From 68e22b87d9776d136c6ba69cc55fa43c59967bb6 Mon Sep 17 00:00:00 2001 From: Christopher Howard <45762860+topherocity@users.noreply.github.com> Date: Sat, 4 Jun 2022 18:31:09 -0400 Subject: [PATCH] Fix fetch method causing test-drive tests to be included in CTest list (#18) --- CMakeLists.txt | 6 ++++-- config/CMakeLists.txt | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ba27141..2a8f0ac 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -96,5 +96,7 @@ install( ) # add the testsuite -enable_testing() -add_subdirectory("test") +include(CTest) +if(BUILD_TESTING AND TEST_DRIVE_BUILD_TESTING) + add_subdirectory("test") +endif() diff --git a/config/CMakeLists.txt b/config/CMakeLists.txt index d8fe100..e4bc2df 100644 --- a/config/CMakeLists.txt +++ b/config/CMakeLists.txt @@ -12,6 +12,7 @@ # limitations under the License. option(BUILD_SHARED_LIBS "Whether the libraries built should be shared" FALSE) +option(TEST_DRIVE_BUILD_TESTING "Enable testing for this project" ON) set( module-dir