core: -I irrt/ & #include absolute paths

This commit is contained in:
lyken 2024-07-14 01:46:54 +08:00
parent 2f7e75d7cf
commit 23ed5642fb
11 changed files with 24 additions and 20 deletions

View File

@ -46,6 +46,8 @@ fn compile_irrt_cpp() {
"-Wall", "-Wall",
"-Wextra", "-Wextra",
"-Werror=return-type", "-Werror=return-type",
"-I",
irrt_dir.to_str().unwrap(),
"-o", "-o",
"-", "-",
irrt_cpp_path.to_str().unwrap(), irrt_cpp_path.to_str().unwrap(),
@ -133,6 +135,8 @@ fn compile_irrt_test_cpp() {
"-Wextra", "-Wextra",
"-Werror=return-type", "-Werror=return-type",
"-lm", // for `tgamma()`, `lgamma()` "-lm", // for `tgamma()`, `lgamma()`
"-I",
irrt_dir.to_str().unwrap(),
"-o", "-o",
exe_path.to_str().unwrap(), exe_path.to_str().unwrap(),
]; ];

View File

@ -1,5 +1,5 @@
#define IRRT_DEFINE_TYPEDEF_INTS #define IRRT_DEFINE_TYPEDEF_INTS
#include "irrt_everything.hpp" #include <irrt_everything.hpp>
/* /*
All IRRT implementations. All IRRT implementations.

View File

@ -1,7 +1,7 @@
#pragma once #pragma once
#include "utils.hpp" #include <irrt/utils.hpp>
#include "int_defs.hpp" #include <irrt/int_defs.hpp>
// NDArray indices are always `uint32_t`. // NDArray indices are always `uint32_t`.
using NDIndex = uint32_t; using NDIndex = uint32_t;

View File

@ -1,7 +1,7 @@
#pragma once #pragma once
#include "int_defs.hpp" #include <irrt/int_defs.hpp>
#include "utils.hpp" #include <irrt/utils.hpp>
namespace { namespace {
// nac3core's "str" struct type definition // nac3core's "str" struct type definition

View File

@ -1,6 +1,6 @@
#pragma once #pragma once
#include "int_defs.hpp" #include <irrt/int_defs.hpp>
namespace { namespace {
namespace string { namespace string {

View File

@ -1,6 +1,6 @@
#pragma once #pragma once
#include "int_defs.hpp" #include <irrt/int_defs.hpp>
namespace { namespace {
template <typename T> template <typename T>

View File

@ -1,6 +1,6 @@
#pragma once #pragma once
#include "irrt/core.hpp" #include <irrt/core.hpp>
#include "irrt/error_context.hpp" #include <irrt/error_context.hpp>
#include "irrt/int_defs.hpp" #include <irrt/int_defs.hpp>
#include "irrt/utils.hpp" #include <irrt/utils.hpp>

View File

@ -5,11 +5,11 @@
#include <cstdio> #include <cstdio>
#include <cstdlib> #include <cstdlib>
#include "irrt_everything.hpp" #include <irrt_everything.hpp>
#include "test/core.hpp" #include <test/core.hpp>
#include "test/test_core.hpp" #include <test/test_core.hpp>
#include "test/test_utils.hpp" #include <test/test_utils.hpp>
int main() { int main() {
run_test_core(); run_test_core();

View File

@ -6,7 +6,7 @@
#include <cstdio> #include <cstdio>
#include <cstdlib> #include <cstdlib>
#include "print.hpp" #include <test/print.hpp>
// Some utils can be used here // Some utils can be used here
#include "../irrt/utils.hpp" #include "../irrt/utils.hpp"

View File

@ -1,7 +1,7 @@
#pragma once #pragma once
#include "core.hpp" #include <test/core.hpp>
#include "../irrt/core.hpp" #include <irrt/core.hpp>
void test_int_exp() { void test_int_exp() {
BEGIN_TEST(); BEGIN_TEST();

View File

@ -1,7 +1,7 @@
#pragma once #pragma once
#include "core.hpp" #include <test/core.hpp>
#include "../irrt/utils.hpp" #include <irrt/utils.hpp>
void test_int_log_10() { void test_int_log_10() {
BEGIN_TEST(); BEGIN_TEST();