mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-24 06:59:07 +08:00
[vcpkg-cmake] Catch wrong MAYBE_UNUSED_VARIABLES (#38249)
https://github.com/microsoft/vcpkg/pull/36124#discussion_r1567897651, https://github.com/microsoft/vcpkg/pull/24633#discussion_r1568353228. Related (fix): https://github.com/microsoft/vcpkg/pull/38223 (merged here.) --------- Co-authored-by: Jim-Wang <wangzhijie05@beyondsoft.com>
This commit is contained in:
parent
4af63c6f3e
commit
2eab0f6ee8
@ -51,12 +51,11 @@ vcpkg_cmake_configure(
|
||||
-DDCMTK_WIDE_CHAR_MAIN_FUNCTION=ON
|
||||
-DDCMTK_ENABLE_STL=ON
|
||||
-DCMAKE_DEBUG_POSTFIX=d
|
||||
-DDCMTK_USE_FIND_PACKAGE_WIN_DEFAULT=ON
|
||||
OPTIONS_DEBUG
|
||||
-DINSTALL_HEADERS=OFF
|
||||
-DINSTALL_OTHER=OFF
|
||||
-DBUILD_APPS=OFF
|
||||
MAYBE_UNUSED_VARIABLES
|
||||
-DDCMTK_USE_FIND_PACKAGE_WIN_DEFAULT=ON
|
||||
)
|
||||
|
||||
vcpkg_cmake_install()
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "dcmtk",
|
||||
"version": "3.6.8",
|
||||
"port-version": 3,
|
||||
"port-version": 4,
|
||||
"description": "This DICOM ToolKit (DCMTK) package consists of source code, documentation and installation instructions for a set of software libraries and applications implementing part of the DICOM/MEDICOM Standard.",
|
||||
"homepage": "https://github.com/DCMTK/dcmtk",
|
||||
"license": "BSD-3-Clause OR BSD-2-Clause OR libtiff OR MIT OR Zlib OR Libpng",
|
||||
|
@ -139,7 +139,6 @@ vcpkg_cmake_configure(
|
||||
|
||||
${FEATURE_OPTIONS}
|
||||
|
||||
MAYBE_UNUSED_VARIABLES
|
||||
-DCMAKE_DISABLE_FIND_PACKAGE_GLEW=ON
|
||||
-DCMAKE_DISABLE_FIND_PACKAGE_glfw3=ON
|
||||
-DCMAKE_DISABLE_FIND_PACKAGE_LibXml2=ON
|
||||
@ -147,6 +146,14 @@ vcpkg_cmake_configure(
|
||||
-DCMAKE_DISABLE_FIND_PACKAGE_OpenGL=ON
|
||||
-DCMAKE_DISABLE_FIND_PACKAGE_Qt5=ON
|
||||
-DCMAKE_DISABLE_FIND_PACKAGE_Subversion=ON
|
||||
MAYBE_UNUSED_VARIABLES
|
||||
CMAKE_DISABLE_FIND_PACKAGE_GLEW
|
||||
CMAKE_DISABLE_FIND_PACKAGE_glfw3
|
||||
CMAKE_DISABLE_FIND_PACKAGE_LibXml2
|
||||
CMAKE_DISABLE_FIND_PACKAGE_OCaml
|
||||
CMAKE_DISABLE_FIND_PACKAGE_OpenGL
|
||||
CMAKE_DISABLE_FIND_PACKAGE_Qt5
|
||||
CMAKE_DISABLE_FIND_PACKAGE_Subversion
|
||||
)
|
||||
|
||||
vcpkg_cmake_install()
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "mdl-sdk",
|
||||
"version": "2021.1.2",
|
||||
"port-version": 4,
|
||||
"port-version": 5,
|
||||
"description": "NVIDIA Material Definition Language SDK",
|
||||
"homepage": "https://github.com/NVIDIA/MDL-SDK",
|
||||
"license": "BSD-3-Clause",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"version-date": "2023-05-04",
|
||||
"documentation": "https://vcpkg.io/en/docs/maintainers/ports/vcpkg-cmake.html",
|
||||
"version-date": "2024-04-18",
|
||||
"documentation": "https://learn.microsoft.com/vcpkg/maintainers/functions/vcpkg_cmake_configure",
|
||||
"license": "MIT"
|
||||
}
|
||||
|
@ -33,6 +33,15 @@ function(vcpkg_cmake_configure)
|
||||
set(arg_LOGFILE_BASE "config-${TARGET_TRIPLET}")
|
||||
endif()
|
||||
|
||||
set(invalid_maybe_unused_vars "${arg_MAYBE_UNUSED_VARIABLES}")
|
||||
list(FILTER invalid_maybe_unused_vars INCLUDE REGEX "^-D")
|
||||
if(NOT invalid_maybe_unused_vars STREQUAL "")
|
||||
list(JOIN invalid_maybe_unused_vars " " bad_items)
|
||||
message(${Z_VCPKG_BACKCOMPAT_MESSAGE_LEVEL}
|
||||
"Option MAYBE_UNUSED_VARIABLES must be used with variables names. "
|
||||
"The following items are invalid: ${bad_items}")
|
||||
endif()
|
||||
|
||||
set(manually_specified_variables "")
|
||||
|
||||
if(arg_Z_CMAKE_GET_VARS_USAGE)
|
||||
|
@ -2198,7 +2198,7 @@
|
||||
},
|
||||
"dcmtk": {
|
||||
"baseline": "3.6.8",
|
||||
"port-version": 3
|
||||
"port-version": 4
|
||||
},
|
||||
"debug-assert": {
|
||||
"baseline": "1.3.3",
|
||||
@ -5650,7 +5650,7 @@
|
||||
},
|
||||
"mdl-sdk": {
|
||||
"baseline": "2021.1.2",
|
||||
"port-version": 4
|
||||
"port-version": 5
|
||||
},
|
||||
"mdns": {
|
||||
"baseline": "1.4.3",
|
||||
@ -9037,7 +9037,7 @@
|
||||
"port-version": 0
|
||||
},
|
||||
"vcpkg-cmake": {
|
||||
"baseline": "2023-05-04",
|
||||
"baseline": "2024-04-18",
|
||||
"port-version": 0
|
||||
},
|
||||
"vcpkg-cmake-config": {
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "d095cd89e9ff603392d4dd996ed335d9d0172a86",
|
||||
"version": "3.6.8",
|
||||
"port-version": 4
|
||||
},
|
||||
{
|
||||
"git-tree": "43cc4b7f4cafcf246412bd814cc0e3cd6f60db6f",
|
||||
"version": "3.6.8",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "a766439c586bae690dfd211fe3acebe13ee70c02",
|
||||
"version": "2021.1.2",
|
||||
"port-version": 5
|
||||
},
|
||||
{
|
||||
"git-tree": "7c4084ba04dcadc57086603e341b7d74e6926f00",
|
||||
"version": "2021.1.2",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "a10a94e8d0071ed4804d40d0f0f0c5e4e7180afd",
|
||||
"version-date": "2024-04-18",
|
||||
"port-version": 0
|
||||
},
|
||||
{
|
||||
"git-tree": "88a7058fc7fa73a9c4c99cfcae9d79e2abf87a5a",
|
||||
"version-date": "2023-05-04",
|
||||
|
Loading…
Reference in New Issue
Block a user