[vcpkg] Fix more cases of semicolon mishandling in "scripts" - follow-up to PR #12926 (#13968)

This commit is contained in:
Joachim Gehweiler 2020-10-27 03:30:27 +01:00 коммит произвёл GitHub
Родитель 839f533382
Коммит 0ff75ac80b
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
41 изменённых файлов: 706 добавлений и 640 удалений

Просмотреть файл

@ -1,5 +1,6 @@
Source: aws-sdk-cpp
Version: 1.8.4
Port-Version: 1
Homepage: https://github.com/aws/aws-sdk-cpp
Description: AWS SDK for C++
Build-Depends: openssl (!uwp&!windows), curl (!uwp&!windows), aws-c-event-stream

Просмотреть файл

@ -1,5 +1,6 @@
Source: aws-sdk-cpp
Version: 1.8.4
Port-Version: 1
Description: AWS SDK for C++
Build-Depends: openssl (!uwp&!windows), curl (!uwp&!windows), aws-c-event-stream
Default-Features: dynamodb, s3, kinesis

Просмотреть файл

@ -14,7 +14,7 @@ set(BUILD_ONLY core)
include(${CMAKE_CURRENT_LIST_DIR}/compute_build_only.cmake)
string(REPLACE ";" "\\\\\\\\\\\;" BUILD_ONLY "${BUILD_ONLY}")
string(REPLACE ";" "\\\\\\\\\\;" BUILD_ONLY "${BUILD_ONLY}")
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
@ -25,7 +25,7 @@ vcpkg_configure_cmake(
-DENABLE_TESTING=OFF
-DFORCE_SHARED_CRT=${FORCE_SHARED_CRT}
-DCMAKE_DISABLE_FIND_PACKAGE_Git=TRUE
"-DBUILD_ONLY=${BUILD_ONLY}"
-DBUILD_ONLY=${BUILD_ONLY}
-DBUILD_DEPS=OFF
)

Просмотреть файл

@ -266,7 +266,7 @@ if (VCPKG_TARGET_IS_WINDOWS OR VCPKG_TARGET_IS_UWP)
message(STATUS "Building ${TARGET_TRIPLET}-rel")
vcpkg_execute_required_process(
COMMAND ${NMAKE} -f makefile.vc
"${NMAKE_OPTIONS_REL}"
${NMAKE_OPTIONS_REL}
WORKING_DIRECTORY ${SOURCE_PATH_RELEASE}
LOGNAME nmake-build-${TARGET_TRIPLET}-release
)
@ -281,7 +281,7 @@ if (VCPKG_TARGET_IS_WINDOWS OR VCPKG_TARGET_IS_UWP)
message(STATUS "Building ${TARGET_TRIPLET}-dbg")
vcpkg_execute_required_process(
COMMAND ${NMAKE} /G -f makefile.vc
"${NMAKE_OPTIONS_DBG}"
${NMAKE_OPTIONS_DBG}
WORKING_DIRECTORY ${SOURCE_PATH_DEBUG}
LOGNAME nmake-build-${TARGET_TRIPLET}-debug
)
@ -296,9 +296,9 @@ if (VCPKG_TARGET_IS_WINDOWS OR VCPKG_TARGET_IS_UWP)
vcpkg_execute_required_process(
COMMAND ${NMAKE} -f makefile.vc
"${NMAKE_OPTIONS_REL}"
"install"
"devinstall"
${NMAKE_OPTIONS_REL}
install
devinstall
WORKING_DIRECTORY ${SOURCE_PATH_RELEASE}
LOGNAME nmake-install-${TARGET_TRIPLET}
)

Просмотреть файл

@ -1,5 +1,6 @@
Source: libxslt
Version: 1.1.33-7
Port-Version: 1
Homepage: https://github.com/GNOME/libxslt
Description: Libxslt is a XSLT library implemented in C for XSLT 1.0 and most of EXSLT
Build-Depends: libxml2, liblzma

Просмотреть файл

@ -21,8 +21,8 @@ if (VCPKG_TARGET_IS_WINDOWS)
prefix=@INSTALL_DIR@
include=@INCLUDE_DIR@
lib=@LIB_DIR@
bindir=$(PREFIX)\\tools\\
sodir=$(PREFIX)\\bin\\
bindir=$(PREFIX)\\tools
sodir=$(PREFIX)\\bin
)
# Debug params
if(VCPKG_CRT_LINKAGE STREQUAL dynamic)

Просмотреть файл

@ -39,7 +39,7 @@ set(ENV{INCLUDE} "${CURRENT_INSTALLED_DIR}/include;$ENV{INCLUDE}")
message(STATUS "Pre-building ${TARGET_TRIPLET}")
vcpkg_execute_required_process(
COMMAND ${NMAKE} -f Makefile.msc /A /NOLOGO clean tcl
"${NMAKE_OPTIONS}"
${NMAKE_OPTIONS}
WORKING_DIRECTORY ${SOURCE_PATH}
LOGNAME pre-build-${TARGET_TRIPLET}
)

Просмотреть файл

@ -1,6 +1,7 @@
{
"name": "sqlcipher",
"version-string": "4.4.0",
"port-version": 1,
"description": "SQLCipher extends the SQLite database library to add security enhancements that make it more suitable for encrypted local data storage.",
"homepage": "https://www.zetetic.net/sqlcipher",
"supports": "windows & !uwp & !static",

Просмотреть файл

@ -55,7 +55,8 @@
## * [libvpx](https://github.com/Microsoft/vcpkg/blob/master/ports/libvpx/portfile.cmake)
function(vcpkg_acquire_msys PATH_TO_ROOT_OUT)
cmake_parse_arguments(_am "NO_DEFAULT_PACKAGES" "" "PACKAGES;DIRECT_PACKAGES" ${ARGN})
# parse parameters such that semicolons in options arguments to COMMAND don't get erased
cmake_parse_arguments(PARSE_ARGV 0 _am "NO_DEFAULT_PACKAGES" "" "PACKAGES;DIRECT_PACKAGES")
set(TOTAL_HASH 0)
set(ARCHIVES)

Просмотреть файл

@ -33,7 +33,8 @@
include(vcpkg_execute_in_download_mode)
function(vcpkg_apply_patches)
cmake_parse_arguments(_ap "QUIET" "SOURCE_PATH" "PATCHES" ${ARGN})
# parse parameters such that semicolons in options arguments to COMMAND don't get erased
cmake_parse_arguments(PARSE_ARGV 0 _ap "QUIET" "SOURCE_PATH" "PATCHES")
find_program(GIT NAMES git git.cmd)
set(PATCHNUM 0)

Просмотреть файл

@ -30,7 +30,8 @@
## * [poco](https://github.com/Microsoft/vcpkg/blob/master/ports/poco/portfile.cmake)
## * [opencv](https://github.com/Microsoft/vcpkg/blob/master/ports/opencv/portfile.cmake)
function(vcpkg_build_cmake)
cmake_parse_arguments(_bc "DISABLE_PARALLEL;ADD_BIN_TO_PATH" "TARGET;LOGFILE_ROOT" "" ${ARGN})
# parse parameters such that semicolons in options arguments to COMMAND don't get erased
cmake_parse_arguments(PARSE_ARGV 0 _bc "DISABLE_PARALLEL;ADD_BIN_TO_PATH" "TARGET;LOGFILE_ROOT" "")
if(NOT _bc_LOGFILE_ROOT)
set(_bc_LOGFILE_ROOT "build")

Просмотреть файл

@ -39,7 +39,8 @@
## * [freexl](https://github.com/Microsoft/vcpkg/blob/master/ports/freexl/portfile.cmake)
## * [libosip2](https://github.com/Microsoft/vcpkg/blob/master/ports/libosip2/portfile.cmake)
function(vcpkg_build_make)
cmake_parse_arguments(_bc "ADD_BIN_TO_PATH;ENABLE_INSTALL;DISABLE_PARALLEL" "LOGFILE_ROOT;BUILD_TARGET" "" ${ARGN})
# parse parameters such that semicolons in options arguments to COMMAND don't get erased
cmake_parse_arguments(PARSE_ARGV 0 _bc "ADD_BIN_TO_PATH;ENABLE_INSTALL;DISABLE_PARALLEL" "LOGFILE_ROOT;BUILD_TARGET" "")
if(NOT _bc_LOGFILE_ROOT)
set(_bc_LOGFILE_ROOT "build")

Просмотреть файл

@ -62,12 +62,13 @@
## * [cppunit](https://github.com/Microsoft/vcpkg/blob/master/ports/cppunit/portfile.cmake)
function(vcpkg_build_msbuild)
# parse parameters such that semicolons in options arguments to COMMAND don't get erased
cmake_parse_arguments(
PARSE_ARGV 0
_csc
"USE_VCPKG_INTEGRATION"
"PROJECT_PATH;RELEASE_CONFIGURATION;DEBUG_CONFIGURATION;PLATFORM;PLATFORM_TOOLSET;TARGET_PLATFORM_VERSION;TARGET"
"OPTIONS;OPTIONS_RELEASE;OPTIONS_DEBUG"
${ARGN}
)
if(NOT DEFINED _csc_RELEASE_CONFIGURATION)

Просмотреть файл

@ -14,7 +14,8 @@
## Only build the specified targets.
function(vcpkg_build_ninja)
cmake_parse_arguments(_vbn "" "" "TARGETS" ${ARGN})
# parse parameters such that semicolons in options arguments to COMMAND don't get erased
cmake_parse_arguments(PARSE_ARGV 0 _vbn "" "" "TARGETS")
vcpkg_find_acquire_program(NINJA)

Просмотреть файл

@ -71,11 +71,11 @@
## * [tcl](https://github.com/Microsoft/vcpkg/blob/master/ports/tcl/portfile.cmake)
## * [freexl](https://github.com/Microsoft/vcpkg/blob/master/ports/freexl/portfile.cmake)
function(vcpkg_build_nmake)
cmake_parse_arguments(_bn
# parse parameters such that semicolons in options arguments to COMMAND don't get erased
cmake_parse_arguments(PARSE_ARGV 0 _bn
"ADD_BIN_TO_PATH;ENABLE_INSTALL;NO_DEBUG"
"SOURCE_PATH;PROJECT_SUBPATH;PROJECT_NAME;LOGFILE_ROOT"
"OPTIONS;OPTIONS_RELEASE;OPTIONS_DEBUG;PRERUN_SHELL;PRERUN_SHELL_DEBUG;PRERUN_SHELL_RELEASE"
${ARGN}
)
if (NOT CMAKE_HOST_WIN32)
@ -188,7 +188,7 @@ function(vcpkg_build_nmake)
if (BUILDTYPE STREQUAL "debug" AND _bn_PRERUN_SHELL_DEBUG)
message(STATUS "Prerunning ${CURRENT_TRIPLET_NAME}")
vcpkg_execute_required_process(
COMMAND "${_bn_PRERUN_SHELL_DEBUG}"
COMMAND ${_bn_PRERUN_SHELL_DEBUG}
WORKING_DIRECTORY ${OBJ_DIR}${_bn_PROJECT_SUBPATH}
LOGNAME "prerun-${CURRENT_TRIPLET_NAME}-dbg"
)

Просмотреть файл

@ -7,7 +7,8 @@
# vcpkg_build_qmake()
#
function(vcpkg_build_qmake)
cmake_parse_arguments(_csc "SKIP_MAKEFILES" "BUILD_LOGNAME" "TARGETS;RELEASE_TARGETS;DEBUG_TARGETS" ${ARGN})
# parse parameters such that semicolons in options arguments to COMMAND don't get erased
cmake_parse_arguments(PARSE_ARGV 0 _csc "SKIP_MAKEFILES" "BUILD_LOGNAME" "TARGETS;RELEASE_TARGETS;DEBUG_TARGETS")
if(CMAKE_HOST_WIN32)
vcpkg_find_acquire_program(JOM)

Просмотреть файл

@ -144,7 +144,8 @@
## * [rocksdb](https://github.com/microsoft/vcpkg/blob/master/ports/rocksdb/portfile.cmake)
##
function(vcpkg_check_features)
cmake_parse_arguments(_vcf "" "OUT_FEATURE_OPTIONS" "FEATURES;INVERTED_FEATURES" ${ARGN})
# parse parameters such that semicolons in options arguments to COMMAND don't get erased
cmake_parse_arguments(PARSE_ARGV 0 _vcf "" "OUT_FEATURE_OPTIONS" "FEATURES;INVERTED_FEATURES")
if (NOT DEFINED _vcf_OUT_FEATURE_OPTIONS)
message(FATAL_ERROR "OUT_FEATURE_OPTIONS must be specified.")

Просмотреть файл

@ -19,7 +19,8 @@
## ## Examples
## * [czmq](https://github.com/microsoft/vcpkg/blob/master/ports/czmq/portfile.cmake)
function(vcpkg_clean_executables_in_bin)
cmake_parse_arguments(_vct "" "" "FILE_NAMES" ${ARGN})
# parse parameters such that semicolons in options arguments to COMMAND don't get erased
cmake_parse_arguments(PARSE_ARGV 0 _vct "" "" "FILE_NAMES")
if(NOT DEFINED _vct_FILE_NAMES)
message(FATAL_ERROR "FILE_NAMES must be specified.")

Просмотреть файл

@ -266,12 +266,12 @@ function(vcpkg_configure_cmake)
endforeach()
set(rel_command
${CMAKE_COMMAND} ${_csc_SOURCE_PATH} "${_csc_OPTIONS}" "${_csc_OPTIONS_RELEASE}"
${CMAKE_COMMAND} ${_csc_SOURCE_PATH} ${_csc_OPTIONS} ${_csc_OPTIONS_RELEASE}
-G ${GENERATOR}
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_INSTALL_PREFIX=${CURRENT_PACKAGES_DIR})
set(dbg_command
${CMAKE_COMMAND} ${_csc_SOURCE_PATH} "${_csc_OPTIONS}" "${_csc_OPTIONS_DEBUG}"
${CMAKE_COMMAND} ${_csc_SOURCE_PATH} ${_csc_OPTIONS} ${_csc_OPTIONS_DEBUG}
-G ${GENERATOR}
-DCMAKE_BUILD_TYPE=Debug
-DCMAKE_INSTALL_PREFIX=${CURRENT_PACKAGES_DIR}/debug)

Просмотреть файл

@ -27,7 +27,8 @@
## Options to be passed to the release target.
function(vcpkg_configure_gn)
cmake_parse_arguments(_vcg "" "SOURCE_PATH;OPTIONS;OPTIONS_DEBUG;OPTIONS_RELEASE" "" ${ARGN})
# parse parameters such that semicolons in options arguments to COMMAND don't get erased
cmake_parse_arguments(PARSE_ARGV 0 _vcg "" "SOURCE_PATH;OPTIONS;OPTIONS_DEBUG;OPTIONS_RELEASE" "")
if(NOT DEFINED _vcg_SOURCE_PATH)
message(FATAL_ERROR "SOURCE_PATH must be specified.")
@ -42,7 +43,7 @@ function(vcpkg_configure_gn)
function(generate CONFIG ARGS)
message(STATUS "Generating build (${CONFIG})...")
vcpkg_execute_required_process(
COMMAND "${GN}" gen "${CURRENT_BUILDTREES_DIR}/${CONFIG}" "${ARGS}"
COMMAND "${GN}" gen "${CURRENT_BUILDTREES_DIR}/${CONFIG}" ${ARGS}
WORKING_DIRECTORY "${SOURCE_PATH}"
LOGNAME generate-${CONFIG}
)

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -34,7 +34,8 @@
## * [fribidi](https://github.com/Microsoft/vcpkg/blob/master/ports/fribidi/portfile.cmake)
## * [libepoxy](https://github.com/Microsoft/vcpkg/blob/master/ports/libepoxy/portfile.cmake)
function(vcpkg_configure_meson)
cmake_parse_arguments(_vcm "" "SOURCE_PATH" "OPTIONS;OPTIONS_DEBUG;OPTIONS_RELEASE" ${ARGN})
# parse parameters such that semicolons in options arguments to COMMAND don't get erased
cmake_parse_arguments(PARSE_ARGV 0 _vcm "" "SOURCE_PATH" "OPTIONS;OPTIONS_DEBUG;OPTIONS_RELEASE")
file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel)
file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg)

Просмотреть файл

@ -16,7 +16,8 @@
# The options passed to qmake.
function(vcpkg_configure_qmake)
cmake_parse_arguments(_csc "" "SOURCE_PATH" "OPTIONS;OPTIONS_RELEASE;OPTIONS_DEBUG;BUILD_OPTIONS;BUILD_OPTIONS_RELEASE;BUILD_OPTIONS_DEBUG" ${ARGN})
# parse parameters such that semicolons in options arguments to COMMAND don't get erased
cmake_parse_arguments(PARSE_ARGV 0 _csc "" "SOURCE_PATH" "OPTIONS;OPTIONS_RELEASE;OPTIONS_DEBUG;BUILD_OPTIONS;BUILD_OPTIONS_RELEASE;BUILD_OPTIONS_DEBUG")
# Find qmake executable
set(_triplet_hostbindir ${CURRENT_INSTALLED_DIR}/tools/qt5/bin)

Просмотреть файл

@ -21,7 +21,8 @@
## * [zlib](https://github.com/Microsoft/vcpkg/blob/master/ports/zlib/portfile.cmake)
## * [cpprestsdk](https://github.com/Microsoft/vcpkg/blob/master/ports/cpprestsdk/portfile.cmake)
function(vcpkg_copy_pdbs)
cmake_parse_arguments(_vcp "" "" "BUILD_PATHS" ${ARGN})
# parse parameters such that semicolons in options arguments to COMMAND don't get erased
cmake_parse_arguments(PARSE_ARGV 0 _vcp "" "" "BUILD_PATHS")
if(NOT _vcp_BUILD_PATHS)
set(

Просмотреть файл

@ -26,7 +26,8 @@
## * [nanomsg](https://github.com/microsoft/vcpkg/blob/master/ports/nanomsg/portfile.cmake)
## * [uriparser](https://github.com/microsoft/vcpkg/blob/master/ports/uriparser/portfile.cmake)
function(vcpkg_copy_tools)
cmake_parse_arguments(_vct "AUTO_CLEAN" "SEARCH_DIR" "TOOL_NAMES" ${ARGN})
# parse parameters such that semicolons in options arguments to COMMAND don't get erased
cmake_parse_arguments(PARSE_ARGV 0 _vct "AUTO_CLEAN" "SEARCH_DIR" "TOOL_NAMES")
if(NOT DEFINED _vct_TOOL_NAMES)
message(FATAL_ERROR "TOOL_NAMES must be specified.")

Просмотреть файл

@ -56,6 +56,7 @@ function(vcpkg_download_distfile VAR)
set(options SKIP_SHA512 SILENT_EXIT QUIET)
set(oneValueArgs FILENAME SHA512)
set(multipleValuesArgs URLS HEADERS)
# parse parameters such that semicolons in options arguments to COMMAND don't get erased
cmake_parse_arguments(PARSE_ARGV 1 vcpkg_download_distfile "${options}" "${oneValueArgs}" "${multipleValuesArgs}")
if(NOT DEFINED vcpkg_download_distfile_URLS)

Просмотреть файл

@ -33,7 +33,8 @@
## * [icu](https://github.com/Microsoft/vcpkg/blob/master/ports/icu/portfile.cmake)
include(vcpkg_prettify_command)
function(vcpkg_execute_build_process)
cmake_parse_arguments(_ebp "" "WORKING_DIRECTORY;LOGNAME" "COMMAND;NO_PARALLEL_COMMAND" ${ARGN})
# parse parameters such that semicolons in options arguments to COMMAND don't get erased
cmake_parse_arguments(PARSE_ARGV 0 _ebp "" "WORKING_DIRECTORY;LOGNAME" "COMMAND;NO_PARALLEL_COMMAND")
set(LOG_OUT "${CURRENT_BUILDTREES_DIR}/${_ebp_LOGNAME}-out.log")
set(LOG_ERR "${CURRENT_BUILDTREES_DIR}/${_ebp_LOGNAME}-err.log")

Просмотреть файл

@ -9,6 +9,8 @@
## WORKING_DIRECTORY <${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg>
## LOGNAME <build-${TARGET_TRIPLET}-dbg>
## [TIMEOUT <seconds>]
## [OUTPUT_VARIABLE <var>]
## [ERROR_VARIABLE <var>]
## )
## ```
## ## Parameters
@ -28,6 +30,12 @@
## ### TIMEOUT
## Optional timeout after which to terminate the command.
##
## ### OUTPUT_VARIABLE
## Optional variable to receive stdout of the command.
##
## ### ERROR_VARIABLE
## Optional variable to receive stderr of the command.
##
## This should be a unique name for different triplets so that the logs don't conflict when building multiple at once.
##
## ## Examples
@ -41,14 +49,25 @@ include(vcpkg_prettify_command)
include(vcpkg_execute_in_download_mode)
function(vcpkg_execute_required_process)
cmake_parse_arguments(vcpkg_execute_required_process "ALLOW_IN_DOWNLOAD_MODE" "WORKING_DIRECTORY;LOGNAME;TIMEOUT" "COMMAND" ${ARGN})
# parse parameters such that semicolons in options arguments to COMMAND don't get erased
cmake_parse_arguments(PARSE_ARGV 0 vcpkg_execute_required_process "ALLOW_IN_DOWNLOAD_MODE" "WORKING_DIRECTORY;LOGNAME;TIMEOUT;OUTPUT_VARIABLE;ERROR_VARIABLE" "COMMAND")
set(LOG_OUT "${CURRENT_BUILDTREES_DIR}/${vcpkg_execute_required_process_LOGNAME}-out.log")
set(LOG_ERR "${CURRENT_BUILDTREES_DIR}/${vcpkg_execute_required_process_LOGNAME}-err.log")
if(vcpkg_execute_required_process_TIMEOUT)
set(TIMEOUT_PARAM "TIMEOUT;${vcpkg_execute_required_process_TIMEOUT}")
set(TIMEOUT_PARAM "TIMEOUT;${vcpkg_execute_required_process_TIMEOUT}")
else()
set(TIMEOUT_PARAM "")
set(TIMEOUT_PARAM "")
endif()
if(vcpkg_execute_required_process_OUTPUT_VARIABLE)
set(OUTPUT_VARIABLE_PARAM "OUTPUT_VARIABLE;${vcpkg_execute_required_process_OUTPUT_VARIABLE}")
else()
set(OUTPUT_VARIABLE_PARAM "")
endif()
if(vcpkg_execute_required_process_ERROR_VARIABLE)
set(ERROR_VARIABLE_PARAM "ERROR_VARIABLE;${vcpkg_execute_required_process_ERROR_VARIABLE}")
else()
set(ERROR_VARIABLE_PARAM "")
endif()
if (DEFINED VCPKG_DOWNLOAD_MODE AND NOT vcpkg_execute_required_process_ALLOW_IN_DOWNLOAD_MODE)
@ -65,7 +84,9 @@ Halting portfile execution.
ERROR_FILE ${LOG_ERR}
RESULT_VARIABLE error_code
WORKING_DIRECTORY ${vcpkg_execute_required_process_WORKING_DIRECTORY}
${TIMEOUT_PARAM})
${TIMEOUT_PARAM}
${OUTPUT_VARIABLE_PARAM}
${ERROR_VARIABLE_PARAM})
if(error_code)
set(LOGS)
file(READ "${LOG_OUT}" out_contents)
@ -90,4 +111,10 @@ Halting portfile execution.
${STRINGIFIED_LOGS}
)
endif()
# pass output parameters back to caller's scope
foreach(arg OUTPUT_VARIABLE ERROR_VARIABLE)
if(vcpkg_execute_required_process_${arg})
set(${vcpkg_execute_required_process_${arg}} ${${vcpkg_execute_required_process_${arg}}} PARENT_SCOPE)
endif()
endforeach()
endfunction()

Просмотреть файл

@ -1,11 +1,19 @@
# Usage: vcpkg_execute_required_process_repeat(COUNT <num> COMMAND <cmd> [<args>...] WORKING_DIRECTORY </path/to/dir> LOGNAME <my_log_name>)
include(vcpkg_prettify_command)
function(vcpkg_execute_required_process_repeat)
cmake_parse_arguments(vcpkg_execute_required_process_repeat "" "COUNT;WORKING_DIRECTORY;LOGNAME" "COMMAND" ${ARGN})
# parse parameters such that semicolons in options arguments to COMMAND don't get erased
cmake_parse_arguments(PARSE_ARGV 0 vcpkg_execute_required_process_repeat "ALLOW_IN_DOWNLOAD_MODE" "COUNT;WORKING_DIRECTORY;LOGNAME" "COMMAND")
#debug_message("vcpkg_execute_required_process_repeat(${vcpkg_execute_required_process_repeat_COMMAND})")
if (DEFINED VCPKG_DOWNLOAD_MODE AND NOT vcpkg_execute_required_process_repeat_ALLOW_IN_DOWNLOAD_MODE)
message(FATAL_ERROR
[[
This command cannot be executed in Download Mode.
Halting portfile execution.
]])
endif()
set(SUCCESSFUL_EXECUTION FALSE)
foreach(loop_count RANGE ${vcpkg_execute_required_process_repeat_COUNT})
execute_process(
vcpkg_execute_in_download_mode(
COMMAND ${vcpkg_execute_required_process_repeat_COMMAND}
OUTPUT_FILE ${CURRENT_BUILDTREES_DIR}/${vcpkg_execute_required_process_repeat_LOGNAME}-out-${loop_count}.log
ERROR_FILE ${CURRENT_BUILDTREES_DIR}/${vcpkg_execute_required_process_repeat_LOGNAME}-err-${loop_count}.log

Просмотреть файл

@ -55,12 +55,13 @@ include(vcpkg_apply_patches)
include(vcpkg_extract_source_archive)
function(vcpkg_extract_source_archive_ex)
# parse parameters such that semicolons in options arguments to COMMAND don't get erased
cmake_parse_arguments(
PARSE_ARGV 0
_vesae
"NO_REMOVE_ONE_LEVEL;SKIP_PATCH_CHECK"
"OUT_SOURCE_PATH;ARCHIVE;REF;WORKING_DIRECTORY"
"PATCHES"
${ARGN}
)
if(NOT _vesae_ARCHIVE)

Просмотреть файл

@ -37,6 +37,7 @@
##
## * [aws-lambda-cpp](https://github.com/Microsoft/vcpkg/blob/master/ports/aws-lambda-cpp/portfile.cmake)
function(vcpkg_fail_port_install)
# parse parameters such that semicolons in options arguments to COMMAND don't get erased
cmake_parse_arguments(PARSE_ARGV 0 _csc "ALWAYS" "MESSAGE" "ON_TARGET;ON_ARCH;ON_CRT_LINKAGE;ON_LIBRARY_LINKAGE")
if(DEFINED _csc_UNPARSED_ARGUMENTS)
message(FATAL_ERROR "Unknown arguments passed to vcpkg_fail_port_install. Please correct the portfile!")

Просмотреть файл

@ -43,7 +43,8 @@
## * [curl](https://github.com/Microsoft/vcpkg/blob/master/ports/curl/portfile.cmake)
## * [nlohmann-json](https://github.com/Microsoft/vcpkg/blob/master/ports/nlohmann-json/portfile.cmake)
function(vcpkg_fixup_cmake_targets)
cmake_parse_arguments(_vfct "DO_NOT_DELETE_PARENT_CONFIG_PATH" "CONFIG_PATH;TARGET_PATH" "" ${ARGN})
# parse parameters such that semicolons in options arguments to COMMAND don't get erased
cmake_parse_arguments(PARSE_ARGV 0 _vfct "DO_NOT_DELETE_PARENT_CONFIG_PATH" "CONFIG_PATH;TARGET_PATH" "")
if(_vfct_UNPARSED_ARGUMENTS)
message(FATAL_ERROR "vcpkg_fixup_cmake_targets was passed extra arguments: ${_vfct_UNPARSED_ARGUMENTS}")

Просмотреть файл

@ -239,7 +239,8 @@ function(vcpkg_fixup_pkgconfig_check_files pkg_cfg_cmd _file _config _system_lib
endfunction()
function(vcpkg_fixup_pkgconfig)
cmake_parse_arguments(_vfpkg "SKIP_CHECK;NOT_STATIC_PKGCONFIG" "" "RELEASE_FILES;DEBUG_FILES;SYSTEM_LIBRARIES;SYSTEM_PACKAGES;IGNORE_FLAGS" ${ARGN})
# parse parameters such that semicolons in options arguments to COMMAND don't get erased
cmake_parse_arguments(PARSE_ARGV 0 _vfpkg "SKIP_CHECK;NOT_STATIC_PKGCONFIG" "" "RELEASE_FILES;DEBUG_FILES;SYSTEM_LIBRARIES;SYSTEM_PACKAGES;IGNORE_FLAGS")
# Note about SYSTEM_PACKAGES: pkg-config requires all packages mentioned in pc files to exists. Otherwise pkg-config will fail to find the pkg.
# As such naming any SYSTEM_PACKAGES is damned to fail which is why it is not mentioned in the docs at the beginning.

Просмотреть файл

@ -57,7 +57,8 @@
function(vcpkg_from_bitbucket)
set(oneValueArgs OUT_SOURCE_PATH REPO REF SHA512 HEAD_REF)
set(multipleValuesArgs PATCHES)
cmake_parse_arguments(_vdud "" "${oneValueArgs}" "${multipleValuesArgs}" ${ARGN})
# parse parameters such that semicolons in options arguments to COMMAND don't get erased
cmake_parse_arguments(PARSE_ARGV 0 _vdud "" "${oneValueArgs}" "${multipleValuesArgs}")
if(NOT _vdud_OUT_SOURCE_PATH)
message(FATAL_ERROR "OUT_SOURCE_PATH must be specified.")

Просмотреть файл

@ -41,7 +41,8 @@ include(vcpkg_execute_in_download_mode)
function(vcpkg_from_git)
set(oneValueArgs OUT_SOURCE_PATH URL REF)
set(multipleValuesArgs PATCHES)
cmake_parse_arguments(_vdud "" "${oneValueArgs}" "${multipleValuesArgs}" ${ARGN})
# parse parameters such that semicolons in options arguments to COMMAND don't get erased
cmake_parse_arguments(PARSE_ARGV 0 _vdud "" "${oneValueArgs}" "${multipleValuesArgs}")
if(NOT DEFINED _vdud_OUT_SOURCE_PATH)
message(FATAL_ERROR "OUT_SOURCE_PATH must be specified.")

Просмотреть файл

@ -68,7 +68,8 @@
function(vcpkg_from_github)
set(oneValueArgs OUT_SOURCE_PATH REPO REF SHA512 HEAD_REF GITHUB_HOST AUTHORIZATION_TOKEN)
set(multipleValuesArgs PATCHES)
cmake_parse_arguments(_vdud "" "${oneValueArgs}" "${multipleValuesArgs}" ${ARGN})
# parse parameters such that semicolons in options arguments to COMMAND don't get erased
cmake_parse_arguments(PARSE_ARGV 0 _vdud "" "${oneValueArgs}" "${multipleValuesArgs}")
if(NOT DEFINED _vdud_OUT_SOURCE_PATH)
message(FATAL_ERROR "OUT_SOURCE_PATH must be specified.")

Просмотреть файл

@ -67,7 +67,8 @@ include(vcpkg_execute_in_download_mode)
function(vcpkg_from_gitlab)
set(oneValueArgs OUT_SOURCE_PATH GITLAB_URL USER REPO REF SHA512 HEAD_REF)
set(multipleValuesArgs PATCHES)
cmake_parse_arguments(_vdud "" "${oneValueArgs}" "${multipleValuesArgs}" ${ARGN})
# parse parameters such that semicolons in options arguments to COMMAND don't get erased
cmake_parse_arguments(PARSE_ARGV 0 _vdud "" "${oneValueArgs}" "${multipleValuesArgs}")
if(NOT DEFINED _vdud_GITLAB_URL)
message(FATAL_ERROR "GITLAB_URL must be specified.")

Просмотреть файл

@ -96,7 +96,8 @@ function(vcpkg_from_sourceforge)
set(booleanValueArgs DISABLE_SSL NO_REMOVE_ONE_LEVEL)
set(oneValueArgs OUT_SOURCE_PATH REPO REF SHA512 FILENAME WORKING_DIRECTORY)
set(multipleValuesArgs PATCHES)
cmake_parse_arguments(_vdus "${booleanValueArgs}" "${oneValueArgs}" "${multipleValuesArgs}" ${ARGN})
# parse parameters such that semicolons in options arguments to COMMAND don't get erased
cmake_parse_arguments(PARSE_ARGV 0 _vdus "${booleanValueArgs}" "${oneValueArgs}" "${multipleValuesArgs}")
if(NOT DEFINED _vdus_OUT_SOURCE_PATH)
message(FATAL_ERROR "OUT_SOURCE_PATH must be specified.")

Просмотреть файл

@ -20,7 +20,8 @@
## Note: includes must be handled separately
function(vcpkg_install_gn)
cmake_parse_arguments(_vig "" "SOURCE_PATH" "TARGETS" ${ARGN})
# parse parameters such that semicolons in options arguments to COMMAND don't get erased
cmake_parse_arguments(PARSE_ARGV 0 _vig "" "SOURCE_PATH" "TARGETS")
if(NOT DEFINED _vig_SOURCE_PATH)
message(FATAL_ERROR "SOURCE_PATH must be specified.")

Просмотреть файл

@ -92,12 +92,13 @@
include(vcpkg_clean_msbuild)
function(vcpkg_install_msbuild)
# parse parameters such that semicolons in options arguments to COMMAND don't get erased
cmake_parse_arguments(
PARSE_ARGV 0
_csc
"USE_VCPKG_INTEGRATION;ALLOW_ROOT_INCLUDES;REMOVE_ROOT_INCLUDES;SKIP_CLEAN"
"SOURCE_PATH;PROJECT_SUBPATH;INCLUDES_SUBPATH;LICENSE_SUBPATH;RELEASE_CONFIGURATION;DEBUG_CONFIGURATION;PLATFORM;PLATFORM_TOOLSET;TARGET_PLATFORM_VERSION;TARGET"
"OPTIONS;OPTIONS_RELEASE;OPTIONS_DEBUG"
${ARGN}
)
if(NOT DEFINED _csc_RELEASE_CONFIGURATION)

Просмотреть файл

@ -62,11 +62,11 @@
## * [freexl](https://github.com/Microsoft/vcpkg/blob/master/ports/freexl/portfile.cmake)
function(vcpkg_install_nmake)
cmake_parse_arguments(_in
# parse parameters such that semicolons in options arguments to COMMAND don't get erased
cmake_parse_arguments(PARSE_ARGV 0 _in
"NO_DEBUG"
"SOURCE_PATH;PROJECT_SUBPATH;PROJECT_NAME"
"OPTIONS;OPTIONS_RELEASE;OPTIONS_DEBUG;PRERUN_SHELL;PRERUN_SHELL_DEBUG;PRERUN_SHELL_RELEASE"
${ARGN}
)
if (NOT CMAKE_HOST_WIN32)