aboutsummaryrefslogtreecommitdiff
path: root/test/CMakeLists.txt
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2023-10-07 17:42:22 +0800
committercrupest <crupest@outlook.com>2023-10-07 17:42:22 +0800
commit922619988d0392d365bc48767183a218baf0def9 (patch)
tree146cd0f75bc24d0f6f0f1b8c11b9318ef8db9645 /test/CMakeLists.txt
parentae2ae81374792cb78259104b9cbc3e0fef5e6471 (diff)
downloadcru-922619988d0392d365bc48767183a218baf0def9.tar.gz
cru-922619988d0392d365bc48767183a218baf0def9.tar.bz2
cru-922619988d0392d365bc48767183a218baf0def9.zip
Recover build. Remove test discovery in emscripten.
Diffstat (limited to 'test/CMakeLists.txt')
-rw-r--r--test/CMakeLists.txt14
1 files changed, 13 insertions, 1 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index c4133193..10ab323e 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -1,7 +1,19 @@
include(Catch)
add_library(CruTestBase INTERFACE)
-target_link_libraries(CruTestBase INTERFACE Catch2::Catch2WithMain)
+if (EMSCRIPTEN)
+ target_link_libraries(CruTestBase INTERFACE Catch2::Catch2)
+else()
+ target_link_libraries(CruTestBase INTERFACE Catch2::Catch2WithMain)
+endif()
+
+function(cru_catch_discover_tests target)
+ if (EMSCRIPTEN)
+ message("Emscripten, not do catch_discover_tests for " target)
+ else()
+ catch_discover_tests(target)
+ endif()
+endfunction()
add_subdirectory(common)
add_subdirectory(platform)