diff --git a/.gitmodules b/.gitmodules index f760c09f..25980054 100644 --- a/.gitmodules +++ b/.gitmodules @@ -64,3 +64,6 @@ [submodule "third_party/nihstro"] path = third_party/nihstro url = https://github.com/neobrain/nihstro.git +[submodule "third_party/Catch2"] + path = third_party/Catch2 + url = https://github.com/catchorg/Catch2.git diff --git a/CMakeLists.txt b/CMakeLists.txt index 8c5a8305..629601ab 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -525,7 +525,11 @@ endif() if(ENABLE_TESTS) enable_testing() - find_package(Catch2 3 REQUIRED) + find_package(Catch2 3) + if(NOT Catch2_FOUND) + add_subdirectory(third_party/Catch2) + endif() + add_library(nihstro-headers INTERFACE) target_include_directories(nihstro-headers SYSTEM INTERFACE ./third_party/nihstro/include) diff --git a/third_party/Catch2 b/third_party/Catch2 new file mode 160000 index 00000000..4acc5182 --- /dev/null +++ b/third_party/Catch2 @@ -0,0 +1 @@ +Subproject commit 4acc51828f7f93f3b2058a63f54d112af4034503