From 9ae7e1fc45d707e1686dd425a154d30963801944 Mon Sep 17 00:00:00 2001 From: Ilya Lavrenov Date: Fri, 24 May 2024 17:27:29 +0400 Subject: [PATCH] Ability to disable JinjaCpp installation rules (#250) --- CMakeLists.txt | 94 ++++++++++--------- cmake/coverage.cmake | 14 +-- .../patches/0001-fix-skip-install-rules.patch | 25 ----- cmake/public/jinja2cpp-config.cmake.in | 2 +- cmake/sanitizer.cmake | 14 +-- conanfile.txt | 2 +- thirdparty/CMakeLists.txt | 2 +- thirdparty/external_boost_deps.cmake | 61 ++++++------ thirdparty/internal_deps.cmake | 28 +++--- thirdparty/thirdparty-conan-build.cmake | 4 +- thirdparty/thirdparty-external.cmake | 40 ++++---- thirdparty/thirdparty-internal.cmake | 9 +- 12 files changed, 146 insertions(+), 149 deletions(-) delete mode 100644 cmake/patches/0001-fix-skip-install-rules.patch diff --git a/CMakeLists.txt b/CMakeLists.txt index ac3bf552..9c42efcc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,9 @@ cmake_minimum_required(VERSION 3.23.0) + +if(POLICY CMP0135) + cmake_policy(SET CMP0135 NEW) +endif() + project(Jinja2Cpp VERSION 1.3.1) if("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}") @@ -23,6 +28,7 @@ option(JINJA2CPP_STRICT_WARNINGS "Enable additional warnings and treat them as e option(JINJA2CPP_BUILD_SHARED "Build shared linkage version of Jinja2Cpp" OFF) option(JINJA2CPP_PIC "Control -fPIC option for library build" OFF) option(JINJA2CPP_VERBOSE "Add extra debug output to the build scripts" OFF) +option(JINJA2CPP_INSTALL "Add installation rules for JinjaCpp targets" ${JINJA2CPP_IS_MAIN_PROJECT}) if (DEFINED BUILD_SHARED_LIBS) set(JINJA2CPP_BUILD_SHARED ${BUILD_SHARED_LIBS}) @@ -298,51 +304,53 @@ Jinja2CppGetTargetIncludeDir(STRING-VIEW-LITE nonstd::string-view-lite) # We can't use EXPORT feature of 'install' as is due to limitation of subproject's targets installation # So jinja2cpp-config.cmake should be written manually -install( - TARGETS - ${LIB_TARGET_NAME} - EXPORT - InstallTargets - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/static - FILE_SET HEADERS -) +if(JINJA2CPP_INSTALL) + install( + TARGETS + ${LIB_TARGET_NAME} + EXPORT + InstallTargets + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/static + FILE_SET HEADERS + ) -install( - FILES - ${CMAKE_BINARY_DIR}/jinja2cpp.pc - DESTINATION - ${CMAKE_INSTALL_DATAROOTDIR}/pkgconfig -) + install( + FILES + ${CMAKE_BINARY_DIR}/jinja2cpp.pc + DESTINATION + ${CMAKE_INSTALL_DATAROOTDIR}/pkgconfig + ) -install( - EXPORT - InstallTargets - FILE - jinja2cpp-cfg.cmake - DESTINATION - ${JINJA2CPP_INSTALL_CONFIG_DIR} -) + install( + EXPORT + InstallTargets + FILE + jinja2cpp-cfg.cmake + DESTINATION + ${JINJA2CPP_INSTALL_CONFIG_DIR} + ) -configure_package_config_file( - cmake/public/jinja2cpp-config.cmake.in - ${JINJA2CPP_TMP_CONFIG_PATH}/jinja2cpp-config.cmake - INSTALL_DESTINATION ${JINJA2CPP_TMP_CONFIG_PATH} - NO_CHECK_REQUIRED_COMPONENTS_MACRO -) + configure_package_config_file( + cmake/public/jinja2cpp-config.cmake.in + ${JINJA2CPP_TMP_CONFIG_PATH}/jinja2cpp-config.cmake + INSTALL_DESTINATION ${JINJA2CPP_TMP_CONFIG_PATH} + NO_CHECK_REQUIRED_COMPONENTS_MACRO + ) -configure_package_config_file( - cmake/public/jinja2cpp-config-deps-${JINJA2CPP_DEPS_MODE}.cmake.in - ${JINJA2CPP_TMP_CONFIG_PATH}/jinja2cpp-config-deps.cmake - INSTALL_DESTINATION ${JINJA2CPP_TMP_CONFIG_PATH} - NO_CHECK_REQUIRED_COMPONENTS_MACRO -) + configure_package_config_file( + cmake/public/jinja2cpp-config-deps-${JINJA2CPP_DEPS_MODE}.cmake.in + ${JINJA2CPP_TMP_CONFIG_PATH}/jinja2cpp-config-deps.cmake + INSTALL_DESTINATION ${JINJA2CPP_TMP_CONFIG_PATH} + NO_CHECK_REQUIRED_COMPONENTS_MACRO + ) -install( - FILES - ${CMAKE_CURRENT_BINARY_DIR}/${JINJA2CPP_TMP_CONFIG_PATH}/${LIB_TARGET_NAME}-config.cmake - ${CMAKE_CURRENT_BINARY_DIR}/${JINJA2CPP_TMP_CONFIG_PATH}/${LIB_TARGET_NAME}-config-deps.cmake - DESTINATION - ${JINJA2CPP_INSTALL_CONFIG_DIR} -) + install( + FILES + ${CMAKE_CURRENT_BINARY_DIR}/${JINJA2CPP_TMP_CONFIG_PATH}/${LIB_TARGET_NAME}-config.cmake + ${CMAKE_CURRENT_BINARY_DIR}/${JINJA2CPP_TMP_CONFIG_PATH}/${LIB_TARGET_NAME}-config-deps.cmake + DESTINATION + ${JINJA2CPP_INSTALL_CONFIG_DIR} + ) +endif() \ No newline at end of file diff --git a/cmake/coverage.cmake b/cmake/coverage.cmake index 0aabecbf..3e8720fa 100644 --- a/cmake/coverage.cmake +++ b/cmake/coverage.cmake @@ -15,10 +15,12 @@ function(add_coverage_target _TARGET) ) target_link_libraries(${_TARGET} INTERFACE gcov) - install( - TARGETS - ${_TARGET} - EXPORT - InstallTargets - ) + if(JINJA2CPP_INSTALL) + install( + TARGETS + ${_TARGET} + EXPORT + InstallTargets + ) + endif() endfunction() diff --git a/cmake/patches/0001-fix-skip-install-rules.patch b/cmake/patches/0001-fix-skip-install-rules.patch deleted file mode 100644 index d20445a1..00000000 --- a/cmake/patches/0001-fix-skip-install-rules.patch +++ /dev/null @@ -1,25 +0,0 @@ -From d924c3bf4d83e9ef3ce66a6ac1e80ef1cb7cc4ca Mon Sep 17 00:00:00 2001 -From: Ruslan Morozov -Date: Sat, 3 Jun 2023 12:21:15 +0300 -Subject: [PATCH] [PATCH] fix skip install rules - ---- - include/BoostRoot.cmake | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/tools/cmake/include/BoostRoot.cmake b/tools/cmake/include/BoostRoot.cmake -index e93f907..f0380b3 100644 ---- a/tools/cmake/include/BoostRoot.cmake -+++ b/tools/cmake/include/BoostRoot.cmake -@@ -108,7 +108,7 @@ else() - endif() - - set(BUILD_TESTING OFF) -- set(BOOST_SKIP_INSTALL_RULES ON) -+ set(BOOST_SKIP_INSTALL_RULES OFF) - - endif() - --- -2.39.2 (Apple Git-143) - diff --git a/cmake/public/jinja2cpp-config.cmake.in b/cmake/public/jinja2cpp-config.cmake.in index a437f2a9..37e6652e 100644 --- a/cmake/public/jinja2cpp-config.cmake.in +++ b/cmake/public/jinja2cpp-config.cmake.in @@ -62,7 +62,7 @@ if (JINJA2CPP_BUILD_SHARED) endif() -# INTERFACE_LINK_LIBRARIES "nonstd::expected-lite;nonstd::variant-lite;nonstd::value_ptr-lite;nonstd::optional-lite;\$;\$;\$" +# INTERFACE_LINK_LIBRARIES "nonstd::expected-lite;nonstd::variant-lite;nonstd::value_ptr-lite;nonstd::optional-lite;\$;\$;\$;\$" if(CMAKE_VERSION VERSION_LESS 2.8.12) message(FATAL_ERROR "This file relies on consumers using CMake 2.8.12 or greater.") diff --git a/cmake/sanitizer.cmake b/cmake/sanitizer.cmake index 36e4bc37..7b63759e 100644 --- a/cmake/sanitizer.cmake +++ b/cmake/sanitizer.cmake @@ -30,12 +30,14 @@ function(add_sanitizer_target _TARGET) ${_BASE_ENABLE_SANITIZER_FLAGS} ) - install( - TARGETS - ${_TARGET} - EXPORT - InstallTargets - ) + if(JINJA2CPP_INSTALL) + install( + TARGETS + ${_TARGET} + EXPORT + InstallTargets + ) + endif() endfunction() diff --git a/conanfile.txt b/conanfile.txt index 1c661f7e..13be3027 100644 --- a/conanfile.txt +++ b/conanfile.txt @@ -1,5 +1,5 @@ [requires] -boost/1.83.0 +boost/1.85.0 expected-lite/0.6.3 fmt/10.1.1 nlohmann_json/3.11.2 diff --git a/thirdparty/CMakeLists.txt b/thirdparty/CMakeLists.txt index fc8f51de..57c8f8ee 100644 --- a/thirdparty/CMakeLists.txt +++ b/thirdparty/CMakeLists.txt @@ -71,7 +71,7 @@ endif() if (NOT DEFINED JINJA2_PRIVATE_LIBS_INT) set(JINJA2CPP_PRIVATE_LIBS ${JINJA2CPP_PRIVATE_LIBS} Boost::variant Boost::filesystem Boost::algorithm Boost::lexical_cast Boost::json - Boost::regex fmt RapidJson) + Boost::regex Boost::numeric_conversion fmt RapidJson) else () set (JINJA2CPP_PRIVATE_LIBS ${JINJA2_PRIVATE_LIBS_INT}) endif () diff --git a/thirdparty/external_boost_deps.cmake b/thirdparty/external_boost_deps.cmake index a14484f2..8b3d3552 100644 --- a/thirdparty/external_boost_deps.cmake +++ b/thirdparty/external_boost_deps.cmake @@ -19,45 +19,52 @@ if (MSVC) endif () endif () -find_package(boost_algorithm ${FIND_BOOST_PACKAGE_QUIET}) -find_package(boost_filesystem ${FIND_BOOST_PACKAGE_QUIET}) -find_package(boost_json ${FIND_BOOST_PACKAGE_QUIET}) -find_package(boost_optional ${FIND_BOOST_PACKAGE_QUIET}) -find_package(boost_variant ${FIND_BOOST_PACKAGE_QUIET}) -find_package(boost_regex ${FIND_BOOST_PACKAGE_QUIET}) +find_package(boost_algorithm ${FIND_BOOST_PACKAGE_QUIET}) +find_package(boost_filesystem ${FIND_BOOST_PACKAGE_QUIET}) +find_package(boost_numeric_conversion ${FIND_BOOST_PACKAGE_QUIET}) +find_package(boost_json ${FIND_BOOST_PACKAGE_QUIET}) +find_package(boost_optional ${FIND_BOOST_PACKAGE_QUIET}) +find_package(boost_variant ${FIND_BOOST_PACKAGE_QUIET}) +find_package(boost_regex ${FIND_BOOST_PACKAGE_QUIET}) if (boost_algorithm_FOUND AND boost_filesystem_FOUND AND + boost_numeric_conversion_FOUND AND boost_json_FOUND AND boost_optional_FOUND AND boost_variant_FOUND AND boost_regex_FOUND) - imported_target_alias(boost_algorithm ALIAS boost_algorithm::boost_algorithm) - imported_target_alias(boost_filesystem ALIAS boost_filesystem::boost_filesystem) - imported_target_alias(boost_json ALIAS boost_json::boost_json) - imported_target_alias(boost_optional ALIAS boost_optional::boost_optional) - imported_target_alias(boost_variant ALIAS boost_variant::boost_variant) - imported_target_alias(boost_regex ALIAS boost_regex::boost_regex) + imported_target_alias(boost_algorithm ALIAS boost_algorithm::boost_algorithm) + imported_target_alias(boost_filesystem ALIAS boost_filesystem::boost_filesystem) + imported_target_alias(boost_numeric_conversion ALIAS numeric_conversion::numeric_conversion) + imported_target_alias(boost_json ALIAS boost_json::boost_json) + imported_target_alias(boost_optional ALIAS boost_optional::boost_optional) + imported_target_alias(boost_variant ALIAS boost_variant::boost_variant) + imported_target_alias(boost_regex ALIAS boost_regex::boost_regex) else () - find_package(Boost COMPONENTS system filesystem json regex ${FIND_BOOST_PACKAGE_QUIET} REQUIRED) + find_package(Boost COMPONENTS system filesystem numeric_conversion json regex ${FIND_BOOST_PACKAGE_QUIET} REQUIRED) if (Boost_FOUND) - imported_target_alias(boost_algorithm ALIAS Boost::boost) - imported_target_alias(boost_filesystem ALIAS Boost::filesystem) - imported_target_alias(boost_json ALIAS Boost::json) - imported_target_alias(boost_optional ALIAS Boost::boost) - imported_target_alias(boost_variant ALIAS Boost::boost) - imported_target_alias(boost_regex ALIAS Boost::regex) + imported_target_alias(boost_algorithm ALIAS Boost::boost) + imported_target_alias(boost_filesystem ALIAS Boost::filesystem) + imported_target_alias(boost_numeric_conversion ALIAS Boost::numeric_conversion) + imported_target_alias(boost_json ALIAS Boost::json) + imported_target_alias(boost_optional ALIAS Boost::boost) + imported_target_alias(boost_variant ALIAS Boost::boost) + imported_target_alias(boost_regex ALIAS Boost::regex) endif () endif () set(_additional_boost_install_targets) if ("${JINJA2CPP_USE_REGEX}" STREQUAL "boost") -set(_additional_boost_install_targets "boost_regex") + set(_additional_boost_install_targets "boost_regex") +endif() + +if(JINJA2CPP_INSTALL) + install(TARGETS boost_algorithm boost_filesystem boost_numeric_conversion boost_json boost_optional boost_variant ${_additional_boost_install_targets} + EXPORT InstallTargets + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/static + PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/boost + ) endif() -install(TARGETS boost_algorithm boost_filesystem boost_json boost_optional boost_variant ${_additional_boost_install_targets} - EXPORT InstallTargets - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/static - PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/boost - ) diff --git a/thirdparty/internal_deps.cmake b/thirdparty/internal_deps.cmake index 03311db5..1b2237a2 100644 --- a/thirdparty/internal_deps.cmake +++ b/thirdparty/internal_deps.cmake @@ -2,37 +2,37 @@ include(FetchContent) FetchContent_Declare( expected-lite - GIT_REPOSITORY https://github.com/martinmoene/expected-lite.git - GIT_TAG master + URL https://github.com/martinmoene/expected-lite/archive/3634b0a6d8dffcffad4d1355253d79290c0c754c.tar.gz + URL_HASH SHA256=ce3bf45480d3ef5f78aa3c06cc5ddea43f5e6b864d92571b6b9838a516e1848b ) FetchContent_MakeAvailable(expected-lite) FetchContent_Declare( variant-lite - GIT_REPOSITORY https://github.com/martinmoene/variant-lite.git - GIT_TAG master + URL https://github.com/martinmoene/variant-lite/archive/5015e841cf143487f2d7e2f619b618d455658fab.tar.gz + URL_HASH SHA256=d343cfa347517a2ee318864f3e2a08af8e17e699de701c69c1cdbdab79d9331f ) FetchContent_MakeAvailable(variant-lite) FetchContent_Declare( optional-lite - GIT_REPOSITORY https://github.com/martinmoene/optional-lite.git - GIT_TAG master + URL https://github.com/martinmoene/optional-lite/archive/2605a4b13094b0bf7a8ecdcde6d644370105bce5.tar.gz + URL_HASH SHA256=29d5ca8d24d1174bf3e933d2e5186f7d1dab3a4cfe7befbe0f0d2795e53e3e0d ) FetchContent_MakeAvailable(optional-lite) FetchContent_Declare( string-view-lite - GIT_REPOSITORY https://github.com/martinmoene/string-view-lite.git - GIT_TAG master + URL https://github.com/martinmoene/string-view-lite/archive/6e5e519d69b4ea99c3095d85d8e1e3ff4d54bbaa.tar.gz + URL_HASH SHA256=fdcb41a43543f5970c617b4dd224b4c958316707cd61090f18e579072eb15b0e ) FetchContent_MakeAvailable(string-view-lite) set (FMT_INSTALL ON CACHE BOOL "" FORCE) FetchContent_Declare( fmt - GIT_REPOSITORY https://github.com/fmtlib/fmt.git - GIT_TAG 10.1.1 + URL https://github.com/fmtlib/fmt/archive/refs/tags/10.2.1.tar.gz + URL_HASH SHA256=1250e4cc58bf06ee631567523f48848dc4596133e163f02615c97f78bab6c811 ) FetchContent_MakeAvailable(fmt) @@ -44,8 +44,8 @@ set (RAPIDJSON_ENABLE_INSTRUMENTATION_OPT OFF CACHE BOOL "" FORCE) FetchContent_Declare( rapidjson - GIT_REPOSITORY https://github.com/Tencent/rapidjson.git - GIT_TAG 973dc9c06dcd3d035ebd039cfb9ea457721ec213 + URL https://github.com/Tencent/rapidjson/archive/973dc9c06dcd3d035ebd039cfb9ea457721ec213.tar.gz + URL_HASH SHA256=d0c9e52823d493206eb721d38cb3a669ca0212360862bd15a3c2f7d35ea7c6f7 ) # GIT_TAG f9d53419e912910fd8fa57d5705fa41425428c35 - latest but broken revision FetchContent_MakeAvailable(rapidjson) @@ -63,8 +63,8 @@ if (JINJA2CPP_BUILD_TESTS) FetchContent_Declare( nlohmann_json - GIT_REPOSITORY https://github.com/nlohmann/json.git - GIT_TAG develop + URL https://github.com/nlohmann/json/archive/8c391e04fe4195d8be862c97f38cfe10e2a3472e.tar.gz + URL_HASH SHA256=8ca375182e9557612f043eaa62dfc4224b41ddf07af704577666aadb7dd99a79 ) FetchContent_MakeAvailable(nlohmann_json) endif() diff --git a/thirdparty/thirdparty-conan-build.cmake b/thirdparty/thirdparty-conan-build.cmake index 773cb87b..e1bc3a4f 100644 --- a/thirdparty/thirdparty-conan-build.cmake +++ b/thirdparty/thirdparty-conan-build.cmake @@ -6,10 +6,10 @@ find_package(optional-lite REQUIRED) find_package(string-view-lite REQUIRED) find_package(nlohmann_json REQUIRED) -find_package(Boost COMPONENTS algorithm filesystem json optional variant regex REQUIRED) +find_package(Boost COMPONENTS algorithm filesystem numeric_conversion json optional variant regex REQUIRED) find_package(fmt REQUIRED) find_package(RapidJSON REQUIRED) -set(JINJA2_PRIVATE_LIBS_INT Boost::headers Boost::filesystem) +set(JINJA2_PRIVATE_LIBS_INT Boost::headers Boost::filesystem Boost::numeric_conversion) set(JINJA2_PUBLIC_LIBS_INT Boost::json fmt::fmt rapidjson Boost::regex nlohmann_json::nlohmann_json nonstd::expected-lite nonstd::variant-lite nonstd::optional-lite nonstd::string-view-lite) diff --git a/thirdparty/thirdparty-external.cmake b/thirdparty/thirdparty-external.cmake index 524dabec..a0de94a7 100644 --- a/thirdparty/thirdparty-external.cmake +++ b/thirdparty/thirdparty-external.cmake @@ -53,26 +53,28 @@ if (TARGET fmt-header-only) add_library(fmt ALIAS fmt-header-only) endif () -install(TARGETS expected-lite variant-lite optional-lite string-view-lite - EXPORT InstallTargets - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/static - PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/nonstd - ) +if(JINJA2CPP_INSTALL) + install(TARGETS expected-lite variant-lite optional-lite string-view-lite + EXPORT InstallTargets + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/static + PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/nonstd + ) -install(TARGETS fmt-header-only - EXPORT InstallTargets - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/static - ) + install(TARGETS fmt-header-only + EXPORT InstallTargets + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/static + ) -install(TARGETS RapidJson - EXPORT InstallTargets - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/static - ) + install(TARGETS RapidJson + EXPORT InstallTargets + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/static + ) +endif() include (./thirdparty/external_boost_deps.cmake) diff --git a/thirdparty/thirdparty-internal.cmake b/thirdparty/thirdparty-internal.cmake index eafd93b5..a47b272e 100644 --- a/thirdparty/thirdparty-internal.cmake +++ b/thirdparty/thirdparty-internal.cmake @@ -8,6 +8,7 @@ list(APPEND BOOST_INCLUDE_LIBRARIES assert atomic filesystem + numeric/conversion lexical_cast optional variant @@ -18,10 +19,11 @@ list(APPEND BOOST_INCLUDE_LIBRARIES include(FetchContent) FetchContent_Declare( Boost - GIT_REPOSITORY https://github.com/boostorg/boost.git - GIT_TAG boost-1.83.0 - PATCH_COMMAND git apply --ignore-whitespace "${CMAKE_CURRENT_LIST_DIR}/../cmake/patches/0001-fix-skip-install-rules.patch" || true + URL https://github.com/boostorg/boost/releases/download/boost-1.85.0/boost-1.85.0-cmake.tar.gz + URL_HASH SHA256=ab9c9c4797384b0949dd676cf86b4f99553f8c148d767485aaac412af25183e6 ) + +set(BOOST_SKIP_INSTALL_RULES OFF) FetchContent_MakeAvailable(Boost) if(NOT MSVC) @@ -41,7 +43,6 @@ if(NOT MSVC) if(COMPILER_HAS_WNO_ERROR_MAYBE_UNINITIALIZED_FLAG) target_compile_options(boost_variant INTERFACE -Wno-error=maybe-uninitialized) endif() - else () endif() # install(TARGETS boost_filesystem boost_algorithm boost_variant boost_optional