diff options
| author | Victor Romero <romerosanchezv@gmail.com> | 2019-08-28 13:49:29 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-08-28 13:49:29 -0700 |
| commit | f5c732b40d43f062278f247036b773477823813b (patch) | |
| tree | 5c034cd060ee0e1b32d3453e3cb8812d3f58b285 /scripts/cmake/vcpkg_execute_required_process.cmake | |
| parent | 2d60eea04554e783b0055a930dd9ca039a975fb7 (diff) | |
| download | vcpkg-f5c732b40d43f062278f247036b773477823813b.tar.gz vcpkg-f5c732b40d43f062278f247036b773477823813b.zip | |
Download Mode (#7950)
* [portfile functions] Override execute_process() to accept ALLOW_IN_DOWNLOAD_MODE option
* [vcpkg install] Set VCPKG_DOWNLOAD_MODE when using --only-downloads option
* [vcpkg_find_acquire_program] Allow in Download Mode
* Don't stop when build fails for a package
* Download sources for all packages in dependency graph
* Improve output messages
* Enable acquiring MSYS packages in download mode
* Documentation
* Update documentation
* execute_process() always fails on Download Mode
* Regenerate docs and fix formatting
* Run clang-format
* Use _execute_process on vcpkg_from_<source> helpers
* Fix calls to _execute_process() when not in Download Mode
Diffstat (limited to 'scripts/cmake/vcpkg_execute_required_process.cmake')
| -rw-r--r-- | scripts/cmake/vcpkg_execute_required_process.cmake | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/scripts/cmake/vcpkg_execute_required_process.cmake b/scripts/cmake/vcpkg_execute_required_process.cmake index e65d1970a..f25a5b55e 100644 --- a/scripts/cmake/vcpkg_execute_required_process.cmake +++ b/scripts/cmake/vcpkg_execute_required_process.cmake @@ -11,6 +11,10 @@ ## ) ## ``` ## ## Parameters +## ### ALLOW_IN_DOWNLOAD_MODE +## Allows the command to execute in Download Mode. +## [See execute_process() override](../../scripts/cmake/execute_process.cmake). +## ## ### COMMAND ## The command to be executed, along with its arguments. ## @@ -30,10 +34,20 @@ ## * [qt5](https://github.com/Microsoft/vcpkg/blob/master/ports/qt5/portfile.cmake) include(vcpkg_prettify_command) function(vcpkg_execute_required_process) - cmake_parse_arguments(vcpkg_execute_required_process "" "WORKING_DIRECTORY;LOGNAME" "COMMAND" ${ARGN}) + cmake_parse_arguments(vcpkg_execute_required_process "ALLOW_IN_DOWNLOAD_MODE" "WORKING_DIRECTORY;LOGNAME" "COMMAND" ${ARGN}) 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") - execute_process( + + set(execute_process_function execute_process) + if (DEFINED VCPKG_DOWNLOAD_MODE AND NOT vcpkg_execute_required_process_ALLOW_IN_DOWNLOAD_MODE) + message(FATAL_ERROR +[[ +This command cannot be executed in Download Mode. +Halting portfile execution. +]]) + endif() + + _execute_process( COMMAND ${vcpkg_execute_required_process_COMMAND} OUTPUT_FILE ${LOG_OUT} ERROR_FILE ${LOG_ERR} |
