From b0a95793417b74604780684021253822fab466c3 Mon Sep 17 00:00:00 2001 From: Jon Rood Date: Thu, 28 Mar 2024 14:30:17 -0600 Subject: [PATCH] Use enable_language(Fortran) before FindMPI. --- CMakeLists.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index bd3913c88..d0afa62d3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -56,10 +56,6 @@ endif() add_library(nalu "") -########################## MPI #################################### -find_package(MPI REQUIRED) -target_link_libraries(nalu PUBLIC $<$:MPI::MPI_CXX>) - if(ENABLE_CUDA) enable_language(CUDA) find_package(CUDAToolkit REQUIRED) @@ -206,6 +202,10 @@ if(ENABLE_TIOGA) endif() endif() +########################## MPI #################################### +find_package(MPI REQUIRED) +target_link_libraries(nalu PUBLIC $<$:MPI::MPI_CXX>) +target_link_libraries(nalu PUBLIC $<$:MPI::MPI_Fortran>) ############################ MATRIXREE ##################################### if(ENABLE_MATRIXFREE)