diff options
-rw-r--r-- | Source/cmGlobalKdevelopGenerator.cxx | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/Source/cmGlobalKdevelopGenerator.cxx b/Source/cmGlobalKdevelopGenerator.cxx index 4ce771b..388ed13 100644 --- a/Source/cmGlobalKdevelopGenerator.cxx +++ b/Source/cmGlobalKdevelopGenerator.cxx @@ -80,24 +80,25 @@ 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; - 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++) + for (std::vector<cmLocalGenerator*>::const_iterator lg=lgs.begin(); + lg!=lgs.end(); lg++) { - if (ti->second.GetType()==cmTarget::EXECUTABLE) + cmMakefile* makefile=(*lg)->GetMakefile(); + cmTargets& targets=makefile->GetTargets(); + for (cmTargets::iterator ti = targets.begin(); + ti != targets.end(); ti++) + { + if (ti->second.GetType()==cmTarget::EXECUTABLE) + { + executable = ti->second.GetProperty("LOCATION"); + break; + } + } + if (!executable.empty()) { - executable = ti->second.GetProperty("LOCATION"); break; } } - if (!executable.empty()) - break; - } // now create a project file this->CreateProjectFile(outputDir, projectDir, projectName, executable, cmakeFilePattern, fileToOpen); |