From 73b537f6c356ea9a5a24d14d2a830ebd2dc26a29 Mon Sep 17 00:00:00 2001 From: Richard Berger Date: Thu, 21 May 2020 15:02:37 -0400 Subject: [PATCH] Make sure include directories are passed to test binaries --- unittest/force-styles/CMakeLists.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/unittest/force-styles/CMakeLists.txt b/unittest/force-styles/CMakeLists.txt index 9062f4260f..e3ca515d09 100644 --- a/unittest/force-styles/CMakeLists.txt +++ b/unittest/force-styles/CMakeLists.txt @@ -8,11 +8,11 @@ endif() set(TEST_INPUT_FOLDER ${CMAKE_CURRENT_SOURCE_DIR}/tests) add_library(style_tests STATIC yaml_writer.cpp error_stats.cpp test_config_reader.cpp test_main.cpp) target_compile_definitions(style_tests PRIVATE TEST_INPUT_FOLDER=${TEST_INPUT_FOLDER}) -target_link_libraries(style_tests PRIVATE MPI::MPI_CXX Yaml::Yaml) +target_link_libraries(style_tests PUBLIC GTest::GTest GTest::GMock MPI::MPI_CXX Yaml::Yaml) # pair style tester add_executable(pair_style pair_style.cpp) -target_link_libraries(pair_style PRIVATE lammps GTest::GTest GTest::GMock style_tests) +target_link_libraries(pair_style PRIVATE lammps style_tests) # tests for a molecular systems and related pair styles file(GLOB MOL_PAIR_TESTS LIST_DIRECTORIES false ${TEST_INPUT_FOLDER}/mol-pair-*.yaml) @@ -33,7 +33,7 @@ endforeach() # bond style tester add_executable(bond_style bond_style.cpp) -target_link_libraries(bond_style PRIVATE lammps GTest::GTest GTest::GMock style_tests) +target_link_libraries(bond_style PRIVATE lammps style_tests) file(GLOB BOND_TESTS LIST_DIRECTORIES false ${TEST_INPUT_FOLDER}/bond-*.yaml) foreach(TEST ${BOND_TESTS}) @@ -44,7 +44,7 @@ endforeach() # angle style tester add_executable(angle_style angle_style.cpp) -target_link_libraries(angle_style PRIVATE lammps GTest::GTest GTest::GMock style_tests) +target_link_libraries(angle_style PRIVATE lammps style_tests) file(GLOB ANGLE_TESTS LIST_DIRECTORIES false ${TEST_INPUT_FOLDER}/angle-*.yaml) foreach(TEST ${ANGLE_TESTS})