summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-09-22 16:57:50 (GMT)
committerBrad King <brad.king@kitware.com>2020-09-23 13:25:42 (GMT)
commitf2daa025e3bf05f89a745e6a65fea9537e0a035d (patch)
tree2e7528043c7ee905e3777e53e11698f8b81a9a57 /Source/cmGlobalGenerator.cxx
parent0cb7216b9f016d5749209227502e499b53b33841 (diff)
downloadCMake-f2daa025e3bf05f89a745e6a65fea9537e0a035d.zip
CMake-f2daa025e3bf05f89a745e6a65fea9537e0a035d.tar.gz
CMake-f2daa025e3bf05f89a745e6a65fea9537e0a035d.tar.bz2
{get,set}_property: Add support for referencing binary directories
Index directories by their binary directory path in addition to their source directory path. Fixes: #19262
Diffstat (limited to 'Source/cmGlobalGenerator.cxx')
-rw-r--r--Source/cmGlobalGenerator.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index ce1a4ec..86b01bc 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -2353,13 +2353,13 @@ std::string cmGlobalGenerator::IndexGeneratorTargetUniquely(
void cmGlobalGenerator::IndexMakefile(cmMakefile* mf)
{
- // FIXME: add_subdirectory supports multiple build directories
- // sharing the same source directory. We currently index only the
- // first one, because that is what FindMakefile has always returned.
- // All of its callers will need to be modified to support looking
- // up directories by build directory path.
+ // We index by both source and binary directory. add_subdirectory
+ // supports multiple build directories sharing the same source directory.
+ // The source directory index will reference only the first time it is used.
this->MakefileSearchIndex.insert(
MakefileMap::value_type(mf->GetCurrentSourceDirectory(), mf));
+ this->MakefileSearchIndex.insert(
+ MakefileMap::value_type(mf->GetCurrentBinaryDirectory(), mf));
}
void cmGlobalGenerator::IndexLocalGenerator(cmLocalGenerator* lg)