summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-10-07 13:01:30 (GMT)
committerBrad King <brad.king@kitware.com>2016-10-07 13:01:30 (GMT)
commitfbc1a30b87f9af2f798e1f2dc61e94089a99e213 (patch)
tree393d895999e688e7d787487b2cfbcda1482e96c1 /Source
parentffff5c17a5b87984b9bcb7e6f20445b0efdcd124 (diff)
parent80574a38e6cb6ac33630e878d9633f1267b53d2b (diff)
downloadCMake-fbc1a30b87f9af2f798e1f2dc61e94089a99e213.zip
CMake-fbc1a30b87f9af2f798e1f2dc61e94089a99e213.tar.gz
CMake-fbc1a30b87f9af2f798e1f2dc61e94089a99e213.tar.bz2
Merge branch 'codelite-global-setting' into release
Diffstat (limited to 'Source')
-rw-r--r--Source/cmExtraCodeLiteGenerator.cxx4
-rw-r--r--Source/cmGlobalGenerator.cxx19
-rw-r--r--Source/cmGlobalGenerator.h4
3 files changed, 24 insertions, 3 deletions
diff --git a/Source/cmExtraCodeLiteGenerator.cxx b/Source/cmExtraCodeLiteGenerator.cxx
index 629c5b6..360c852 100644
--- a/Source/cmExtraCodeLiteGenerator.cxx
+++ b/Source/cmExtraCodeLiteGenerator.cxx
@@ -60,7 +60,6 @@ void cmExtraCodeLiteGenerator::Generate()
// loop projects and locate the root project.
// and extract the information for creating the worspace
// root makefile
- const cmMakefile* rmf = CM_NULLPTR;
for (std::map<std::string, std::vector<cmLocalGenerator*> >::const_iterator
it = projectMap.begin();
it != projectMap.end(); ++it) {
@@ -75,7 +74,6 @@ void cmExtraCodeLiteGenerator::Generate()
workspaceFileName = workspaceOutputDir + "/";
workspaceFileName += workspaceProjectName + ".workspace";
this->WorkspacePath = it->second[0]->GetCurrentBinaryDirectory();
- rmf = it->second[0]->GetMakefile();
;
break;
}
@@ -89,7 +87,7 @@ void cmExtraCodeLiteGenerator::Generate()
xml.Attribute("Name", workspaceProjectName);
bool const targetsAreProjects =
- rmf && rmf->IsOn("CMAKE_CODELITE_USE_TARGETS");
+ this->GlobalGenerator->GlobalSettingIsOn("CMAKE_CODELITE_USE_TARGETS");
std::vector<std::string> ProjectNames;
if (targetsAreProjects) {
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index a446862..7132ade 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 4120b52..add2b92 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);