summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Help/variable/CMAKE_CODELITE_USE_TARGETS.rst5
-rw-r--r--Source/cmExtraCodeLiteGenerator.cxx4
2 files changed, 4 insertions, 5 deletions
diff --git a/Help/variable/CMAKE_CODELITE_USE_TARGETS.rst b/Help/variable/CMAKE_CODELITE_USE_TARGETS.rst
index 4aede03..33cdf6c 100644
--- a/Help/variable/CMAKE_CODELITE_USE_TARGETS.rst
+++ b/Help/variable/CMAKE_CODELITE_USE_TARGETS.rst
@@ -3,5 +3,6 @@ CMAKE_CODELITE_USE_TARGETS
Change the way the CodeLite generator creates projectfiles.
-If this variable is set to ``ON`` the generator creates projectfiles
-based on targets rather than projects.
+If this variable evaluates to ``ON`` at the end of the top-level
+``CMakeLists.txt`` file, the generator creates projectfiles based on targets
+rather than projects.
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) {