diff options
Diffstat (limited to 'src/libctor.h')
-rw-r--r-- | src/libctor.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/libctor.h b/src/libctor.h index 70f2c3e..f80a5c5 100644 --- a/src/libctor.h +++ b/src/libctor.h @@ -8,6 +8,7 @@ #include <vector> #include <map> #include <variant> +#include <cstddef> enum class TargetType { @@ -55,6 +56,13 @@ struct Flags std::vector<std::string> asmflags; // flags for asm translator }; +struct Settings +{ + std::string builddir{"build"}; + std::size_t parallel_processes{1}; + int verbose{0}; // -1: completely silent, 0: normal, 1: verbose, ... +}; + struct BuildConfiguration { std::string name; // Name - used for referring in other configurations. @@ -69,7 +77,7 @@ struct BuildConfiguration using BuildConfigurations = std::vector<BuildConfiguration>; -int reg(BuildConfigurations (*cb)(), +int reg(BuildConfigurations (*cb)(const Settings&), const std::source_location location = std::source_location::current()); // This type will use flags verbatim @@ -87,7 +95,7 @@ struct ExternalConfiguration using ExternalConfigurations = std::vector<ExternalConfiguration>; -int reg(ExternalConfigurations (*cb)(), +int reg(ExternalConfigurations (*cb)(const Settings&), const std::source_location location = std::source_location::current()); // Convenience macro - ugly but keeps things simple(r) |