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
This commit is contained in:
Brad King
2020-12-08 15:16:43 +00:00
committed by Kitware Robot
5 changed files with 32 additions and 15 deletions
+6 -1
View File
@@ -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);
}
}