vcpkg/scripts/cmake
Billy O'Neal ae76307e4b
Audit use of TO_NATIVE_PATH. (#26201)
* Audit use of TO_NATIVE_PATH.

TO_NATIVE_PATH should only be used when (1) pasting a path into a command line, or (2) displaying a path to a user. It must not be used before calling other CMake operations like file(WRITE.

Fixes https://github.com/microsoft/vcpkg/issues/26178

ports/ffmpeg/portfile.cmake:
Both uses are being embedded into a command line ✅

ports/gdal/dependency_win.cmake
117: This used TO_NATIVE_PATH but didn't actually connect the result. It's going on a command line so TO_NATIVE_PATH is appropriate.
Drive by: Added quotes around other uses (all of which seem to be going to command lines).
202: ${EXPAT_LIBRARY_REL} ${ZLIB_LIBRARY_REL} don't seem to be set even though they are used; I think this is wrong but I don't know for sure that it is so I'm leaving it alone for now.

ports/msmpi/portfile.cmake
All 3 uses are being embedded into a command line ✅

ports/jemalloc/fix-utilities.patch
ports/libproxy/fix-dependency-libmodman.patch
ports/qtbase/env.patch
These are in upstream content / context so it is not edited.

ports/opengl/portfile.cmake
Broken! Drive by fixes:
* Modernized checking VCPKG_BUILD_TYPE
* Ordered things consistently to be release then debug.
* Removed funny newlines.

ports/openni2/portfile.cmake
Borderline OK; it goes into an MSBuild / vcxproj. I'm leaving it alone. Drive by fixes:
* Guarded debug-only copies for VCPKG_BUILD_TYPE
* Fixed supports expression

ports/openssl/unix/CMakeLists.txt:
Unused!

ports/pthreads/portfile.cmake:
Both uses are being embedded into a command line ✅

ports/qt5-base/cmake/qt_fix_makefile_install.cmake
I'm not sure if this one is OK but it's being embedded into a file so it's probably fine.

ports/qtapplicationmanager/portfile.cmake:
I'm pretty sure this one is wrong, but it's guarded by VCPKG_TARGET_IS_WINDOWS so the ability to create damage is limited.

ports/readosm/portfile.cmake:
The use is being embedded into a command line ✅

ports/spatialite-tools/portfile.cmake:
The use is being embedded into a command line ✅

ports/sqlcipher/portfile.cmake:
Both uses are being embedded into a command line ✅

scripts/ports.cmake:
Some uses were unused, others are immediately used and printed to the console. ✅

scripts/buildsystems/vcpkg.cmake:
Fixed :)

scripts/cmake/vcpkg_build_qmake:
Looks unused.

scripts/cmake/vcpkg_build_process.cmake:
Added to console message only. ✅

scripts/cmake/vcpkg_execute_required_process_repeat.cmake:
Added to console message only. ✅
Drive by: Fixed typo in variable name in the message.

scripts/cmake/vcpkg_execute_required_process.cmake:
Added to console message only. ✅

* Fix missing license.
2022-08-12 15:21:20 -07:00
..
execute_process.cmake [docs] Delete embedded documentation in favor of docs/ (#25096) 2022-06-07 16:26:51 -07:00
vcpkg_acquire_msys.cmake [docs] Delete embedded documentation in favor of docs/ (#25096) 2022-06-07 16:26:51 -07:00
vcpkg_add_to_path.cmake [docs] Delete embedded documentation in favor of docs/ (#25096) 2022-06-07 16:26:51 -07:00
vcpkg_apply_patches.cmake [docs] Delete embedded documentation in favor of docs/ (#25096) 2022-06-07 16:26:51 -07:00
vcpkg_backup_restore_env_vars.cmake [docs] Delete embedded documentation in favor of docs/ (#25096) 2022-06-07 16:26:51 -07:00
vcpkg_build_cmake.cmake [docs] Delete embedded documentation in favor of docs/ (#25096) 2022-06-07 16:26:51 -07:00
vcpkg_build_make.cmake [docs] Delete embedded documentation in favor of docs/ (#25096) 2022-06-07 16:26:51 -07:00
vcpkg_build_msbuild.cmake [docs] Delete embedded documentation in favor of docs/ (#25096) 2022-06-07 16:26:51 -07:00
vcpkg_build_ninja.cmake [docs] Delete embedded documentation in favor of docs/ (#25096) 2022-06-07 16:26:51 -07:00
vcpkg_build_nmake.cmake [docs] Delete embedded documentation in favor of docs/ (#25096) 2022-06-07 16:26:51 -07:00
vcpkg_build_qmake.cmake Audit use of TO_NATIVE_PATH. (#26201) 2022-08-12 15:21:20 -07:00
vcpkg_buildpath_length_warning.cmake [docs] Delete embedded documentation in favor of docs/ (#25096) 2022-06-07 16:26:51 -07:00
vcpkg_check_features.cmake [docs] Delete embedded documentation in favor of docs/ (#25096) 2022-06-07 16:26:51 -07:00
vcpkg_check_linkage.cmake [docs] Delete embedded documentation in favor of docs/ (#25096) 2022-06-07 16:26:51 -07:00
vcpkg_clean_executables_in_bin.cmake [docs] Delete embedded documentation in favor of docs/ (#25096) 2022-06-07 16:26:51 -07:00
vcpkg_clean_msbuild.cmake [docs] Delete embedded documentation in favor of docs/ (#25096) 2022-06-07 16:26:51 -07:00
vcpkg_common_definitions.cmake [docs] Delete embedded documentation in favor of docs/ (#25096) 2022-06-07 16:26:51 -07:00
vcpkg_common_functions.cmake [scripts audit] ports.cmake (#16257) 2021-02-18 14:27:41 -08:00
vcpkg_configure_cmake.cmake [vcpkg-cmake] Update parallel vcpkg_cmake_configure (#21507) 2022-07-25 12:23:04 -07:00
vcpkg_configure_gn.cmake [docs] Delete embedded documentation in favor of docs/ (#25096) 2022-06-07 16:26:51 -07:00
vcpkg_configure_make.cmake [vcpkg script] Normalize PATH so that insertion of msys paths always works (#25848) 2022-07-25 13:26:12 -07:00
vcpkg_configure_meson.cmake Save meson logs on failure (#25806) 2022-07-18 13:21:36 -07:00
vcpkg_configure_qmake.cmake [docs] Delete embedded documentation in favor of docs/ (#25096) 2022-06-07 16:26:51 -07:00
vcpkg_copy_pdbs.cmake [docs] Delete embedded documentation in favor of docs/ (#25096) 2022-06-07 16:26:51 -07:00
vcpkg_copy_tool_dependencies.cmake [docs] Delete embedded documentation in favor of docs/ (#25096) 2022-06-07 16:26:51 -07:00
vcpkg_copy_tools.cmake [docs] Delete embedded documentation in favor of docs/ (#25096) 2022-06-07 16:26:51 -07:00
vcpkg_download_distfile.cmake [vcpkg_download_distfile] Make file name more unique (#25607) 2022-08-01 15:14:44 -07:00
vcpkg_execute_build_process.cmake [vcpkg_execute_*_process] Add support for build profiling (#22676) 2022-06-10 10:56:44 -07:00
vcpkg_execute_in_download_mode.cmake [docs] Delete embedded documentation in favor of docs/ (#25096) 2022-06-07 16:26:51 -07:00
vcpkg_execute_required_process.cmake [scripts|world rebuild] Always save `config.log` and `CMakeCache.txt` (#25189) 2022-07-07 14:58:03 -07:00
vcpkg_execute_required_process_repeat.cmake Audit use of TO_NATIVE_PATH. (#26201) 2022-08-12 15:21:20 -07:00
vcpkg_extract_source_archive.cmake [docs] Delete embedded documentation in favor of docs/ (#25096) 2022-06-07 16:26:51 -07:00
vcpkg_extract_source_archive_ex.cmake [docs] Delete embedded documentation in favor of docs/ (#25096) 2022-06-07 16:26:51 -07:00
vcpkg_fail_port_install.cmake [docs] Delete embedded documentation in favor of docs/ (#25096) 2022-06-07 16:26:51 -07:00
vcpkg_find_acquire_program.cmake [vcpkg] Fixup rpath after building dynamic libraries on linux (#23035) 2022-07-18 12:44:34 -07:00
vcpkg_find_fortran.cmake [docs] Delete embedded documentation in favor of docs/ (#25096) 2022-06-07 16:26:51 -07:00
vcpkg_fixup_cmake_targets.cmake [docs] Delete embedded documentation in favor of docs/ (#25096) 2022-06-07 16:26:51 -07:00
vcpkg_fixup_pkgconfig.cmake [dcmtk] no absolute paths (#25964) 2022-07-27 11:41:12 -07:00
vcpkg_from_bitbucket.cmake [docs] Delete embedded documentation in favor of docs/ (#25096) 2022-06-07 16:26:51 -07:00
vcpkg_from_git.cmake [docs] Delete embedded documentation in favor of docs/ (#25096) 2022-06-07 16:26:51 -07:00
vcpkg_from_github.cmake [docs] Delete embedded documentation in favor of docs/ (#25096) 2022-06-07 16:26:51 -07:00
vcpkg_from_gitlab.cmake [docs] Delete embedded documentation in favor of docs/ (#25096) 2022-06-07 16:26:51 -07:00
vcpkg_from_sourceforge.cmake [docs] Delete embedded documentation in favor of docs/ (#25096) 2022-06-07 16:26:51 -07:00
vcpkg_get_program_files_platform_bitness.cmake [docs] Delete embedded documentation in favor of docs/ (#25096) 2022-06-07 16:26:51 -07:00
vcpkg_get_windows_sdk.cmake [docs] Delete embedded documentation in favor of docs/ (#25096) 2022-06-07 16:26:51 -07:00
vcpkg_host_path_list.cmake [docs] Delete embedded documentation in favor of docs/ (#25096) 2022-06-07 16:26:51 -07:00
vcpkg_install_cmake.cmake [docs] Delete embedded documentation in favor of docs/ (#25096) 2022-06-07 16:26:51 -07:00
vcpkg_install_copyright.cmake [vcpkg] Add `vcpkg_install_copyright()` portfile function (#25239) 2022-07-13 09:41:52 -07:00
vcpkg_install_gn.cmake [docs] Delete embedded documentation in favor of docs/ (#25096) 2022-06-07 16:26:51 -07:00
vcpkg_install_make.cmake [docs] Delete embedded documentation in favor of docs/ (#25096) 2022-06-07 16:26:51 -07:00
vcpkg_install_meson.cmake [docs] Delete embedded documentation in favor of docs/ (#25096) 2022-06-07 16:26:51 -07:00
vcpkg_install_msbuild.cmake [docs] Delete embedded documentation in favor of docs/ (#25096) 2022-06-07 16:26:51 -07:00
vcpkg_install_nmake.cmake [docs] Delete embedded documentation in favor of docs/ (#25096) 2022-06-07 16:26:51 -07:00
vcpkg_install_qmake.cmake [docs] Delete embedded documentation in favor of docs/ (#25096) 2022-06-07 16:26:51 -07:00
vcpkg_list.cmake [docs] Delete embedded documentation in favor of docs/ (#25096) 2022-06-07 16:26:51 -07:00
vcpkg_minimum_required.cmake [docs] Delete embedded documentation in favor of docs/ (#25096) 2022-06-07 16:26:51 -07:00
vcpkg_replace_string.cmake [docs] Delete embedded documentation in favor of docs/ (#25096) 2022-06-07 16:26:51 -07:00
vcpkg_test_cmake.cmake [scripts audit] ports.cmake (#16257) 2021-02-18 14:27:41 -08:00
z_vcpkg_apply_patches.cmake [docs] Delete embedded documentation in favor of docs/ (#25096) 2022-06-07 16:26:51 -07:00
z_vcpkg_escape_regex_control_characters.cmake [scripts-audit] Rollup 2021-05-21 (#18112) 2021-05-26 13:40:48 -07:00
z_vcpkg_fixup_rpath.cmake [vcpkg] Fixup rpath after building dynamic libraries on linux (#23035) 2022-07-18 12:44:34 -07:00
z_vcpkg_forward_output_variable.cmake [docs] Delete embedded documentation in favor of docs/ (#25096) 2022-06-07 16:26:51 -07:00
z_vcpkg_function_arguments.cmake [docs] Delete embedded documentation in favor of docs/ (#25096) 2022-06-07 16:26:51 -07:00
z_vcpkg_get_cmake_vars.cmake [docs] Delete embedded documentation in favor of docs/ (#25096) 2022-06-07 16:26:51 -07:00
z_vcpkg_prettify_command_line.cmake [docs] Delete embedded documentation in favor of docs/ (#25096) 2022-06-07 16:26:51 -07:00
z_vcpkg_setup_pkgconfig_path.cmake [vcpkg_setup_pkgconfig_path] Fix backup/restore (#25361) 2022-06-29 14:47:44 -07:00