[CMake] CMAKE_<LANG>_FLAGS added to link rule

Verweij, Arjen VerweijA at tass-safe.com
Mon Jul 12 13:12:14 EDT 2010


As a follow-up: redefining CMAKE_Fortran_LINK_EXECUTABLE to not include <FLAGS> gets rid of the CMAKE_Fortran_FLAGS.. but perhaps other (useful) stuff as well? As a sidetrack I'm starting to wonder what the purpose of CMAKE_<LANG>_FLAGS is. The book lists it as cmake's counterpart of the environment variable, e.g. CMAKE_CXX_FLAGS and CXXFLAGS from the shell, which means it doesn't make sense to include it when linking. Am I overlooking something here :)

Regards,
Arjen

From: cmake-bounces at cmake.org [mailto:cmake-bounces at cmake.org] On Behalf Of Verweij, Arjen
Sent: maandag 12 juli 2010 18:13
To: cmake at cmake.org
Subject: [CMake] CMAKE_<LANG>_FLAGS added to link rule

Hi,

It seems that in our project the contents of CMAKE_<LANG>_FLAGS is added to the link line. This causes problems for some of our platforms. Is there a mechanism to separate language specific compile and link flags out? It would be nice if you could define CMAKE_<LANG>_COMPILER_FLAGS and CMAKE_<LANG>_LINK_FLAGS separately.

I could write a wrapper around add_executable() and add_library() but I would prefer something standard. Looking at cmake-2.8.1/Modules/CMakeFortranInformation.cmake, I can't really find much except that CMAKE_Fortran_LINK_EXECUTABLE is set, but CMAKE_Fortran_FLAGS are not included.

Regards,
Arjen


Arjen Verweij
QA/Test Engineer

[cid:image001.gif at 01CB21F5.056CED80]


Einsteinlaan 6
2289 CC  Rijswijk
The Netherlands

Phone:  +31 88 827 7086
Fax:       +31 88 827 7003
Email:  arjen.verweij at tass-safe.com
www.tass-safe.com

This e-mail and its contents are subject to a DISCLAIMER with important RESERVATIONS.



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20100712/32b00beb/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.gif
Type: image/gif
Size: 1941 bytes
Desc: image001.gif
URL: <http://www.cmake.org/pipermail/cmake/attachments/20100712/32b00beb/attachment-0001.gif>


More information about the CMake mailing list