cmake: Do not require googletest if unit tests are disabled. (#8271)
authorMathias Preiner <mathias.preiner@gmail.com>
Sat, 12 Mar 2022 03:54:49 +0000 (19:54 -0800)
committerGitHub <noreply@github.com>
Sat, 12 Mar 2022 03:54:49 +0000 (03:54 +0000)
Fixes #8088

test/CMakeLists.txt
test/unit/CMakeLists.txt

index feafc418afe342684f5de9001f12eeb11112eaf0..7bfa515dab9e95d88cf2fe31124518f43bdf6dd7 100644 (file)
@@ -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()
index 1fbaf5ba2fc1a5cdcc3e1c9473f53311ee6b2c12..0dc902f13d7c26454ec2f74330b60500e790b5f2 100644 (file)
@@ -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)