From ee8999c1274a0597e3c3cf2dd5f8d0bd6e38bb0a Mon Sep 17 00:00:00 2001 From: pantor Date: Sat, 5 Oct 2024 09:46:42 +0200 Subject: [PATCH] fix test include directory, resolves #276 --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index df8db81e..5bf91de4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -84,6 +84,7 @@ if(BUILD_TESTING AND INJA_BUILD_TESTS) add_executable(inja_test test/test.cpp) target_link_libraries(inja_test PRIVATE inja) + target_include_directories(inja_test PRIVATE include third_party/include) add_test(inja_test ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/inja_test) if(MSVC) @@ -95,10 +96,11 @@ if(BUILD_TESTING AND INJA_BUILD_TESTS) add_library(single_inja INTERFACE) target_compile_features(single_inja INTERFACE cxx_std_17) - target_include_directories(single_inja INTERFACE single_include include third_party/include) + target_include_directories(single_inja INTERFACE single_include) add_executable(single_inja_test test/test.cpp) target_link_libraries(single_inja_test PRIVATE single_inja) + target_include_directories(single_inja_test PRIVATE include third_party/include) add_test(single_inja_test ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/single_inja_test) endif()