Skip to content

Commit

Permalink
Merge pull request #239 from GEOS-ESM/develop
Browse files Browse the repository at this point in the history
Merge Develop into Main for Release
  • Loading branch information
mathomp4 authored Nov 8, 2021
2 parents d9b1c34 + d40d852 commit 6692f74
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 29 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Removed
### Added

## [3.7.2] - 2021-Nov-08

### Fixed

- Move finding of OpenMP, MPI, and Threads above `FindBaselibs`. This was interfering with f2py...for some reason.

## [3.7.1] - 2021-Nov-05

### Fixed
Expand Down
57 changes: 28 additions & 29 deletions esma.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,34 @@ include (ecbuild_system NO_POLICY_SCOPE)
list (APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/compiler")
include (esma_compiler)

### OpenMP ###

find_package (OpenMP)

### Position independent code ###

set(CMAKE_POSITION_INDEPENDENT_CODE ON)

### MPI Support ###

# Only invoked from Fortran sources in GEOS-5, But some BASEDIR packages use MPI from C/C++.
set(MPI_DETERMINE_LIBRARY_VERSION TRUE)
find_package (MPI REQUIRED)

### Threading ###

set(CMAKE_THREAD_PREFER_PTHREAD TRUE)

## Turns out with NAG on Linux, this generates '-pthread' which
## NAG cannot handle. So we set to FALSE in that case
if(UNIX AND CMAKE_Fortran_COMPILER_ID MATCHES "NAG")
set(THREADS_PREFER_PTHREAD_FLAG FALSE)
else()
set(THREADS_PREFER_PTHREAD_FLAG TRUE)
endif()

find_package(Threads REQUIRED)

### External Libraries Support ###

list (APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/external_libraries")
Expand Down Expand Up @@ -76,35 +104,6 @@ if (APPLE)
include(osx_extras)
endif ()

### OpenMP ###

find_package (OpenMP)

### Threading ###

set(CMAKE_THREAD_PREFER_PTHREAD TRUE)

## Turns out with NAG on Linux, this generates '-pthread' which
## NAG cannot handle. So we set to FALSE in that case
if(UNIX AND CMAKE_Fortran_COMPILER_ID MATCHES "NAG")
set(THREADS_PREFER_PTHREAD_FLAG FALSE)
else()
set(THREADS_PREFER_PTHREAD_FLAG TRUE)
endif()

find_package(Threads REQUIRED)

### Position independent code ###

set(CMAKE_POSITION_INDEPENDENT_CODE ON)

### MPI Support ###

# Only invoked from Fortran sources in GEOS-5, But some BASEDIR packages use MPI from C/C++.
set(MPI_DETERMINE_LIBRARY_VERSION TRUE)
find_package (MPI REQUIRED)


option (ESMA_ALLOW_DEPRECATED "suppress warnings about deprecated features" ON)
# Temporary option for transition purposes.
option (ESMA_USE_GFE_NAMESPACE "use cmake namespace with GFE projects" ON)
Expand Down

0 comments on commit 6692f74

Please sign in to comment.