diff --git a/CMakeLists.txt b/CMakeLists.txt index 4eb0e694..6ce3fffb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,7 +2,7 @@ # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. -cmake_minimum_required(VERSION 3.12) +cmake_minimum_required(VERSION 3.22) project("Libmultiprocess" CXX) if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR) diff --git a/ci/configs/olddeps.bash b/ci/configs/olddeps.bash index 1d9ea6fc..15364806 100644 --- a/ci/configs/olddeps.bash +++ b/ci/configs/olddeps.bash @@ -4,5 +4,5 @@ CI_DIR=build-olddeps CI_NIXPKGS_CHANNEL=nixos-25.05 export CXXFLAGS="-Werror -Wall -Wextra -Wpedantic -Wno-unused-parameter -Wno-error=array-bounds" CAPNP_CHECKOUT=v0.9.2 # Use a checkout to compile it with the selected GCC -NIX_ARGS=(--argstr capnprotoVersion "none" --argstr cmakeVersion "3.12.4" --argstr gccVersion "10") +NIX_ARGS=(--argstr capnprotoVersion "none" --argstr cmakeVersion "3.22.6" --argstr gccVersion "10") BUILD_ARGS=(-k) diff --git a/ci/scripts/ci.sh b/ci/scripts/ci.sh index 8016d921..7321fe36 100755 --- a/ci/scripts/ci.sh +++ b/ci/scripts/ci.sh @@ -32,7 +32,7 @@ if [ -n "${CAPNP_CHECKOUT-}" ]; then git --no-pager log -1 || true CXXFLAGS="-std=c++20" cmake .. "-DCMAKE_INSTALL_PREFIX=${capnp_prefix}" -DBUILD_TESTING=OFF -DWITH_OPENSSL=OFF -DWITH_ZLIB=OFF cmake --build . - cmake --build . --target install # Replacement for modern "cmake --install .". + cmake --install . ) export CMAKE_PREFIX_PATH="${capnp_prefix}:${CMAKE_PREFIX_PATH-}" fi @@ -47,8 +47,8 @@ if ! cmake "$src_dir" "${cmake_args[@]}"; then # If cmake failed, try it again with debug options. # Could add --trace / --trace-expand here too but they are very verbose. cmake_args+=(--debug-output --debug-trycompile) - if ver_ge "$cmake_ver" "3.16"; then cmake_args+=(--log-level=DEBUG); fi - if ver_ge "$cmake_ver" "3.17"; then cmake_args+=(--debug-find); fi + cmake_args+=(--log-level=DEBUG) + cmake_args+=(--debug-find) cmake "$src_dir" "${cmake_args[@]}" || : "cmake exited with $?" if ver_ge "$cmake_ver" "3.26"; then cat CMakeFiles/CMakeConfigureLog.yaml || true @@ -58,13 +58,5 @@ if ! cmake "$src_dir" "${cmake_args[@]}"; then find . -ls || true false fi -if ver_ge "$cmake_ver" "3.15"; then - cmake --build . -t "${BUILD_TARGETS[@]}" -- "${BUILD_ARGS[@]+"${BUILD_ARGS[@]}"}" -else - # Older versions of cmake can only build one target at a time with --target, - # and do not support -t shortcut - for t in "${BUILD_TARGETS[@]}"; do - cmake --build . --target "$t" -- "${BUILD_ARGS[@]+"${BUILD_ARGS[@]}"}" - done -fi +cmake --build . -t "${BUILD_TARGETS[@]}" -- "${BUILD_ARGS[@]+"${BUILD_ARGS[@]}"}" ctest --output-on-failure diff --git a/shell.nix b/shell.nix index 1fbfda51..69b1c9e5 100644 --- a/shell.nix +++ b/shell.nix @@ -54,7 +54,7 @@ let clang = if enableLibcxx then llvm.libcxxClang else llvm.clang; clang-tools = llvm.clang-tools.override { inherit enableLibcxx; }; cmakeHashes = { - "3.12.4" = "sha256-UlVYS/0EPrcXViz/iULUcvHA5GecSUHYS6raqbKOMZQ="; + "3.22.6" = "sha256-c5MxY2cOpOqVwjFUkAewxyQygik1BqLPRENxSCatXsM="; "4.1.1" = "sha256-sp9vGXM6oiS3djUHoQikJ+1Ixojh+vIrKcROHDBUkoI="; "4.3.4" = "sha256-/e/4l7nrSddkU58rHtxut+FEDfMlZ4qXwZeEmekxrdo="; };