Add dynamic catch 2 install
This commit is contained in:
parent
242d0ec09f
commit
2e0cb27987
1 changed files with 9 additions and 1 deletions
|
|
@ -54,7 +54,15 @@ endif()
|
|||
|
||||
if(WARPPIPE_BUILD_TESTS)
|
||||
enable_testing()
|
||||
find_package(Catch2 3 REQUIRED)
|
||||
find_package(Catch2 3 QUIET)
|
||||
if(NOT Catch2_FOUND)
|
||||
FetchContent_Declare(Catch2
|
||||
GIT_REPOSITORY https://github.com/catchorg/Catch2.git
|
||||
GIT_TAG v3.5.2
|
||||
)
|
||||
FetchContent_MakeAvailable(Catch2)
|
||||
list(APPEND CMAKE_MODULE_PATH ${catch2_SOURCE_DIR}/extras)
|
||||
endif()
|
||||
add_executable(warppipe_tests tests/warppipe_tests.cpp)
|
||||
target_link_libraries(warppipe_tests PRIVATE warppipe Catch2::Catch2WithMain)
|
||||
target_compile_definitions(warppipe PRIVATE WARPPIPE_TESTING)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue