commit 7e92ba1b6f4a547ee730abd99fc9494bcb0c879e parent 84f645f0439c2435c810cb7d4535808eda3439d8 Author: Christophe Coustet <christophe.coustet@meso-star.com> Date: Tue, 23 Jun 2020 11:25:48 +0200 Build optional tests even if not active Diffstat:
| M | cmake/CMakeLists.txt | | | 29 | +++++++++++++---------------- |
1 file changed, 13 insertions(+), 16 deletions(-)
diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt @@ -36,9 +36,6 @@ find_package(OpenMP 2.0 REQUIRED) if(NOT NO_TEST) find_package(StarSP 0.7 REQUIRED) -endif() - -if(HUGE_ADDITIONAL_TESTS) find_package(Star3DUT 0.3.1 REQUIRED) endif() @@ -56,12 +53,10 @@ else() include_directories( ${RSys_INCLUDE_DIR} ${Star3D_INCLUDE_DIR} - ${Star3DUT_INCLUDE_DIR} - ${StarSP_INCLUDE_DIR}) + ${StarSP_INCLUDE_DIR} + ${Star3DUT_INCLUDE_DIR}) - if(HUGE_ADDITIONAL_TESTS) - rcmake_append_runtime_dirs(_runtime_dirs RSys StarSP Star3DUT Star3D) - endif() + rcmake_append_runtime_dirs(_runtime_dirs RSys StarSP Star3DUT Star3D) endif() ############################################################################### @@ -166,21 +161,23 @@ if(NOT NO_TEST) new_test(test_senc3d_some_triangles) new_test(test_senc3d_unspecified_medium) + build_test(test_senc3d_many_enclosures test_senc3d_utils2.h) + build_test(test_senc3d_many_triangles test_senc3d_utils2.h) + target_link_libraries(test_senc3d_enclosure Star3D) target_link_libraries(test_senc3d_sample_enclosure StarSP Star3D) + target_link_libraries(test_senc3d_many_enclosures Star3DUT) + target_link_libraries(test_senc3d_many_triangles Star3DUT) rcmake_copy_runtime_libraries(test_senc3d_sample_enclosure) + rcmake_copy_runtime_libraries(test_senc3d_many_enclosures) + rcmake_copy_runtime_libraries(test_senc3d_many_triangles) if(HUGE_ADDITIONAL_TESTS) - new_test(test_senc3d_many_enclosures test_senc3d_utils2.h) - new_test(test_senc3d_many_triangles test_senc3d_utils2.h) - - target_link_libraries(test_senc3d_many_enclosures Star3DUT) - target_link_libraries(test_senc3d_many_triangles Star3DUT) - - rcmake_copy_runtime_libraries(test_senc3d_many_enclosures) - rcmake_copy_runtime_libraries(test_senc3d_many_triangles) + add_test(test_senc3d_many_enclosures test_senc3d_many_enclosures) + add_test(test_senc3d_many_triangles test_senc3d_many_triangles) endif() + endif() ###############################################################################