aboutsummaryrefslogtreecommitdiff
path: root/toolsrc/src/vcpkg/postbuildlint.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'toolsrc/src/vcpkg/postbuildlint.cpp')
-rw-r--r--toolsrc/src/vcpkg/postbuildlint.cpp27
1 files changed, 14 insertions, 13 deletions
diff --git a/toolsrc/src/vcpkg/postbuildlint.cpp b/toolsrc/src/vcpkg/postbuildlint.cpp
index a384cea0a..78fa993a2 100644
--- a/toolsrc/src/vcpkg/postbuildlint.cpp
+++ b/toolsrc/src/vcpkg/postbuildlint.cpp
@@ -157,7 +157,7 @@ namespace vcpkg::PostBuildLint
restricted_sys_filenames, restricted_crt_filenames, restricted_general_filenames};
const fs::path include_dir = package_dir / "include";
auto files = fs.get_files_non_recursive(include_dir);
- auto filenames_v = Util::fmap(files, [](const auto& file) { return file.filename().u8string(); });
+ auto filenames_v = Util::fmap(files, [](const auto& file) { return fs::u8string(file.filename()); });
std::set<std::string> filenames_s(filenames_v.begin(), filenames_v.end());
std::vector<fs::path> violations;
@@ -391,7 +391,7 @@ namespace vcpkg::PostBuildLint
for (const fs::path& dll : dlls)
{
const std::string cmd_line =
- Strings::format(R"("%s" /exports "%s")", dumpbin_exe.u8string(), dll.u8string());
+ Strings::format(R"("%s" /exports "%s")", fs::u8string(dumpbin_exe), fs::u8string(dll));
System::ExitCodeAndOutput ec_data = System::cmd_execute_and_capture_output(cmd_line);
Checks::check_exit(VCPKG_LINE_INFO, ec_data.exit_code == 0, "Running command:\n %s\n failed", cmd_line);
@@ -429,7 +429,7 @@ namespace vcpkg::PostBuildLint
for (const fs::path& dll : dlls)
{
const std::string cmd_line =
- Strings::format(R"("%s" /headers "%s")", dumpbin_exe.u8string(), dll.u8string());
+ Strings::format(R"("%s" /headers "%s")", fs::u8string(dumpbin_exe), fs::u8string(dll));
System::ExitCodeAndOutput ec_data = System::cmd_execute_and_capture_output(cmd_line);
Checks::check_exit(VCPKG_LINE_INFO, ec_data.exit_code == 0, "Running command:\n %s\n failed", cmd_line);
@@ -480,7 +480,7 @@ namespace vcpkg::PostBuildLint
for (const FileAndArch& b : binaries_with_invalid_architecture)
{
System::print2(" ",
- b.file.u8string(),
+ fs::u8string(b.file),
"\n"
"Expected ",
expected_architecture,
@@ -616,7 +616,7 @@ namespace vcpkg::PostBuildLint
if (lib_count == 0 && dll_count != 0)
{
- System::print2(System::Color::warning, "Import libs were not present in ", lib_dir.u8string(), "\n");
+ System::print2(System::Color::warning, "Import libs were not present in ", fs::u8string(lib_dir), "\n");
System::printf(System::Color::warning,
"If this is intended, add the following line in the portfile:\n"
" SET(%s enabled)\n",
@@ -643,7 +643,7 @@ namespace vcpkg::PostBuildLint
System::printf(System::Color::warning,
R"(There should be no bin\ directory in a static build, but %s is present.)"
"\n",
- bin.u8string());
+ fs::u8string(bin));
}
if (fs.exists(debug_bin))
@@ -651,7 +651,7 @@ namespace vcpkg::PostBuildLint
System::printf(System::Color::warning,
R"(There should be no debug\bin\ directory in a static build, but %s is present.)"
"\n",
- debug_bin.u8string());
+ fs::u8string(debug_bin));
}
System::print2(
@@ -679,7 +679,7 @@ namespace vcpkg::PostBuildLint
if (!empty_directories.empty())
{
- System::print2(System::Color::warning, "There should be no empty directories in ", dir.u8string(), "\n");
+ System::print2(System::Color::warning, "There should be no empty directories in ", fs::u8string(dir), "\n");
System::print2("The following empty directories were found:\n");
Files::print_paths(empty_directories);
System::print2(
@@ -717,7 +717,7 @@ namespace vcpkg::PostBuildLint
for (const fs::path& lib : libs)
{
const std::string cmd_line =
- Strings::format(R"("%s" /directives "%s")", dumpbin_exe.u8string(), lib.u8string());
+ Strings::format(R"("%s" /directives "%s")", fs::u8string(dumpbin_exe), fs::u8string(lib));
System::ExitCodeAndOutput ec_data = System::cmd_execute_and_capture_output(cmd_line);
Checks::check_exit(VCPKG_LINE_INFO,
ec_data.exit_code == 0,
@@ -771,7 +771,8 @@ namespace vcpkg::PostBuildLint
for (const fs::path& dll : dlls)
{
- const auto cmd_line = Strings::format(R"("%s" /dependents "%s")", dumpbin_exe.u8string(), dll.u8string());
+ const auto cmd_line =
+ Strings::format(R"("%s" /dependents "%s")", fs::u8string(dumpbin_exe), fs::u8string(dll));
System::ExitCodeAndOutput ec_data = System::cmd_execute_and_capture_output(cmd_line);
Checks::check_exit(VCPKG_LINE_INFO, ec_data.exit_code == 0, "Running command:\n %s\n failed", cmd_line);
@@ -790,7 +791,7 @@ namespace vcpkg::PostBuildLint
System::print2(System::Color::warning, "Detected outdated dynamic CRT in the following files:\n\n");
for (const OutdatedDynamicCrtAndFile& btf : dlls_with_outdated_crt)
{
- System::print2(" ", btf.file.u8string(), ": ", btf.outdated_crt.name, "\n");
+ System::print2(" ", fs::u8string(btf.file), ": ", btf.outdated_crt.name, "\n");
}
System::print2("\n");
@@ -818,7 +819,7 @@ namespace vcpkg::PostBuildLint
if (!misplaced_files.empty())
{
- System::print2(System::Color::warning, "The following files are placed in\n", dir.u8string(), ":\n");
+ System::print2(System::Color::warning, "The following files are placed in\n", fs::u8string(dir), ":\n");
Files::print_paths(misplaced_files);
System::print2(System::Color::warning, "Files cannot be present in those directories.\n\n");
return LintStatus::ERROR_DETECTED;
@@ -965,7 +966,7 @@ namespace vcpkg::PostBuildLint
"Found ",
error_count,
" error(s). Please correct the portfile:\n ",
- portfile.u8string(),
+ fs::u8string(portfile),
"\n");
}