Improve the algorithm which skips targets so they are not added to the codeblocks GUI.
-add all global targets from CMAKE_BINARY_DIR to the menu, but not from the subdirs -add all utility targets to the menu, except the Nightly/Experimental/Continuous-"sub"targets as e. Alex
This commit is contained in:
parent
c858146872
commit
d78e051f46
|
@ -323,15 +323,6 @@ void cmExtraCodeBlocksGenerator
|
||||||
" "<<virtualFolders<<"\n"
|
" "<<virtualFolders<<"\n"
|
||||||
" <Build>\n";
|
" <Build>\n";
|
||||||
|
|
||||||
bool installTargetCreated = false;
|
|
||||||
bool installStripTargetCreated = false;
|
|
||||||
bool testTargetCreated = false;
|
|
||||||
bool experimentalTargetCreated = false;
|
|
||||||
bool nightlyTargetCreated = false;
|
|
||||||
bool packageTargetCreated = false;
|
|
||||||
bool packageSourceTargetCreated = false;
|
|
||||||
bool rebuildCacheTargetCreated = false;
|
|
||||||
|
|
||||||
this->AppendTarget(fout, "all", 0, make.c_str(), mf, compiler.c_str());
|
this->AppendTarget(fout, "all", 0, make.c_str(), mf, compiler.c_str());
|
||||||
|
|
||||||
// add all executable and library targets and some of the GLOBAL
|
// add all executable and library targets and some of the GLOBAL
|
||||||
|
@ -346,51 +337,29 @@ void cmExtraCodeBlocksGenerator
|
||||||
{
|
{
|
||||||
switch(ti->second.GetType())
|
switch(ti->second.GetType())
|
||||||
{
|
{
|
||||||
case cmTarget::UTILITY:
|
|
||||||
case cmTarget::GLOBAL_TARGET:
|
case cmTarget::GLOBAL_TARGET:
|
||||||
// only add these targets once
|
// Only add the global targets from CMAKE_BINARY_DIR,
|
||||||
if ((ti->first=="install") && (installTargetCreated==false))
|
// not from the subdirs
|
||||||
|
if (strcmp(makefile->GetStartOutputDirectory(),
|
||||||
|
makefile->GetHomeOutputDirectory())==0)
|
||||||
{
|
{
|
||||||
installTargetCreated=true;
|
this->AppendTarget(fout, ti->first.c_str(), 0,
|
||||||
|
make.c_str(), makefile, compiler.c_str());
|
||||||
}
|
}
|
||||||
else if ((ti->first=="install/strip")
|
break;
|
||||||
&& (installStripTargetCreated==false))
|
case cmTarget::UTILITY:
|
||||||
{
|
// Add all utility targets, except the Nightly/Continuous/
|
||||||
installStripTargetCreated=true;
|
// Experimental-"sub"targets as e.g. NightlyStart
|
||||||
}
|
if (((ti->first.find("Nightly")==0) &&(ti->first!="Nightly"))
|
||||||
else if ((ti->first=="test") && (testTargetCreated==false))
|
|| ((ti->first.find("Continuous")==0)&&(ti->first!="Continuous"))
|
||||||
{
|
|| ((ti->first.find("Experimental")==0)
|
||||||
testTargetCreated=true;
|
&& (ti->first!="Experimental")))
|
||||||
}
|
|
||||||
else if ((ti->first=="Experimental")
|
|
||||||
&& (experimentalTargetCreated==false))
|
|
||||||
{
|
|
||||||
experimentalTargetCreated=true;
|
|
||||||
}
|
|
||||||
else if ((ti->first=="Nightly") && (nightlyTargetCreated==false))
|
|
||||||
{
|
|
||||||
nightlyTargetCreated=true;
|
|
||||||
}
|
|
||||||
else if ((ti->first=="package") && (packageTargetCreated==false))
|
|
||||||
{
|
|
||||||
packageTargetCreated=true;
|
|
||||||
}
|
|
||||||
else if ((ti->first=="package_source")
|
|
||||||
&& (packageSourceTargetCreated==false))
|
|
||||||
{
|
|
||||||
packageSourceTargetCreated=true;
|
|
||||||
}
|
|
||||||
else if ((ti->first=="rebuild_cache")
|
|
||||||
&& (rebuildCacheTargetCreated==false))
|
|
||||||
{
|
|
||||||
rebuildCacheTargetCreated=true;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
this->AppendTarget(fout, ti->first.c_str(), 0,
|
this->AppendTarget(fout, ti->first.c_str(), 0,
|
||||||
make.c_str(), makefile, compiler.c_str());
|
make.c_str(), makefile, compiler.c_str());
|
||||||
break;
|
break;
|
||||||
case cmTarget::EXECUTABLE:
|
case cmTarget::EXECUTABLE:
|
||||||
case cmTarget::STATIC_LIBRARY:
|
case cmTarget::STATIC_LIBRARY:
|
||||||
|
|
Loading…
Reference in New Issue