mirror of
https://github.com/reactos/CMake.git
synced 2024-12-05 10:16:50 +00:00
af2ad90991
On Linux the NAG Fortran compiler uses gcc under the hood to link. Use "-Wl,-v" to pass "-v" to the underlying gcc compiler to get verbose link output. Detect the NAG Fortran directory (using -dryrun) and then honor object files in the directory referenced in the implicit link line. Pass real linker options with "-Wl,-Xlinker,". The -Wl, gets through the NAG front-end and the -Xlinker gets through the gcc front-end.
11 lines
596 B
CMake
11 lines
596 B
CMake
set(CMAKE_Fortran_VERBOSE_FLAG "-Wl,-v") # Runs gcc under the hood.
|
|
|
|
# Need one "-Wl," level to send flag through to gcc.
|
|
# Use "-Xlinker" to get through gcc to real linker.
|
|
set(CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS "-Wl,-shared")
|
|
set(CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG "-Wl,-Xlinker,-rpath,-Xlinker,")
|
|
set(CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG_SEP ":")
|
|
set(CMAKE_SHARED_LIBRARY_RPATH_LINK_Fortran_FLAG "-Wl,-Xlinker,-rpath-link,-Xlinker,")
|
|
set(CMAKE_SHARED_LIBRARY_SONAME_Fortran_FLAG "-Wl,-Xlinker,-soname,-Xlinker,")
|
|
set(CMAKE_SHARED_LIBRARY_LINK_Fortran_FLAGS "-Wl,-rdynamic")
|