abacus: fix include directories
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:
Bruno BELANYI 2021-09-01 19:42:58 +02:00
parent eb9295cfcd
commit 171ef10a6d
7 changed files with 8 additions and 9 deletions

View file

@ -10,6 +10,9 @@ target_compile_options(common_options INTERFACE
-Wall
-Wextra
)
target_include_directories(common_options INTERFACE
src
)
add_subdirectory(src)
add_subdirectory(tests)

View file

@ -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() {
abacus::parse::ParserDriver driver{};

View file

@ -3,7 +3,3 @@ add_library(bignum STATIC
bignum.hh
)
target_link_libraries(bignum PRIVATE common_options)
target_include_directories(bignum PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
)

View file

@ -18,6 +18,6 @@ target_link_libraries(parse PRIVATE
)
target_include_directories(parse PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
)

View file

@ -4,7 +4,7 @@
#include "parser.hh"
#include "bignum.hh" // FIXME: I would like `bignum/bignum.hh` path instead...
#include "bignum/bignum.hh"
namespace abacus::parse {

View file

@ -36,7 +36,7 @@ namespace abacus::parse {
class ParserDriver;
} // namespace abacus::parse
#include "bignum.hh" // FIXME: I would like `bignum/bignum.hh` path instead...
#include "bignum/bignum.hh"
}
%code provides {

View file

@ -2,7 +2,7 @@
#include <gtest/gtest.h>
#include "bignum.hh"
#include "bignum/bignum.hh"
using namespace abacus::bignum;