summaryrefslogtreecommitdiff
path: root/src/libctor.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/libctor.h')
-rw-r--r--src/libctor.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/libctor.h b/src/libctor.h
index b539910..14fdf1d 100644
--- a/src/libctor.h
+++ b/src/libctor.h
@@ -9,6 +9,7 @@
#include <map>
#include <variant>
#include <cstddef>
+#include <functional>
enum class TargetType
{
@@ -20,6 +21,7 @@ enum class TargetType
Object,
UnitTest,
UnitTestLib,
+ Function,
};
enum class Language
@@ -69,6 +71,12 @@ struct Settings
int verbose{0}; // -1: completely silent, 0: normal, 1: verbose, ...
};
+struct BuildConfiguration;
+using GeneratorCb = std::function<int(const std::string& input,
+ const std::string& output,
+ const BuildConfiguration& config,
+ const Settings& settings)>;
+
struct BuildConfiguration
{
std::string name; // Name - used for referring in other configurations.
@@ -79,6 +87,7 @@ struct BuildConfiguration
std::vector<std::string> depends; // internal target dependencies
Flags flags;
std::vector<std::string> externals; // externals used by this configuration
+ GeneratorCb function;
};
using BuildConfigurations = std::vector<BuildConfiguration>;