diff options
author | Tobias Hunger <tobias.hunger@qt.io> | 2016-06-10 16:04:58 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-06-17 18:49:38 (GMT) |
commit | 3c488ce89955d00785bb4637c87b960da6c55ec8 (patch) | |
tree | ab23337d74ad31f05734257251e8741f52ac126f /Source/cmCommonTargetGenerator.cxx | |
parent | 5467e7945d46f5f8540a6e11933c9b6b584036a2 (diff) | |
download | CMake-3c488ce89955d00785bb4637c87b960da6c55ec8.zip CMake-3c488ce89955d00785bb4637c87b960da6c55ec8.tar.gz CMake-3c488ce89955d00785bb4637c87b960da6c55ec8.tar.bz2 |
cmLocalGenerator: Adopt target compile flag generation
Factor the flag generation out of cmCommonTargetGenerator::GetFlags
into a new cmLocalGenerator::GetTargetCompileFlags method.
This will allow it to be used without a target generator available.
Diffstat (limited to 'Source/cmCommonTargetGenerator.cxx')
-rw-r--r-- | Source/cmCommonTargetGenerator.cxx | 33 |
1 files changed, 2 insertions, 31 deletions
diff --git a/Source/cmCommonTargetGenerator.cxx b/Source/cmCommonTargetGenerator.cxx index aa7f5c0..101093d 100644 --- a/Source/cmCommonTargetGenerator.cxx +++ b/Source/cmCommonTargetGenerator.cxx @@ -120,38 +120,9 @@ std::string cmCommonTargetGenerator::GetFlags(const std::string& l) ByLanguageMap::iterator i = this->FlagsByLanguage.find(l); if (i == this->FlagsByLanguage.end()) { std::string flags; - const char* lang = l.c_str(); - // Add language feature flags. - this->AddFeatureFlags(flags, lang); - - this->LocalGenerator->AddArchitectureFlags(flags, this->GeneratorTarget, - lang, this->ConfigName); - - // Fortran-specific flags computed for this target. - if (l == "Fortran") { - this->LocalGenerator->AppendFlags( - flags, this->LocalGenerator->GetTargetFortranFlags( - this->GeneratorTarget, this->ConfigName)); - } - - this->LocalGenerator->AddCMP0018Flags(flags, this->GeneratorTarget, lang, - this->ConfigName); - - this->LocalGenerator->AddVisibilityPresetFlags( - flags, this->GeneratorTarget, lang); - - // Append old-style preprocessor definition flags. - this->LocalGenerator->AppendFlags(flags, this->Makefile->GetDefineFlags()); - - // Add framework directory flags. - this->LocalGenerator->AppendFlags( - flags, this->LocalGenerator->GetFrameworkFlags(l, this->ConfigName, - this->GeneratorTarget)); - - // Add target-specific flags. - this->LocalGenerator->AddCompileOptions(flags, this->GeneratorTarget, lang, - this->ConfigName); + this->LocalGenerator->GetTargetCompileFlags(this->GeneratorTarget, + this->ConfigName, l, flags); ByLanguageMap::value_type entry(l, flags); i = this->FlagsByLanguage.insert(entry).first; |