diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2018-08-21 10:39:22 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2018-08-21 10:39:22 +0200 |
commit | 7c7cd5c27bd92e5b837c33edb97fa3f0a0d9ad79 (patch) | |
tree | 0d577a9d3224a22b23bbbb2dc98376ce19096f66 /build2/utility.cxx | |
parent | fe55b14b627ad4d832261c68ea24d37d513e834e (diff) |
Unset CL and _CL_ environment variables when detecting MSVC
Diffstat (limited to 'build2/utility.cxx')
-rw-r--r-- | build2/utility.cxx | 15 |
1 files changed, 12 insertions, 3 deletions
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) { |