instructed/third_party/catch2.cmake
szdytom c6d311128e
fix: install catch2 only with BUILD_TESTS enabled
Signed-off-by: szdytom <szdytom@qq.com>
2025-08-06 12:27:38 +08:00

17 lines
357 B
CMake

cmake_minimum_required(VERSION 3.27)
cmake_policy(VERSION 3.27)
include(FetchContent)
IF(BUILD_TESTS)
# Catch2 third-party library setup
message(STATUS "Downloading Catch2...")
FetchContent_Declare(
Catch2
URL "https://github.com/catchorg/Catch2/archive/refs/tags/v3.9.0.zip"
)
FetchContent_MakeAvailable(Catch2)
message(STATUS "Catch2 ready")
endif()