summaryrefslogtreecommitdiffstats
path: root/Source/cmNinjaTargetGenerator.cxx
diff options
context:
space:
mode:
authorSaleem Abdulrasool <compnerd@compnerd.org>2019-07-24 00:56:19 (GMT)
committerSaleem Abdulrasool <compnerd@compnerd.org>2019-07-24 00:56:19 (GMT)
commit3391a3eca821ec9e2844af60835e6f2ab722ceed (patch)
tree78f2d4b99d84c90bf3ae7c53bd041ec8d3ebeedf /Source/cmNinjaTargetGenerator.cxx
parenta1debb8b0844128fcdd9b75223b31c4e386d3d33 (diff)
downloadCMake-3391a3eca821ec9e2844af60835e6f2ab722ceed.zip
CMake-3391a3eca821ec9e2844af60835e6f2ab722ceed.tar.gz
CMake-3391a3eca821ec9e2844af60835e6f2ab722ceed.tar.bz2
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.
Diffstat (limited to 'Source/cmNinjaTargetGenerator.cxx')
-rw-r--r--Source/cmNinjaTargetGenerator.cxx4
1 files 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")) {