From 3391a3eca821ec9e2844af60835e6f2ab722ceed Mon Sep 17 00:00:00 2001 From: Saleem Abdulrasool Date: Tue, 23 Jul 2019 17:56:19 -0700 Subject: 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. --- Source/cmNinjaTargetGenerator.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx index de79817..08c92ff 100644 --- a/Source/cmNinjaTargetGenerator.cxx +++ b/Source/cmNinjaTargetGenerator.cxx @@ -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")) { -- cgit v0.12