compile only one single binary for tests

Sat, 16 Apr 2022 08:58:27 +0200

author
Mike Becker <universe@uap-core.de>
date
Sat, 16 Apr 2022 08:58:27 +0200
changeset 512
096d206b63f9
parent 511
a32e6a6b1ca7
child 513
b66532b5d8db

compile only one single binary for tests

test/CMakeLists.txt file | annotate | diff | comparison | revisions
--- a/test/CMakeLists.txt	Sat Apr 16 08:49:31 2022 +0200
+++ b/test/CMakeLists.txt	Sat Apr 16 08:58:27 2022 +0200
@@ -38,12 +38,9 @@
 include(GoogleTest)
 message(STATUS "Google Test made available")
 
-set(TESTS
-        selftest
-        test_allocator
+add_executable(ucxtest
+        test_allocator.cpp
+        selftest.cpp
         )
-foreach (test ${TESTS})
-    add_executable(${test} ${test}.cpp)
-    target_link_libraries(${test} PRIVATE ucx_static gtest_main)
-    gtest_discover_tests(${test})
-endforeach ()
+target_link_libraries(ucxtest PRIVATE ucx_static gtest_main)
+gtest_discover_tests(ucxtest)

mercurial