abacus: fix include directories
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This cleans up one of my major pain points with the Meson way of doing things. The Meson solution to have nice includes would have been to create an `include/<name>` directory per library I create...
This commit is contained in:
parent
eb9295cfcd
commit
171ef10a6d
|
@ -10,6 +10,9 @@ target_compile_options(common_options INTERFACE
|
||||||
-Wall
|
-Wall
|
||||||
-Wextra
|
-Wextra
|
||||||
)
|
)
|
||||||
|
target_include_directories(common_options INTERFACE
|
||||||
|
src
|
||||||
|
)
|
||||||
|
|
||||||
add_subdirectory(src)
|
add_subdirectory(src)
|
||||||
add_subdirectory(tests)
|
add_subdirectory(tests)
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#include "parser-driver.hh" // FIXME: I would like `parse/parser-driver.hh` path instead...
|
#include "parse/parser-driver.hh"
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
abacus::parse::ParserDriver driver{};
|
abacus::parse::ParserDriver driver{};
|
||||||
|
|
|
@ -3,7 +3,3 @@ add_library(bignum STATIC
|
||||||
bignum.hh
|
bignum.hh
|
||||||
)
|
)
|
||||||
target_link_libraries(bignum PRIVATE common_options)
|
target_link_libraries(bignum PRIVATE common_options)
|
||||||
|
|
||||||
target_include_directories(bignum PUBLIC
|
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
|
||||||
)
|
|
||||||
|
|
|
@ -18,6 +18,6 @@ target_link_libraries(parse PRIVATE
|
||||||
)
|
)
|
||||||
|
|
||||||
target_include_directories(parse PUBLIC
|
target_include_directories(parse PUBLIC
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>
|
||||||
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
||||||
)
|
)
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
#include "parser.hh"
|
#include "parser.hh"
|
||||||
|
|
||||||
#include "bignum.hh" // FIXME: I would like `bignum/bignum.hh` path instead...
|
#include "bignum/bignum.hh"
|
||||||
|
|
||||||
namespace abacus::parse {
|
namespace abacus::parse {
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@ namespace abacus::parse {
|
||||||
class ParserDriver;
|
class ParserDriver;
|
||||||
} // namespace abacus::parse
|
} // namespace abacus::parse
|
||||||
|
|
||||||
#include "bignum.hh" // FIXME: I would like `bignum/bignum.hh` path instead...
|
#include "bignum/bignum.hh"
|
||||||
}
|
}
|
||||||
|
|
||||||
%code provides {
|
%code provides {
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
|
|
||||||
#include "bignum.hh"
|
#include "bignum/bignum.hh"
|
||||||
|
|
||||||
using namespace abacus::bignum;
|
using namespace abacus::bignum;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue