aboutsummaryrefslogtreecommitdiff
path: root/build2/utility
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2016-08-09 11:31:53 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2016-08-12 17:04:22 +0200
commit9fa5f73d00905568e8979d0c93ec4a8f645c81d5 (patch)
treef2bf937fa256c0ef2c9bbe05d3655d1985719405 /build2/utility
parenta1b2319ff2ddc8a6f139ee364cabe236ca62e23e (diff)
Implement support for C compilation
We now have two new modules: cc (c-common) and c.
Diffstat (limited to 'build2/utility')
-rw-r--r--build2/utility39
1 files changed, 37 insertions, 2 deletions
diff --git a/build2/utility b/build2/utility
index 4c49be5..3ecceed 100644
--- a/build2/utility
+++ b/build2/utility
@@ -146,13 +146,23 @@ namespace build2
// Append all the values from a variable to the C-string list. T is either
// target or scope. The variable is expected to be of type strings.
//
+ struct variable;
+
+ template <typename T>
+ void
+ append_options (cstrings&, T&, const variable&);
+
+ template <typename T>
+ void
+ append_options (cstrings&, T&, const char*);
+
template <typename T>
void
- append_options (cstrings&, T&, const char* variable);
+ hash_options (sha256&, T&, const variable&);
template <typename T>
void
- hash_options (sha256&, T&, const char* variable);
+ hash_options (sha256&, T&, const char*);
// As above but from the strings value directly.
//
@@ -178,6 +188,13 @@ namespace build2
bool
find_option (const char* option,
T&,
+ const variable&,
+ bool ignore_case = false);
+
+ template <typename T>
+ bool
+ find_option (const char* option,
+ T&,
const char* variable,
bool ignore_case = false);
@@ -194,6 +211,13 @@ namespace build2
//
template <typename T>
bool
+ find_options (initializer_list<const char*>,
+ T&,
+ const variable&,
+ bool = false);
+
+ template <typename T>
+ bool
find_options (initializer_list<const char*>, T&, const char*, bool = false);
bool
@@ -209,6 +233,10 @@ namespace build2
//
template <typename T>
bool
+ find_option_prefix (const char* prefix, T&, const variable&, bool = false);
+
+ template <typename T>
+ bool
find_option_prefix (const char* prefix, T&, const char*, bool = false);
bool
@@ -226,6 +254,13 @@ namespace build2
bool
find_option_prefixes (initializer_list<const char*>,
T&,
+ const variable&,
+ bool = false);
+
+ template <typename T>
+ bool
+ find_option_prefixes (initializer_list<const char*>,
+ T&,
const char*,
bool = false);