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
     1.1 --- a/test/CMakeLists.txt	Sat Apr 16 08:49:31 2022 +0200
     1.2 +++ b/test/CMakeLists.txt	Sat Apr 16 08:58:27 2022 +0200
     1.3 @@ -38,12 +38,9 @@
     1.4  include(GoogleTest)
     1.5  message(STATUS "Google Test made available")
     1.6  
     1.7 -set(TESTS
     1.8 -        selftest
     1.9 -        test_allocator
    1.10 +add_executable(ucxtest
    1.11 +        test_allocator.cpp
    1.12 +        selftest.cpp
    1.13          )
    1.14 -foreach (test ${TESTS})
    1.15 -    add_executable(${test} ${test}.cpp)
    1.16 -    target_link_libraries(${test} PRIVATE ucx_static gtest_main)
    1.17 -    gtest_discover_tests(${test})
    1.18 -endforeach ()
    1.19 +target_link_libraries(ucxtest PRIVATE ucx_static gtest_main)
    1.20 +gtest_discover_tests(ucxtest)

mercurial