dev-cafe / autocmake

CMake plugin composer.
http://autocmake.org
BSD 3-Clause "New" or "Revised" License
42 stars 18 forks source link

Remove "-rdynamic" linking flag for PGI #48

Closed miroi closed 9 years ago

miroi commented 9 years ago

With Portral Group Fortram, pgf90, autocmake is linking with "-rdynamic" option, which is unwanted:

Linking Fortran executable ../bin/example
cd /home/milias/Work/qch/software/software_projects/autocmake_devel/autocmake_miroi/test/fc/build_pgf90/src && /usr/bin/cmake -E cmake_link_script CMakeFiles/example.dir/link.txt --verbose=1
/mnt/apps/pgi/linux86-64/13.10/bin/pgf90       -Mpreprocess -Kieee  -fast -O3 -Mipa=fast CMakeFiles/example.dir/example.f90.o CMakeFiles/example.dir/module.f90.o  -o ../bin/example -rdynamic 
pgf90-Error-Unknown switch: -rdynamic

There is a lot of intenet posts about removing it from cmake, see for example http://www.cmake.org/pipermail/cmake/2009-October/032948.html .

bast commented 9 years ago

If we do it inside Autocmake, we remove this flag for every project on earth that uses Autocmake. This is perhaps good but I have no experience with PGI. For the moment I recommend to solve it at the project level. Later we may consider treating this globally. What I will do today is to document how to do such tweaks using Autocmake. I'll keep this open until then.

bast commented 9 years ago

http://autocmake.readthedocs.org/en/latest/developers/faq.html#autocmake-does-not-do-feature-x-i-really-need-feature-x-and-a-setup-py-flag-x