aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2019-04-14 06:20:40 +0200
committerdec05eba <dec05eba@protonmail.com>2020-07-06 07:39:33 +0200
commit3605255a8e6eabd20490e784f9535ee540c1d079 (patch)
treebd6ef5428053a379070928c7bbcf4652cffa9d50
parente6dc47717bb78f8ef5c522ba465f02886f59f37c (diff)
Use full path for source files in ninja, to make file links work with vscode and other tools
-rw-r--r--backend/ninja/Ninja.cpp8
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;
}