diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2016-08-09 11:31:53 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2016-08-12 17:04:22 +0200 |
commit | 9fa5f73d00905568e8979d0c93ec4a8f645c81d5 (patch) | |
tree | f2bf937fa256c0ef2c9bbe05d3655d1985719405 /build2/utility.ixx | |
parent | a1b2319ff2ddc8a6f139ee364cabe236ca62e23e (diff) |
Implement support for C compilation
We now have two new modules: cc (c-common) and c.
Diffstat (limited to 'build2/utility.ixx')
-rw-r--r-- | build2/utility.ixx | 49 |
1 files changed, 48 insertions, 1 deletions
diff --git a/build2/utility.ixx b/build2/utility.ixx index f957875..956a726 100644 --- a/build2/utility.ixx +++ b/build2/utility.ixx @@ -35,6 +35,13 @@ namespace build2 template <typename T> inline void + append_options (cstrings& args, T& s, const variable& var) + { + append_options (args, s[var]); + } + + template <typename T> + inline void append_options (cstrings& args, T& s, const char* var) { append_options (args, s[var]); @@ -42,14 +49,27 @@ namespace build2 template <typename T> inline void - hash_options (sha256& csum, T& s, const char* var) + hash_options (sha256& csum, T& s, const variable& var) { + hash_options (csum, s[var]); + } + template <typename T> + inline void + hash_options (sha256& csum, T& s, const char* var) + { hash_options (csum, s[var]); } template <typename T> inline bool + find_option (const char* o, T& s, const variable& var, bool ic) + { + return find_option (o, s[var], ic); + } + + template <typename T> + inline bool find_option (const char* o, T& s, const char* var, bool ic) { return find_option (o, s[var], ic); @@ -59,6 +79,16 @@ namespace build2 inline bool find_options (initializer_list<const char*> os, T& s, + const variable& var, + bool ic) + { + return find_options (os, s[var], ic); + } + + template <typename T> + inline bool + find_options (initializer_list<const char*> os, + T& s, const char* var, bool ic) { @@ -67,6 +97,13 @@ namespace build2 template <typename T> inline bool + find_option_prefix (const char* p, T& s, const variable& var, bool ic) + { + return find_option_prefix (p, s[var], ic); + } + + template <typename T> + inline bool find_option_prefix (const char* p, T& s, const char* var, bool ic) { return find_option_prefix (p, s[var], ic); @@ -76,6 +113,16 @@ namespace build2 inline bool find_option_prefixes (initializer_list<const char*> ps, T& s, + const variable& var, + bool ic) + { + return find_option_prefixes (ps, s[var], ic); + } + + template <typename T> + inline bool + find_option_prefixes (initializer_list<const char*> ps, + T& s, const char* var, bool ic) { |