diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2009-10-09 20:11:47 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2009-10-09 20:11:47 (GMT) |
commit | ebd0c2d3771835a1317c1fd70eafd3ebf2135b01 (patch) | |
tree | 1dc8f5805b5f3f01933bc0035b3b6cad7b04b73a /Source/cmMakefileTargetGenerator.cxx | |
parent | f9687e328f7ea64ea6384aae11af36fdd3a12643 (diff) | |
download | CMake-ebd0c2d3771835a1317c1fd70eafd3ebf2135b01.zip CMake-ebd0c2d3771835a1317c1fd70eafd3ebf2135b01.tar.gz CMake-ebd0c2d3771835a1317c1fd70eafd3ebf2135b01.tar.bz2 |
Merge in changes for RC 3
Diffstat (limited to 'Source/cmMakefileTargetGenerator.cxx')
-rw-r--r-- | Source/cmMakefileTargetGenerator.cxx | 35 |
1 files changed, 28 insertions, 7 deletions
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index edfae87..c4f1d32 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") @@ -578,9 +576,6 @@ cmMakefileTargetGenerator sourceFile = this->Convert(sourceFile.c_str(), cmLocalGenerator::NONE, cmLocalGenerator::SHELL); - std::string objectFile = this->Convert(obj.c_str(), - cmLocalGenerator::START_OUTPUT, - cmLocalGenerator::SHELL); // Construct the build message. std::vector<std::string> no_commands; @@ -1762,3 +1757,29 @@ void cmMakefileTargetGenerator::AddModuleDefinitionFlag(std::string& flags) this->ModuleDefinitionFile.c_str())); this->LocalGenerator->AppendFlags(flags, flag.c_str()); } + +//---------------------------------------------------------------------------- +const char* cmMakefileTargetGenerator::GetFeature(const char* feature) +{ + return this->Target->GetFeature(feature, this->ConfigName); +} + +//---------------------------------------------------------------------------- +bool cmMakefileTargetGenerator::GetFeatureAsBool(const char* feature) +{ + return cmSystemTools::IsOn(this->GetFeature(feature)); +} + +//---------------------------------------------------------------------------- +void cmMakefileTargetGenerator::AddFeatureFlags( + std::string& flags, const char* lang + ) +{ + // Add language-specific flags. + this->LocalGenerator->AddLanguageFlags(flags, lang, this->ConfigName); + + if(this->GetFeatureAsBool("INTERPROCEDURAL_OPTIMIZATION")) + { + this->LocalGenerator->AppendFeatureOptions(flags, lang, "IPO"); + } +} |