Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# @author Oliver Thomson Brown
# @author Tyson Jones (patched MSVC and test discovery)

add_executable(tests
main.cpp
Expand All @@ -19,5 +20,5 @@ if (QUEST_ENABLE_DEPRECATED_API)
add_subdirectory(deprecated)
endif()

# let Catch2 register all tests with CTest
catch_discover_tests(tests)
# defer test discovery, so that (e.g.) MPI libs aren't loaded during build
catch_discover_tests(tests DISCOVERY_MODE PRE_TEST)
3 changes: 2 additions & 1 deletion tests/deprecated/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# @author Oliver Thomson Brown
# @author Erich Essmann (patched MPI)
# @author Tyson Jones (deferred test discovery)

add_executable(dep_tests
test_main.cpp
Expand All @@ -18,4 +19,4 @@ if (QUEST_ENABLE_MPI)
target_link_libraries(dep_tests PRIVATE MPI::MPI_CXX)
endif()

catch_discover_tests(dep_tests)
catch_discover_tests(dep_tests DISCOVERY_MODE PRE_TEST)
Loading