diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2019-10-10 23:13:46 +0300 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2019-10-14 12:57:28 +0200 |
commit | 2671496db7c3996a6d8467360979f3085375c6df (patch) | |
tree | 281531a27acfdd4a929f19b6b35ce2a94bfc9633 /libbuild2/utility.hxx | |
parent | 19e1b71a396e6b82c8e8a4602446ada0173579b9 (diff) |
Implement MSVC installation discovery for version 15 (2017) and later
In particular, this removes the requirement to build from the Visual Studio
command prompt. Note that since MSVC compiler binaries are target-specific
(i.e., there are no -m32/-m64 options nor something like /MACHINE), in this
case we default to a 64-bit build (a 32-bit build can still be achieved by
running from a suitable command prompt).
Finally, this mechanism is also used to find Clang bundled with MSVC.
Diffstat (limited to 'libbuild2/utility.hxx')
-rw-r--r-- | libbuild2/utility.hxx | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/libbuild2/utility.hxx b/libbuild2/utility.hxx index 980c31f..956d213 100644 --- a/libbuild2/utility.hxx +++ b/libbuild2/utility.hxx @@ -515,11 +515,11 @@ namespace build2 template <typename T> void - hash_options (sha256&, T&, const variable&); + append_options (sha256&, T&, const variable&); template <typename T> void - hash_options (sha256&, T&, const char*); + append_options (sha256&, T&, const char*); // As above but from the strings value directly. // @@ -533,7 +533,7 @@ namespace build2 append_options (strings&, const lookup&, const char* excl = nullptr); LIBBUILD2_SYMEXPORT void - hash_options (sha256&, const lookup&); + append_options (sha256&, const lookup&); void append_options (cstrings&, const strings&, const char* excl = nullptr); @@ -542,7 +542,7 @@ namespace build2 append_options (strings&, const strings&, const char* excl = nullptr); void - hash_options (sha256&, const strings&); + append_options (sha256&, const strings&); LIBBUILD2_SYMEXPORT void append_options (cstrings&, @@ -555,7 +555,7 @@ namespace build2 const char* excl = nullptr); LIBBUILD2_SYMEXPORT void - hash_options (sha256&, const strings&, size_t); + append_options (sha256&, const strings&, size_t); // As above but append/hash option values for the specified option (e.g., // -I, -L). @@ -569,10 +569,10 @@ namespace build2 template <typename I, typename F> void - hash_option_values (sha256&, - const char* opt, - I begin, I end, - F&& get = [] (const string& s) {return s;}); + append_option_values (sha256&, + const char* opt, + I begin, I end, + F&& get = [] (const string& s) {return s;}); // Check if a specified option is present in the variable or value. T is // either target or scope. |