From 253dff3b0cf5d9d96029cd6c9d5b30ab68c90073 Mon Sep 17 00:00:00 2001 From: Oliver Lantwin Date: Thu, 19 Feb 2026 02:04:49 +0100 Subject: [PATCH 1/2] feat(cmake): update to v4.2.3 --- CHANGELOG.md | 1 + cmake.sh | 30 +++++++++++++++--------------- 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1b9341d6..b3a89c8d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ Until May 2022 (inclusive) no changelog was kept. We might try to reconstruct it ### Changed +* CMake: Update to v4.2.3 * python: Require at least 3.12.12 in prefer_system_check * ROOT: Update to 6.36.08 * defaults-actstracking: Removed all overrides unrelated to ACTS or C++20. diff --git a/cmake.sh b/cmake.sh index fc7d752c..95fa2e12 100644 --- a/cmake.sh +++ b/cmake.sh @@ -1,9 +1,9 @@ package: CMake version: "%(tag_basename)s" -tag: "v3.26.5" +tag: "v4.2.3" source: https://github.com/Kitware/CMake build_requires: - - "GCC-Toolchain:(?!osx)" + - "GCC-Toolchain:(?!osx)" prefer_system: .* prefer_system_check: | REQUESTED_VERSION=${REQUESTED_VERSION#v} @@ -12,27 +12,27 @@ prefer_system_check: | --- #!/bin/bash -e -cat > build-flags.cmake <<- EOF -# Disable Java capabilities; we don't need it and on OS X might miss the -# required /System/Library/Frameworks/JavaVM.framework/Headers/jni.h. -SET(JNI_H FALSE CACHE BOOL "" FORCE) -SET(Java_JAVA_EXECUTABLE FALSE CACHE BOOL "" FORCE) -SET(Java_JAVAC_EXECUTABLE FALSE CACHE BOOL "" FORCE) +cat >build-flags.cmake <<-EOF + # Disable Java capabilities; we don't need it and on OS X might miss the + # required /System/Library/Frameworks/JavaVM.framework/Headers/jni.h. + SET(JNI_H FALSE CACHE BOOL "" FORCE) + SET(Java_JAVA_EXECUTABLE FALSE CACHE BOOL "" FORCE) + SET(Java_JAVAC_EXECUTABLE FALSE CACHE BOOL "" FORCE) -# SL6 with GCC 4.6.1 and LTO requires -ltinfo with -lcurses for link to succeed, -# but cmake is not smart enough to find it. We do not really need ccmake anyway, -# so just disable it. -SET(BUILD_CursesDialog FALSE CACHE BOOL "" FORCE) + # SL6 with GCC 4.6.1 and LTO requires -ltinfo with -lcurses for link to succeed, + # but cmake is not smart enough to find it. We do not really need ccmake anyway, + # so just disable it. + SET(BUILD_CursesDialog FALSE CACHE BOOL "" FORCE) EOF $SOURCEDIR/bootstrap --prefix=$INSTALLROOT \ - --init=build-flags.cmake \ - ${JOBS:+--parallel=$JOBS} + --init=build-flags.cmake \ + ${JOBS:+--parallel=$JOBS} make ${JOBS+-j $JOBS} make install/strip mkdir -p etc/modulefiles -cat > etc/modulefiles/$PKGNAME <etc/modulefiles/$PKGNAME < Date: Fri, 27 Feb 2026 14:11:23 +0100 Subject: [PATCH 2/2] fix: specify minimum CMake policy version where needed --- hepmc.sh | 1 + pythia6.sh | 1 + tbb.sh | 1 + yaml-cpp.sh | 1 + 4 files changed, 4 insertions(+) diff --git a/hepmc.sh b/hepmc.sh index 28fdc6cd..1460aeca 100644 --- a/hepmc.sh +++ b/hepmc.sh @@ -25,6 +25,7 @@ cmake $SOURCEDIR \ -Dmomentum=GEV \ -Dlength=MM \ -Dbuild_docs:BOOL=OFF \ + -DCMAKE_POLICY_VERSION_MINIMUM=3.5 \ -DCMAKE_INSTALL_PREFIX=$INSTALLROOT make ${JOBS+-j $JOBS} diff --git a/pythia6.sh b/pythia6.sh index 9fe0d6b2..afad261d 100644 --- a/pythia6.sh +++ b/pythia6.sh @@ -16,6 +16,7 @@ build_requires: cmake ${SOURCEDIR} \ -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} \ -DCMAKE_INSTALL_PREFIX=${INSTALLROOT} \ + -DCMAKE_POLICY_VERSION_MINIMUM=3.5 \ -DCMAKE_INSTALL_LIBDIR=lib make ${JOBS+-j$JOBS} make install diff --git a/tbb.sh b/tbb.sh index 3a7ae649..bf1f4c53 100644 --- a/tbb.sh +++ b/tbb.sh @@ -22,6 +22,7 @@ prepend_path: cmake "$SOURCEDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLROOT" \ ${CXXSTD:+-DCMAKE_CXX_STANDARD=$CXXSTD} \ -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_POLICY_VERSION_MINIMUM=3.5 \ -DTBB_TEST=OFF # Build and install diff --git a/yaml-cpp.sh b/yaml-cpp.sh index ea9fc427..f5b45fd3 100644 --- a/yaml-cpp.sh +++ b/yaml-cpp.sh @@ -24,6 +24,7 @@ cmake $SOURCEDIR \ ${BOOST_ROOT:+-DBoost_INCLUDE_DIR:PATH="$BOOST_ROOT/include"} \ -DCMAKE_SKIP_RPATH=YES \ -DYAML_CPP_BUILD_TESTS=NO \ + -DCMAKE_POLICY_VERSION_MINIMUM=3.5 \ -DSKIP_INSTALL_FILES=1 make ${JOBS+-j $JOBS} install