SET(CATCH_INSTALL_DOCS OFF CACHE BOOL "")
SET(CATCH_INSTALL_EXTRAS OFF CACHE BOOL "")
SET(CATCH_BUILD_STATIC_LIBRARY ON CACHE BOOL "")
SET(CATCH_BUILD_EXAMPLES OFF CACHE BOOL "")

FetchContent_Declare(
  LIBCATCH2
  GIT_REPOSITORY https://hub.fastgit.org/catchorg/Catch2.git
  GIT_TAG        v2.13.7
  GIT_SHALLOW    TRUE

  CMAKE_CACHE_ARGS
  -DCMAKE_INSTALL_PREFIX:STRING=${CMAKE_BINARY_DIR}/3rdparty/
  -DCMAKE_CXX_FLAGS:STRING=${BUILD_WITHOUT_CXX11_FLAGS}
  -DCATCH_BUILD_STATIC_LIBRARY:BOOL=ON
  -DCATCH_BUILD_EXAMPLES:BOOL=OFF
  -DBUILD_TESTING:BOOL=OFF
)
FetchContent_MakeAvailable(LIBCATCH2)