ENH: merge in Alex patches
This commit is contained in:
parent
4e9564a0f1
commit
54b1655915
|
@ -68,8 +68,9 @@ void cmGlobalKdevelopGenerator::Generate()
|
||||||
std::string projectName=mf->GetProjectName();
|
std::string projectName=mf->GetProjectName();
|
||||||
std::string cmakeFilePattern("CMakeLists.txt;*.cmake;");
|
std::string cmakeFilePattern("CMakeLists.txt;*.cmake;");
|
||||||
std::string fileToOpen;
|
std::string fileToOpen;
|
||||||
|
std::vector<cmLocalGenerator*>& lgs= it->second;
|
||||||
// create the project.kdevelop.filelist file
|
// create the project.kdevelop.filelist file
|
||||||
if(!this->CreateFilelistFile(it->second[0], it->second,
|
if(!this->CreateFilelistFile(it->second[0], lgs,
|
||||||
outputDir, projectDir,
|
outputDir, projectDir,
|
||||||
projectName, cmakeFilePattern, fileToOpen))
|
projectName, cmakeFilePattern, fileToOpen))
|
||||||
{
|
{
|
||||||
|
@ -79,7 +80,12 @@ void cmGlobalKdevelopGenerator::Generate()
|
||||||
//try to find the name of an executable so we have something to
|
//try to find the name of an executable so we have something to
|
||||||
//run from kdevelop for now just pick the first executable found
|
//run from kdevelop for now just pick the first executable found
|
||||||
std::string executable;
|
std::string executable;
|
||||||
cmTargets& targets=mf->GetTargets();
|
for (std::vector<cmLocalGenerator*>::const_iterator it=lgs.begin();
|
||||||
|
it!=lgs.end(); it++)
|
||||||
|
{
|
||||||
|
cmMakefile* makefile=(*it)->GetMakefile();
|
||||||
|
|
||||||
|
cmTargets& targets=makefile->GetTargets();
|
||||||
for (cmTargets::iterator ti = targets.begin();
|
for (cmTargets::iterator ti = targets.begin();
|
||||||
ti != targets.end(); ti++)
|
ti != targets.end(); ti++)
|
||||||
{
|
{
|
||||||
|
@ -89,6 +95,9 @@ void cmGlobalKdevelopGenerator::Generate()
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (!executable.empty())
|
||||||
|
break;
|
||||||
|
}
|
||||||
// now create a project file
|
// now create a project file
|
||||||
this->CreateProjectFile(outputDir, projectDir, projectName,
|
this->CreateProjectFile(outputDir, projectDir, projectName,
|
||||||
executable, cmakeFilePattern, fileToOpen);
|
executable, cmakeFilePattern, fileToOpen);
|
||||||
|
@ -121,7 +130,7 @@ bool cmGlobalKdevelopGenerator
|
||||||
tmp=*lt;
|
tmp=*lt;
|
||||||
cmSystemTools::ReplaceString(tmp, projectDir.c_str(), "");
|
cmSystemTools::ReplaceString(tmp, projectDir.c_str(), "");
|
||||||
// make sure the file is part of this source tree
|
// make sure the file is part of this source tree
|
||||||
if (tmp[0]!='/')
|
if ((tmp[0]!='/') && (strstr(tmp.c_str(), "CMakeFiles/")==0))
|
||||||
{
|
{
|
||||||
files.insert(tmp);
|
files.insert(tmp);
|
||||||
tmp=cmSystemTools::GetFilenameName(tmp);
|
tmp=cmSystemTools::GetFilenameName(tmp);
|
||||||
|
@ -146,7 +155,7 @@ bool cmGlobalKdevelopGenerator
|
||||||
{
|
{
|
||||||
tmp=(*si)->GetFullPath();
|
tmp=(*si)->GetFullPath();
|
||||||
cmSystemTools::ReplaceString(tmp, projectDir.c_str(), "");
|
cmSystemTools::ReplaceString(tmp, projectDir.c_str(), "");
|
||||||
if (tmp[0]!='/')
|
if ((tmp[0]!='/') && (strstr(tmp.c_str(), "CMakeFiles/")==0))
|
||||||
{
|
{
|
||||||
files.insert(tmp);
|
files.insert(tmp);
|
||||||
}
|
}
|
||||||
|
@ -156,7 +165,7 @@ bool cmGlobalKdevelopGenerator
|
||||||
{
|
{
|
||||||
tmp=*lt;
|
tmp=*lt;
|
||||||
cmSystemTools::ReplaceString(tmp, projectDir.c_str(), "");
|
cmSystemTools::ReplaceString(tmp, projectDir.c_str(), "");
|
||||||
if (tmp[0]!='/')
|
if ((tmp[0]!='/') && (strstr(tmp.c_str(), "CMakeFiles/")==0))
|
||||||
{
|
{
|
||||||
files.insert(tmp.c_str());
|
files.insert(tmp.c_str());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue