From 3550020808207838ce72d951ca4d279fd9f7f8d6 Mon Sep 17 00:00:00 2001 From: Eduard Valeyev Date: Sun, 22 Oct 2023 13:45:45 -0400 Subject: [PATCH] [cmake] introduced versions.cmake , pins to specific version of VG cmake kit, require Boost 1.71 or higher --- CMakeLists.txt | 4 ++++ external/boost.cmake | 4 ++-- external/versions.cmake | 7 +++++++ 3 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 external/versions.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index d84b65a2..a367abb9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,6 +2,9 @@ cmake_minimum_required (VERSION 3.14.0) # FetchContent_MakeAvailable +# Preload versions/tags of all dependencies ==================================== +include(external/versions.cmake) + ############################################################################### # CMake defaults to address key pain points ############################################################################### @@ -24,6 +27,7 @@ FetchContent_Declare( vg_cmake_kit QUIET GIT_REPOSITORY https://github.com/ValeevGroup/kit-cmake.git + GIT_TAG ${BTAS_TRACKED_VGCMAKEKIT_TAG} SOURCE_DIR ${${VG_CMAKE_KIT_PREFIX_DIR}}/cmake/vg BINARY_DIR ${${VG_CMAKE_KIT_PREFIX_DIR}}/cmake/vg-build SUBBUILD_DIR ${${VG_CMAKE_KIT_PREFIX_DIR}}/cmake/vg-subbuild diff --git a/external/boost.cmake b/external/boost.cmake index 4dcf0605..9570bb53 100644 --- a/external/boost.cmake +++ b/external/boost.cmake @@ -21,9 +21,9 @@ if (NOT TARGET Boost::boost OR NOT TARGET Boost::serialization) # try config first # OPTIONAL_COMPONENTS in FindBoost available since 3.11 cmake_minimum_required(VERSION 3.11.0) - find_package(Boost CONFIG OPTIONAL_COMPONENTS ${Boost_BTAS_DEPS_LIBRARIES}) + find_package(Boost ${BTAS_TRACKED_BOOST_VERSION} CONFIG OPTIONAL_COMPONENTS ${Boost_BTAS_DEPS_LIBRARIES}) if (NOT TARGET Boost::boost) - find_package(Boost OPTIONAL_COMPONENTS ${Boost_BTAS_DEPS_LIBRARIES}) + find_package(Boost ${BTAS_TRACKED_BOOST_VERSION} OPTIONAL_COMPONENTS ${Boost_BTAS_DEPS_LIBRARIES}) if (TARGET Boost::boost) set(Boost_USE_CONFIG FALSE) endif(TARGET Boost::boost) diff --git a/external/versions.cmake b/external/versions.cmake new file mode 100644 index 00000000..2c955352 --- /dev/null +++ b/external/versions.cmake @@ -0,0 +1,7 @@ +set(BTAS_TRACKED_VGCMAKEKIT_TAG d6746098e63deab4032309c4455bb084a17ff51a) + +# likely can use earlier, but +# - as of oct 2023 tested with 1.71 and up only +# - avoids the need to avoid 1.70 in which Boost.Container is broken +# - matches the version provided by https://github.com/Orphis/boost-cmake as of oct 2023 +set(BTAS_TRACKED_BOOST_VERSION 1.71)