summaryrefslogtreecommitdiff
path: root/task.cc
diff options
context:
space:
mode:
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()))