From ada9e37ed33b83918f0e5df4ab8d713d003ff805 Mon Sep 17 00:00:00 2001 From: Jon Rood Date: Tue, 26 Mar 2024 14:26:54 -0600 Subject: [PATCH 1/2] Enable Fortran when using OpenFAST. (#1250) --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index cfa1c6f12..bd3913c88 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -185,6 +185,7 @@ if(ENABLE_OPENFAST_FSI) endif() if(ENABLE_OPENFAST) set(CMAKE_PREFIX_PATH ${OpenFAST_DIR} ${CMAKE_PREFIX_PATH}) + enable_language(Fortran) find_package(OpenFAST QUIET REQUIRED) message(STATUS "Found OpenFAST = ${OpenFAST_LIBRARY_DIRS}") target_link_libraries(nalu PUBLIC ${OpenFAST_LIBRARIES} ${OpenFAST_CPP_LIBRARIES}) From 30a8102b894e419a7cccb4c7ea44d92af0626400 Mon Sep 17 00:00:00 2001 From: Jon Rood Date: Thu, 28 Mar 2024 14:57:13 -0600 Subject: [PATCH 2/2] Use enable_language(Fortran) before FindMPI. (#1251) --- 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)