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

Verweij, Arjen VerweijA at tass-safe.com
Mon Jul 12 15:06:40 EDT 2010


That bit of code is #IFDEF'ed for __APPLE__. I doubt it is causing the problem on AIX.


>-----Original Message-----
>From: cmake-bounces at cmake.org [mailto:cmake-bounces at cmake.org] On Behalf
>Of Verweij, Arjen
>Sent: maandag 12 juli 2010 20:47
>To: Brad King
>Cc: cmake at cmake.org; Bill Hoffman
>Subject: Re: [CMake] CMAKE_<LANG>_FLAGS added to link rule
>That sounds fine, I'm already in the habit of specifying link flags per
>language anyway. In fact I will take a looksie and recompile cmake with
>your suggested fix.
>>Looking at the implementation I see it gets architecture flags on
>>the Mac (-arch and -isysroot), which is consistent with the -m64
>>type flags I mentioned before.  However it looks to me like things
>>have been refactored enough to simply move these into the link-only
>>flags with a one-line change.  The change would not solve the original
>>problem but would enable your workaround.
>>diff --git a/Source/cmMakefileExecutableTargetGenerator.cxx
>>index 93c981a..cb41e74 100644
>>--- a/Source/cmMakefileExecutableTargetGenerator.cxx
>>+++ b/Source/cmMakefileExecutableTargetGenerator.cxx
>>@@ -229,7 +229,7 @@ void
>>cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink)
>>   // Add language feature flags.
>>   this->AddFeatureFlags(flags, linkLanguage);
>>-  this->LocalGenerator->AddArchitectureFlags(flags, this->Target,
>>+  this->LocalGenerator->AddArchitectureFlags(linkFlags, this->Target,
>>                                              linkLanguage, this-
>>   // Add target-specific linker flags.
>Powered by www.kitware.com
>Visit other Kitware open-source projects at
>Please keep messages on-topic and check the CMake FAQ at:
>Follow this link to subscribe/unsubscribe:

More information about the CMake mailing list