diff options
author | Adam Weisi <android.weisi@googlemail.com> | 2016-11-21 14:43:37 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-11-21 20:05:14 (GMT) |
commit | f84a3acd71d4aacd2c553279ab0943d09d83eced (patch) | |
tree | 0baad1417874803a12b8bdc01d008ccff3d3d40d /Source | |
parent | 029b2096129aeb96bd6352522bca88489fc76352 (diff) | |
download | CMake-f84a3acd71d4aacd2c553279ab0943d09d83eced.zip CMake-f84a3acd71d4aacd2c553279ab0943d09d83eced.tar.gz CMake-f84a3acd71d4aacd2c553279ab0943d09d83eced.tar.bz2 |
Eclipse: Fix indexer for subprojects
Using `add_subdirectory(source_dir binary_dir)` with `source_dir` not a
subdirectory needs to add a `[Subprojects]` entry to the source path in
Eclipse. The Eclipse indexer seems to use those entries as reference to
index source files.
Closes: #15984
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmExtraEclipseCDT4Generator.cxx | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Source/cmExtraEclipseCDT4Generator.cxx b/Source/cmExtraEclipseCDT4Generator.cxx index ff2703e..b4fc771 100644 --- a/Source/cmExtraEclipseCDT4Generator.cxx +++ b/Source/cmExtraEclipseCDT4Generator.cxx @@ -703,6 +703,14 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const * Also on the cdt-dev list didn't bring any information: * http://web.archiveorange.com/archive/v/B4NlJDNIpYoOS1SbxFNy * Alex */ + // include subprojects directory to the src pathentry + // eclipse cdt indexer uses this entries as reference to index source files + if (this->GenerateLinkedResources) { + xml.StartElement("pathentry"); + xml.Attribute("kind", "src"); + xml.Attribute("path", "[Subprojects]"); + xml.EndElement(); + } for (std::vector<std::string>::const_iterator it = this->SrcLinkedResources.begin(); |