cmake: Add target units.
authorAina Niemetz <aina.niemetz@gmail.com>
Fri, 17 Aug 2018 18:37:27 +0000 (11:37 -0700)
committerMathias Preiner <mathias.preiner@gmail.com>
Sat, 22 Sep 2018 23:30:59 +0000 (16:30 -0700)
test/unit/CMakeLists.txt
test/unit/base/CMakeLists.txt [new file with mode: 0644]
test/unit/preprocessing/CMakeLists.txt [new file with mode: 0644]

index 089e263036f0237399f7db48d1e7bcec622b531a..57a50f52ece1a3bb760b7f8cb2920b562966143e 100644 (file)
@@ -10,6 +10,7 @@ set(CVC4_CXXTEST_FLAGS_WHITE -fno-access-control ${CVC4_CXXTEST_FLAGS_BLACK})
 
 macro(cvc4_add_unit_test is_white name)
   cxxtest_add_test(${name} ${name}.cpp ${CMAKE_CURRENT_LIST_DIR}/${name}.h)
+  set_tests_properties(${name} PROPERTIES LABELS "unit")
   target_link_libraries(${name} main)
   target_compile_definitions(${name} PRIVATE ${CVC4_CXXTEST_FLAGS_BLACK})
   if(${is_white})
@@ -32,3 +33,5 @@ add_subdirectory(parser)
 add_subdirectory(prop)
 add_subdirectory(theory)
 add_subdirectory(util)
+
+add_custom_target(units COMMAND ctest -L "unit")
diff --git a/test/unit/base/CMakeLists.txt b/test/unit/base/CMakeLists.txt
new file mode 100644 (file)
index 0000000..4c2a051
--- /dev/null
@@ -0,0 +1 @@
+cvc4_add_unit_test_black(map_util_black)
diff --git a/test/unit/preprocessing/CMakeLists.txt b/test/unit/preprocessing/CMakeLists.txt
new file mode 100644 (file)
index 0000000..fdd32be
--- /dev/null
@@ -0,0 +1 @@
+cvc4_add_unit_test_white(pass_bv_gauss_white)