summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefileTargetGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2009-10-02 17:51:49 (GMT)
committerBrad King <brad.king@kitware.com>2009-10-02 17:51:49 (GMT)
commit57df2abca804dd8e98d000441fc0035eef9d4829 (patch)
tree2de2390a8c812bba6d1ce203c897c9f2aec93844 /Source/cmMakefileTargetGenerator.cxx
parentd455eeb6d7f178df4b8b199af540626a26722bb6 (diff)
downloadCMake-57df2abca804dd8e98d000441fc0035eef9d4829.zip
CMake-57df2abca804dd8e98d000441fc0035eef9d4829.tar.gz
CMake-57df2abca804dd8e98d000441fc0035eef9d4829.tar.bz2
Centralize language flag addition for Makefiles
We create cmMakefileTargetGenerator::AddFeatureFlags to consolidate addition of language flags. Currently it just adds the flags from generic per-language flag variables (AddLanguageFlags).
Diffstat (limited to 'Source/cmMakefileTargetGenerator.cxx')
-rw-r--r--Source/cmMakefileTargetGenerator.cxx15
1 files changed, 11 insertions, 4 deletions
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx
index edfae87..719aa50 100644
--- a/Source/cmMakefileTargetGenerator.cxx
+++ b/Source/cmMakefileTargetGenerator.cxx
@@ -291,10 +291,8 @@ void cmMakefileTargetGenerator::WriteTargetLanguageFlags()
this->LocalGenerator->AppendDefines
(defines, this->Target->GetProperty(defPropName.c_str()), lang);
- // Add language-specific flags.
- this->LocalGenerator
- ->AddLanguageFlags(flags, lang,
- this->LocalGenerator->ConfigurationName.c_str());
+ // Add language feature flags.
+ this->AddFeatureFlags(flags, lang);
// Fortran-specific flags computed for this target.
if(*l == "Fortran")
@@ -1762,3 +1760,12 @@ void cmMakefileTargetGenerator::AddModuleDefinitionFlag(std::string& flags)
this->ModuleDefinitionFile.c_str()));
this->LocalGenerator->AppendFlags(flags, flag.c_str());
}
+
+//----------------------------------------------------------------------------
+void cmMakefileTargetGenerator::AddFeatureFlags(
+ std::string& flags, const char* lang
+ )
+{
+ // Add language-specific flags.
+ this->LocalGenerator->AddLanguageFlags(flags, lang, this->ConfigName);
+}