From cbdf65945cc53723c27119fc2501fe810d822269 Mon Sep 17 00:00:00 2001 From: Sylwester Arabas Date: Tue, 27 Feb 2024 19:16:58 +0100 Subject: [PATCH 1/3] bump SUNDIALS submodule to v6.7.0 --- gitmodules/sundials | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gitmodules/sundials b/gitmodules/sundials index 2e94b7c0..aaeab8d9 160000 --- a/gitmodules/sundials +++ b/gitmodules/sundials @@ -1 +1 @@ -Subproject commit 2e94b7c0f02038aa2dabcac270e22d037950c095 +Subproject commit aaeab8d907c6b7dfca86041401fdc1448f35f826 From e614aea0d7d3130dc63156524adb32f7ebed61e5 Mon Sep 17 00:00:00 2001 From: Sylwester Arabas Date: Tue, 27 Feb 2024 19:29:52 +0100 Subject: [PATCH 2/3] minimal pyproject.toml --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) create mode 100644 pyproject.toml diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 00000000..10d5fb8a --- /dev/null +++ b/pyproject.toml @@ -0,0 +1 @@ +[tool.setuptools_scm] From c15db3a74dcc4fab9114eb4d4f7a38ba7f241b8d Mon Sep 17 00:00:00 2001 From: Sylwester Arabas Date: Tue, 27 Feb 2024 19:30:55 +0100 Subject: [PATCH 3/3] making SUNDIALS CMake logic compatible with v6.7.0 --- CMakeLists.txt | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5288ceb6..0253aee3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,6 +5,11 @@ #################################################################################################### cmake_minimum_required(VERSION 3.8) # CXX17 +include(CheckCSourceCompiles) +include(CheckCXXSourceCompiles) +include(CheckFunctionExists) +include(CheckFortranCompilerFlag) +include(CheckFunctionExists) file(GLOB mods RELATIVE ${CMAKE_SOURCE_DIR} gitmodules/*) foreach(mod ${mods}) @@ -284,6 +289,7 @@ endfunction() scoped_sundials_setup_config() set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${SUNDIALS_SOURCE_DIR}/cmake) +set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${SUNDIALS_SOURCE_DIR}/cmake/tpl) include(${SUNDIALS_SOURCE_DIR}/cmake/SundialsSetupCompilers.cmake) foreach(item cvode;sunmatrix;sunlinsol;sunnonlinsol;nvector;sundials;sunlinsol/klu) @@ -335,7 +341,6 @@ string(CONCAT cmd " or '_T TRUE)' in line" "]))" ) -include(CheckFunctionExists) execute_process( COMMAND ${PYTHON_EXECUTABLE} "-c" "${cmd}" INPUT_FILE ${CMAKE_SOURCE_DIR}/gitmodules/netcdf-c/CMakeLists.txt @@ -392,7 +397,6 @@ target_compile_options(netcdf_clib PRIVATE ### netCDF-FORTRAN ################################################################################# -include(CheckFortranCompilerFlag) add_library(netcdf_flib STATIC ${netcdf_f_SOURCES}) target_link_libraries(netcdf_flib PRIVATE netcdf_clib) target_compile_definitions(netcdf_flib PRIVATE @@ -437,7 +441,6 @@ string(CONCAT "import sys;" "print(''.join([f'#define {line.split()[3]} {line.split()[5]}\\n' for line in sys.stdin if 'parameter ::' in line]))" ) -include(CheckFunctionExists) foreach(file aero_data;gas_data;output) execute_process( COMMAND ${PYTHON_EXECUTABLE} "-c" "${cmd}" @@ -505,7 +508,6 @@ foreach(target _PyPartMC) ) endforeach() target_compile_definitions(_PyPartMC PRIVATE PMC_USE_SUNDIALS="1") -include(CheckCXXSourceCompiles) file(GLOB PyPartMC_headers ${CMAKE_SOURCE_DIR}/src/*.hpp) if (NOT "${CMAKE_REQUIRED_INCLUDES}" STREQUAL "") message("CMAKE_REQUIRED_INCLUDES not empty! (${CMAKE_REQUIRED_INCLUDES})")