1
0
Fork 0
raii-safe-cuda/tests/CMakeLists.txt

27 lines
696 B
CMake

project(testsRaiiSafeCuda CXX)
find_package(Catch2 3)
if (NOT Catch2_FOUND)
message(STATUS "Using FetchContent to download and use Catch2")
include(FetchContent)
fetchcontent_declare(
Catch2
GIT_REPOSITORY https://github.com/catchorg/Catch2
GIT_TAG v3.5.3
EXCLUDE_FROM_ALL
OVERRIDE_FIND_PACKAGE
)
fetchcontent_makeavailable(Catch2)
find_package(Catch2 3 REQUIRED)
endif ()
include(CTest)
enable_testing()
include(Catch)
include(CatchAddTests)
add_executable(tests tests_stream.cpp)
target_link_libraries(tests Catch2::Catch2WithMain)
catch_discover_tests(tests WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})