diff --git a/CMakeLists.txt b/CMakeLists.txt index df1433f75d3..ff27dc41462 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -58,9 +58,19 @@ if(OSSIA_TESTING) target_link_libraries(Catch2WithMain INTERFACE Catch2::Catch2) endif() else() + set(CATCH_INSTALL_DOCS 0) + set(CATCH_INSTALL_DOCS 0 CACHE INTERNAL "" FORCE) + set(CATCH_INSTALL_EXTRAS 0) + set(CATCH_INSTALL_EXTRAS 0 CACHE INTERNAL "" FORCE) + set(CATCH_BUILD_TESTING 0) + set(CATCH_BUILD_TESTING 0 CACHE INTERNAL "" FORCE) set(CATCH_BUILD_STATIC_LIBRARY 1) set(CATCH_BUILD_STATIC_LIBRARY 1 CACHE INTERNAL "" FORCE) + + set(old_BUILD_SHARED_LIBS "${BUILD_SHARED_LIBS}") + set(BUILD_SHARED_LIBS 0) add_subdirectory(3rdparty/Catch2) + set(BUILD_SHARED_LIBS "${old_BUILD_SHARED_LIBS}") endif() add_subdirectory(tests) endif()