aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/cmake/vcpkg_build_cmake.cmake7
-rw-r--r--scripts/cmake/vcpkg_build_msbuild.cmake2
-rw-r--r--scripts/cmake/vcpkg_install_cmake.cmake7
-rw-r--r--scripts/findVisualStudioInstallationInstances.ps116
-rw-r--r--scripts/ports.cmake3
5 files changed, 21 insertions, 14 deletions
diff --git a/scripts/cmake/vcpkg_build_cmake.cmake b/scripts/cmake/vcpkg_build_cmake.cmake
index 2e73a72d6..18e2a8b00 100644
--- a/scripts/cmake/vcpkg_build_cmake.cmake
+++ b/scripts/cmake/vcpkg_build_cmake.cmake
@@ -1,9 +1,14 @@
function(vcpkg_build_cmake)
cmake_parse_arguments(_bc "MSVC_64_TOOLSET;DISABLE_PARALLEL" "" "" ${ARGN})
- set(MSVC_EXTRA_ARGS /p:VCPkgLocalAppDataDisabled=true)
+ set(MSVC_EXTRA_ARGS
+ "/p:VCPkgLocalAppDataDisabled=true"
+ "/p:UseIntelMKL=No"
+ )
# Specifies the architecture of the toolset, NOT the architecture of the produced binary
+ # This can help libraries that cause the linker to run out of memory.
+ # https://support.microsoft.com/en-us/help/2891057/linker-fatal-error-lnk1102-out-of-memory
if (_bc_MSVC_64_TOOLSET)
list(APPEND MSVC_EXTRA_ARGS "/p:PreferredToolArchitecture=x64")
endif()
diff --git a/scripts/cmake/vcpkg_build_msbuild.cmake b/scripts/cmake/vcpkg_build_msbuild.cmake
index df255c745..f4a809e7f 100644
--- a/scripts/cmake/vcpkg_build_msbuild.cmake
+++ b/scripts/cmake/vcpkg_build_msbuild.cmake
@@ -55,6 +55,7 @@ function(vcpkg_build_msbuild)
/p:Configuration=${_csc_RELEASE_CONFIGURATION}
/p:Platform=${_csc_PLATFORM}
/p:VCPkgLocalAppDataDisabled=true
+ /p:UseIntelMKL=No
/m
WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel
LOGNAME build-${TARGET_TRIPLET}-rel
@@ -67,6 +68,7 @@ function(vcpkg_build_msbuild)
/p:Configuration=${_csc_DEBUG_CONFIGURATION}
/p:Platform=${_csc_PLATFORM}
/p:VCPkgLocalAppDataDisabled=true
+ /p:UseIntelMKL=No
/m
WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg
LOGNAME build-${TARGET_TRIPLET}-dbg
diff --git a/scripts/cmake/vcpkg_install_cmake.cmake b/scripts/cmake/vcpkg_install_cmake.cmake
index 5997fa764..0ebff6961 100644
--- a/scripts/cmake/vcpkg_install_cmake.cmake
+++ b/scripts/cmake/vcpkg_install_cmake.cmake
@@ -1,9 +1,14 @@
function(vcpkg_install_cmake)
cmake_parse_arguments(_bc "MSVC_64_TOOLSET;DISABLE_PARALLEL" "" "" ${ARGN})
- set(MSVC_EXTRA_ARGS /p:VCPkgLocalAppDataDisabled=true)
+ set(MSVC_EXTRA_ARGS
+ "/p:VCPkgLocalAppDataDisabled=true"
+ "/p:UseIntelMKL=No"
+ )
# Specifies the architecture of the toolset, NOT the architecture of the produced binary
+ # This can help libraries that cause the linker to run out of memory.
+ # https://support.microsoft.com/en-us/help/2891057/linker-fatal-error-lnk1102-out-of-memory
if (_bc_MSVC_64_TOOLSET)
list(APPEND MSVC_EXTRA_ARGS "/p:PreferredToolArchitecture=x64")
endif()
diff --git a/scripts/findVisualStudioInstallationInstances.ps1 b/scripts/findVisualStudioInstallationInstances.ps1
index a2ce66522..951975758 100644
--- a/scripts/findVisualStudioInstallationInstances.ps1
+++ b/scripts/findVisualStudioInstallationInstances.ps1
@@ -13,17 +13,8 @@ $downloadsDir = "$vcpkgRootDir\downloads"
$nugetexe = & $scriptsDir\fetchDependency.ps1 "nuget"
$nugetPackageDir = "$downloadsDir\nuget-packages"
-$SetupAPIVersion = "1.3.269-rc"
-$url = "https://api.nuget.org/packages/microsoft.visualstudio.setup.configuration.native.$SetupAPIVersion.nupkg"
-$downloadName = "microsoft.visualstudio.setup.configuration.native.$SetupAPIVersion.nupkg"
-$downloadPath = "$downloadsDir\$downloadName"
-
-if (!(Test-Path $downloadPath))
-{
- Start-BitsTransfer -Source $url -Destination $downloadPath #-ErrorAction SilentlyContinue
-}
-
-$nugetOutput = & $nugetexe install Microsoft.VisualStudio.Setup.Configuration.Native -Pre -Source $downloadsDir -OutputDirectory $nugetPackageDir 2>&1
+$SetupAPIVersion = "1.5.125-rc"
+$nugetOutput = & $nugetexe install Microsoft.VisualStudio.Setup.Configuration.Native -Version $SetupAPIVersion -OutputDirectory $nugetPackageDir -nocache 2>&1
$SetupConsoleExe = "$nugetPackageDir\Microsoft.VisualStudio.Setup.Configuration.Native.$SetupAPIVersion\tools\x86\Microsoft.VisualStudio.Setup.Configuration.Console.exe"
@@ -34,8 +25,9 @@ if (!(Test-Path $SetupConsoleExe))
$instances = & $SetupConsoleExe -nologo -value InstallationPath 2>&1
$instanceCount = $instances.Length
+
# The last item can be empty
-if ($instances[$entryCount - 1] -eq "")
+if ($instanceCount -gt 0 -and $instances[$instanceCount - 1] -eq "")
{
$instances = $instances[0..($instanceCount - 2)]
}
diff --git a/scripts/ports.cmake b/scripts/ports.cmake
index cc01a0619..c03b005ea 100644
--- a/scripts/ports.cmake
+++ b/scripts/ports.cmake
@@ -79,6 +79,9 @@ if(CMD MATCHES "^BUILD$")
if (DEFINED VCPKG_POLICY_DLLS_WITHOUT_LIBS)
file(APPEND ${BUILD_INFO_FILE_PATH} "PolicyDLLsWithoutLIBs: ${VCPKG_POLICY_DLLS_WITHOUT_LIBS}\n")
endif()
+ if (DEFINED VCPKG_POLICY_EMPTY_PACKAGE)
+ file(APPEND ${BUILD_INFO_FILE_PATH} "PolicyEmptyPackage: ${VCPKG_POLICY_EMPTY_PACKAGE}\n")
+ endif()
elseif(CMD MATCHES "^CREATE$")
file(TO_NATIVE_PATH ${VCPKG_ROOT_DIR} NATIVE_VCPKG_ROOT_DIR)
file(TO_NATIVE_PATH ${DOWNLOADS} NATIVE_DOWNLOADS)