summaryrefslogtreecommitdiff
path: root/src/task_fn.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/task_fn.cc')
-rw-r--r--src/task_fn.cc21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/task_fn.cc b/src/task_fn.cc
index b11ff15..1ff72f9 100644
--- a/src/task_fn.cc
+++ b/src/task_fn.cc
@@ -11,13 +11,13 @@
#include "execute.h"
#include "util.h"
-TaskFn::TaskFn(const ctor::build_configuration& config, const ctor::settings& settings,
- const std::string& sourceDir, const ctor::source& source)
- : Task(config, settings, sourceDir)
- , config(config)
- , settings(settings)
+TaskFn::TaskFn(const ctor::build_configuration& config_, const ctor::settings& settings_,
+ const std::string& sourceDir_, const ctor::source& source)
+ : Task(config_, settings_, sourceDir_)
+ , sourceFile(sourceDir_)
+ , config(config_)
+ , settings(settings_)
{
- sourceFile = sourceDir;
sourceFile /= source.file;
std::filesystem::create_directories(std::filesystem::path(settings.builddir) / sourceFile.parent_path());
@@ -68,9 +68,10 @@ int TaskFn::runInner()
if(settings.verbose >= 0)
{
- std::cout << "Fn" << " " <<
- sourceFile.lexically_normal().string() << " => " <<
- targetFile().lexically_normal().string() << std::endl;
+ std::string output = "Fn " +
+ sourceFile.lexically_normal().string() + " => " +
+ targetFile().lexically_normal().string() + '\n';
+ std::cout << output << std::flush;
}
return config.function(sourceFile.string(),
@@ -97,7 +98,7 @@ std::vector<std::string> TaskFn::depends() const
std::string TaskFn::target() const
{
- return _targetFile;
+ return _targetFile.string();
}
std::filesystem::path TaskFn::targetFile() const