Add VCPKG_MAKE_CONFIGURE_OPTIONS (that can be set in the triplet) (#18132)

* Add VCPKG_MAKE_CONFIGURE_OPTIONS that can be set in the triplet

To append options to the configure command

* Add documentation

* Expand without quotes

Co-Authored-By: ras0219 <533828+ras0219@users.noreply.github.com>

* Add VCPKG_CMAKE_CONFIGURE_OPTIONS that can be set in the triplet

Co-Authored-By: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com>

* Bump vcpkg-cmake port-version

* Run x-add-version vcpkg-cmake

* Apply suggestions from code review

* [vcpkg-cmake] add version

Co-authored-by: ras0219 <533828+ras0219@users.noreply.github.com>
Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com>
Co-authored-by: nicole mazzuca <83086508+strega-nil-ms@users.noreply.github.com>
Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
This commit is contained in:
pastdue 2021-06-08 12:50:09 -04:00 committed by GitHub
parent 31993541c3
commit 38d2893b30
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 48 additions and 2 deletions

View File

@ -89,6 +89,25 @@ This option also has forms for configuration-specific flags:
- `VCPKG_LINKER_FLAGS_DEBUG`
- `VCPKG_LINKER_FLAGS_RELEASE`
### VCPKG_CMAKE_CONFIGURE_OPTIONS
Set additional CMake configure options that are appended to the configure command (in [`vcpkg_cmake_configure`](../maintainers/ports/vcpkg-cmake/vcpkg_cmake_configure.md)).
This field is optional.
Also available as build-type specific `VCPKG_CMAKE_CONFIGURE_OPTIONS_DEBUG` and `VCPKG_CMAKE_CONFIGURE_OPTIONS_RELEASE` variables.
### VCPKG_MAKE_CONFIGURE_OPTIONS
Set additional automake / autoconf configure options that are appended to the configure command (in [`vcpkg_configure_make`](../maintainers/vcpkg_configure_make.md)).
This field is optional.
For example, to skip certain libtool checks that may errantly fail:
```cmake
set(VCPKG_MAKE_CONFIGURE_OPTIONS "lt_cv_deplibs_check_method=pass_all")
```
Also available as build-type specific `VCPKG_MAKE_CONFIGURE_OPTIONS_DEBUG` and `VCPKG_MAKE_CONFIGURE_OPTIONS_RELEASE` variables.
<a name="VCPKG_DEP_INFO_OVERRIDE_VARS"></a>
### VCPKG_DEP_INFO_OVERRIDE_VARS
Replaces the default computed list of triplet "Supports" terms.

View File

@ -1,5 +1,5 @@
{
"name": "vcpkg-cmake",
"version-date": "2021-02-28",
"port-version": 2
"port-version": 3
}

View File

@ -293,6 +293,17 @@ function(vcpkg_cmake_configure)
endif()
endforeach()
# Allow overrides / additional configuration variables from triplets
if(DEFINED VCPKG_CMAKE_CONFIGURE_OPTIONS)
list(APPEND arg_OPTIONS "${VCPKG_CMAKE_CONFIGURE_OPTIONS}")
endif()
if(DEFINED VCPKG_CMAKE_CONFIGURE_OPTIONS_RELEASE)
list(APPEND arg_OPTIONS_RELEASE "${VCPKG_CMAKE_CONFIGURE_OPTIONS_RELEASE}")
endif()
if(DEFINED VCPKG_CMAKE_CONFIGURE_OPTIONS_DEBUG)
list(APPEND arg_OPTIONS_DEBUG "${VCPKG_CMAKE_CONFIGURE_OPTIONS_DEBUG}")
endif()
if(ninja_host AND CMAKE_HOST_WIN32 AND NOT arg_DISABLE_PARALLEL_CONFIGURE)
list(APPEND arg_OPTIONS "-DCMAKE_DISABLE_SOURCE_CHANGES=ON")

View File

@ -512,6 +512,17 @@ function(vcpkg_configure_make)
list(APPEND _csc_OPTIONS --disable-shared --enable-static)
endif()
# Can be set in the triplet to append options for configure
if(DEFINED VCPKG_MAKE_CONFIGURE_OPTIONS)
list(APPEND _csc_OPTIONS ${VCPKG_MAKE_CONFIGURE_OPTIONS})
endif()
if(DEFINED VCPKG_MAKE_CONFIGURE_OPTIONS_RELEASE)
list(APPEND _csc_OPTIONS_RELEASE ${VCPKG_MAKE_CONFIGURE_OPTIONS_RELEASE})
endif()
if(DEFINED VCPKG_MAKE_CONFIGURE_OPTIONS_DEBUG)
list(APPEND _csc_OPTIONS_DEBUG ${VCPKG_MAKE_CONFIGURE_OPTIONS_DEBUG})
endif()
file(RELATIVE_PATH RELATIVE_BUILD_PATH "${CURRENT_BUILDTREES_DIR}" "${_csc_SOURCE_PATH}/${_csc_PROJECT_SUBPATH}")
set(base_cmd)

View File

@ -6482,7 +6482,7 @@
},
"vcpkg-cmake": {
"baseline": "2021-02-28",
"port-version": 2
"port-version": 3
},
"vcpkg-cmake-config": {
"baseline": "2021-05-22",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "0e8bb94599a00fd9c61fd0ae524c22a067c21420",
"version-date": "2021-02-28",
"port-version": 3
},
{
"git-tree": "02fbd92ab46d1512b22280f1264e4e8f8d076ef4",
"version-date": "2021-02-28",