From 7c7cd5c27bd92e5b837c33edb97fa3f0a0d9ad79 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 21 Aug 2018 10:39:22 +0200 Subject: Unset CL and _CL_ environment variables when detecting MSVC --- build2/utility.cxx | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'build2/utility.cxx') diff --git a/build2/utility.cxx b/build2/utility.cxx index 2d8e59b..4da2195 100644 --- a/build2/utility.cxx +++ b/build2/utility.cxx @@ -174,7 +174,7 @@ namespace build2 process run_start (uint16_t verbosity, - const process_path& pp, + const process_env& pe, const char* args[], int in, int out, @@ -183,12 +183,21 @@ namespace build2 const location& l) try { - assert (args[0] == pp.recall_string ()); + assert (args[0] == pe.path->recall_string ()); if (verb >= verbosity) print_process (args, 0); - return process (pp, args, in, out, (err ? 2 : 1), cwd.string ().c_str ()); + return process ( + *pe.path, + args, + in, + out, + (err ? 2 : 1), + (!cwd.empty () + ? cwd.string ().c_str () + : pe.cwd != nullptr ? pe.cwd->string ().c_str () : nullptr), + pe.vars); } catch (const process_error& e) { -- cgit v1.1