From 9fb2f704748b717ba5170f7935579c9901257879 Mon Sep 17 00:00:00 2001 From: Anders Kvellestad Date: Tue, 14 Nov 2023 09:51:14 +0100 Subject: [PATCH 1/4] Changed cmake version requirement to 3.16.3 (matching Ubuntu 20.04 LTS) --- CMakeLists.txt | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b76498ef4f..a35034e540 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -38,7 +38,7 @@ #************************************************ # Define minimum cmake version -cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR) +cmake_minimum_required(VERSION 3.16.3 FATAL_ERROR) # Define minimum compiler versions set(MIN_GCC_VERSION 9.1) @@ -335,11 +335,7 @@ endif() # Fix Boost < 1.55 for Clang if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang") - if(${CMAKE_VERSION} VERSION_LESS 3.12.0) - add_definitions(-DBOOST_PP_VARIADICS=1) - else() - add_compile_definitions(BOOST_PP_VARIADICS=1) - endif() + add_compile_definitions(BOOST_PP_VARIADICS=1) endif() # Check for Eigen From 7debff4f3ae654ea4ee08b6ff270d0de610cccb4 Mon Sep 17 00:00:00 2001 From: Anders Kvellestad Date: Tue, 14 Nov 2023 10:00:08 +0100 Subject: [PATCH 2/4] Updated cmake version req. in README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8e4c8868c5..04e81a804a 100644 --- a/README.md +++ b/README.md @@ -73,7 +73,7 @@ COMPULSORY: - gcc >= 9 / llvm clang >= 10 / AppleClang >= 13 / icc >= 15.0.2 - gfortran >= 9 / ifort >=15.0.2 - - CMake 3.2.3 or greater + - CMake 3.16.3 or greater - Python 3 - Python modules: yaml, future, os, re, datetime, sys, getopt, shutil and itertools. - git From aab3bd75f0ac9216faa295593defc2081a88e367 Mon Sep 17 00:00:00 2001 From: Anders Kvellestad Date: Tue, 14 Nov 2023 14:33:51 +0100 Subject: [PATCH 3/4] Deleted FindSQLite3.cmake (now a default module in CMake) --- cmake/FindSQLite3.cmake | 40 ---------------------------------------- 1 file changed, 40 deletions(-) delete mode 100644 cmake/FindSQLite3.cmake diff --git a/cmake/FindSQLite3.cmake b/cmake/FindSQLite3.cmake deleted file mode 100644 index e10e69229b..0000000000 --- a/cmake/FindSQLite3.cmake +++ /dev/null @@ -1,40 +0,0 @@ -# Copyright (C) 2007-2009 LuaDist. -# Created by Peter Kapec -# Redistribution and use of this file is allowed according to the terms of the MIT license. -# For details see the COPYRIGHT file distributed with LuaDist. -# Note: -# Searching headers and libraries is very simple and is NOT as powerful as scripts -# distributed with CMake, because LuaDist defines directories to search for. -# Everyone is encouraged to contact the author with improvements. Maybe this file -# becomes part of CMake distribution sometimes. - -# - Find sqlite3 -# Find the native SQLite3 headers and libraries. -# -# SQLite3_INCLUDE_DIRS - where to find sqlite3.h, etc. -# SQLite3_LIBRARIES - List of libraries when using sqlite. -# SQLite3_FOUND - True if sqlite found. - -# Look for the header file. -FIND_PATH(SQLite3_INCLUDE_DIR NAMES sqlite3.h) - -# Look for the library. -FIND_LIBRARY(SQLite3_LIBRARY NAMES sqlite3) - -#message("SQLite3_LIBRARY: ${SQLite3_LIBRARY}") -#message("SQLite3_INCLUDE_DIR: ${SQLite3_INCLUDE_DIR}") - -# Handle the QUIETLY and REQUIRED arguments and set SQLite3_FOUND to TRUE if all listed variables are TRUE. -INCLUDE(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(SQLite3 "" SQLite3_LIBRARY SQLite3_INCLUDE_DIR) - -# Copy the results to the output variables. -IF(SQLite3_FOUND) - SET(SQLite3_LIBRARIES ${SQLite3_LIBRARY}) - SET(SQLite3_INCLUDE_DIRS ${SQLite3_INCLUDE_DIR}) -ELSE(SQLite3_FOUND) - SET(SQLite3_LIBRARIES) - SET(SQLite3_INCLUDE_DIRS) -ENDIF(SQLite3_FOUND) - -MARK_AS_ADVANCED(SQLite3_INCLUDE_DIRS SQLite3_LIBRARIES) From c53d991f07f10254117aefa86c5a68891fe34fd1 Mon Sep 17 00:00:00 2001 From: Anders Kvellestad Date: Tue, 21 Nov 2023 18:13:31 +0100 Subject: [PATCH 4/4] For debugging: Print cmake version in CI build tests. --- .github/workflows/ci.yml | 1 + .github/workflows/ci_Mac_arm64.yml | 1 + .github/workflows/ci_Mac_x64.yml | 1 + 3 files changed, 3 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index be2c2faaf4..c5ea43fc4b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -48,6 +48,7 @@ jobs: - name: Configure with cmake run: | cd BUILD/ && . buildenv.sh + cmake --version cmake .. -D WITH_ROOT=OFF -D WITH_RESTFRAMES=OFF -D WITH_HEPMC=ON -D WITH_YODA=ON -D BUILD_FS_MODELS="CMSSM;MSSM;MDM" -D WITH_MPI=OFF - name: Build scanners run: | diff --git a/.github/workflows/ci_Mac_arm64.yml b/.github/workflows/ci_Mac_arm64.yml index e10f02d9fc..cc36ac7109 100644 --- a/.github/workflows/ci_Mac_arm64.yml +++ b/.github/workflows/ci_Mac_arm64.yml @@ -30,6 +30,7 @@ jobs: run: | echo "Configure with cmake" cd BUILD + cmake --version cmake -DWITH_MPI=ON -DWITH_HEPMC=ON -DWITH_YODA=ON -DBUILD_FS_MODELS="CMSSM;MSSM;MDM" -Ditch="micromegas_DMsimpVectorMedVectorDM" .. - name: Build scanners run: | diff --git a/.github/workflows/ci_Mac_x64.yml b/.github/workflows/ci_Mac_x64.yml index 54b771efdc..0a049d0a6a 100644 --- a/.github/workflows/ci_Mac_x64.yml +++ b/.github/workflows/ci_Mac_x64.yml @@ -30,6 +30,7 @@ jobs: run: | echo "Configure with cmake" cd BUILD + cmake --version # Ditching a few backends that don't currently work on Mac cmake -DWITH_MPI=ON -DWITH_HEPMC=ON -DWITH_YODA=ON -DBUILD_FS_MODELS="CMSSM;MSSM;MDM" -Ditch="micromegas_DMsimpVectorMedVectorDM" .. - name: Build scanners