summaryrefslogtreecommitdiff
path: root/task.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2021-06-11 21:29:09 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2021-06-11 21:29:09 +0200
commitee825bf2e966a1b565473753adb3f2b74f6d0ce4 (patch)
tree1c88ce85788c1678f0946d880b0a3737c592e9d7 /task.cc
parent6e3070181fadbe47511b52c12af5e1409a9a70b0 (diff)
Flags'n'stuff
Diffstat (limited to 'task.cc')
-rw-r--r--task.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/task.cc b/task.cc
index 0b4240f..19e4712 100644
--- a/task.cc
+++ b/task.cc
@@ -84,6 +84,8 @@ std::vector<std::string> readDeps(const std::string& depFile)
Task::Task(const BuildConfiguration& config, const Settings& settings,
const std::string& source)
+ : config(config)
+ , settings(settings)
{
sourceFile = source;
targetFile = settings.builddir / sourceFile.stem();
@@ -155,8 +157,9 @@ void Task::start()
if(recompile)
{
std::string cmd =
- "g++ -MMD -c " + std::string(sourceFile) +
- " -o " + std::string(targetFile);
+ "g++ -MMD -c " + std::string(sourceFile) + " " +
+ config.cxxflags + " " +
+ "-o " + std::string(targetFile);
std::cout << cmd << "\n";
if(system(cmd.data()))