summaryrefslogtreecommitdiff
path: root/task_cc.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2021-06-19 14:10:36 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2021-06-19 14:10:36 +0200
commit154ce9b1ce22532a68f95f2291fa12fd90c49fde (patch)
tree602a5d927c79fbdfa0972136eb00d9570f0df480 /task_cc.cc
parent330336c28507e0ee3a77d20e03dbc994618c213c (diff)
Make sources relative to the build-file (include paths are still relative to project rootdir). Add -b to control build-dir.
Diffstat (limited to 'task_cc.cc')
-rw-r--r--task_cc.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/task_cc.cc b/task_cc.cc
index 4340f7b..f827c25 100644
--- a/task_cc.cc
+++ b/task_cc.cc
@@ -84,12 +84,13 @@ std::vector<std::string> readDeps(const std::string& depFile)
} // namespace ::
TaskCC::TaskCC(const BuildConfiguration& config, const Settings& settings,
- const std::string& source)
+ const std::string& sourceDir, const std::string& source)
: Task({})
, config(config)
, settings(settings)
{
- sourceFile = source;
+ sourceFile = sourceDir;
+ sourceFile /= source;
targetFile = settings.builddir / sourceFile.stem();
targetFile += ".o";