From c6d311128ed1b746c1a67fa3d5e3938ba53130b8 Mon Sep 17 00:00:00 2001 From: szdytom Date: Wed, 6 Aug 2025 12:27:38 +0800 Subject: [PATCH] fix: install catch2 only with BUILD_TESTS enabled Signed-off-by: szdytom --- third_party/catch2.cmake | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/third_party/catch2.cmake b/third_party/catch2.cmake index e374917..70a0068 100644 --- a/third_party/catch2.cmake +++ b/third_party/catch2.cmake @@ -2,6 +2,8 @@ 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( @@ -10,3 +12,5 @@ FetchContent_Declare( ) FetchContent_MakeAvailable(Catch2) message(STATUS "Catch2 ready") + +endif()