fix indentation
Alex
This commit is contained in:
parent
03d55fb4c7
commit
45b8f2e441
@ -194,7 +194,7 @@ void Tree::BuildVirtualFolderImpl(std::string& virtualFolders,
|
|||||||
{
|
{
|
||||||
virtualFolders += "CMake Files\\" + prefix + path + "\\;";
|
virtualFolders += "CMake Files\\" + prefix + path + "\\;";
|
||||||
for (std::vector<Tree>::const_iterator it = folders.begin();
|
for (std::vector<Tree>::const_iterator it = folders.begin();
|
||||||
it != folders.end();
|
it != folders.end();
|
||||||
++it)
|
++it)
|
||||||
{
|
{
|
||||||
it->BuildVirtualFolderImpl(virtualFolders, prefix + path + "\\");
|
it->BuildVirtualFolderImpl(virtualFolders, prefix + path + "\\");
|
||||||
@ -276,32 +276,31 @@ void cmExtraCodeBlocksGenerator
|
|||||||
|
|
||||||
// Convert
|
// Convert
|
||||||
for (std::vector<std::string>::const_iterator jt = listFiles.begin();
|
for (std::vector<std::string>::const_iterator jt = listFiles.begin();
|
||||||
jt != listFiles.end();
|
jt != listFiles.end();
|
||||||
++jt)
|
++jt)
|
||||||
{
|
{
|
||||||
const std::string &relative =
|
const std::string &relative = cmSystemTools::RelativePath(
|
||||||
cmSystemTools::RelativePath(
|
|
||||||
it->second[0]->GetMakefile()->GetHomeDirectory(),
|
it->second[0]->GetMakefile()->GetHomeDirectory(),
|
||||||
jt->c_str());
|
jt->c_str());
|
||||||
std::vector<std::string> splitted;
|
std::vector<std::string> splitted;
|
||||||
cmSystemTools::SplitPath(relative.c_str(), splitted, false);
|
cmSystemTools::SplitPath(relative.c_str(), splitted, false);
|
||||||
// Split filename from path
|
// Split filename from path
|
||||||
std::string fileName = *(splitted.end()-1);
|
std::string fileName = *(splitted.end()-1);
|
||||||
splitted.erase(splitted.end() - 1, splitted.end());
|
splitted.erase(splitted.end() - 1, splitted.end());
|
||||||
|
|
||||||
// We don't want paths with ".." in them
|
// We don't want paths with ".." in them
|
||||||
// reasons are that we don't want files outside the project
|
// reasons are that we don't want files outside the project
|
||||||
// TODO: the path should be normalized first though
|
// TODO: the path should be normalized first though
|
||||||
// We don't want paths with CMakeFiles in them
|
// We don't want paths with CMakeFiles in them
|
||||||
// or do we?
|
// or do we?
|
||||||
// In speedcrunch those where purely internal
|
// In speedcrunch those where purely internal
|
||||||
if (splitted.size() >= 1
|
if (splitted.size() >= 1
|
||||||
&& relative.find("..") == std::string::npos
|
&& relative.find("..") == std::string::npos
|
||||||
&& relative.find("CMakeFiles") == std::string::npos)
|
&& relative.find("CMakeFiles") == std::string::npos)
|
||||||
{
|
{
|
||||||
tree.InsertPath(splitted, 1, fileName);
|
tree.InsertPath(splitted, 1, fileName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Now build a virtual tree string
|
// Now build a virtual tree string
|
||||||
@ -337,68 +336,68 @@ void cmExtraCodeBlocksGenerator
|
|||||||
for (cmTargets::iterator ti = targets.begin();
|
for (cmTargets::iterator ti = targets.begin();
|
||||||
ti != targets.end(); ti++)
|
ti != targets.end(); ti++)
|
||||||
{
|
{
|
||||||
switch(ti->second.GetType())
|
switch(ti->second.GetType())
|
||||||
{
|
{
|
||||||
case cmTarget::GLOBAL_TARGET:
|
case cmTarget::GLOBAL_TARGET:
|
||||||
|
{
|
||||||
|
bool insertTarget = false;
|
||||||
|
// Only add the global targets from CMAKE_BINARY_DIR,
|
||||||
|
// not from the subdirs
|
||||||
|
if (strcmp(makefile->GetStartOutputDirectory(),
|
||||||
|
makefile->GetHomeOutputDirectory())==0)
|
||||||
{
|
{
|
||||||
bool insertTarget = false;
|
insertTarget = true;
|
||||||
// Only add the global targets from CMAKE_BINARY_DIR,
|
// only add the "edit_cache" target if it's not ccmake, because
|
||||||
// not from the subdirs
|
// this will not work within the IDE
|
||||||
if (strcmp(makefile->GetStartOutputDirectory(),
|
if (ti->first == "edit_cache")
|
||||||
makefile->GetHomeOutputDirectory())==0)
|
|
||||||
{
|
{
|
||||||
insertTarget = true;
|
if (strstr(makefile->GetRequiredDefinition
|
||||||
// only add the "edit_cache" target if it's not ccmake, because
|
|
||||||
// this will not work within the IDE
|
|
||||||
if (ti->first == "edit_cache")
|
|
||||||
{
|
|
||||||
if (strstr(makefile->GetRequiredDefinition
|
|
||||||
("CMAKE_EDIT_COMMAND"), "ccmake")!=NULL)
|
("CMAKE_EDIT_COMMAND"), "ccmake")!=NULL)
|
||||||
{
|
{
|
||||||
insertTarget = false;
|
insertTarget = false;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (insertTarget)
|
|
||||||
{
|
|
||||||
this->AppendTarget(fout, ti->first.c_str(), 0,
|
|
||||||
make.c_str(), makefile, compiler.c_str());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
break;
|
if (insertTarget)
|
||||||
case cmTarget::UTILITY:
|
{
|
||||||
// Add all utility targets, except the Nightly/Continuous/
|
this->AppendTarget(fout, ti->first.c_str(), 0,
|
||||||
// Experimental-"sub"targets as e.g. NightlyStart
|
make.c_str(), makefile, compiler.c_str());
|
||||||
if (((ti->first.find("Nightly")==0) &&(ti->first!="Nightly"))
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case cmTarget::UTILITY:
|
||||||
|
// Add all utility targets, except the Nightly/Continuous/
|
||||||
|
// Experimental-"sub"targets as e.g. NightlyStart
|
||||||
|
if (((ti->first.find("Nightly")==0) &&(ti->first!="Nightly"))
|
||||||
|| ((ti->first.find("Continuous")==0)&&(ti->first!="Continuous"))
|
|| ((ti->first.find("Continuous")==0)&&(ti->first!="Continuous"))
|
||||||
|| ((ti->first.find("Experimental")==0)
|
|| ((ti->first.find("Experimental")==0)
|
||||||
&& (ti->first!="Experimental")))
|
&& (ti->first!="Experimental")))
|
||||||
{
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
this->AppendTarget(fout, ti->first.c_str(), 0,
|
|
||||||
make.c_str(), makefile, compiler.c_str());
|
|
||||||
break;
|
|
||||||
case cmTarget::EXECUTABLE:
|
|
||||||
case cmTarget::STATIC_LIBRARY:
|
|
||||||
case cmTarget::SHARED_LIBRARY:
|
|
||||||
case cmTarget::MODULE_LIBRARY:
|
|
||||||
{
|
{
|
||||||
this->AppendTarget(fout, ti->first.c_str(), &ti->second,
|
break;
|
||||||
make.c_str(), makefile, compiler.c_str());
|
|
||||||
std::string fastTarget = ti->first;
|
|
||||||
fastTarget += "/fast";
|
|
||||||
this->AppendTarget(fout, fastTarget.c_str(), &ti->second,
|
|
||||||
make.c_str(), makefile, compiler.c_str());
|
|
||||||
}
|
}
|
||||||
break;
|
|
||||||
// ignore these:
|
this->AppendTarget(fout, ti->first.c_str(), 0,
|
||||||
case cmTarget::INSTALL_FILES:
|
make.c_str(), makefile, compiler.c_str());
|
||||||
case cmTarget::INSTALL_PROGRAMS:
|
break;
|
||||||
case cmTarget::INSTALL_DIRECTORY:
|
case cmTarget::EXECUTABLE:
|
||||||
default:
|
case cmTarget::STATIC_LIBRARY:
|
||||||
break;
|
case cmTarget::SHARED_LIBRARY:
|
||||||
|
case cmTarget::MODULE_LIBRARY:
|
||||||
|
{
|
||||||
|
this->AppendTarget(fout, ti->first.c_str(), &ti->second,
|
||||||
|
make.c_str(), makefile, compiler.c_str());
|
||||||
|
std::string fastTarget = ti->first;
|
||||||
|
fastTarget += "/fast";
|
||||||
|
this->AppendTarget(fout, fastTarget.c_str(), &ti->second,
|
||||||
|
make.c_str(), makefile, compiler.c_str());
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
// ignore these:
|
||||||
|
case cmTarget::INSTALL_FILES:
|
||||||
|
case cmTarget::INSTALL_PROGRAMS:
|
||||||
|
case cmTarget::INSTALL_DIRECTORY:
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -676,7 +675,7 @@ int cmExtraCodeBlocksGenerator::GetCBTargetType(cmTarget* target)
|
|||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
else if ((target->GetType()==cmTarget::SHARED_LIBRARY)
|
else if ((target->GetType()==cmTarget::SHARED_LIBRARY)
|
||||||
|| (target->GetType()==cmTarget::MODULE_LIBRARY))
|
|| (target->GetType()==cmTarget::MODULE_LIBRARY))
|
||||||
{
|
{
|
||||||
return 3;
|
return 3;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user