From b2232e273a5d3acb525240b6e684a5e634732ed3 Mon Sep 17 00:00:00 2001 From: Dmytro Bogovych Date: Tue, 22 Apr 2025 11:07:36 +0300 Subject: [PATCH] - fix CMakeLists to reduce default build time --- CMakeLists.txt | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4ef39e5..217714f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,4 @@ -# 3.5 is actually available almost everywhere, but this a good minimum -cmake_minimum_required(VERSION 3.4) +cmake_minimum_required(VERSION 3.20) # enable MSVC_RUNTIME_LIBRARY target property # see https://cmake.org/cmake/help/latest/policy/CMP0091.html @@ -17,9 +16,9 @@ include(CTest) find_program(YAML_CPP_CLANG_FORMAT_EXE NAMES clang-format) -option(YAML_CPP_BUILD_CONTRIB "Enable yaml-cpp contrib in library" ON) -option(YAML_CPP_BUILD_TOOLS "Enable parse tools" ON) -option(YAML_BUILD_SHARED_LIBS "Build yaml-cpp shared library" ${BUILD_SHARED_LIBS}) +option(YAML_CPP_BUILD_CONTRIB "Enable yaml-cpp contrib in library" OFF) +option(YAML_CPP_BUILD_TOOLS "Enable parse tools" OFF) +option(YAML_BUILD_SHARED_LIBS "Build yaml-cpp shared library" OFF) cmake_dependent_option(YAML_CPP_BUILD_TESTS "Enable yaml-cpp tests" ON @@ -158,13 +157,6 @@ if (YAML_CPP_INSTALL) DESTINATION ${CMAKE_INSTALL_DATADIR}/pkgconfig) endif() -if(YAML_CPP_BUILD_TESTS) - add_subdirectory(test) -endif() - -if(YAML_CPP_BUILD_TOOLS) - add_subdirectory(util) -endif() if (YAML_CPP_CLANG_FORMAT_EXE) add_custom_target(format