Making intel-specific compiler flag only apply to ifort

This commit is contained in:
Jeffrey Garretson
2020-10-12 21:37:21 -06:00
parent d525907337
commit 0952dc92ff

View File

@@ -95,7 +95,10 @@ if(ENABLE_MPI)
add_definitions(${MPI_Fortran_COMPILE_FLAGS})
include_directories(${MPI_Fortran_INCLUDE_PATH})
link_directories(${MPI_Fortran_LIBRARIES})
string(APPEND CMAKE_Fortran_FLAGS " -mt_mpi")
if(CMAKE_Fortran_COMPILER_ID MATCHES Intel)
string(APPEND CMAKE_Fortran_FLAGS " -mt_mpi")
endif()
# no matching flag for GNU
set(CMAKE_Fortran_COMPILER ${MPI_Fortran_COMPILER})
endif()