From 9fa5f73d00905568e8979d0c93ec4a8f645c81d5 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 9 Aug 2016 11:31:53 +0200 Subject: Implement support for C compilation We now have two new modules: cc (c-common) and c. --- build2/utility | 39 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 37 insertions(+), 2 deletions(-) (limited to 'build2/utility') 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 + void + append_options (cstrings&, T&, const variable&); + + template + void + append_options (cstrings&, T&, const char*); + template void - append_options (cstrings&, T&, const char* variable); + hash_options (sha256&, T&, const variable&); template 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 + bool + find_option (const char* option, + T&, const char* variable, bool ignore_case = false); @@ -194,6 +211,13 @@ namespace build2 // template bool + find_options (initializer_list, + T&, + const variable&, + bool = false); + + template + bool find_options (initializer_list, T&, const char*, bool = false); bool @@ -209,6 +233,10 @@ namespace build2 // template bool + find_option_prefix (const char* prefix, T&, const variable&, bool = false); + + template + 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, T&, + const variable&, + bool = false); + + template + bool + find_option_prefixes (initializer_list, + T&, const char*, bool = false); -- cgit v1.1