diff options
Diffstat (limited to 'Source/cmLocalGenerator.cxx')
-rw-r--r-- | Source/cmLocalGenerator.cxx | 29 |
1 files changed, 20 insertions, 9 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index ee55957..c4ee5c7 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -1951,15 +1951,6 @@ void cmLocalGenerator::AddSharedFlags(std::string& flags, flagsVar += "_FLAGS"; this->AppendFlags(flags, this->Makefile->GetDefinition(flagsVar.c_str())); } - - // Add flags specific to shared builds. - if(cmSystemTools::IsOn(this->Makefile->GetDefinition("BUILD_SHARED_LIBS"))) - { - flagsVar = "CMAKE_SHARED_BUILD_"; - flagsVar += lang; - flagsVar += "_FLAGS"; - this->AppendFlags(flags, this->Makefile->GetDefinition(flagsVar.c_str())); - } } //---------------------------------------------------------------------------- @@ -2083,6 +2074,26 @@ void cmLocalGenerator::AppendDefines(std::string& defines, } //---------------------------------------------------------------------------- +void cmLocalGenerator::AppendFeatureOptions( + std::string& flags, const char* lang, const char* feature) +{ + std::string optVar = "CMAKE_"; + optVar += lang; + optVar += "_COMPILE_OPTIONS_"; + optVar += feature; + if(const char* optionList = this->Makefile->GetDefinition(optVar.c_str())) + { + std::vector<std::string> options; + cmSystemTools::ExpandListArgument(optionList, options); + for(std::vector<std::string>::const_iterator oi = options.begin(); + oi != options.end(); ++oi) + { + this->AppendFlags(flags, this->EscapeForShell(oi->c_str()).c_str()); + } + } +} + +//---------------------------------------------------------------------------- std::string cmLocalGenerator::ConstructComment(const cmCustomCommand& cc, const char* default_comment) |