diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index a446862c9..7132ade19 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -1007,6 +1007,25 @@ void cmGlobalGenerator::FillExtensionToLanguageMap(const std::string& l, } } +const char* cmGlobalGenerator::GetGlobalSetting(std::string const& name) const +{ + assert(!this->Makefiles.empty()); + return this->Makefiles[0]->GetDefinition(name); +} + +bool cmGlobalGenerator::GlobalSettingIsOn(std::string const& name) const +{ + assert(!this->Makefiles.empty()); + return this->Makefiles[0]->IsOn(name); +} + +const char* cmGlobalGenerator::GetSafeGlobalSetting( + std::string const& name) const +{ + assert(!this->Makefiles.empty()); + return this->Makefiles[0]->GetSafeDefinition(name); +} + bool cmGlobalGenerator::IgnoreFile(const char* ext) const { if (!this->GetLanguageFromExtension(ext).empty()) { diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h index 4120b52ea..add2b92a0 100644 --- a/Source/cmGlobalGenerator.h +++ b/Source/cmGlobalGenerator.h @@ -194,6 +194,10 @@ public: cmExportSetMap& GetExportSets() { return this->ExportSets; } + const char* GetGlobalSetting(std::string const& name) const; + bool GlobalSettingIsOn(std::string const& name) const; + const char* GetSafeGlobalSetting(std::string const& name) const; + /** Add a file to the manifest of generated targets for a configuration. */ void AddToManifest(std::string const& f);