diff options
author | Alex Neundorf <neundorf@kde.org> | 2012-10-23 20:38:33 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2012-11-06 16:51:11 (GMT) |
commit | 077de8b27136d0ac84eebdac8dd468c273b16597 (patch) | |
tree | 15db99422dd3d42c79641b1d06cede7452bf5986 /Source/cmExtraEclipseCDT4Generator.cxx | |
parent | 2362bc8e80ee657dd733bbf4b698199ce3b656fe (diff) | |
download | CMake-077de8b27136d0ac84eebdac8dd468c273b16597.zip CMake-077de8b27136d0ac84eebdac8dd468c273b16597.tar.gz CMake-077de8b27136d0ac84eebdac8dd468c273b16597.tar.bz2 |
Eclipse: set source path once to fix Eclipse indexer (#13596)
Since CMake 2.8.7 no src-path entry was generated anymore, in response to
http://www.cmake.org/Bug/view.php?id=12213
Before that a src-path entry was added for each linked resource.
Now only one src-path entry is added, for the ${CMAKE_SOURCE_DIR}.
According to
http://www.cmake.org/Bug/view.php?id=13596
this makes the indexer behave better.
Alex
Diffstat (limited to 'Source/cmExtraEclipseCDT4Generator.cxx')
-rw-r--r-- | Source/cmExtraEclipseCDT4Generator.cxx | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/Source/cmExtraEclipseCDT4Generator.cxx b/Source/cmExtraEclipseCDT4Generator.cxx index 689f213..c8f98d7 100644 --- a/Source/cmExtraEclipseCDT4Generator.cxx +++ b/Source/cmExtraEclipseCDT4Generator.cxx @@ -579,7 +579,8 @@ void cmExtraEclipseCDT4Generator::CreateLinksToSubprojects( this->GetEclipsePath(linkSourceDirectory), LinkToFolder ); - this->SrcLinkedResources.push_back(it->first); + // Don't add it to the srcLinkedResources, because listing multiple + // directories confuses the Eclipse indexer (#13596). } } } @@ -730,15 +731,16 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const /* I don't know what the pathentry kind="src" are good for, e.g. autocompletion * works also without them. Done wrong, the indexer complains, see #12417 * and #12213. + * According to #13596, this entry at least limits the directories the + * indexer is searching for files. So now the "src" entry contains only + * the linked resource to CMAKE_SOURCE_DIR. * The CDT documentation is very terse on that: * "CDT_SOURCE: Entry kind constant describing a path entry identifying a * folder containing source code to be compiled." * Also on the cdt-dev list didn't bring any information: * http://web.archiveorange.com/archive/v/B4NlJDNIpYoOS1SbxFNy - * So I'm disabling them for now, hoping that somebody will report if something - * is not workging anymore. * Alex */ -#ifdef DO_CREATE_SRC_PATH_ENTRIES + for (std::vector<std::string>::const_iterator it = this->SrcLinkedResources.begin(); it != this->SrcLinkedResources.end(); @@ -755,7 +757,7 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const excludeFromOut += this->EscapeForXML(*it) + "/|"; } } -#endif + excludeFromOut += "**/CMakeFiles/"; fout << "<pathentry excluding=\"" << excludeFromOut << "\" kind=\"out\" path=\"\"/>\n"; |