summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ctor.h10
-rw-r--r--src/rebuild.cc2
-rw-r--r--src/task.cc10
-rw-r--r--src/task.h4
-rw-r--r--src/task_ar.cc4
-rw-r--r--src/tools.cc6
-rw-r--r--src/tools.h2
7 files changed, 19 insertions, 19 deletions
diff --git a/src/ctor.h b/src/ctor.h
index dbcfa66..dba2f3a 100644
--- a/src/ctor.h
+++ b/src/ctor.h
@@ -35,10 +35,10 @@ enum class language
assembler,
};
-enum class OutputSystem
+enum class output_system
{
- Host, // Output for the target system
- Build, // Internal tool during cross-compilation
+ host, // Output for the target system
+ build, // Internal tool during cross-compilation
};
struct Source
@@ -83,7 +83,7 @@ struct BuildConfiguration
{
std::string name; // Name - used for referring in other configurations.
ctor::target_type type{ctor::target_type::automatic};
- OutputSystem system{OutputSystem::Host};
+ 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<std::string> depends; // internal target dependencies
@@ -107,7 +107,7 @@ struct ExternalManual
struct ExternalConfiguration
{
std::string name; // Name for configuration
- OutputSystem system{OutputSystem::Host};
+ ctor::output_system system{ctor::output_system::host};
std::variant<ExternalManual> external;
};
diff --git a/src/rebuild.cc b/src/rebuild.cc
index c40a18c..f645275 100644
--- a/src/rebuild.cc
+++ b/src/rebuild.cc
@@ -162,7 +162,7 @@ bool recompileCheck(const Settings& global_settings, int argc, char* argv[],
BuildConfiguration config;
config.name = "ctor";
- config.system = OutputSystem::Build;
+ config.system = ctor::output_system::build;
auto tool_chain = getToolChain(config.system);
diff --git a/src/task.cc b/src/task.cc
index eba365f..4a55d00 100644
--- a/src/task.cc
+++ b/src/task.cc
@@ -124,7 +124,7 @@ ctor::language Task::sourceLanguage() const
return source_language;
}
-OutputSystem Task::outputSystem() const
+ctor::output_system Task::outputSystem() const
{
return output_system;
}
@@ -136,17 +136,17 @@ std::string Task::compiler() const
case ctor::language::c:
switch(outputSystem())
{
- case OutputSystem::Host:
+ case ctor::output_system::host:
return getConfiguration(cfg::host_cc, "/usr/bin/gcc");
- case OutputSystem::Build:
+ case ctor::output_system::build:
return getConfiguration(cfg::build_cc, "/usr/bin/gcc");
}
case ctor::language::cpp:
switch(outputSystem())
{
- case OutputSystem::Host:
+ case ctor::output_system::host:
return getConfiguration(cfg::host_cxx, "/usr/bin/g++");
- case OutputSystem::Build:
+ case ctor::output_system::build:
return getConfiguration(cfg::build_cxx, "/usr/bin/g++");
}
default:
diff --git a/src/task.h b/src/task.h
index 673df67..c82a995 100644
--- a/src/task.h
+++ b/src/task.h
@@ -61,7 +61,7 @@ public:
ctor::target_type targetType() const;
ctor::language sourceLanguage() const;
- ctor::OutputSystem outputSystem() const;
+ ctor::output_system outputSystem() const;
std::string compiler() const;
std::set<std::shared_ptr<Task>> getDependsTasks();
@@ -78,7 +78,7 @@ protected:
const ctor::BuildConfiguration& config;
ctor::target_type target_type{ctor::target_type::automatic};
ctor::language source_language{ctor::language::automatic};
- ctor::OutputSystem output_system{ctor::OutputSystem::Host};
+ ctor::output_system output_system{ctor::output_system::host};
const ctor::Settings& settings;
std::string sourceDir;
};
diff --git a/src/task_ar.cc b/src/task_ar.cc
index 528e71a..d9548cd 100644
--- a/src/task_ar.cc
+++ b/src/task_ar.cc
@@ -100,10 +100,10 @@ int TaskAR::runInner()
std::string tool;
switch(outputSystem())
{
- case OutputSystem::Host:
+ case ctor::output_system::host:
tool = getConfiguration(cfg::host_ar, "/usr/bin/ar");
break;
- case OutputSystem::Build:
+ case ctor::output_system::build:
tool = getConfiguration(cfg::build_ar, "/usr/bin/ar");
break;
}
diff --git a/src/tools.cc b/src/tools.cc
index f0b6d4e..e61a749 100644
--- a/src/tools.cc
+++ b/src/tools.cc
@@ -10,15 +10,15 @@
using namespace ctor;
-ToolChain getToolChain(OutputSystem system)
+ToolChain getToolChain(ctor::output_system system)
{
std::string compiler;
switch(system)
{
- case OutputSystem::Host:
+ case ctor::output_system::host:
compiler = getConfiguration(cfg::host_cxx, "g++");
break;
- case OutputSystem::Build:
+ case ctor::output_system::build:
compiler = getConfiguration(cfg::build_cxx, "g++");
break;
}
diff --git a/src/tools.h b/src/tools.h
index 0b5b211..49069d5 100644
--- a/src/tools.h
+++ b/src/tools.h
@@ -37,7 +37,7 @@ enum class opt
};
//! Get tool-chain type from output system (via configuration)
-ToolChain getToolChain(ctor::OutputSystem system);
+ToolChain getToolChain(ctor::output_system system);
//! Get tool argument(s) for specific option type matching the supplied
//! tool-chain