From 6cce85b3a34a4a27d678abf0b4c005a38afd1738 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Sat, 17 Oct 2020 18:38:17 +0300 Subject: cmake: no more target_include_directories hacks --- test/benchmarks/CMakeLists.txt | 1 - test/benchmarks/lexer.cpp | 2 +- test/unit_tests/CMakeLists.txt | 4 ++-- test/unit_tests/lexer.cpp | 10 +++++----- test/unit_tests/parser.cpp | 4 ++-- 5 files changed, 10 insertions(+), 11 deletions(-) (limited to 'test') diff --git a/test/benchmarks/CMakeLists.txt b/test/benchmarks/CMakeLists.txt index 09566cc..340dbcc 100644 --- a/test/benchmarks/CMakeLists.txt +++ b/test/benchmarks/CMakeLists.txt @@ -3,7 +3,6 @@ add_executable(benchmarks ${benchmarks_cpp}) set_target_properties(benchmarks PROPERTIES OUTPUT_NAME math-server-benchmarks) target_link_libraries(benchmarks PRIVATE lexer) -target_include_directories(benchmarks PRIVATE ../..) target_link_libraries(benchmarks PRIVATE benchmark benchmark_main) diff --git a/test/benchmarks/lexer.cpp b/test/benchmarks/lexer.cpp index 5b0612f..f4ee457 100644 --- a/test/benchmarks/lexer.cpp +++ b/test/benchmarks/lexer.cpp @@ -3,7 +3,7 @@ // For details, see https://github.com/egor-tensin/math-server. // Distributed under the MIT License. -#include +#include #include diff --git a/test/unit_tests/CMakeLists.txt b/test/unit_tests/CMakeLists.txt index 5a46f01..d84829d 100644 --- a/test/unit_tests/CMakeLists.txt +++ b/test/unit_tests/CMakeLists.txt @@ -1,9 +1,9 @@ file(GLOB unit_tests_cpp "*.cpp") add_executable(unit_tests ${unit_tests_cpp}) -target_link_libraries(unit_tests PRIVATE lexer parser) -target_include_directories(unit_tests PRIVATE ../..) set_target_properties(unit_tests PROPERTIES OUTPUT_NAME math-server-unit-tests) +target_link_libraries(unit_tests PRIVATE lexer parser) + find_package(Boost REQUIRED COMPONENTS unit_test_framework) target_link_libraries(unit_tests PRIVATE Boost::disable_autolinking Boost::unit_test_framework) diff --git a/test/unit_tests/lexer.cpp b/test/unit_tests/lexer.cpp index 9a3fc26..02e806f 100644 --- a/test/unit_tests/lexer.cpp +++ b/test/unit_tests/lexer.cpp @@ -3,11 +3,11 @@ // For details, see https://github.com/egor-tensin/math-server. // Distributed under the MIT License. -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include diff --git a/test/unit_tests/parser.cpp b/test/unit_tests/parser.cpp index 655ba39..b86d4d4 100644 --- a/test/unit_tests/parser.cpp +++ b/test/unit_tests/parser.cpp @@ -3,8 +3,8 @@ // For details, see https://github.com/egor-tensin/math-server. // Distributed under the MIT License. -#include -#include +#include +#include #include #include -- cgit v1.2.3