diff options
author | Brad King <brad.king@kitware.com> | 2020-09-23 14:22:31 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2020-09-23 14:22:56 (GMT) |
commit | 145730c74630f09e0cb7a0167059ec7ee470d245 (patch) | |
tree | ae5fa78f82e87677fdf1eb2a8fceead634c1ab2e /Source | |
parent | 03b3b5ab4b512b7d80871bdd7a3fe3e03f9f744a (diff) | |
parent | f2daa025e3bf05f89a745e6a65fea9537e0a035d (diff) | |
download | CMake-145730c74630f09e0cb7a0167059ec7ee470d245.zip CMake-145730c74630f09e0cb7a0167059ec7ee470d245.tar.gz CMake-145730c74630f09e0cb7a0167059ec7ee470d245.tar.bz2 |
Merge topic 'binary-dir-props'
f2daa025e3 {get,set}_property: Add support for referencing binary directories
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !5254
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmGlobalGenerator.cxx | 10 | ||||
-rw-r--r-- | Source/cmSetPropertyCommand.cxx | 2 |
2 files changed, 6 insertions, 6 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) diff --git a/Source/cmSetPropertyCommand.cxx b/Source/cmSetPropertyCommand.cxx index 6ca763b..df6a38a 100644 --- a/Source/cmSetPropertyCommand.cxx +++ b/Source/cmSetPropertyCommand.cxx @@ -113,7 +113,7 @@ bool HandleSourceFileDirectoryScopes( "given non-existent target for TARGET_DIRECTORY ", target_name)); return false; } - cmProp target_source_dir = target->GetProperty("SOURCE_DIR"); + cmProp target_source_dir = target->GetProperty("BINARY_DIR"); cmMakefile* target_dir_mf = status.GetMakefile().GetGlobalGenerator()->FindMakefile( *target_source_dir); |