summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Pfeiffer <cpfeiffer@live.de>2017-05-05 15:30:11 (GMT)
committerChristian Pfeiffer <cpfeiffer@live.de>2017-05-05 15:30:11 (GMT)
commitfb31229e9928534162c2f14d23c45bb939eaffd9 (patch)
treecb8a1b5acd2d0522cccc7d19f826f21474acd6df
parenta83250880ad511d92d96bfd860873b9c79c0f462 (diff)
downloadCMake-fb31229e9928534162c2f14d23c45bb939eaffd9.zip
CMake-fb31229e9928534162c2f14d23c45bb939eaffd9.tar.gz
CMake-fb31229e9928534162c2f14d23c45bb939eaffd9.tar.bz2
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.
-rw-r--r--Modules/Platform/Linux-PGI.cmake1
1 files changed, 1 insertions, 0 deletions
diff --git a/Modules/Platform/Linux-PGI.cmake b/Modules/Platform/Linux-PGI.cmake
index a407e43..db032c2 100644
--- a/Modules/Platform/Linux-PGI.cmake
+++ b/Modules/Platform/Linux-PGI.cmake
@@ -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()