summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2023-01-11 18:06:36 +0100
committerBent Bisballe Nyeng <deva@aasimon.org>2023-01-11 18:06:36 +0100
commit539c127d6c35e07c995d30c55aa600d248ec12e6 (patch)
tree50e09fc2e067bafd6cff7ac6d74edac784ca6bcb /src
parent35e368cee986bcf91a472170f97e79f76065366d (diff)
Rename Source class to source
Diffstat (limited to 'src')
-rw-r--r--src/ctor.h20
-rw-r--r--src/rebuild.cc2
-rw-r--r--src/task_cc.cc2
-rw-r--r--src/task_cc.h4
-rw-r--r--src/task_fn.cc2
-rw-r--r--src/task_fn.h2
6 files changed, 16 insertions, 16 deletions
diff --git a/src/ctor.h b/src/ctor.h
index dba2f3a..549efb4 100644
--- a/src/ctor.h
+++ b/src/ctor.h
@@ -41,17 +41,17 @@ enum class output_system
build, // Internal tool during cross-compilation
};
-struct Source
+struct source
{
- Source(const char* file) : file(file) {}
- Source(const std::string& file) : file(file) {}
- Source(const char* file, ctor::language lang) : file(file), language(lang) {}
- Source(const std::string& file, ctor::language lang) : file(file), language(lang) {}
+ source(const char* file) : file(file) {}
+ source(const std::string& file) : file(file) {}
+ source(const char* file, ctor::language lang) : file(file), language(lang) {}
+ source(const std::string& file, ctor::language lang) : file(file), language(lang) {}
- Source(const char* file, const char* output) : file(file), output(output) {}
- Source(const std::string& file, const std::string& output) : file(file), output(output) {}
- Source(const char* file, ctor::language lang, const char* output) : file(file), language(lang), output(output) {}
- Source(const std::string& file, ctor::language lang, const std::string& output) : file(file), language(lang), output(output) {}
+ source(const char* file, const char* output) : file(file), output(output) {}
+ source(const std::string& file, const std::string& output) : file(file), output(output) {}
+ source(const char* file, ctor::language lang, const char* output) : file(file), language(lang), output(output) {}
+ source(const std::string& file, ctor::language lang, const std::string& output) : file(file), language(lang), output(output) {}
std::string file;
ctor::language language{ctor::language::automatic};
@@ -85,7 +85,7 @@ struct BuildConfiguration
ctor::target_type type{ctor::target_type::automatic};
ctor::output_system system{ctor::output_system::host};
std::string target; // Output target file for this configuration
- std::vector<Source> sources; // source list
+ std::vector<ctor::source> sources; // source list
std::vector<std::string> depends; // internal target dependencies
Flags flags;
std::vector<std::string> externals; // externals used by this configuration
diff --git a/src/rebuild.cc b/src/rebuild.cc
index f645275..daf5443 100644
--- a/src/rebuild.cc
+++ b/src/rebuild.cc
@@ -135,7 +135,7 @@ int reg(ExternalConfigurations (*cb)(const Settings&),
namespace
{
-bool contains(const std::vector<Source>& sources, const std::string& file)
+bool contains(const std::vector<ctor::source>& sources, const std::string& file)
{
for(const auto& source : sources)
{
diff --git a/src/task_cc.cc b/src/task_cc.cc
index 581ca12..0733afc 100644
--- a/src/task_cc.cc
+++ b/src/task_cc.cc
@@ -15,7 +15,7 @@
using namespace ctor;
TaskCC::TaskCC(const BuildConfiguration& config, const Settings& settings,
- const std::string& sourceDir, const Source& source)
+ const std::string& sourceDir, const ctor::source& source)
: Task(config, settings, sourceDir)
, config(config)
, settings(settings)
diff --git a/src/task_cc.h b/src/task_cc.h
index cdde84b..ee53f6d 100644
--- a/src/task_cc.h
+++ b/src/task_cc.h
@@ -16,7 +16,7 @@ class TaskCC
public:
TaskCC(const ctor::BuildConfiguration& config,
const ctor::Settings& settings,
- const std::string& sourceDir, const ctor::Source& source);
+ const std::string& sourceDir, const ctor::source& source);
virtual ~TaskCC() = default;
int registerDepTasksInner(const std::set<std::shared_ptr<Task>>& tasks) override;
@@ -51,5 +51,5 @@ protected:
const ctor::BuildConfiguration& config;
const ctor::Settings& settings;
std::filesystem::path sourceDir;
- const ctor::Source& _source;
+ const ctor::source& _source;
};
diff --git a/src/task_fn.cc b/src/task_fn.cc
index f633704..4af86a4 100644
--- a/src/task_fn.cc
+++ b/src/task_fn.cc
@@ -14,7 +14,7 @@
using namespace ctor;
TaskFn::TaskFn(const BuildConfiguration& config, const Settings& settings,
- const std::string& sourceDir, const Source& source)
+ const std::string& sourceDir, const ctor::source& source)
: Task(config, settings, sourceDir)
, config(config)
, settings(settings)
diff --git a/src/task_fn.h b/src/task_fn.h
index 654241c..565836b 100644
--- a/src/task_fn.h
+++ b/src/task_fn.h
@@ -16,7 +16,7 @@ class TaskFn
public:
TaskFn(const ctor::BuildConfiguration& config,
const ctor::Settings& settings,
- const std::string& sourceDir, const ctor::Source& source);
+ const std::string& sourceDir, const ctor::source& source);
virtual ~TaskFn() = default;
bool dirtyInner() override;