aboutsummaryrefslogtreecommitdiff
path: root/toolsrc/src/vcpkg-test/util.cpp
diff options
context:
space:
mode:
authorNicole Mazzuca <mazzucan@outlook.com>2019-08-09 12:00:43 -0700
committernicole mazzuca <mazzucan@outlook.com>2019-08-10 13:13:21 -0700
commit52b2e740de81d58fbe5fa535c1f66aa82e80951e (patch)
treec61eae92850dea2e5a56cb6d0b3f14fec9c34ae7 /toolsrc/src/vcpkg-test/util.cpp
parent9dfab115aaee2550ad8cf23bfb28a84ff581c936 (diff)
downloadvcpkg-52b2e740de81d58fbe5fa535c1f66aa82e80951e.tar.gz
vcpkg-52b2e740de81d58fbe5fa535c1f66aa82e80951e.zip
[vcpkg] Fix build under /W4
I was building under /W3, because CMake hadn't been set up to build under /W4 -- therefore, I didn't see some warnings. We also decided to remove the niebloids and instead break ADL by using `= delete`, since otherwise we get warnings when we define a local variable with the same name as a niebloid. I also removed `status` and `symlink_status` from the `files` header, since it's unnecessary now, and they're just implementation details of `RealFilesystem`. I also removed some existing uses of unqualified `status(path)`, since that no longer compiles. I also added `Filesystem::canonical`, to remove another use of `fs::stdfs` in a function I was already working in.
Diffstat (limited to 'toolsrc/src/vcpkg-test/util.cpp')
-rw-r--r--toolsrc/src/vcpkg-test/util.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/toolsrc/src/vcpkg-test/util.cpp b/toolsrc/src/vcpkg-test/util.cpp
index 384954b4e..379b253b1 100644
--- a/toolsrc/src/vcpkg-test/util.cpp
+++ b/toolsrc/src/vcpkg-test/util.cpp
@@ -141,7 +141,7 @@ namespace vcpkg::Test
std::filesystem::path targetp = target.native();
std::filesystem::path filep = file.native();
- std::filesystem::create_symlink(targetp, filep);
+ std::filesystem::create_symlink(targetp, filep, ec);
}
else
{
@@ -153,6 +153,7 @@ namespace vcpkg::Test
ec.assign(errno, std::system_category());
}
#else
+ std::ignore = ec;
vcpkg::Checks::exit_with_message(VCPKG_LINE_INFO, no_filesystem_message);
#endif
}
@@ -165,7 +166,7 @@ namespace vcpkg::Test
std::filesystem::path targetp = target.native();
std::filesystem::path filep = file.native();
- std::filesystem::create_directory_symlink(targetp, filep);
+ std::filesystem::create_directory_symlink(targetp, filep, ec);
}
else
{
@@ -174,6 +175,7 @@ namespace vcpkg::Test
#elif FILESYSTEM_SYMLINK == FILESYSTEM_SYMLINK_UNIX
::vcpkg::Test::create_symlink(target, file, ec);
#else
+ std::ignore = ec;
vcpkg::Checks::exit_with_message(VCPKG_LINE_INFO, no_filesystem_message);
#endif
}