aboutsummaryrefslogtreecommitdiff
path: root/toolsrc
diff options
context:
space:
mode:
authorVictor Romero <romerosanchezv@gmail.com>2019-04-02 16:53:20 -0700
committerVictor Romero <romerosanchezv@gmail.com>2019-04-02 16:53:20 -0700
commit9596fe7dd72179045cd9460730a71e197e82b1c2 (patch)
treec27ae77fe5a646686bbf72f910416dfbb2af9e0b /toolsrc
parentf41cc7b47cd0e846e047891b605f6870cc598ccb (diff)
parent0fffb47ed02507aeacc29c64d91e9d4639f981f6 (diff)
downloadvcpkg-9596fe7dd72179045cd9460730a71e197e82b1c2.tar.gz
vcpkg-9596fe7dd72179045cd9460730a71e197e82b1c2.zip
Merge branch 'master' of https://github.com/Microsoft/vcpkg into pr/cmake_3_14
Diffstat (limited to 'toolsrc')
-rw-r--r--toolsrc/include/vcpkg/base/files.h7
-rw-r--r--toolsrc/src/vcpkg/base/system.cpp13
2 files changed, 14 insertions, 6 deletions
diff --git a/toolsrc/include/vcpkg/base/files.h b/toolsrc/include/vcpkg/base/files.h
index b24778308..b07ff25b3 100644
--- a/toolsrc/include/vcpkg/base/files.h
+++ b/toolsrc/include/vcpkg/base/files.h
@@ -2,7 +2,7 @@
#include <vcpkg/base/expected.h>
-#if defined(_WIN32) || defined(__cpp_lib_filesystem)
+#if defined(_WIN32)
#include <filesystem>
#else
#include <experimental/filesystem>
@@ -10,12 +10,7 @@
namespace fs
{
-// VS2015 (_MSC_VER 1900) uses std::experimental::filesystem
-#if (defined(_MSC_VER) && _MSC_VER > 1900) || defined(__cpp_lib_filesystem)
- namespace stdfs = std::filesystem;
-#else
namespace stdfs = std::experimental::filesystem;
-#endif
using stdfs::copy_options;
using stdfs::file_status;
diff --git a/toolsrc/src/vcpkg/base/system.cpp b/toolsrc/src/vcpkg/base/system.cpp
index 90b9c34b3..6ddf17496 100644
--- a/toolsrc/src/vcpkg/base/system.cpp
+++ b/toolsrc/src/vcpkg/base/system.cpp
@@ -178,6 +178,19 @@ namespace vcpkg::System
L"ANDROID_NDK_HOME",
};
+ const Optional<std::string> keep_vars = System::get_environment_variable("VCPKG_KEEP_ENV_VARS");
+ const auto k = keep_vars.get();
+
+ if (k && !k->empty())
+ {
+ auto vars = Strings::split(*k, ";");
+
+ for (auto&& var : vars)
+ {
+ env_wstrings.push_back(Strings::to_utf16(var.c_str()));
+ }
+ }
+
std::wstring env_cstr;
for (auto&& env_wstring : env_wstrings)