diff options
author | dec05eba <dec05eba@protonmail.com> | 2019-04-14 06:20:40 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2020-07-06 07:39:33 +0200 |
commit | 3605255a8e6eabd20490e784f9535ee540c1d079 (patch) | |
tree | bd6ef5428053a379070928c7bbcf4652cffa9d50 /backend | |
parent | e6dc47717bb78f8ef5c522ba465f02886f59f37c (diff) |
Use full path for source files in ninja, to make file links work with vscode and other tools
Diffstat (limited to 'backend')
-rw-r--r-- | backend/ninja/Ninja.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/backend/ninja/Ninja.cpp b/backend/ninja/Ninja.cpp index c594722..f5c92a4 100644 --- a/backend/ninja/Ninja.cpp +++ b/backend/ninja/Ninja.cpp @@ -1187,9 +1187,9 @@ namespace backend ninja::NinjaArgValue zigHeaderFileValue = { zigHeaderFile, '"' + toUtf8(zigHeaderFileDir) + '/' + headerName + '"' }; ninja::NinjaBuild *ninjaBuild = nullptr; if(zigTest) - ninjaBuild = testZigRule->build("../../../" + sourceFile.filepath, objectName, { zigHeaderFileValue }); + ninjaBuild = testZigRule->build(projectPathUtf8 + "/" + sourceFile.filepath, objectName, { zigHeaderFileValue }); else - ninjaBuild = compileZigRule->build("../../../" + sourceFile.filepath, objectName, { zigHeaderFileValue }); + ninjaBuild = compileZigRule->build(projectPathUtf8 + "/" + sourceFile.filepath, objectName, { zigHeaderFileValue }); ninjaBuild->alwaysRun = true; zigBuilds.push_back(ninjaBuild); @@ -1209,7 +1209,7 @@ namespace backend { objectName += config.getPackageName() + "@exe/" + sourceFile.filepath; objectName += getObjectFileExtension(config.getCompiler()); - compileCRule->build("../../../" + sourceFile.filepath, objectName, {}, zigBuilds); + compileCRule->build(projectPathUtf8 + "/" + sourceFile.filepath, objectName, {}, zigBuilds); usesCFiles = true; break; } @@ -1217,7 +1217,7 @@ namespace backend { objectName += config.getPackageName() + "@exe/" + sourceFile.filepath; objectName += getObjectFileExtension(config.getCompiler()); - compileCppRule->build("../../../" + sourceFile.filepath, objectName, {}, zigBuilds); + compileCppRule->build(projectPathUtf8 + "/" + sourceFile.filepath, objectName, {}, zigBuilds); usesCppFiles = true; break; } |