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/execute_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/execute_process.cmake')
| -rw-r--r-- | scripts/cmake/execute_process.cmake | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/scripts/cmake/execute_process.cmake b/scripts/cmake/execute_process.cmake new file mode 100644 index 000000000..6d9bd6cfc --- /dev/null +++ b/scripts/cmake/execute_process.cmake @@ -0,0 +1,20 @@ +## # execute_process
+##
+## Intercepts all calls to execute_process() inside portfiles and fails when Download Mode
+## is enabled.
+##
+## In order to execute a process in Download Mode call `_execute_process()` instead.
+##
+if (NOT DEFINED OVERRIDEN_EXECUTE_PROCESS)
+ set(OVERRIDEN_EXECUTE_PROCESS ON)
+
+ if (DEFINED VCPKG_DOWNLOAD_MODE)
+ function(execute_process)
+ message(FATAL_ERROR "This command cannot be executed in Download Mode.\nHalting portfile execution.\n")
+ endfunction()
+ else()
+ function(execute_process)
+ _execute_process(${ARGV})
+ endfunction()
+ endif()
+endif()
\ No newline at end of file |
