diff options
author | Brad King <brad.king@kitware.com> | 2020-12-08 15:16:43 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2020-12-08 15:17:33 (GMT) |
commit | 60d95fe2c2781131a6bdd4e60c22d666d5d84d3a (patch) | |
tree | 6e6213605ac4ab16215208eda0b41d8b3a8abdbc /Source/cmGeneratorTarget.cxx | |
parent | cc14733044d39a6b49775b67ed353e88d4260e9b (diff) | |
parent | 9af93fef11e9ea23d7d87a1c217254c482555262 (diff) | |
download | CMake-60d95fe2c2781131a6bdd4e60c22d666d5d84d3a.zip CMake-60d95fe2c2781131a6bdd4e60c22d666d5d84d3a.tar.gz CMake-60d95fe2c2781131a6bdd4e60c22d666d5d84d3a.tar.bz2 |
Merge topic 'correct_ispc_path_computation'
9af93fef11 ISPC: Handle OBJECT sources in different directories
72ae15ebcb ISPC: Ninja properly compute ISPC_HEADER_DIRECTORY location
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5581
Diffstat (limited to 'Source/cmGeneratorTarget.cxx')
-rw-r--r-- | Source/cmGeneratorTarget.cxx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 12f8e44..b444edd 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -5086,9 +5086,14 @@ void cmGeneratorTarget::GetTargetObjectNames( objects.push_back(map_it->second); } + // We need to compute the relative path from the root of + // of the object directory to handle subdirectory paths + std::string rootObjectDir = this->GetObjectDirectory(config); + rootObjectDir = cmSystemTools::CollapseFullPath(rootObjectDir); auto ispcObjects = this->GetGeneratedISPCObjects(config); for (std::string const& output : ispcObjects) { - objects.push_back(cmSystemTools::GetFilenameName(output)); + auto relativePathFromObjectDir = output.substr(rootObjectDir.size()); + objects.push_back(relativePathFromObjectDir); } } |