diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/task.cc | 7 | ||||
| -rw-r--r-- | src/task_ar.cc | 12 | ||||
| -rw-r--r-- | src/task_ar.h | 1 | ||||
| -rw-r--r-- | src/task_ld.cc | 12 | ||||
| -rw-r--r-- | src/task_ld.h | 1 | ||||
| -rw-r--r-- | src/task_so.cc | 12 | ||||
| -rw-r--r-- | src/task_so.h | 1 |
7 files changed, 9 insertions, 37 deletions
diff --git a/src/task.cc b/src/task.cc index ef7731b..77c745e 100644 --- a/src/task.cc +++ b/src/task.cc @@ -18,7 +18,12 @@ Task::Task(const ctor::build_configuration& config_, const ctor::settings& setti int Task::registerDepTasks(const std::vector<std::shared_ptr<Task>>& tasks) { - for(const auto& depStr : depends()) + auto dependsList = depends(); + for(const auto& dep : config.depends) + { + dependsList.emplace_back(dep); + } + for(const auto& depStr : dependsList) { bool found{false}; for(const auto& task : tasks) diff --git a/src/task_ar.cc b/src/task_ar.cc index 3b45cc2..74ea888 100644 --- a/src/task_ar.cc +++ b/src/task_ar.cc @@ -34,11 +34,6 @@ TaskAR::TaskAR(const ctor::build_configuration& config_, dependsStr.push_back(objectFile.string()); } - for(const auto& dep : config.depends) - { - depFiles.emplace_back(dep); - } - flagsFile = std::filesystem::path(settings.builddir) / cleanUp(sourceDir) / targetFile().stem(); flagsFile += ".flags"; @@ -155,11 +150,6 @@ std::vector<std::string> TaskAR::depends() const deps.push_back(objectFile.string()); } - for(const auto& dep : config.depends) - { - deps.push_back(dep); - } - return deps; } @@ -198,7 +188,7 @@ std::string TaskAR::flagsString() const for(const auto& dep : config.depends) { - if(dep != config.depends[0]) + if(&dep != &config.depends[0]) { flagsStr += " "; } diff --git a/src/task_ar.h b/src/task_ar.h index 601afeb..69cc088 100644 --- a/src/task_ar.h +++ b/src/task_ar.h @@ -37,7 +37,6 @@ private: std::string flagsString() const; std::vector<std::filesystem::path> objectFiles; - std::vector<std::filesystem::path> depFiles; std::filesystem::path _targetFile; std::filesystem::path flagsFile; diff --git a/src/task_ld.cc b/src/task_ld.cc index 03745be..c7014ff 100644 --- a/src/task_ld.cc +++ b/src/task_ld.cc @@ -41,11 +41,6 @@ TaskLD::TaskLD(const ctor::build_configuration& config_, dependsStr.push_back(objectFile.string()); } - for(const auto& dep : config.depends) - { - depFiles.emplace_back(dep); - } - flagsFile = std::filesystem::path(settings.builddir) / cleanUp(sourceDir) / targetFile().stem(); flagsFile += ".flags"; @@ -168,11 +163,6 @@ std::vector<std::string> TaskLD::depends() const deps.push_back(objectFile.string()); } - for(const auto& depFile : depFiles) - { - deps.push_back(depFile.string()); - } - return deps; } @@ -211,7 +201,7 @@ std::string TaskLD::flagsString() const for(const auto& dep : config.depends) { - if(dep != config.depends[0]) + if(&dep != &config.depends[0]) { flagsStr += " "; } diff --git a/src/task_ld.h b/src/task_ld.h index c0e3ebb..85f680a 100644 --- a/src/task_ld.h +++ b/src/task_ld.h @@ -38,7 +38,6 @@ private: std::string flagsString() const; std::vector<std::filesystem::path> objectFiles; - std::vector<std::filesystem::path> depFiles; std::filesystem::path _targetFile; std::filesystem::path flagsFile; diff --git a/src/task_so.cc b/src/task_so.cc index 92aeefe..f922ac3 100644 --- a/src/task_so.cc +++ b/src/task_so.cc @@ -36,11 +36,6 @@ TaskSO::TaskSO(const ctor::build_configuration& config_, dependsStr.push_back(objectFile.string()); } - for(const auto& dep : config.depends) - { - depFiles.emplace_back(dep); - } - flagsFile = std::filesystem::path(settings.builddir) / cleanUp(sourceDir) / targetFile().stem(); flagsFile += ".flags"; @@ -155,11 +150,6 @@ std::vector<std::string> TaskSO::depends() const deps.push_back(objectFile.string()); } - for(const auto& depFile : depFiles) - { - deps.push_back(depFile.string()); - } - return deps; } @@ -198,7 +188,7 @@ std::string TaskSO::flagsString() const for(const auto& dep : config.depends) { - if(dep != config.depends[0]) + if(&dep != &config.depends[0]) { flagsStr += " "; } diff --git a/src/task_so.h b/src/task_so.h index 60af225..3fc2e2f 100644 --- a/src/task_so.h +++ b/src/task_so.h @@ -37,7 +37,6 @@ private: std::string flagsString() const; std::vector<std::filesystem::path> objectFiles; - std::vector<std::filesystem::path> depFiles; std::filesystem::path _targetFile; std::filesystem::path flagsFile; |
