summaryrefslogtreecommitdiff
path: root/src/task_cc.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2022-05-30 19:33:37 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2022-06-09 22:27:49 +0200
commit69d6df33bf7fabe62cdcd61bcd7ebc20b6de6b67 (patch)
tree3de37f23c4449b899c222989c7c78aa8fc067fd8 /src/task_cc.cc
parent61f7f7538cc6abb0be64c35570f38dd2541d7451 (diff)
Add custom output object names to source specifications.
Diffstat (limited to 'src/task_cc.cc')
-rw-r--r--src/task_cc.cc11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/task_cc.cc b/src/task_cc.cc
index 673c16d..ee25abf 100644
--- a/src/task_cc.cc
+++ b/src/task_cc.cc
@@ -51,8 +51,15 @@ TaskCC::TaskCC(const BuildConfiguration& config, const Settings& settings,
break;
}
- _targetFile = base;
- _targetFile += ".o";
+ if(source.output.empty())
+ {
+ _targetFile = base;
+ _targetFile += ".o";
+ }
+ else
+ {
+ _targetFile = source.output;
+ }
depsFile = targetFile().parent_path() / targetFile().stem();
depsFile += ".d";
flagsFile = targetFile().parent_path() / targetFile().stem();