From 23dd0647b845e27de399dd279dc3c5c9c5ed35fc Mon Sep 17 00:00:00 2001 From: Mathias Preiner Date: Fri, 11 Mar 2022 19:54:49 -0800 Subject: [PATCH] cmake: Do not require googletest if unit tests are disabled. (#8271) Fixes #8088 --- test/CMakeLists.txt | 4 +++- test/unit/CMakeLists.txt | 28 ++++++++++++---------------- 2 files changed, 15 insertions(+), 17 deletions(-) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index feafc418a..7bfa515da 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -38,4 +38,6 @@ add_custom_target(check add_subdirectory(regress) add_subdirectory(api EXCLUDE_FROM_ALL) add_subdirectory(binary EXCLUDE_FROM_ALL) -add_subdirectory(unit EXCLUDE_FROM_ALL) +if(ENABLE_UNIT_TESTING) + add_subdirectory(unit EXCLUDE_FROM_ALL) +endif() diff --git a/test/unit/CMakeLists.txt b/test/unit/CMakeLists.txt index 1fbaf5ba2..0dc902f13 100644 --- a/test/unit/CMakeLists.txt +++ b/test/unit/CMakeLists.txt @@ -91,20 +91,16 @@ macro(cvc5_add_unit_test_white name output_dir) cvc5_add_unit_test(TRUE ${name} ${output_dir}) endmacro() -# API black box unit tests are always enabled add_subdirectory(api) - -if(ENABLE_UNIT_TESTING) - add_subdirectory(base) - add_subdirectory(context) - add_subdirectory(main) - add_subdirectory(node) - add_subdirectory(options) - add_subdirectory(parser) - add_subdirectory(printer) - add_subdirectory(proof) - add_subdirectory(prop) - add_subdirectory(theory) - add_subdirectory(preprocessing) - add_subdirectory(util) -endif() +add_subdirectory(base) +add_subdirectory(context) +add_subdirectory(main) +add_subdirectory(node) +add_subdirectory(options) +add_subdirectory(parser) +add_subdirectory(printer) +add_subdirectory(proof) +add_subdirectory(prop) +add_subdirectory(theory) +add_subdirectory(preprocessing) +add_subdirectory(util) -- 2.30.2