summaryrefslogtreecommitdiff
path: root/src/tasks.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/tasks.cc')
-rw-r--r--src/tasks.cc30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/tasks.cc b/src/tasks.cc
index 2d83349..a1d4c70 100644
--- a/src/tasks.cc
+++ b/src/tasks.cc
@@ -87,24 +87,24 @@ std::set<std::shared_ptr<Task>> taskFactory(const BuildConfiguration& config,
std::filesystem::path targetFile(config.target);
- TargetType target_type{config.type};
- if(target_type == TargetType::Auto)
+ ctor::target_type target_type{config.type};
+ if(target_type == ctor::target_type::automatic)
{
if(config.function != nullptr)
{
- target_type = TargetType::Function;
+ target_type = ctor::target_type::function;
}
else if(targetFile.extension() == ".a")
{
- target_type = TargetType::StaticLibrary;
+ target_type = ctor::target_type::static_library;
}
else if(targetFile.extension() == ".so")
{
- target_type = TargetType::DynamicLibrary;
+ target_type = ctor::target_type::dynamic_library;
}
else if(targetFile.extension() == "")
{
- target_type = TargetType::Executable;
+ target_type = ctor::target_type::executable;
}
else
{
@@ -115,7 +115,7 @@ std::set<std::shared_ptr<Task>> taskFactory(const BuildConfiguration& config,
}
std::vector<std::string> objects;
- if(target_type != TargetType::Function)
+ if(target_type != ctor::target_type::function)
{
for(const auto& file : config.sources)
{
@@ -138,17 +138,17 @@ std::set<std::shared_ptr<Task>> taskFactory(const BuildConfiguration& config,
switch(target_type)
{
- case TargetType::Auto:
+ case ctor::target_type::automatic:
// The target_type cannot be Auto
break;
- case TargetType::StaticLibrary:
- case TargetType::UnitTestLib:
+ case ctor::target_type::static_library:
+ case ctor::target_type::unit_test_library:
tasks.insert(std::make_shared<TaskAR>(config, settings, config.target,
objects, sourceDir));
break;
#ifndef BOOTSTRAP
- case TargetType::DynamicLibrary:
+ case ctor::target_type::dynamic_library:
// TODO: Use C++20 starts_with
if(targetFile.stem().string().substr(0, 3) != "lib")
{
@@ -159,14 +159,14 @@ std::set<std::shared_ptr<Task>> taskFactory(const BuildConfiguration& config,
objects, sourceDir));
break;
- case TargetType::Executable:
- case TargetType::UnitTest:
+ case ctor::target_type::executable:
+ case ctor::target_type::unit_test:
tasks.insert(std::make_shared<TaskLD>(config, settings, config.target,
objects, sourceDir));
break;
- case TargetType::Object:
- case TargetType::Function:
+ case ctor::target_type::object:
+ case ctor::target_type::function:
break;
#else
default: