Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Deprecated

## [4.18.0] - 2025-05-13

### Fixed

- Fixed issue with f2py detection where f2py was still being test compiled even if a user specified `-DUSE_F2PY:BOOL=OFF`

### Changed

- Make `proc_description` a `CACHE` variable

## [4.17.0] - 2025-05-06

### Added
Expand Down
1 change: 1 addition & 0 deletions compiler/esma_compiler.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## Print out the processor description
cmake_host_system_information(RESULT proc_description QUERY PROCESSOR_DESCRIPTION)
message(STATUS "Processor description: ${proc_description}")
set(proc_description "${proc_description}" CACHE INTERNAL "Processor description")

## Checks for Fortran support
list (APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/checks")
Expand Down
29 changes: 20 additions & 9 deletions python/esma_python.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,25 @@
# The new policy needed for f2py3 and Meson is 3.24
cmake_minimum_required(VERSION 3.24)

# Note f2py (-> distutils) does seem to support nagfor as an fcompiler, but
# testing with it did not work. For now, just don't do any f2py if using NAG
if (CMAKE_Fortran_COMPILER_ID MATCHES "NAG")
option(USE_F2PY "Turn on F2PY builds" OFF)
else ()
option(USE_F2PY "Turn on F2PY builds" ON)
endif ()

# Find Python
set(Python_FIND_STRATEGY LOCATION)
set(Python_FIND_UNVERSIONED_NAMES FIRST)
set(Python_FIND_FRAMEWORK LAST)
find_package(Python COMPONENTS Interpreter)
list (APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/f2py")
include (esma_find_python_module)
include (esma_check_python_module)
if (USE_F2PY)
include (esma_add_f2py_module)
endif ()

# Find Python2
set(Python2_FIND_STRATEGY LOCATION)
Expand All @@ -18,7 +32,9 @@ find_package(Python2 COMPONENTS Interpreter)
list (APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/f2py2")
include (esma_find_python2_module)
include (esma_check_python2_module)
include (esma_add_f2py2_module)
if (USE_F2PY)
include (esma_add_f2py2_module)
endif ()

# Find Python3
set(Python3_FIND_STRATEGY LOCATION)
Expand All @@ -28,12 +44,7 @@ find_package(Python3 COMPONENTS Interpreter)
list (APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/f2py3")
include (esma_find_python3_module)
include (esma_check_python3_module)
include (esma_add_f2py3_module)

# Note f2py (-> distutils) does seem to support nagfor as an fcompiler, but
# testing with it did not work. For now, just don't do any f2py if using NAG
if (CMAKE_Fortran_COMPILER_ID MATCHES "NAG")
option(USE_F2PY "Turn on F2PY builds" OFF)
else ()
option(USE_F2PY "Turn on F2PY builds" ON)
if (USE_F2PY)
include (esma_add_f2py3_module)
endif ()