Merge branch 'codelite-global-setting' into release
This commit is contained in:
commit
fbc1a30b87
|
@ -3,5 +3,6 @@ CMAKE_CODELITE_USE_TARGETS
|
||||||
|
|
||||||
Change the way the CodeLite generator creates projectfiles.
|
Change the way the CodeLite generator creates projectfiles.
|
||||||
|
|
||||||
If this variable is set to ``ON`` the generator creates projectfiles
|
If this variable evaluates to ``ON`` at the end of the top-level
|
||||||
based on targets rather than projects.
|
``CMakeLists.txt`` file, the generator creates projectfiles based on targets
|
||||||
|
rather than projects.
|
||||||
|
|
|
@ -60,7 +60,6 @@ void cmExtraCodeLiteGenerator::Generate()
|
||||||
// loop projects and locate the root project.
|
// loop projects and locate the root project.
|
||||||
// and extract the information for creating the worspace
|
// and extract the information for creating the worspace
|
||||||
// root makefile
|
// root makefile
|
||||||
const cmMakefile* rmf = CM_NULLPTR;
|
|
||||||
for (std::map<std::string, std::vector<cmLocalGenerator*> >::const_iterator
|
for (std::map<std::string, std::vector<cmLocalGenerator*> >::const_iterator
|
||||||
it = projectMap.begin();
|
it = projectMap.begin();
|
||||||
it != projectMap.end(); ++it) {
|
it != projectMap.end(); ++it) {
|
||||||
|
@ -75,7 +74,6 @@ void cmExtraCodeLiteGenerator::Generate()
|
||||||
workspaceFileName = workspaceOutputDir + "/";
|
workspaceFileName = workspaceOutputDir + "/";
|
||||||
workspaceFileName += workspaceProjectName + ".workspace";
|
workspaceFileName += workspaceProjectName + ".workspace";
|
||||||
this->WorkspacePath = it->second[0]->GetCurrentBinaryDirectory();
|
this->WorkspacePath = it->second[0]->GetCurrentBinaryDirectory();
|
||||||
rmf = it->second[0]->GetMakefile();
|
|
||||||
;
|
;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -89,7 +87,7 @@ void cmExtraCodeLiteGenerator::Generate()
|
||||||
xml.Attribute("Name", workspaceProjectName);
|
xml.Attribute("Name", workspaceProjectName);
|
||||||
|
|
||||||
bool const targetsAreProjects =
|
bool const targetsAreProjects =
|
||||||
rmf && rmf->IsOn("CMAKE_CODELITE_USE_TARGETS");
|
this->GlobalGenerator->GlobalSettingIsOn("CMAKE_CODELITE_USE_TARGETS");
|
||||||
|
|
||||||
std::vector<std::string> ProjectNames;
|
std::vector<std::string> ProjectNames;
|
||||||
if (targetsAreProjects) {
|
if (targetsAreProjects) {
|
||||||
|
|
|
@ -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
|
bool cmGlobalGenerator::IgnoreFile(const char* ext) const
|
||||||
{
|
{
|
||||||
if (!this->GetLanguageFromExtension(ext).empty()) {
|
if (!this->GetLanguageFromExtension(ext).empty()) {
|
||||||
|
|
|
@ -194,6 +194,10 @@ public:
|
||||||
|
|
||||||
cmExportSetMap& GetExportSets() { return this->ExportSets; }
|
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. */
|
/** Add a file to the manifest of generated targets for a configuration. */
|
||||||
void AddToManifest(std::string const& f);
|
void AddToManifest(std::string const& f);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue