From 3cf3b73ffc6881d5428a735736a347f6e143b366 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 29 Feb 2016 10:57:40 +0200 Subject: Implement auxiliary dependency database (.d files), use in cxx.compile This is part of the "High Fidelity Build" work. --- build2/config/utility | 24 ------------------------ build2/config/utility.cxx | 12 ------------ build2/config/utility.ixx | 17 ----------------- build2/config/utility.txx | 16 ---------------- 4 files changed, 69 deletions(-) delete mode 100644 build2/config/utility.ixx (limited to 'build2/config') diff --git a/build2/config/utility b/build2/config/utility index 2f53521..9218106 100644 --- a/build2/config/utility +++ b/build2/config/utility @@ -94,33 +94,9 @@ namespace build2 // bool specified (scope& root, const string& ns); - - // @@ Why are these here? - // - - // Add 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. - // - template - void - append_options (cstrings& args, T& s, const char* var); - - // As above but from the strings value directly. - // - void - append_options (cstrings& args, const const_strings_value&); - - // Check if a specified option is present in the variable value. - // T is either target or scope. - // - template - bool - find_option (const char* option, T& s, const char* var); } } #include -#include #endif // BUILD2_CONFIG_UTILITY diff --git a/build2/config/utility.cxx b/build2/config/utility.cxx index d5e0afe..c617690 100644 --- a/build2/config/utility.cxx +++ b/build2/config/utility.cxx @@ -76,17 +76,5 @@ namespace build2 return false; } - - void - append_options (cstrings& args, const const_strings_value& sv) - { - if (!sv.empty ()) - { - args.reserve (args.size () + sv.size ()); - - for (const string& s: sv) - args.push_back (s.c_str ()); - } - } } } diff --git a/build2/config/utility.ixx b/build2/config/utility.ixx deleted file mode 100644 index 7f666d4..0000000 --- a/build2/config/utility.ixx +++ /dev/null @@ -1,17 +0,0 @@ -// file : build2/config/utility.ixx -*- C++ -*- -// copyright : Copyright (c) 2014-2016 Code Synthesis Ltd -// license : MIT; see accompanying LICENSE file - -namespace build2 -{ - namespace config - { - template - inline void - append_options (cstrings& args, T& s, const char* var) - { - if (auto l = s[var]) - append_options (args, as (*l)); - } - } -} diff --git a/build2/config/utility.txx b/build2/config/utility.txx index fd32599..d3c57a5 100644 --- a/build2/config/utility.txx +++ b/build2/config/utility.txx @@ -25,21 +25,5 @@ namespace build2 return result (root.assign (var) = def_value, true); } - - template - bool - find_option (const char* option, T& s, const char* var) - { - if (auto l = s[var]) - { - for (const string& s: as (*l)) - { - if (s == option) - return true; - } - } - - return false; - } } } -- cgit v1.1