From b77f341c00cd92335d9539866e56bb436084d200 Mon Sep 17 00:00:00 2001 From: Bryan Weber Date: Sun, 1 Dec 2024 10:32:26 -0500 Subject: [PATCH] [Python/Wheel] Adjust minimum CMake version Set the minimum CMake version to 3.27 so that we can use upper-cased or lower-cased *_ROOT variables to identify the locations of dependencies. We also set the HDF5_ROOT CMake variable so that HighFive can find HDF5. --- interfaces/python_sdist/CMakeLists.txt | 5 ++++- interfaces/python_sdist/pyproject.toml.in | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/interfaces/python_sdist/CMakeLists.txt b/interfaces/python_sdist/CMakeLists.txt index 1c41db4741..ac777735fc 100644 --- a/interfaces/python_sdist/CMakeLists.txt +++ b/interfaces/python_sdist/CMakeLists.txt @@ -1,4 +1,7 @@ -cmake_minimum_required(VERSION 3.24...3.30) +# Set minimum version 3.27 so that CMP0144, search for packages by upper-cased +# environment variables will use upper-cased variables. OLD behavior is to ignore +# upper-cased variables +cmake_minimum_required(VERSION 3.27...3.31) project(${SKBUILD_PROJECT_NAME} LANGUAGES CXX) set(CMAKE_CXX_STANDARD 17) diff --git a/interfaces/python_sdist/pyproject.toml.in b/interfaces/python_sdist/pyproject.toml.in index b42e0e07c2..8ecb10f953 100644 --- a/interfaces/python_sdist/pyproject.toml.in +++ b/interfaces/python_sdist/pyproject.toml.in @@ -75,6 +75,7 @@ make-fallback = false [tool.scikit-build.cmake.define] CMAKE_POSITION_INDEPENDENT_CODE = "ON" Boost_INCLUDE_DIRS = { env = "Boost_INCLUDE_DIRS" } +HDF5_ROOT = { env = "HDF5_ROOT" } [tool.scikit-build.sdist] exclude = ["pyproject.toml.in", "cantera/with_units/solution.py.in"]