Add embedded catch2 submodule

Will use the host catch2 if available.
This commit is contained in:
Wunkolo 2024-03-11 14:01:55 -07:00
parent 35414fdf41
commit f0464fee0c
No known key found for this signature in database
3 changed files with 9 additions and 1 deletions

3
.gitmodules vendored
View file

@ -64,3 +64,6 @@
[submodule "third_party/nihstro"] [submodule "third_party/nihstro"]
path = third_party/nihstro path = third_party/nihstro
url = https://github.com/neobrain/nihstro.git url = https://github.com/neobrain/nihstro.git
[submodule "third_party/Catch2"]
path = third_party/Catch2
url = https://github.com/catchorg/Catch2.git

View file

@ -525,7 +525,11 @@ endif()
if(ENABLE_TESTS) if(ENABLE_TESTS)
enable_testing() 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) add_library(nihstro-headers INTERFACE)
target_include_directories(nihstro-headers SYSTEM INTERFACE ./third_party/nihstro/include) target_include_directories(nihstro-headers SYSTEM INTERFACE ./third_party/nihstro/include)

1
third_party/Catch2 vendored Submodule

@ -0,0 +1 @@
Subproject commit 4acc51828f7f93f3b2058a63f54d112af4034503