aboutsummaryrefslogtreecommitdiff
path: root/toolsrc/src
diff options
context:
space:
mode:
authornicole mazzuca <mazzucan@outlook.com>2019-08-02 09:52:39 -0700
committerGitHub <noreply@github.com>2019-08-02 09:52:39 -0700
commit165907550c8f6ce7506beef591f55cd3f8458d78 (patch)
treea400e42fdb0391544aa8a829d54678c6e5690638 /toolsrc/src
parentbacbcf3527390ae7d20cd9660d82a180f2c8e065 (diff)
downloadvcpkg-165907550c8f6ce7506beef591f55cd3f8458d78.tar.gz
vcpkg-165907550c8f6ce7506beef591f55cd3f8458d78.zip
Update tests, and add documentation! (#7506)
This PR does the following: * fix tests -- now, they're always built in the CMake scripts, and they work on VS2015 *add a new flag, BUILD_TESTING, which allows one to turn off testing builds * Add documentation for running tests
Diffstat (limited to 'toolsrc/src')
-rw-r--r--toolsrc/src/vcpkg-test/util.cpp19
1 files changed, 9 insertions, 10 deletions
diff --git a/toolsrc/src/vcpkg-test/util.cpp b/toolsrc/src/vcpkg-test/util.cpp
index a80ab36a0..5359b0fad 100644
--- a/toolsrc/src/vcpkg-test/util.cpp
+++ b/toolsrc/src/vcpkg-test/util.cpp
@@ -76,12 +76,13 @@ namespace vcpkg::Test
static bool system_allows_symlinks()
{
-#if defined(_WIN32)
- if (!__cpp_lib_filesystem)
- {
- return false;
- }
-
+#if FILESYSTEM_SYMLINK == FILESYSTEM_SYMLINK_NONE
+ return false;
+#elif FILESYSTEM_SYMLINK == FILESYSTEM_SYMLINK_UNIX
+ return true;
+#elif !defined(_WIN32) // FILESYSTEM_SYMLINK == FILESYSTEM_SYMLINK_STD
+ return true;
+#else
HKEY key;
bool allow_symlinks = true;
@@ -97,8 +98,6 @@ namespace vcpkg::Test
if (status == ERROR_SUCCESS) RegCloseKey(key);
return allow_symlinks;
-#else
- return true;
#endif
}
@@ -125,8 +124,8 @@ namespace vcpkg::Test
const bool SYMLINKS_ALLOWED = system_allows_symlinks();
const fs::path TEMPORARY_DIRECTORY = internal_temporary_directory();
-#if FILESYSTEM_SYMLINK == FILSYSTEM_SYMLINK_NONE
- constexpr inline char no_filesystem_message[] =
+#if FILESYSTEM_SYMLINK == FILESYSTEM_SYMLINK_NONE
+ constexpr char no_filesystem_message[] =
"<filesystem> doesn't exist; on windows, we don't attempt to use the win32 calls to create symlinks";
#endif