Skip to content

Commit 971f849

Browse files
committed
Intel needs -coarray flag to the linker as well
1 parent 574e84d commit 971f849

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

cmake/compilers.cmake

+4
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,18 @@ elseif(CMAKE_Fortran_COMPILER_ID MATCHES "^Intel")
2424
message(STATUS "Configuring to build with -coarray=single")
2525
if(WIN32)
2626
add_compile_options("$<$<COMPILE_LANGUAGE:Fortran>:/Qcoarray:single>")
27+
add_link_options("$<$<COMPILE_LANGUAGE:Fortran>:/Qcoarray:single>")
2728
else()
2829
add_compile_options("$<$<COMPILE_LANGUAGE:Fortran>:-coarray=single>")
30+
add_link_options("$<$<COMPILE_LANGUAGE:Fortran>:-coarray=single>")
2931
endif()
3032
else()
3133
if(WIN32)
3234
add_compile_options("$<$<COMPILE_LANGUAGE:Fortran>:/Qcoarray:shared>")
35+
add_link_options("$<$<COMPILE_LANGUAGE:Fortran>:/Qcoarray:shared>")
3336
else()
3437
add_compile_options("$<$<COMPILE_LANGUAGE:Fortran>:-coarray=shared>")
38+
add_link_options("$<$<COMPILE_LANGUAGE:Fortran>:-coarray=shared>")
3539
endif()
3640
endif()
3741

0 commit comments

Comments
 (0)