[CMake] cmake 2.8.3 forces -rdynamic for pf90 in pure fortran projects

Verweij, Arjen VerweijA at tass-safe.com
Tue Nov 23 06:03:05 EST 2010


Hi Brad,

>Please try the patch below.

It gets rid of -rdynamic for pure F90. I will try in a C/C++/F77/F90 project soonish (hopefully today). I didn't check if other flags get cleared as well.

Thanks,
Arjen

>diff --git a/Modules/Platform/Linux-PGI.cmake b/Modules/Platform/Linux-
>PGI.cmake
>index ef06acd..43e0232 100644
>--- a/Modules/Platform/Linux-PGI.cmake
>+++ b/Modules/Platform/Linux-PGI.cmake
>@@ -22,4 +22,5 @@ macro(__linux_compiler_pgi lang)
>   # Shared library compile and link flags.
>   set(CMAKE_SHARED_LIBRARY_${lang}_FLAGS "-fPIC")
>   set(CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS "-shared")
>+  set(CMAKE_SHARED_LIBRARY_LINK_${lang}_FLAGS "")
> endmacro()


More information about the CMake mailing list