Skip to content

Commit

Permalink
Merge pull request #769 from GEOS-ESM/feature/mathomp4/support-spack-…
Browse files Browse the repository at this point in the history
…build

Fix up MPI detection for Spack builds
  • Loading branch information
sdrabenh authored Mar 20, 2024
2 parents 53409fd + d4fc84d commit 13b6c56
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,16 @@ foreach (dir cmake @cmake cmake@)
set (ESMA_CMAKE_PATH "${CMAKE_CURRENT_LIST_DIR}/${dir}" CACHE PATH "Path to ESMA_cmake code")
endif ()
endforeach ()

# We need to find MPI before we go into esma
# for the MPI stack detection to work
set(MPI_DETERMINE_LIBRARY_VERSION TRUE)
find_package(MPI)

include (esma)

# Add CMake for when not using Baselibs
if (NOT Baselibs_FOUND)
set(MPI_DETERMINE_LIBRARY_VERSION TRUE)
find_package(MPI)

find_package(NetCDF REQUIRED C Fortran)
add_definitions(-DHAS_NETCDF4)
Expand Down

0 comments on commit 13b6c56

Please sign in to comment.