must link with -lgfortran when using flang
This commit is contained in:
@ -23,6 +23,10 @@ if(CMAKE_Fortran_COMPILER)
|
||||
endif()
|
||||
else()
|
||||
add_library(fmpi_stubs STATIC mpi_stubs.f90)
|
||||
get_filename_component(_tmp_fc ${CMAKE_Fortran_COMPILER} NAME)
|
||||
if (_tmp_fc STREQUAL "flang")
|
||||
target_link_libraries(fmpi_stubs PUBLIC gfortran)
|
||||
endif()
|
||||
add_library(MPI::MPI_Fortran ALIAS fmpi_stubs)
|
||||
endif()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user