Skip to content

Commit

Permalink
Merge pull request #290 from GEOS-ESM/develop
Browse files Browse the repository at this point in the history
GitFlow: Merge Develop into Main
  • Loading branch information
mathomp4 authored Nov 9, 2022
2 parents 7285234 + 04f5e5a commit 3041ff3
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 6 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

## [3.20.0] - 2022-11-09

### Added

- Add `NETCDF_INCLUDE_DIRS` as alias to `INC_NETCDF` for spack compatibility when using Baselibs

## [3.19.0] - 2022-10-27

### Added
Expand Down
7 changes: 4 additions & 3 deletions external_libraries/FindBaselibs.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,8 @@ if (Baselibs_FOUND)
#------------------------------------------------------------------

set (INC_HDF5 ${BASEDIR}/include/hdf5)
set (INC_NETCDF ${BASEDIR}/include/netcdf)
set (NETCDF_INCLUDE_DIRS ${BASEDIR}/include/netcdf)
set (INC_NETCDF ${NETCDF_INCLUDE_DIRS})
set (INC_HDF ${BASEDIR}/include/hdf)

# Need to do a bit of kludgy stuff here to allow Fortran linker to
Expand Down Expand Up @@ -188,7 +189,7 @@ if (Baselibs_FOUND)
add_library(NetCDF::NetCDF_C STATIC IMPORTED)
set_target_properties(NetCDF::NetCDF_C PROPERTIES
IMPORTED_LOCATION ${BASEDIR}/lib/libnetcdf.a
INTERFACE_INCLUDE_DIRECTORIES "${INC_NETCDF}"
INTERFACE_INCLUDE_DIRECTORIES "${NETCDF_INCLUDE_DIRS}"
INTERFACE_LINK_LIBRARIES "${NETCDF_LIBRARIES}"
INTERFACE_LINK_DIRECTORIES "${BASEDIR}/lib"
)
Expand All @@ -198,7 +199,7 @@ if (Baselibs_FOUND)
add_library(NetCDF::NetCDF_Fortran STATIC IMPORTED)
set_target_properties(NetCDF::NetCDF_Fortran PROPERTIES
IMPORTED_LOCATION ${BASEDIR}/lib/libnetcdff.a
INTERFACE_INCLUDE_DIRECTORIES "${INC_NETCDF}"
INTERFACE_INCLUDE_DIRECTORIES "${NETCDF_INCLUDE_DIRS}"
INTERFACE_LINK_LIBRARIES "${NETCDF_LIBRARIES}"
INTERFACE_LINK_DIRECTORIES "${BASEDIR}/lib"
)
Expand Down
2 changes: 1 addition & 1 deletion python/f2py/UseF2Py.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ macro (add_f2py_module _name)
if (Baselibs_FOUND)

# include dirs
foreach(_dir ${INC_NETCDF})
foreach(_dir ${NETCDF_INCLUDE_DIRS})
list(APPEND _inc_opts "-I${_dir}")
endforeach()

Expand Down
2 changes: 1 addition & 1 deletion python/f2py2/UseF2Py2.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ macro (add_f2py2_module _name)
if (Baselibs_FOUND)

# include dirs
foreach(_dir ${INC_NETCDF})
foreach(_dir ${NETCDF_INCLUDE_DIRS})
list(APPEND _inc_opts "-I${_dir}")
endforeach()

Expand Down
2 changes: 1 addition & 1 deletion python/f2py3/UseF2Py3.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ macro (add_f2py3_module _name)
if (Baselibs_FOUND)

# include dirs
foreach(_dir ${INC_NETCDF})
foreach(_dir ${NETCDF_INCLUDE_DIRS})
list(APPEND _inc_opts "-I${_dir}")
endforeach()

Expand Down

0 comments on commit 3041ff3

Please sign in to comment.