mirror of
https://github.com/slsdetectorgroup/aare.git
synced 2026-05-08 16:12:04 +02:00
bumped pybind version, cmake fixes (#300)
- Bumped pybind11 version - Bumped libfmt version - Patch Minuit to avoid messing around with CMake policy
This commit is contained in:
+7
-6
@@ -150,10 +150,15 @@ else()
|
||||
endif()
|
||||
|
||||
if(AARE_FETCH_MINUIT2)
|
||||
# Patch minuit2 to avoid messing with cmake policies
|
||||
set(MINUIT2_PATCH_COMMAND git apply
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/patches/minuit2.patch)
|
||||
FetchContent_Declare(
|
||||
Minuit2
|
||||
GIT_REPOSITORY https://github.com/GooFit/Minuit2.git
|
||||
GIT_TAG master)
|
||||
GIT_TAG master
|
||||
PATCH_COMMAND ${MINUIT2_PATCH_COMMAND}
|
||||
UPDATE_DISCONNECTED 1)
|
||||
# Disable Minuit2 extras we don't need
|
||||
set(minuit2_mpi
|
||||
OFF
|
||||
@@ -164,11 +169,7 @@ if(AARE_FETCH_MINUIT2)
|
||||
set(BUILD_TESTING
|
||||
OFF
|
||||
CACHE BOOL "")
|
||||
set(CMAKE_POLICY_VERSION_MINIMUM
|
||||
3.5
|
||||
CACHE STRING "Allow older CMake compat for Minuit2")
|
||||
FetchContent_MakeAvailable(Minuit2)
|
||||
unset(CMAKE_POLICY_VERSION_MINIMUM CACHE)
|
||||
set_property(TARGET Minuit2Math PROPERTY POSITION_INDEPENDENT_CODE ON)
|
||||
set_property(TARGET Minuit2 PROPERTY POSITION_INDEPENDENT_CODE ON)
|
||||
else()
|
||||
@@ -231,7 +232,7 @@ if(AARE_FETCH_FMT)
|
||||
FetchContent_Declare(
|
||||
fmt
|
||||
GIT_REPOSITORY https://github.com/fmtlib/fmt.git
|
||||
GIT_TAG 10.2.1
|
||||
GIT_TAG 12.1.0
|
||||
GIT_PROGRESS TRUE
|
||||
USES_TERMINAL_DOWNLOAD TRUE)
|
||||
set(FMT_INSTALL
|
||||
|
||||
@@ -27,7 +27,7 @@ requirements:
|
||||
- pip
|
||||
- numpy >=2.1
|
||||
- scikit-build-core
|
||||
- pybind11 >=2.13.0
|
||||
- pybind11 >=3.0.3
|
||||
- matplotlib # needed in host to solve the environment for run
|
||||
|
||||
run:
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 4e72289..33dd58a 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -4,7 +4,7 @@
|
||||
# For the licensing terms see $ROOTSYS/LICENSE.
|
||||
# For the list of contributors see $ROOTSYS/README/CREDITS.
|
||||
|
||||
-cmake_minimum_required(VERSION 3.1)
|
||||
+cmake_minimum_required(VERSION 3.15)
|
||||
|
||||
if(NOT CMAKE_PROJECT_NAME STREQUAL ROOT)
|
||||
project(Minuit2 LANGUAGES CXX)
|
||||
diff --git a/StandAlone.cmake b/StandAlone.cmake
|
||||
index 0a662ba..b7a05ca 100644
|
||||
--- a/StandAlone.cmake
|
||||
+++ b/StandAlone.cmake
|
||||
@@ -1,12 +1,12 @@
|
||||
-cmake_minimum_required(VERSION 3.1)
|
||||
-
|
||||
-# Tested with and supporting policies up to the following CMake version.
|
||||
-# Not using ... syntax due to parser bug in MSVC's built-in CMake server mode.
|
||||
-if(${CMAKE_VERSION} VERSION_LESS 3.12)
|
||||
- cmake_policy(VERSION ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION})
|
||||
-else()
|
||||
- cmake_policy(VERSION 3.12)
|
||||
-endif()
|
||||
+cmake_minimum_required(VERSION 3.15)
|
||||
+
|
||||
+# # Tested with and supporting policies up to the following CMake version.
|
||||
+# # Not using ... syntax due to parser bug in MSVC's built-in CMake server mode.
|
||||
+# if(${CMAKE_VERSION} VERSION_LESS 3.12)
|
||||
+# cmake_policy(VERSION ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION})
|
||||
+# else()
|
||||
+# cmake_policy(VERSION 3.12)
|
||||
+# endif()
|
||||
|
||||
include(FeatureSummary)
|
||||
include(CMakeDependentOption)
|
||||
@@ -11,10 +11,10 @@ if(AARE_FETCH_PYBIND11)
|
||||
FetchContent_Declare(
|
||||
pybind11
|
||||
GIT_REPOSITORY https://github.com/pybind/pybind11
|
||||
GIT_TAG v2.13.6)
|
||||
GIT_TAG v3.0.3)
|
||||
FetchContent_MakeAvailable(pybind11)
|
||||
else()
|
||||
find_package(pybind11 2.13 REQUIRED)
|
||||
find_package(pybind11 3.0.3 REQUIRED)
|
||||
endif()
|
||||
|
||||
# Add the compiled python extension
|
||||
|
||||
Reference in New Issue
Block a user