From: Mathias Preiner Date: Sat, 12 Mar 2022 03:54:49 +0000 (-0800) Subject: cmake: Do not require googletest if unit tests are disabled. (#8271) X-Git-Tag: cvc5-1.0.0~268 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=23dd064;p=cvc5.git cmake: Do not require googletest if unit tests are disabled. (#8271) Fixes #8088 --- 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)