mirror of https://github.com/microsoft/vcpkg.git
Rename function
This commit is contained in:
parent
0042316c4b
commit
5b6baf0ce0
|
|
@ -17,7 +17,7 @@ namespace vcpkg { namespace PostBuildLint
|
|||
|
||||
static const fs::path DUMPBIN_EXE = R"(%VS140COMNTOOLS%\..\..\VC\bin\dumpbin.exe)";
|
||||
|
||||
static void print_vector_of_files(const std::vector<fs::path>& paths)
|
||||
static void print_paths(const std::vector<fs::path>& paths)
|
||||
{
|
||||
System::println("");
|
||||
for (const fs::path& p : paths)
|
||||
|
|
@ -96,7 +96,7 @@ namespace vcpkg { namespace PostBuildLint
|
|||
if (!misplaced_cmake_files.empty())
|
||||
{
|
||||
System::println(System::color::warning, "The following cmake files were found outside /share/%s. Please place cmake files in /share/%s.", spec.name(), spec.name());
|
||||
print_vector_of_files(misplaced_cmake_files);
|
||||
print_paths(misplaced_cmake_files);
|
||||
return lint_status::ERROR_DETECTED;
|
||||
}
|
||||
|
||||
|
|
@ -124,7 +124,7 @@ namespace vcpkg { namespace PostBuildLint
|
|||
if (!dlls.empty())
|
||||
{
|
||||
System::println(System::color::warning, "\nThe following dlls were found in /lib and /debug/lib. Please move them to /bin or /debug/bin, respectively.");
|
||||
print_vector_of_files(dlls);
|
||||
print_paths(dlls);
|
||||
return lint_status::ERROR_DETECTED;
|
||||
}
|
||||
|
||||
|
|
@ -172,7 +172,7 @@ namespace vcpkg { namespace PostBuildLint
|
|||
if (potential_copyright_files.size() > 1)
|
||||
{
|
||||
System::println(System::color::warning, "The following files are potential copyright files:");
|
||||
print_vector_of_files(potential_copyright_files);
|
||||
print_paths(potential_copyright_files);
|
||||
}
|
||||
|
||||
System::println(" %s/share/%s/copyright", packages_dir.generic_string(), spec.name());
|
||||
|
|
@ -188,7 +188,7 @@ namespace vcpkg { namespace PostBuildLint
|
|||
if (!exes.empty())
|
||||
{
|
||||
System::println(System::color::warning, "The following EXEs were found in /bin and /debug/bin. EXEs are not valid distribution targets.");
|
||||
print_vector_of_files(exes);
|
||||
print_paths(exes);
|
||||
return lint_status::ERROR_DETECTED;
|
||||
}
|
||||
|
||||
|
|
@ -213,7 +213,7 @@ namespace vcpkg { namespace PostBuildLint
|
|||
if (!dlls_with_no_exports.empty())
|
||||
{
|
||||
System::println(System::color::warning, "The following DLLs have no exports:");
|
||||
print_vector_of_files(dlls_with_no_exports);
|
||||
print_paths(dlls_with_no_exports);
|
||||
System::println(System::color::warning, "DLLs without any exports are likely a bug in the build script.");
|
||||
return lint_status::ERROR_DETECTED;
|
||||
}
|
||||
|
|
@ -244,7 +244,7 @@ namespace vcpkg { namespace PostBuildLint
|
|||
if (!dlls_with_improper_uwp_bit.empty())
|
||||
{
|
||||
System::println(System::color::warning, "The following DLLs do not have the App Container bit set:");
|
||||
print_vector_of_files(dlls_with_improper_uwp_bit);
|
||||
print_paths(dlls_with_improper_uwp_bit);
|
||||
System::println(System::color::warning, "This bit is required for Windows Store apps.");
|
||||
return lint_status::ERROR_DETECTED;
|
||||
}
|
||||
|
|
@ -346,7 +346,7 @@ namespace vcpkg { namespace PostBuildLint
|
|||
}
|
||||
|
||||
System::println(System::color::warning, "DLLs should not be present in a static build, but the following DLLs were found:");
|
||||
print_vector_of_files(dlls);
|
||||
print_paths(dlls);
|
||||
return lint_status::ERROR_DETECTED;
|
||||
}
|
||||
|
||||
|
|
@ -361,10 +361,10 @@ namespace vcpkg { namespace PostBuildLint
|
|||
|
||||
System::println(System::color::warning, "Mismatching number of debug and release binaries. Found %d for debug but %d for release.", debug_count, release_count);
|
||||
System::println("Debug binaries");
|
||||
print_vector_of_files(debug_binaries);
|
||||
print_paths(debug_binaries);
|
||||
|
||||
System::println("Release binaries");
|
||||
print_vector_of_files(release_binaries);
|
||||
print_paths(release_binaries);
|
||||
|
||||
if (debug_count == 0)
|
||||
{
|
||||
|
|
@ -402,7 +402,7 @@ namespace vcpkg { namespace PostBuildLint
|
|||
{
|
||||
System::println(System::color::warning, "Directory %s should have no subdirectories", dir.generic_string());
|
||||
System::println("The following subdirectories were found: ");
|
||||
print_vector_of_files(subdirectories);
|
||||
print_paths(subdirectories);
|
||||
return lint_status::ERROR_DETECTED;
|
||||
}
|
||||
|
||||
|
|
@ -451,7 +451,7 @@ namespace vcpkg { namespace PostBuildLint
|
|||
{
|
||||
System::println(System::color::warning, "There should be no empty directories in %s", dir.generic_string());
|
||||
System::println("The following empty directories were found: ");
|
||||
print_vector_of_files(empty_directories);
|
||||
print_paths(empty_directories);
|
||||
System::println(System::color::warning, "If a directory should be populated but is not, this might indicate an error in the portfile.\n"
|
||||
"If the directories are not needed and their creation cannot be disabled, use something like this in the portfile to remove them)\n"
|
||||
"\n"
|
||||
|
|
@ -570,7 +570,7 @@ namespace vcpkg { namespace PostBuildLint
|
|||
if (!misplaced_files.empty())
|
||||
{
|
||||
System::println(System::color::warning, "The following files are placed in\n%s and\n%s: ", package_dir.generic_string(), debug_dir.generic_string());
|
||||
print_vector_of_files(misplaced_files);
|
||||
print_paths(misplaced_files);
|
||||
System::println(System::color::warning, "Files cannot be present in those directories.\n");
|
||||
return lint_status::ERROR_DETECTED;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue