diff --git a/CMakeLists.txt b/CMakeLists.txt index cfa1c6f12..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) @@ -185,6 +181,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}) @@ -205,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)