mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-01 19:30:13 -06:00
Ninja: do not normalise swift support file paths
When building the output-map-file.json, do not convert the path to a Ninja path, which will make it relative. If `cmake` is invoked with the `-B` option the files will be written relative to the directory where CMake was invoked rather than relative to the build tree. This path need not be a relative path since it is used internally by CMake to determine where to write the output map file. This allows the use of `-B` option in CMake in projects with Swift targets.
This commit is contained in:
@@ -910,8 +910,8 @@ void cmNinjaTargetGenerator::WriteObjectBuildStatements()
|
||||
this->GetBuildFileStream() << "\n";
|
||||
|
||||
if (!this->SwiftOutputMap.empty()) {
|
||||
std::string const mapFilePath = this->ConvertToNinjaPath(
|
||||
this->GeneratorTarget->GetSupportDirectory() + "/output-file-map.json");
|
||||
std::string const mapFilePath =
|
||||
this->GeneratorTarget->GetSupportDirectory() + "/output-file-map.json";
|
||||
std::string const targetSwiftDepsPath = [this]() -> std::string {
|
||||
cmGeneratorTarget const* target = this->GeneratorTarget;
|
||||
if (const char* name = target->GetProperty("Swift_DEPENDENCIES_FILE")) {
|
||||
|
||||
Reference in New Issue
Block a user