Linux-PGI: Prevent -rdynamic ending up in flags

Ensure that PGI on Linux keeps its
CMAKE_SHARED_LIBRARY_LINK_<LANG>_FLAGS empty, especially of -rdynamic.
In CMakeFortranInformation a lot of flags will be copied from their C
equivalents if they're not defined. By using a combination of GCC and
PGFortran, this will lead to -rdynamic ending up in the PGI flags and
none of the PGI compilers understand that flag, crashing with a fatal
error.
This commit is contained in:
Christian Pfeiffer
2017-05-05 17:30:11 +02:00
parent a83250880a
commit fb31229e99

View File

@@ -14,4 +14,5 @@ macro(__linux_compiler_pgi lang)
set(CMAKE_${lang}_COMPILE_OPTIONS_PIE "")
set(CMAKE_SHARED_LIBRARY_${lang}_FLAGS "-fPIC")
set(CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS "-shared")
set(CMAKE_SHARED_LIBRARY_LINK_${lang}_FLAGS " ")
endmacro()