From 9e68729bb6b62537314c7ab315c2dcf6dc2476b0 Mon Sep 17 00:00:00 2001 From: Victor Romero Date: Thu, 29 Aug 2019 19:40:43 -0700 Subject: Use macro instead of function to override execute_process() (#7980) --- scripts/cmake/execute_process.cmake | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'scripts') diff --git a/scripts/cmake/execute_process.cmake b/scripts/cmake/execute_process.cmake index 6d9bd6cfc..51f6ad160 100644 --- a/scripts/cmake/execute_process.cmake +++ b/scripts/cmake/execute_process.cmake @@ -9,12 +9,12 @@ if (NOT DEFINED OVERRIDEN_EXECUTE_PROCESS) set(OVERRIDEN_EXECUTE_PROCESS ON) if (DEFINED VCPKG_DOWNLOAD_MODE) - function(execute_process) + macro(execute_process) message(FATAL_ERROR "This command cannot be executed in Download Mode.\nHalting portfile execution.\n") - endfunction() + endmacro() else() - function(execute_process) + macro(execute_process) _execute_process(${ARGV}) - endfunction() + endmacro() endif() endif() \ No newline at end of file -- cgit v1.2.3 From 0872eebe34db686c8d87936e3c39984ab609bd5b Mon Sep 17 00:00:00 2001 From: TheGoddessInari Date: Sun, 1 Sep 2019 05:09:34 -0700 Subject: (#8013) [vcpkg] Compatibility with pwsh >= 6.2 In Powershell 6.2/7.0, `Get-ChildItem`'s paths are now printed as absolute paths instead of relative paths; this breaks the code we have that assumes that they're printed as relative paths. Thus, change the code to request the `Name` property specifically, which is what we actually wanted. --- scripts/bootstrap.ps1 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/bootstrap.ps1 b/scripts/bootstrap.ps1 index 6234efaa3..d2632e57b 100644 --- a/scripts/bootstrap.ps1 +++ b/scripts/bootstrap.ps1 @@ -226,8 +226,9 @@ function getWindowsSDK( [Parameter(Mandatory=$False)][switch]$DisableWin10SDK = $win10sdkVersions = @(Get-ChildItem $folder | Where-Object {$_.Name -match "^10"} | Sort-Object) [array]::Reverse($win10sdkVersions) # Newest SDK first - foreach ($win10sdkV in $win10sdkVersions) + foreach ($win10sdk in $win10sdkVersions) { + $win10sdkV = $win10sdk.Name $windowsheader = "$folder\$win10sdkV\um\windows.h" if (!(Test-Path $windowsheader)) { -- cgit v1.2.3