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

Brad King brad.king at kitware.com
Mon Jul 12 13:45:39 EDT 2010


On 07/12/2010 01:25 PM, Verweij, Arjen wrote:
> Can you comment on what other stuff ends up in <FLAGS>?

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.

Bill?

-Brad


diff --git a/Source/cmMakefileExecutableTargetGenerator.cxx b/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->ConfigName);

   // Add target-specific linker flags.


More information about the CMake mailing list