aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorJackBoosY <47264268+JackBoosY@users.noreply.github.com>2019-08-16 10:01:32 +0800
committerGitHub <noreply@github.com>2019-08-16 10:01:32 +0800
commitadb84c2658b9774ff535eb88f377ee818dd429be (patch)
treefcfcf4a93057037152a14aa2885598b45c5b03bd /scripts
parent2865da8f4a6d911617cdd9b147816c4cd02bbf7e (diff)
parent22e787f9448a25dae734ca06c80e7e5af5fb6537 (diff)
downloadvcpkg-adb84c2658b9774ff535eb88f377ee818dd429be.tar.gz
vcpkg-adb84c2658b9774ff535eb88f377ee818dd429be.zip
Merge branch 'master' into dev/jack/4167
Diffstat (limited to 'scripts')
-rw-r--r--scripts/bootstrap.sh2
-rw-r--r--scripts/buildsystems/msbuild/applocal.ps12
-rw-r--r--scripts/buildsystems/vcpkg.cmake12
-rw-r--r--scripts/cmake/vcpkg_check_features.cmake255
-rw-r--r--scripts/cmake/vcpkg_common_functions.cmake1
-rw-r--r--scripts/cmake/vcpkg_configure_cmake.cmake6
-rw-r--r--scripts/cmake/vcpkg_fail_port_install.cmake92
-rw-r--r--scripts/get_triplet_environment.cmake4
-rw-r--r--scripts/ports.cmake1
9 files changed, 274 insertions, 101 deletions
diff --git a/scripts/bootstrap.sh b/scripts/bootstrap.sh
index b0e4f98a5..09d77b07d 100644
--- a/scripts/bootstrap.sh
+++ b/scripts/bootstrap.sh
@@ -249,7 +249,7 @@ buildDir="$vcpkgRootDir/toolsrc/build.rel"
rm -rf "$buildDir"
mkdir -p "$buildDir"
-(cd "$buildDir" && CXX=$CXX "$cmakeExe" .. -DCMAKE_BUILD_TYPE=Release -G "Ninja" "-DCMAKE_MAKE_PROGRAM=$ninjaExe" "-DDEFINE_DISABLE_METRICS=$vcpkgDisableMetrics" "-DVCPKG_ALLOW_APPLE_CLANG=$vcpkgAllowAppleClang") || exit 1
+(cd "$buildDir" && CXX=$CXX "$cmakeExe" .. -DCMAKE_BUILD_TYPE=Release -G "Ninja" "-DCMAKE_MAKE_PROGRAM=$ninjaExe" "-DBUILD_TESTING=OFF" "-DDEFINE_DISABLE_METRICS=$vcpkgDisableMetrics" "-DVCPKG_ALLOW_APPLE_CLANG=$vcpkgAllowAppleClang") || exit 1
(cd "$buildDir" && "$cmakeExe" --build .) || exit 1
rm -rf "$vcpkgRootDir/vcpkg"
diff --git a/scripts/buildsystems/msbuild/applocal.ps1 b/scripts/buildsystems/msbuild/applocal.ps1
index 2fdd9fdb4..ab51dc9be 100644
--- a/scripts/buildsystems/msbuild/applocal.ps1
+++ b/scripts/buildsystems/msbuild/applocal.ps1
@@ -29,7 +29,7 @@ function deployBinary([string]$targetBinaryDir, [string]$SourceDir, [string]$tar
Copy-Item "$SourceDir\$targetBinaryName" $targetBinaryDir
}
if ($copiedFilesLog) { Add-Content $copiedFilesLog "$targetBinaryDir\$targetBinaryName" -Encoding UTF8 }
- if ($tlogFile) { Add-Content $tlogFile "$targetBinaryDir\$targetBinaryName" }
+ if ($tlogFile) { Add-Content $tlogFile "$targetBinaryDir\$targetBinaryName" -Encoding Unicode }
}
diff --git a/scripts/buildsystems/vcpkg.cmake b/scripts/buildsystems/vcpkg.cmake
index f657e2710..6eb0f62dd 100644
--- a/scripts/buildsystems/vcpkg.cmake
+++ b/scripts/buildsystems/vcpkg.cmake
@@ -38,17 +38,7 @@ else()
elseif(CMAKE_GENERATOR MATCHES "^Visual Studio 15 2017$")
set(_VCPKG_TARGET_TRIPLET_ARCH x86)
elseif(CMAKE_GENERATOR MATCHES "^Visual Studio 16 2019$")
- if(CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "^[Xx]86$")
- set(_VCPKG_TARGET_TRIPLET_ARCH x86)
- elseif(CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "^[Aa][Mm][Dd]64$")
- set(_VCPKG_TARGET_TRIPLET_ARCH x64)
- elseif(CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "^[Aa][Rr][Mm]$")
- set(_VCPKG_TARGET_TRIPLET_ARCH arm)
- elseif(CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "^[Aa][Rr][Mm]64$")
- set(_VCPKG_TARGET_TRIPLET_ARCH arm64)
- else()
-
- endif()
+ set(_VCPKG_TARGET_TRIPLET_ARCH x86)
else()
find_program(_VCPKG_CL cl)
if(_VCPKG_CL MATCHES "amd64/cl.exe$" OR _VCPKG_CL MATCHES "x64/cl.exe$")
diff --git a/scripts/cmake/vcpkg_check_features.cmake b/scripts/cmake/vcpkg_check_features.cmake
index d089ac5b1..81ebc234d 100644
--- a/scripts/cmake/vcpkg_check_features.cmake
+++ b/scripts/cmake/vcpkg_check_features.cmake
@@ -1,112 +1,191 @@
## # vcpkg_check_features
-##
-## Check if one or more features are a part of the package installation.
-##
+## Check if one or more features are a part of a package installation.
+##
## ## Usage
## ```cmake
## vcpkg_check_features(
-## <feature1> <output_variable1>
-## [<feature2> <output_variable2>]
-## ...
+## OUT_FEATURE_OPTIONS <FEATURE_OPTIONS>
+## [FEATURES
+## <cuda> <WITH_CUDA>
+## [<opencv> <WITH_OPENCV>]
+## ...]
+## [INVERTED_FEATURES
+## <cuda> <IGNORE_PACKAGE_CUDA>
+## [<opencv> <IGNORE_PACKAGE_OPENCV>]
+## ...]
## )
## ```
-##
-## `vcpkg_check_features` accepts a list of (feature, output_variable) pairs. If a feature is specified, the corresponding output variable will be set as `ON`, or `OFF` otherwise. The syntax is similar to the `PROPERTIES` argument of `set_target_properties`.
-##
-## `vcpkg_check_features` will create a variable `FEATURE_OPTIONS` in the parent scope, which you can pass as a part of `OPTIONS` argument when calling functions like `vcpkg_config_cmake`:
-## ```cmake
-## vcpkg_config_cmake(
-## SOURCE_PATH ${SOURCE_PATH}
-## PREFER_NINJA
-## OPTIONS
-## -DBUILD_TESTING=ON
-## ${FEATURE_OPTIONS}
-## )
-## ```
-##
+## `vcpkg_check_features()` accepts these parameters:
+##
+## * `OUT_FEATURE_OPTIONS`:
+## An output variable, the function will clear the variable passed to `OUT_FEATURE_OPTIONS`
+## and then set it to contain a list of option definitions (`-D<OPTION_NAME>=ON|OFF`).
+##
+## This should be set to `FEATURE_OPTIONS` by convention.
+##
+## * `FEATURES`:
+## A list of (`FEATURE_NAME`, `OPTION_NAME`) pairs.
+## For each `FEATURE_NAME` a definition is added to `OUT_FEATURE_OPTIONS` in the form of:
+##
+## * `-D<OPTION_NAME>=ON`, if a feature is specified for installation,
+## * `-D<OPTION_NAME>=OFF`, otherwise.
+##
+## * `INVERTED_FEATURES`:
+## A list of (`FEATURE_NAME`, `OPTION_NAME`) pairs, uses reversed logic from `FEATURES`.
+## For each `FEATURE_NAME` a definition is added to `OUT_FEATURE_OPTIONS` in the form of:
+##
+## * `-D<OPTION_NAME>=OFF`, if a feature is specified for installation,
+## * `-D<OPTION_NAME>=ON`, otherwise.
+##
+##
## ## Notes
+##
+## The `FEATURES` name parameter can be omitted if no `INVERTED_FEATURES` are used.
+##
+## At least one (`FEATURE_NAME`, `OPTION_NAME`) pair must be passed to the function call.
+##
+## Arguments passed to `FEATURES` and `INVERTED_FEATURES` are not validated to prevent duplication.
+## If the same (`FEATURE_NAME`, `OPTION_NAME`) pair is passed to both lists,
+## two conflicting definitions are added to `OUT_FEATURE_OPTIONS`.
+##
+##
+## ## Examples
+##
+## ### Example 1: Regular features
+##
## ```cmake
-## vcpkg_check_features(<feature> <output_variable>)
-## ```
-## can be used as a replacement of:
-## ```cmake
-## if(<feature> IN_LIST FEATURES)
-## set(<output_variable> ON)
-## else()
-## set(<output_variable> OFF)
-## endif()
+## $ ./vcpkg install mimalloc[asm,secure]
+##
+## # ports/mimalloc/portfile.cmake
+## vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
+## # Keyword FEATURES is optional if INVERTED_FEATURES are not used
+## asm MI_SEE_ASM
+## override MI_OVERRIDE
+## secure MI_SECURE
+## )
+##
+## vcpkg_configure_cmake(
+## SOURCE_PATH ${SOURCE_PATH}
+## PREFER_NINJA
+## OPTIONS
+## # Expands to "-DMI_SEE_ASM=ON; -DMI_OVERRIDE=OFF; -DMI_SECURE=ON"
+## ${FEATURE_OPTIONS}
+## )
## ```
-##
-## However, if you have a feature that was checked like this before:
+##
+## ### Example 2: Inverted features
+##
## ```cmake
-## if(<feature> IN_LIST FEATURES)
-## set(<output_variable> OFF)
-## else()
-## set(<output_variable> ON)
-## endif()
+## $ ./vcpkg install cpprestsdk[websockets]
+##
+## # ports/cpprestsdk/portfile.cmake
+## vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
+## INVERTED_FEATURES # <- Keyword INVERTED_FEATURES required
+## brotli CPPREST_EXCLUDE_BROTLI
+## websockets CPPREST_EXCLUDE_WEBSOCKETS
+## )
+##
+## vcpkg_configure_cmake(
+## SOURCE_PATH ${SOURCE_PATH}
+## PREFER_NINJA
+## OPTIONS
+## # Expands to "-DCPPREST_EXCLUDE_BROTLI=ON; -DCPPREST_EXCLUDE_WEBSOCKETS=OFF"
+## ${FEATURE_OPTIONS}
+## )
## ```
-## then you should not use `vcpkg_check_features` instead. [```oniguruma```](https://github.com/microsoft/vcpkg/blob/master/ports/oniguruma/portfile.cmake), for example, has a feature named `non-posix` which is checked with:
+##
+## ### Example 3: Set multiple options for same feature
+##
## ```cmake
-## if("non-posix" IN_LIST FEATURES)
-## set(ENABLE_POSIX_API OFF)
-## else()
-## set(ENABLE_POSIX_API ON)
-## endif()
-## ```
-## and by replacing these code with:
+## $ ./vcpkg install pcl[cuda]
+##
+## # ports/pcl/portfile.cmake
+## vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
+## cuda WITH_CUDA
+## cuda BUILD_CUDA
+## cuda BUILD_GPU
+## )
+##
+## vcpkg_configure_cmake(
+## SOURCE_PATH ${SOURCE_PATH}
+## PREFER_NINJA
+## OPTIONS
+## # Expands to "-DWITH_CUDA=ON; -DBUILD_CUDA=ON; -DBUILD_GPU=ON"
+## ${FEATURE_OPTIONS}
+## )
+## ```
+##
+## ### Example 4: Use regular and inverted features
+##
## ```cmake
-## vcpkg_check_features(non-posix ENABLE_POSIX_API)
-## ```
-## is totally wrong.
-##
-## `vcpkg_check_features` is supposed to be called only once. Otherwise, the `FEATURE_OPTIONS` variable set by a previous call will be overwritten.
-##
-## ## Examples
-##
-## * [czmq](https://github.com/microsoft/vcpkg/blob/master/ports/czmq/portfile.cmake)
-## * [xsimd](https://github.com/microsoft/vcpkg/blob/master/ports/xsimd/portfile.cmake)
-## * [xtensor](https://github.com/microsoft/vcpkg/blob/master/ports/xtensor/portfile.cmake)
+## $ ./vcpkg install rocksdb[tbb]
+##
+## # ports/rocksdb/portfile.cmake
+## vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
+## FEATURES # <- Keyword FEATURES is required because INVERTED_FEATURES are being used
+## tbb WITH_TBB
+## INVERTED_FEATURES
+## tbb ROCKSDB_IGNORE_PACKAGE_TBB
+## )
+##
+## vcpkg_configure_cmake(
+## SOURCE_PATH ${SOURCE_PATH}
+## PREFER_NINJA
+## OPTIONS
+## # Expands to "-DWITH_TBB=ON; -DROCKSDB_IGNORE_PACKAGE_TBB=OFF"
+## ${FEATURE_OPTIONS}
+## )
+## ```
+##
+## ## Examples in portfiles
+##
+## * [cpprestsdk](https://github.com/microsoft/vcpkg/blob/master/ports/cpprestsdk/portfile.cmake)
+## * [pcl](https://github.com/microsoft/vcpkg/blob/master/ports/pcl/portfile.cmake)
+## * [rocksdb](https://github.com/microsoft/vcpkg/blob/master/ports/rocksdb/portfile.cmake)
+##
function(vcpkg_check_features)
- cmake_parse_arguments(_vcf "" "" "" ${ARGN})
-
- list(LENGTH ARGN _vcf_ARGC)
- math(EXPR _vcf_INCORRECT_ARGN "${_vcf_ARGC} % 2")
+ cmake_parse_arguments(_vcf "" "OUT_FEATURE_OPTIONS" "FEATURES;INVERTED_FEATURES" ${ARGN})
- if(_vcf_INCORRECT_ARGN)
- message(FATAL_ERROR "Called with incorrect number of arguments.")
+ if (NOT DEFINED _vcf_OUT_FEATURE_OPTIONS)
+ message(FATAL_ERROR "OUT_FEATURE_OPTIONS must be specified.")
endif()
- set(_vcf_IS_FEATURE_ARG ON)
- set(_vcf_FEATURE_OPTIONS)
-
- # Process (feature, output_var) pairs
- foreach(_vcf_ARG ${ARGN})
- if(_vcf_IS_FEATURE_ARG)
- set(_vcf_FEATURE ${_vcf_ARG})
-
- if(NOT ${_vcf_FEATURE} IN_LIST ALL_FEATURES)
- message(FATAL_ERROR "Unknown feature: ${_vcf_FEATURE}")
- endif()
-
- set(_vcf_IS_FEATURE_ARG OFF)
- else()
- set(_vcf_FEATURE_VAR ${_vcf_ARG})
+ macro(_check_features _vcf_ARGUMENT _set_if _set_else)
+ list(LENGTH ${_vcf_ARGUMENT} FEATURES_SET_LEN)
+ math(EXPR _vcf_INCORRECT_ARGN "${FEATURES_SET_LEN} % 2")
+ if(_vcf_INCORRECT_ARGN)
+ message(FATAL_ERROR "Called with incorrect number of arguments.")
+ endif()
- if(${_vcf_FEATURE} IN_LIST FEATURES)
- set(${_vcf_FEATURE_VAR} ON PARENT_SCOPE)
- list(APPEND _vcf_FEATURE_OPTIONS "-D${_vcf_FEATURE_VAR}=ON")
+ set(_vcf_IS_FEATURE_NAME_ARG ON)
+ foreach(_vcf_ARG ${${_vcf_ARGUMENT}})
+ if(_vcf_IS_FEATURE_NAME_ARG)
+ set(_vcf_FEATURE_NAME ${_vcf_ARG})
+ if(NOT ${_vcf_FEATURE_NAME} IN_LIST ALL_FEATURES)
+ message(FATAL_ERROR "Unknown feature: ${_vcf_FEATURE_NAME}")
+ endif()
+ set(_vcf_IS_FEATURE_NAME_ARG OFF)
else()
- set(${_vcf_FEATURE_VAR} OFF PARENT_SCOPE)
- list(APPEND _vcf_FEATURE_OPTIONS "-D${_vcf_FEATURE_VAR}=OFF")
+ set(_vcf_FEATURE_VARIABLE ${_vcf_ARG})
+ if(${_vcf_FEATURE_NAME} IN_LIST FEATURES)
+ list(APPEND _vcf_FEATURE_OPTIONS "-D${_vcf_FEATURE_VARIABLE}=${_set_if}")
+ else()
+ list(APPEND _vcf_FEATURE_OPTIONS "-D${_vcf_FEATURE_VARIABLE}=${_set_else}")
+ endif()
+ set(_vcf_IS_FEATURE_NAME_ARG ON)
endif()
+ endforeach()
+ endmacro()
- set(_vcf_IS_FEATURE_ARG ON)
- endif()
- endforeach()
+ set(_vcf_FEATURE_OPTIONS)
- if(DEFINED FEATURE_OPTIONS)
- message(WARNING "FEATURE_OPTIONS is already defined and will be overwritten.")
+ if (DEFINED _vcf_FEATURES OR DEFINED _vcf_INVERTED_FEATURES)
+ _check_features(_vcf_FEATURES ON OFF)
+ _check_features(_vcf_INVERTED_FEATURES OFF ON)
+ else()
+ # Skip arguments that correspond to OUT_FEATURE_OPTIONS and its value.
+ list(SUBLIST ARGN 2 -1 _vcf_ARGN)
+ _check_features(_vcf_ARGN ON OFF)
endif()
-
- set(FEATURE_OPTIONS ${_vcf_FEATURE_OPTIONS} PARENT_SCOPE)
+ set(${_vcf_OUT_FEATURE_OPTIONS} "${_vcf_FEATURE_OPTIONS}" PARENT_SCOPE)
endfunction()
diff --git a/scripts/cmake/vcpkg_common_functions.cmake b/scripts/cmake/vcpkg_common_functions.cmake
index 515b2bafe..e9e52bad8 100644
--- a/scripts/cmake/vcpkg_common_functions.cmake
+++ b/scripts/cmake/vcpkg_common_functions.cmake
@@ -9,6 +9,7 @@ include(vcpkg_extract_source_archive_ex)
include(vcpkg_execute_required_process)
include(vcpkg_execute_required_process_repeat)
include(vcpkg_execute_build_process)
+include(vcpkg_fail_port_install)
include(vcpkg_find_acquire_program)
include(vcpkg_fixup_cmake_targets)
include(vcpkg_from_github)
diff --git a/scripts/cmake/vcpkg_configure_cmake.cmake b/scripts/cmake/vcpkg_configure_cmake.cmake
index 37362a5a2..6c392d385 100644
--- a/scripts/cmake/vcpkg_configure_cmake.cmake
+++ b/scripts/cmake/vcpkg_configure_cmake.cmake
@@ -8,6 +8,7 @@
## SOURCE_PATH <${SOURCE_PATH}>
## [PREFER_NINJA]
## [DISABLE_PARALLEL_CONFIGURE]
+## [NO_CHARSET_FLAG]
## [GENERATOR <"NMake Makefiles">]
## [OPTIONS <-DUSE_THIS_IN_ALL_BUILDS=1>...]
## [OPTIONS_RELEASE <-DOPTIMIZE=1>...]
@@ -28,6 +29,11 @@
## Disables running the CMake configure step in parallel.
## This is needed for libraries which write back into their source directory during configure.
##
+## ### NO_CHARSET_FLAG
+## Disables passing `utf-8` as the default character set to `CMAKE_C_FLAGS` and `CMAKE_CXX_FLAGS`.
+##
+## This is needed for libraries that set their own source code's character set.
+##
## ### GENERATOR
## Specifies the precise generator to use.
##
diff --git a/scripts/cmake/vcpkg_fail_port_install.cmake b/scripts/cmake/vcpkg_fail_port_install.cmake
new file mode 100644
index 000000000..0fdacb639
--- /dev/null
+++ b/scripts/cmake/vcpkg_fail_port_install.cmake
@@ -0,0 +1,92 @@
+## # vcpkg_fail_port_install
+##
+## Fails the current portfile with a (default) error message
+##
+## ## Usage
+## ```cmake
+## vcpkg_fail_port_install([MESSAGE <message>] [ON_TARGET <target1> [<target2> ...]]
+## [ON_ARCH <arch1> [<arch2> ...]]
+## [ON_CRT_LINKAGE <link1> [<link2> ...]])
+## [ON_LIBRARY_LINKAGE <linklib1> [<linklib2> ...]])
+## ```
+##
+## ## Parameters
+## ### MESSAGE
+## Additional failure message. If non is given a default message will be displayed depending on the failure condition
+##
+## ### ALWAYS
+## will always fail early
+##
+## ### ON_TARGET
+## targets for which the build should fail early. Valid targets are <target> from VCPKG_IS_TARGET_<target> (see vcpkg_common_definitions.cmake)
+##
+## ### ON_ARCH
+## architecture for which the build should fail early.
+##
+## ### ON_CRT_LINKAGE
+## CRT linkage for which the build should fail early.
+##
+## ### ON_LIBRARY_LINKAGE
+## library linkage for which the build should fail early.
+##
+## ## Examples
+##
+## * [aws-lambda-cpp](https://github.com/Microsoft/vcpkg/blob/master/ports/aws-lambda-cpp/portfile.cmake)
+function(vcpkg_fail_port_install)
+ cmake_parse_arguments(PARSE_ARGV 0 _csc "ALWAYS" "MESSAGE" "ON_TARGET;ON_ARCH;ON_CRT_LINKAGE;ON_LIBRARY_LINKAGE")
+ if(DEFINED _csc_UNPARSED_ARGUMENTS)
+ message(FATAL_ERROR "Unknown arguments passed to vcpkg_fail_port_install. Please correct the portfile!")
+ endif()
+ if(DEFINED _csc_MESSAGE)
+ set(_csc_MESSAGE "${_csc_MESSAGE}\n")
+ else()
+ set(_csc_MESSAGE "")
+ endif()
+
+ unset(_fail_port)
+ #Target fail check
+ if(DEFINED _csc_ON_TARGET)
+ foreach(_target ${_csc_ON_TARGET})
+ string(TOUPPER ${_target} _target_upper)
+ if(VCPKG_TARGET_IS_${_target_upper})
+ set(_fail_port TRUE)
+ set(_csc_MESSAGE "${_csc_MESSAGE}Target '${_target}' not supported by ${PORT}!\n")
+ endif()
+ endforeach()
+ endif()
+
+ #Architecture fail check
+ if(DEFINED _csc_ON_ARCH)
+ foreach(_arch ${_csc_ON_ARCH})
+ if(${VCPKG_TARGET_ARCHITECTURE} MATCHES ${_arch})
+ set(_fail_port TRUE)
+ set(_csc_MESSAGE "${_csc_MESSAGE}Architecture '${_arch}' not supported by ${PORT}!\n")
+ endif()
+ endforeach()
+ endif()
+
+ #CRT linkage fail check
+ if(DEFINED _csc_ON_CRT_LINKAGE)
+ foreach(_crt_link ${_csc_ON_CRT_LINKAGE})
+ if("${VCPKG_CRT_LINKAGE}" MATCHES "${_crt_link}")
+ set(_fail_port TRUE)
+ set(_csc_MESSAGE "${_csc_MESSAGE}CRT linkage '${VCPKG_CRT_LINKAGE}' not supported by ${PORT}!\n")
+ endif()
+ endforeach()
+ endif()
+
+ #Library linkage fail check
+ if(DEFINED _csc_ON_LIBRARY_LINKAGE)
+ foreach(_lib_link ${_csc_ON_LIBRARY_LINKAGE})
+ if("${VCPKG_LIBRARY_LINKAGE}" MATCHES "${_lib_link}")
+ set(_fail_port TRUE)
+ set(_csc_MESSAGE "${_csc_MESSAGE}Library linkage '${VCPKG_LIBRARY_LINKAGE}' not supported by ${PORT}!\n")
+ endif()
+ endforeach()
+ endif()
+
+ if(_fail_port OR _csc_ALWAYS)
+ message(FATAL_ERROR ${_csc_MESSAGE})
+ endif()
+
+endfunction() \ No newline at end of file
diff --git a/scripts/get_triplet_environment.cmake b/scripts/get_triplet_environment.cmake
index bc79b16ce..21464bb2e 100644
--- a/scripts/get_triplet_environment.cmake
+++ b/scripts/get_triplet_environment.cmake
@@ -1,4 +1,7 @@
include(${CMAKE_TRIPLET_FILE})
+if (DEFINED CMAKE_ENV_OVERRIDES_FILE)
+ include(${CMAKE_ENV_OVERRIDES_FILE} OPTIONAL)
+endif()
# GUID used as a flag - "cut here line"
message("c35112b6-d1ba-415b-aa5d-81de856ef8eb")
@@ -9,3 +12,4 @@ message("VCPKG_PLATFORM_TOOLSET=${VCPKG_PLATFORM_TOOLSET}")
message("VCPKG_VISUAL_STUDIO_PATH=${VCPKG_VISUAL_STUDIO_PATH}")
message("VCPKG_CHAINLOAD_TOOLCHAIN_FILE=${VCPKG_CHAINLOAD_TOOLCHAIN_FILE}")
message("VCPKG_BUILD_TYPE=${VCPKG_BUILD_TYPE}")
+message("VCPKG_ENV_PASSTHROUGH=${VCPKG_ENV_PASSTHROUGH}")
diff --git a/scripts/ports.cmake b/scripts/ports.cmake
index 860d08893..58510567b 100644
--- a/scripts/ports.cmake
+++ b/scripts/ports.cmake
@@ -67,6 +67,7 @@ if(CMD MATCHES "^BUILD$")
file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR} ${CURRENT_PACKAGES_DIR})
include(${CMAKE_TRIPLET_FILE})
+ include(${ENV_OVERRIDES_FILE} OPTIONAL)
set(TRIPLET_SYSTEM_ARCH ${VCPKG_TARGET_ARCHITECTURE})
include(${CMAKE_CURRENT_LIST_DIR}/cmake/vcpkg_common_definitions.cmake)
include(${CMAKE_CURRENT_LIST_DIR}/cmake/vcpkg_common_functions.cmake)