From 691511e97541d46035119a42f902dfec98f48875 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adri=C3=A1n=20Insaurralde=20Avalos?= Date: Thu, 1 Feb 2024 12:43:41 -0300 Subject: [PATCH] Test: build Mod test only if the module is being built --- tests/CMakeLists.txt | 21 ++++++++++++++++----- tests/src/Mod/CMakeLists.txt | 20 +++++++++++++++----- 2 files changed, 31 insertions(+), 10 deletions(-) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 463aaf8f28..f01639d7bd 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -76,13 +76,24 @@ endfunction() set(TestExecutables Tests_run - Material_tests_run - Mesh_tests_run - Part_tests_run - Points_tests_run - Sketcher_tests_run ) +if(BUILD_MATERIAL) + list (APPEND TestExecutables Material_tests_run) +endif(BUILD_MATERIAL) +if(BUILD_MESH) + list (APPEND TestExecutables Mesh_tests_run) +endif(BUILD_MESH) +if(BUILD_PART) + list (APPEND TestExecutables Part_tests_run) +endif(BUILD_PART) +if(BUILD_POINTS) + list (APPEND TestExecutables Points_tests_run) +endif(BUILD_POINTS) +if(BUILD_SKETCHER) + list (APPEND TestExecutables Sketcher_tests_run) +endif(BUILD_SKETCHER) + # ------------------------- foreach (exe ${TestExecutables}) diff --git a/tests/src/Mod/CMakeLists.txt b/tests/src/Mod/CMakeLists.txt index 0d12ca7606..597d6e878a 100644 --- a/tests/src/Mod/CMakeLists.txt +++ b/tests/src/Mod/CMakeLists.txt @@ -1,5 +1,15 @@ -add_subdirectory(Material) -add_subdirectory(Mesh) -add_subdirectory(Part) -add_subdirectory(Points) -add_subdirectory(Sketcher) +if(BUILD_MATERIAL) + add_subdirectory(Material) +endif(BUILD_MATERIAL) +if(BUILD_MESH) + add_subdirectory(Mesh) +endif(BUILD_MESH) +if(BUILD_PART) + add_subdirectory(Part) +endif(BUILD_PART) +if(BUILD_POINTS) + add_subdirectory(Points) +endif(BUILD_POINTS) +if(BUILD_SKETCHER) + add_subdirectory(Sketcher) +endif(BUILD_SKETCHER)