aboutsummaryrefslogtreecommitdiff
path: root/scripts/cmake/execute_process.cmake
diff options
context:
space:
mode:
authorzi-m <zi.m.github.com@gmail.com>2019-08-29 20:39:11 +0200
committerzi-m <zi.m.github.com@gmail.com>2019-08-29 20:39:11 +0200
commit7fd21c5d827c2d77b21270646c2fe53704245747 (patch)
tree2e6c8a4e482c6093acec724a9ec6d1efb5207bd7 /scripts/cmake/execute_process.cmake
parent94d52ecffe377a3d11f626d84a2da9ca5c60be9a (diff)
parentf5c732b40d43f062278f247036b773477823813b (diff)
downloadvcpkg-7fd21c5d827c2d77b21270646c2fe53704245747.tar.gz
vcpkg-7fd21c5d827c2d77b21270646c2fe53704245747.zip
Merge remote-tracking branch 'upstream/master' into wxchartdir
Diffstat (limited to 'scripts/cmake/execute_process.cmake')
-rw-r--r--scripts/cmake/execute_process.cmake20
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