diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2006-04-24 01:12:22 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2006-04-24 01:12:22 (GMT) |
commit | 54b16559153a8a59e77beeba5ca07109cd50cf44 (patch) | |
tree | 4b9b41c98e411da93f3d0e77b15ce5c0fd4d8d3a | |
parent | 4e9564a0f161cc6b5fb18eb8ee4d406285e6cab1 (diff) | |
download | CMake-54b16559153a8a59e77beeba5ca07109cd50cf44.zip CMake-54b16559153a8a59e77beeba5ca07109cd50cf44.tar.gz CMake-54b16559153a8a59e77beeba5ca07109cd50cf44.tar.bz2 |
ENH: merge in Alex patches
-rw-r--r-- | Source/cmGlobalKdevelopGenerator.cxx | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/Source/cmGlobalKdevelopGenerator.cxx b/Source/cmGlobalKdevelopGenerator.cxx index 527aea5..4ce771b 100644 --- a/Source/cmGlobalKdevelopGenerator.cxx +++ b/Source/cmGlobalKdevelopGenerator.cxx @@ -68,8 +68,9 @@ void cmGlobalKdevelopGenerator::Generate() std::string projectName=mf->GetProjectName(); std::string cmakeFilePattern("CMakeLists.txt;*.cmake;"); std::string fileToOpen; + std::vector<cmLocalGenerator*>& lgs= it->second; // create the project.kdevelop.filelist file - if(!this->CreateFilelistFile(it->second[0], it->second, + if(!this->CreateFilelistFile(it->second[0], lgs, outputDir, projectDir, projectName, cmakeFilePattern, fileToOpen)) { @@ -79,7 +80,12 @@ void cmGlobalKdevelopGenerator::Generate() //try to find the name of an executable so we have something to //run from kdevelop for now just pick the first executable found 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(); ti != targets.end(); ti++) { @@ -89,6 +95,9 @@ void cmGlobalKdevelopGenerator::Generate() break; } } + if (!executable.empty()) + break; + } // now create a project file this->CreateProjectFile(outputDir, projectDir, projectName, executable, cmakeFilePattern, fileToOpen); @@ -121,7 +130,7 @@ bool cmGlobalKdevelopGenerator tmp=*lt; cmSystemTools::ReplaceString(tmp, projectDir.c_str(), ""); // 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); tmp=cmSystemTools::GetFilenameName(tmp); @@ -146,7 +155,7 @@ bool cmGlobalKdevelopGenerator { tmp=(*si)->GetFullPath(); cmSystemTools::ReplaceString(tmp, projectDir.c_str(), ""); - if (tmp[0]!='/') + if ((tmp[0]!='/') && (strstr(tmp.c_str(), "CMakeFiles/")==0)) { files.insert(tmp); } @@ -156,7 +165,7 @@ bool cmGlobalKdevelopGenerator { tmp=*lt; cmSystemTools::ReplaceString(tmp, projectDir.c_str(), ""); - if (tmp[0]!='/') + if ((tmp[0]!='/') && (strstr(tmp.c_str(), "CMakeFiles/")==0)) { files.insert(tmp.c_str()); } |