diff --git a/CMakeLists.txt b/CMakeLists.txt index 79ae778..3d920c2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -65,7 +65,9 @@ else() message(STATUS "HDF5 not enabled. Turning it off in spiner") set(SPINER_USE_HDF OFF CACHE BOOL "") endif() -add_subdirectory(utils/spiner) +if (NOT TARGET spiner::spiner) + add_subdirectory(utils/spiner) +endif() target_link_libraries(singularity-opac::flags INTERFACE spiner) include(GNUInstallDirs) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 27c4eee..29d86ae 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -21,8 +21,10 @@ if(NOT Catch2_FOUND) GIT_REPOSITORY https://github.com/catchorg/Catch2.git GIT_TAG v2.13.10) FetchContent_MakeAvailable(Catch2) - list(APPEND CMAKE_MODULE_PATH ${Catch2_SOURCE_DIR}/contrib) endif() +# TODO(JMM) This is gross and bad. Fix when we update to catch2/v3 +list(APPEND CMAKE_MODULE_PATH ${Catch2_SOURCE_DIR}/contrib) +list(APPEND CMAKE_MODULE_PATH ${Catch2_SOURCE_DIR}/extras) # Build tests message(STATUS "Configuring unit tests")