summaryrefslogtreecommitdiffstats
path: root/src/spawn/test/CMakeLists.txt
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 18:45:59 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 18:45:59 +0000
commit19fcec84d8d7d21e796c7624e521b60d28ee21ed (patch)
tree42d26aa27d1e3f7c0b8bd3fd14e7d7082f5008dc /src/spawn/test/CMakeLists.txt
parentInitial commit. (diff)
downloadceph-19fcec84d8d7d21e796c7624e521b60d28ee21ed.tar.xz
ceph-19fcec84d8d7d21e796c7624e521b60d28ee21ed.zip
Adding upstream version 16.2.11+ds.upstream/16.2.11+dsupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/spawn/test/CMakeLists.txt')
-rw-r--r--src/spawn/test/CMakeLists.txt29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/spawn/test/CMakeLists.txt b/src/spawn/test/CMakeLists.txt
new file mode 100644
index 000000000..a6ef136da
--- /dev/null
+++ b/src/spawn/test/CMakeLists.txt
@@ -0,0 +1,29 @@
+add_subdirectory(dependency)
+
+add_library(test_base INTERFACE)
+target_link_libraries(test_base INTERFACE gtest_main)
+
+# all warnings as errors
+if(MSVC)
+ target_compile_options(test_base INTERFACE /W4 /WX)
+else(MSVC)
+ target_compile_options(test_base INTERFACE -Wall -Wextra -Werror)
+endif(MSVC)
+
+if(SPAWN_TEST_ADDRESS_SANITIZER)
+ # add address sanitizier
+ target_compile_options(test_base INTERFACE "-fsanitize=address")
+ target_link_libraries(test_base INTERFACE "-fsanitize=address")
+endif()
+
+add_executable(test_async_result test_async_result.cc)
+target_link_libraries(test_async_result test_base spawn)
+add_test(test_async_result test_async_result)
+
+add_executable(test_spawn test_spawn.cc)
+target_link_libraries(test_spawn test_base spawn)
+add_test(test_spawn test_spawn)
+
+add_executable(test_exception test_exception.cc)
+target_link_libraries(test_exception test_base spawn)
+add_test(test_exception test_exception)