Skip to content

Commit

Permalink
Use enable_language(Fortran) before FindMPI. (#1251)
Browse files Browse the repository at this point in the history
  • Loading branch information
jrood-nrel authored Mar 28, 2024
1 parent ada9e37 commit 30a8102
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,6 @@ endif()

add_library(nalu "")

########################## MPI ####################################
find_package(MPI REQUIRED)
target_link_libraries(nalu PUBLIC $<$<BOOL:${MPI_CXX_FOUND}>:MPI::MPI_CXX>)

if(ENABLE_CUDA)
enable_language(CUDA)
find_package(CUDAToolkit REQUIRED)
Expand Down Expand Up @@ -206,6 +202,10 @@ if(ENABLE_TIOGA)
endif()
endif()

########################## MPI ####################################
find_package(MPI REQUIRED)
target_link_libraries(nalu PUBLIC $<$<BOOL:${MPI_CXX_FOUND}>:MPI::MPI_CXX>)
target_link_libraries(nalu PUBLIC $<$<BOOL:${MPI_Fortran_FOUND}>:MPI::MPI_Fortran>)

############################ MATRIXREE #####################################
if(ENABLE_MATRIXFREE)
Expand Down

0 comments on commit 30a8102

Please sign in to comment.