From 80290e7d65dc498e9ea5e64aa6cbc65282072deb Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Fri, 18 Jun 2021 07:27:57 +0200 Subject: New dependency system. --- task_cc.cc | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'task_cc.cc') diff --git a/task_cc.cc b/task_cc.cc index bef108e..74654aa 100644 --- a/task_cc.cc +++ b/task_cc.cc @@ -85,7 +85,8 @@ std::vector readDeps(const std::string& depFile) TaskCC::TaskCC(const BuildConfiguration& config, const Settings& settings, const std::string& source) - : config(config) + : Task({}) + , config(config) , settings(settings) { sourceFile = source; @@ -100,7 +101,7 @@ TaskCC::TaskCC(const BuildConfiguration& config, const Settings& settings, flagsFile += ".flags"; } -bool TaskCC::dirty() +bool TaskCC::dirtyInner() { if(!std::filesystem::exists(sourceFile)) { @@ -164,7 +165,7 @@ bool TaskCC::dirty() return false; } -int TaskCC::run() +int TaskCC::runInner() { if(!std::filesystem::exists(sourceFile)) { @@ -192,7 +193,12 @@ int TaskCC::run() flagsStream << flagsString(); } - return execute(comp, args); + if(settings.verbose == 0) + { + std::cout << compiler() << " " << sourceFile.string() << " => " << + targetFile.string() << "\n"; + } + return execute(comp, args, settings.verbose > 0); } int TaskCC::clean() -- cgit v1.2.3