summaryrefslogtreecommitdiffstats
path: root/Source/cmNinjaNormalTargetGenerator.cxx
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2012-04-30 03:25:37 (GMT)
committerPeter Collingbourne <peter@pcc.me.uk>2012-05-16 21:56:42 (GMT)
commitd807aab28fd86586e8ecb5e4f4d35b43bc68d5f8 (patch)
treef0dadaedd74bfa4a2d42d00209c2ecb3eabf5591 /Source/cmNinjaNormalTargetGenerator.cxx
parente78483c08e1f7753509afa4d4aab94274cd6b861 (diff)
downloadCMake-d807aab28fd86586e8ecb5e4f4d35b43bc68d5f8.zip
CMake-d807aab28fd86586e8ecb5e4f4d35b43bc68d5f8.tar.gz
CMake-d807aab28fd86586e8ecb5e4f4d35b43bc68d5f8.tar.bz2
Ninja: apply CMAKE_<LANG>_FLAGS_<TYPE> to executable targets (#13069)
Based on a patch by Zaheer Chothia!
Diffstat (limited to 'Source/cmNinjaNormalTargetGenerator.cxx')
-rw-r--r--Source/cmNinjaNormalTargetGenerator.cxx11
1 files changed, 6 insertions, 5 deletions
diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx
index 63ba58d..8b86a98 100644
--- a/Source/cmNinjaNormalTargetGenerator.cxx
+++ b/Source/cmNinjaNormalTargetGenerator.cxx
@@ -193,12 +193,13 @@ cmNinjaNormalTargetGenerator
vars.LinkFlags = "$LINK_FLAGS";
std::string langFlags;
- this->GetLocalGenerator()->AddLanguageFlags(langFlags,
- this->TargetLinkLanguage,
- this->GetConfigName());
- if (targetType != cmTarget::EXECUTABLE)
+ if (targetType != cmTarget::EXECUTABLE) {
+ this->GetLocalGenerator()->AddLanguageFlags(langFlags,
+ this->TargetLinkLanguage,
+ this->GetConfigName());
langFlags += " $ARCH_FLAGS";
- vars.LanguageCompileFlags = langFlags.c_str();
+ vars.LanguageCompileFlags = langFlags.c_str();
+ }
// Rule for linking library.
std::vector<std::string> linkCmds = this->ComputeLinkCmd();