From ce4c5841b619875f90fb1719835ecabff101f21c Mon Sep 17 00:00:00 2001 From: JackBoosY Date: Mon, 31 May 2021 00:10:46 -0700 Subject: [PATCH 01/23] [vcpkg-config-cmake] Add check for unused cmake variables --- ports/vcpkg-cmake/vcpkg.json | 2 +- ports/vcpkg-cmake/vcpkg_cmake_configure.cmake | 34 +++++++++++++++++-- scripts/cmake/vcpkg_configure_cmake.cmake | 26 ++++++++++++++ 3 files changed, 58 insertions(+), 4 deletions(-) diff --git a/ports/vcpkg-cmake/vcpkg.json b/ports/vcpkg-cmake/vcpkg.json index 710d38e62d10ba..8e2ac9ec664858 100644 --- a/ports/vcpkg-cmake/vcpkg.json +++ b/ports/vcpkg-cmake/vcpkg.json @@ -1,5 +1,5 @@ { "name": "vcpkg-cmake", "version-date": "2021-02-28", - "port-version": 2 + "port-version": 3 } diff --git a/ports/vcpkg-cmake/vcpkg_cmake_configure.cmake b/ports/vcpkg-cmake/vcpkg_cmake_configure.cmake index 3b7d31eff37d97..863cfb5b0564b3 100644 --- a/ports/vcpkg-cmake/vcpkg_cmake_configure.cmake +++ b/ports/vcpkg-cmake/vcpkg_cmake_configure.cmake @@ -102,7 +102,7 @@ function(vcpkg_cmake_configure) message(FATAL_ERROR "SOURCE_PATH must be set") endif() if(NOT DEFINED arg_LOGFILE_BASE) - set(arg_LOGFILE_BASE "config") + set(arg_LOGFILE_BASE "config-${TARGET_TRIPLET}") endif() if(CMAKE_HOST_WIN32) @@ -351,8 +351,10 @@ function(vcpkg_cmake_configure) vcpkg_execute_required_process( COMMAND ninja -v WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/vcpkg-parallel-configure" - LOGNAME "${arg_LOGFILE_BASE}-${TARGET_TRIPLET}" + LOGNAME "${arg_LOGFILE_BASE}" ) + list(APPEND CONFIG_LOGS ${CURRENT_BUILDTREES_DIR}/${arg_LOGFILE_BASE}-out.log + ${CURRENT_BUILDTREES_DIR}/${arg_LOGFILE_BASE}-err.log) else() if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") message(STATUS "Configuring ${TARGET_TRIPLET}-dbg") @@ -366,8 +368,10 @@ function(vcpkg_cmake_configure) "-DCMAKE_BUILD_TYPE=Debug" "-DCMAKE_INSTALL_PREFIX=${CURRENT_PACKAGES_DIR}/debug" WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg" - LOGNAME "${arg_LOGFILE_BASE}-${TARGET_TRIPLET}-dbg" + LOGNAME "${arg_LOGFILE_BASE}-dbg" ) + list(APPEND CONFIG_LOGS ${CURRENT_BUILDTREES_DIR}/${arg_LOGFILE_BASE}-dbg-out.log + ${CURRENT_BUILDTREES_DIR}/${arg_LOGFILE_BASE}-dbg-err.log) endif() if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") @@ -384,8 +388,32 @@ function(vcpkg_cmake_configure) WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel" LOGNAME "${arg_LOGFILE_BASE}-rel" ) + list(APPEND CONFIG_LOGS ${CURRENT_BUILDTREES_DIR}/${arg_LOGFILE_BASE}-rel-out.log + ${CURRENT_BUILDTREES_DIR}/${arg_LOGFILE_BASE}-rel-err.log) endif() endif() + + # Check unused variables + list(APPEND KNOWN_UNUSED_VARS CMAKE_INSTALL_BINDIR CMAKE_INSTALL_LIBDIR _VCPKG_ROOT_DIR BUILD_SHARED_LIBS VCPKG_TARGET_ARCHITECTURE) + foreach(config_log ${CONFIG_LOGS}) + if (EXISTS ${config_log}) + file(READ "${config_log}" CFG_LOG) + if (CFG_LOG) + debug_message("READING ${config_log}...") + string(REGEX MATCH "Manually-specified variables were not used by the project:\n([^\[]+)-- Build files have been written to" UNUSED_VARS ${CFG_LOG}) + string(REPLACE "Manually-specified variables were not used by the project:\n\n" "" UNUSED_VARS ${UNUSED_VARS}) + string(REPLACE "-- Build files have been written to" "" UNUSED_VARS ${UNUSED_VARS}) + debug_message("Found unused variables:\n${UNUSED_VARS}") + foreach(known_macro ${KNOWN_UNUSED_VARS}) + string(REPLACE " ${known_macro}\n" "" UNUSED_VARS ${UNUSED_VARS}) + endforeach() + string(REPLACE "\n" "" UNUSED_VARS ${UNUSED_VARS}) + if (UNUSED_VARS) + message(FATAL_ERROR "The following variables are not used in portfile.cmake, please check and remove them:\n${UNUSED_VARS}") + endif() + endif() + endif() + endforeach() set(Z_VCPKG_CMAKE_GENERATOR "${generator}" CACHE INTERNAL "The generator which was used to configure CMake.") endfunction() diff --git a/scripts/cmake/vcpkg_configure_cmake.cmake b/scripts/cmake/vcpkg_configure_cmake.cmake index fdf054e43ee975..bbd373d5995b53 100644 --- a/scripts/cmake/vcpkg_configure_cmake.cmake +++ b/scripts/cmake/vcpkg_configure_cmake.cmake @@ -325,6 +325,8 @@ function(vcpkg_configure_cmake) WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/vcpkg-parallel-configure LOGNAME ${arg_LOGNAME} ) + + list(APPEND CONFIG_LOGS ${CURRENT_BUILDTREES_DIR}/${arg_LOGNAME}-out.log ${CURRENT_BUILDTREES_DIR}/${arg_LOGNAME}-err.log) else() if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") message(STATUS "Configuring ${TARGET_TRIPLET}-dbg") @@ -334,6 +336,7 @@ function(vcpkg_configure_cmake) WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg LOGNAME ${arg_LOGNAME}-dbg ) + list(APPEND CONFIG_LOGS ${CURRENT_BUILDTREES_DIR}/${arg_LOGNAME}-dbg-out.log ${CURRENT_BUILDTREES_DIR}/${arg_LOGNAME}-dbg-err.log) endif() if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") @@ -344,8 +347,31 @@ function(vcpkg_configure_cmake) WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel LOGNAME ${arg_LOGNAME}-rel ) + list(APPEND CONFIG_LOGS ${CURRENT_BUILDTREES_DIR}/${arg_LOGNAME}-rel-out.log ${CURRENT_BUILDTREES_DIR}/${arg_LOGNAME}-rel-err.log) endif() endif() + + # Check unused variables + list(APPEND KNOWN_UNUSED_VARS CMAKE_INSTALL_BINDIR CMAKE_INSTALL_LIBDIR _VCPKG_ROOT_DIR BUILD_SHARED_LIBS VCPKG_TARGET_ARCHITECTURE) + foreach(config_log ${CONFIG_LOGS}) + if (EXISTS ${config_log}) + file(READ "${config_log}" CFG_LOG) + if (CFG_LOG) + debug_message("READING ${config_log}...") + string(REGEX MATCH "Manually-specified variables were not used by the project:\n([^\[]+)-- Build files have been written to" UNUSED_VARS ${CFG_LOG}) + string(REPLACE "Manually-specified variables were not used by the project:\n\n" "" UNUSED_VARS ${UNUSED_VARS}) + string(REPLACE "-- Build files have been written to" "" UNUSED_VARS ${UNUSED_VARS}) + debug_message("Found unused variables:\n${UNUSED_VARS}") + foreach(known_macro ${KNOWN_UNUSED_VARS}) + string(REPLACE " ${known_macro}\n" "" UNUSED_VARS ${UNUSED_VARS}) + endforeach() + string(REPLACE "\n" "" UNUSED_VARS ${UNUSED_VARS}) + if (UNUSED_VARS) + message(FATAL_ERROR "The following variables are not used in portfile.cmake, please check and remove them:\n${UNUSED_VARS}") + endif() + endif() + endif() + endforeach() set(Z_VCPKG_CMAKE_GENERATOR "${GENERATOR}" PARENT_SCOPE) endfunction() From cc3b3f6786faaa44eca8a8dc930d0b0664797b60 Mon Sep 17 00:00:00 2001 From: JackBoosY Date: Mon, 31 May 2021 00:18:11 -0700 Subject: [PATCH 02/23] continue when the contents are not found --- ports/vcpkg-cmake/vcpkg_cmake_configure.cmake | 3 +++ scripts/cmake/vcpkg_configure_cmake.cmake | 3 +++ 2 files changed, 6 insertions(+) diff --git a/ports/vcpkg-cmake/vcpkg_cmake_configure.cmake b/ports/vcpkg-cmake/vcpkg_cmake_configure.cmake index 863cfb5b0564b3..c498e3f7b72da9 100644 --- a/ports/vcpkg-cmake/vcpkg_cmake_configure.cmake +++ b/ports/vcpkg-cmake/vcpkg_cmake_configure.cmake @@ -401,6 +401,9 @@ function(vcpkg_cmake_configure) if (CFG_LOG) debug_message("READING ${config_log}...") string(REGEX MATCH "Manually-specified variables were not used by the project:\n([^\[]+)-- Build files have been written to" UNUSED_VARS ${CFG_LOG}) + if (NOT UNUSED_VARS) + continue() + endif() string(REPLACE "Manually-specified variables were not used by the project:\n\n" "" UNUSED_VARS ${UNUSED_VARS}) string(REPLACE "-- Build files have been written to" "" UNUSED_VARS ${UNUSED_VARS}) debug_message("Found unused variables:\n${UNUSED_VARS}") diff --git a/scripts/cmake/vcpkg_configure_cmake.cmake b/scripts/cmake/vcpkg_configure_cmake.cmake index bbd373d5995b53..7af96129d64a49 100644 --- a/scripts/cmake/vcpkg_configure_cmake.cmake +++ b/scripts/cmake/vcpkg_configure_cmake.cmake @@ -359,6 +359,9 @@ function(vcpkg_configure_cmake) if (CFG_LOG) debug_message("READING ${config_log}...") string(REGEX MATCH "Manually-specified variables were not used by the project:\n([^\[]+)-- Build files have been written to" UNUSED_VARS ${CFG_LOG}) + if (NOT UNUSED_VARS) + continue() + endif() string(REPLACE "Manually-specified variables were not used by the project:\n\n" "" UNUSED_VARS ${UNUSED_VARS}) string(REPLACE "-- Build files have been written to" "" UNUSED_VARS ${UNUSED_VARS}) debug_message("Found unused variables:\n${UNUSED_VARS}") From dbb3430986ef14feee9e6c97276f002d4b3f39ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jack=C2=B7Boos=C2=B7Yu?= <47264268+JackBoosY@users.noreply.github.com> Date: Mon, 31 May 2021 15:48:08 +0800 Subject: [PATCH 03/23] Update ports/vcpkg-cmake/vcpkg_cmake_configure.cmake --- ports/vcpkg-cmake/vcpkg_cmake_configure.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/vcpkg-cmake/vcpkg_cmake_configure.cmake b/ports/vcpkg-cmake/vcpkg_cmake_configure.cmake index c498e3f7b72da9..ffb3c2f2a41509 100644 --- a/ports/vcpkg-cmake/vcpkg_cmake_configure.cmake +++ b/ports/vcpkg-cmake/vcpkg_cmake_configure.cmake @@ -412,7 +412,7 @@ function(vcpkg_cmake_configure) endforeach() string(REPLACE "\n" "" UNUSED_VARS ${UNUSED_VARS}) if (UNUSED_VARS) - message(FATAL_ERROR "The following variables are not used in portfile.cmake, please check and remove them:\n${UNUSED_VARS}") + message(WARNING "The following variables are not used in portfile.cmake, please check and remove them:\n${UNUSED_VARS}") endif() endif() endif() From be7307ea0760132db7f6b1f890a274a74aef9657 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jack=C2=B7Boos=C2=B7Yu?= <47264268+JackBoosY@users.noreply.github.com> Date: Mon, 31 May 2021 15:48:13 +0800 Subject: [PATCH 04/23] Update scripts/cmake/vcpkg_configure_cmake.cmake --- scripts/cmake/vcpkg_configure_cmake.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/cmake/vcpkg_configure_cmake.cmake b/scripts/cmake/vcpkg_configure_cmake.cmake index 7af96129d64a49..5590208e8d8b3e 100644 --- a/scripts/cmake/vcpkg_configure_cmake.cmake +++ b/scripts/cmake/vcpkg_configure_cmake.cmake @@ -370,7 +370,7 @@ function(vcpkg_configure_cmake) endforeach() string(REPLACE "\n" "" UNUSED_VARS ${UNUSED_VARS}) if (UNUSED_VARS) - message(FATAL_ERROR "The following variables are not used in portfile.cmake, please check and remove them:\n${UNUSED_VARS}") + message(WARNING "The following variables are not used in portfile.cmake, please check and remove them:\n${UNUSED_VARS}") endif() endif() endif() From 13f2fcae9c33ccf118efe548c79f6c1b4e8776b3 Mon Sep 17 00:00:00 2001 From: JackBoosY Date: Mon, 31 May 2021 23:35:29 -0700 Subject: [PATCH 05/23] Improve logical --- ports/vcpkg-cmake/vcpkg_cmake_configure.cmake | 50 ++++++++++++------- scripts/cmake/vcpkg_configure_cmake.cmake | 50 ++++++++++++------- 2 files changed, 62 insertions(+), 38 deletions(-) diff --git a/ports/vcpkg-cmake/vcpkg_cmake_configure.cmake b/ports/vcpkg-cmake/vcpkg_cmake_configure.cmake index ffb3c2f2a41509..34661b231810c9 100644 --- a/ports/vcpkg-cmake/vcpkg_cmake_configure.cmake +++ b/ports/vcpkg-cmake/vcpkg_cmake_configure.cmake @@ -394,27 +394,39 @@ function(vcpkg_cmake_configure) endif() # Check unused variables - list(APPEND KNOWN_UNUSED_VARS CMAKE_INSTALL_BINDIR CMAKE_INSTALL_LIBDIR _VCPKG_ROOT_DIR BUILD_SHARED_LIBS VCPKG_TARGET_ARCHITECTURE) + list(APPEND KNOWN_UNUSED_VARS CMAKE_*. _VCPKG_*. BUILD_SHARED_LIBS VCPKG_*. Z_VCPKG_*.) foreach(config_log ${CONFIG_LOGS}) - if (EXISTS ${config_log}) - file(READ "${config_log}" CFG_LOG) - if (CFG_LOG) - debug_message("READING ${config_log}...") - string(REGEX MATCH "Manually-specified variables were not used by the project:\n([^\[]+)-- Build files have been written to" UNUSED_VARS ${CFG_LOG}) - if (NOT UNUSED_VARS) - continue() - endif() - string(REPLACE "Manually-specified variables were not used by the project:\n\n" "" UNUSED_VARS ${UNUSED_VARS}) - string(REPLACE "-- Build files have been written to" "" UNUSED_VARS ${UNUSED_VARS}) - debug_message("Found unused variables:\n${UNUSED_VARS}") - foreach(known_macro ${KNOWN_UNUSED_VARS}) - string(REPLACE " ${known_macro}\n" "" UNUSED_VARS ${UNUSED_VARS}) - endforeach() - string(REPLACE "\n" "" UNUSED_VARS ${UNUSED_VARS}) - if (UNUSED_VARS) - message(WARNING "The following variables are not used in portfile.cmake, please check and remove them:\n${UNUSED_VARS}") + if (NOT EXISTS ${config_log}) + continue() + endif() + file(READ "${config_log}" CFG_LOG) + if (NOT CFG_LOG) + continue() + endif() + debug_message("READING ${config_log}...") + string(REGEX MATCH "Manually-specified variables were not used by the project:\n([^\[]+)-- Build files have been written to" UNUSED_VARS ${CFG_LOG}) + if (NOT UNUSED_VARS) + continue() + endif() + string(REPLACE "Manually-specified variables were not used by the project:\n\n" "" UNUSED_VARS ${UNUSED_VARS}) + string(REPLACE "-- Build files have been written to" "" UNUSED_VARS ${UNUSED_VARS}) + string(REGEX MATCHALL "[^\ |\n]+" UNUSED_VARS ${UNUSED_VARS}) + foreach(known_macro ${KNOWN_UNUSED_VARS}) + foreach(UNUSED_VAR ${UNUSED_VARS}) + debug_message("REGEX: ${UNUSED_VAR} in ${known_macro}") + string(REGEX MATCH "${known_macro}" FOUND_VAR ${UNUSED_VAR}) + debug_message("RESULT: ${FOUND_VAR}") + if (FOUND_VAR) + debug_message("REMOVE ${UNUSED_VAR}") + list(REMOVE_ITEM UNUSED_VARS ${UNUSED_VAR}) endif() - endif() + endforeach() + endforeach() + if (UNUSED_VARS) + message(WARNING "The following variables are not used in CMakeLists.txt,\nPlease recheck them and remove the unnecessary variables in portfile.cmake.") + foreach (UNUSED_VAR ${UNUSED_VARS}) + message(" ${UNUSED_VAR}") + endforeach() endif() endforeach() diff --git a/scripts/cmake/vcpkg_configure_cmake.cmake b/scripts/cmake/vcpkg_configure_cmake.cmake index 5590208e8d8b3e..d4f0058854e2d3 100644 --- a/scripts/cmake/vcpkg_configure_cmake.cmake +++ b/scripts/cmake/vcpkg_configure_cmake.cmake @@ -352,27 +352,39 @@ function(vcpkg_configure_cmake) endif() # Check unused variables - list(APPEND KNOWN_UNUSED_VARS CMAKE_INSTALL_BINDIR CMAKE_INSTALL_LIBDIR _VCPKG_ROOT_DIR BUILD_SHARED_LIBS VCPKG_TARGET_ARCHITECTURE) + list(APPEND KNOWN_UNUSED_VARS CMAKE_*. _VCPKG_*. BUILD_SHARED_LIBS VCPKG_*. Z_VCPKG_*.) foreach(config_log ${CONFIG_LOGS}) - if (EXISTS ${config_log}) - file(READ "${config_log}" CFG_LOG) - if (CFG_LOG) - debug_message("READING ${config_log}...") - string(REGEX MATCH "Manually-specified variables were not used by the project:\n([^\[]+)-- Build files have been written to" UNUSED_VARS ${CFG_LOG}) - if (NOT UNUSED_VARS) - continue() - endif() - string(REPLACE "Manually-specified variables were not used by the project:\n\n" "" UNUSED_VARS ${UNUSED_VARS}) - string(REPLACE "-- Build files have been written to" "" UNUSED_VARS ${UNUSED_VARS}) - debug_message("Found unused variables:\n${UNUSED_VARS}") - foreach(known_macro ${KNOWN_UNUSED_VARS}) - string(REPLACE " ${known_macro}\n" "" UNUSED_VARS ${UNUSED_VARS}) - endforeach() - string(REPLACE "\n" "" UNUSED_VARS ${UNUSED_VARS}) - if (UNUSED_VARS) - message(WARNING "The following variables are not used in portfile.cmake, please check and remove them:\n${UNUSED_VARS}") + if (NOT EXISTS ${config_log}) + continue() + endif() + file(READ "${config_log}" CFG_LOG) + if (NOT CFG_LOG) + continue() + endif() + debug_message("READING ${config_log}...") + string(REGEX MATCH "Manually-specified variables were not used by the project:\n([^\[]+)-- Build files have been written to" UNUSED_VARS ${CFG_LOG}) + if (NOT UNUSED_VARS) + continue() + endif() + string(REPLACE "Manually-specified variables were not used by the project:\n\n" "" UNUSED_VARS ${UNUSED_VARS}) + string(REPLACE "-- Build files have been written to" "" UNUSED_VARS ${UNUSED_VARS}) + string(REGEX MATCHALL "[^\ |\n]+" UNUSED_VARS ${UNUSED_VARS}) + foreach(known_macro ${KNOWN_UNUSED_VARS}) + foreach(UNUSED_VAR ${UNUSED_VARS}) + debug_message("REGEX: ${UNUSED_VAR} in ${known_macro}") + string(REGEX MATCH "${known_macro}" FOUND_VAR ${UNUSED_VAR}) + debug_message("RESULT: ${FOUND_VAR}") + if (FOUND_VAR) + debug_message("REMOVE ${UNUSED_VAR}") + list(REMOVE_ITEM UNUSED_VARS ${UNUSED_VAR}) endif() - endif() + endforeach() + endforeach() + if (UNUSED_VARS) + message(WARNING "The following variables are not used in CMakeLists.txt,\nPlease recheck them and remove the unnecessary variables in portfile.cmake.") + foreach (UNUSED_VAR ${UNUSED_VARS}) + message(" ${UNUSED_VAR}") + endforeach() endif() endforeach() From 0e80fea8d3fd6e95c191704db76b5f8294b91db3 Mon Sep 17 00:00:00 2001 From: JackBoosY Date: Mon, 31 May 2021 23:49:26 -0700 Subject: [PATCH 06/23] add option OPTIONS_CHECK_SKIP to vcpkg_cmake_configure and vcpkg_configure_cmake --- ports/vcpkg-cmake/vcpkg_cmake_configure.cmake | 10 ++++++++-- scripts/cmake/vcpkg_configure_cmake.cmake | 8 ++++++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/ports/vcpkg-cmake/vcpkg_cmake_configure.cmake b/ports/vcpkg-cmake/vcpkg_cmake_configure.cmake index 34661b231810c9..da4c3ac057ed54 100644 --- a/ports/vcpkg-cmake/vcpkg_cmake_configure.cmake +++ b/ports/vcpkg-cmake/vcpkg_cmake_configure.cmake @@ -17,6 +17,8 @@ vcpkg_cmake_configure( ...] [OPTIONS_DEBUG ...] + [OPTIONS_CHECK_SKIP + ...] ) ``` @@ -55,6 +57,10 @@ By default, this function adds flags to `CMAKE_C_FLAGS` and `CMAKE_CXX_FLAGS` which set the default character set to utf-8 for MSVC. If the library sets its own code page, pass the `NO_CHARSET_FLAG` option. +Check all unused cmake options after the configuration is complete. +Use `OPTIONS_CHECK_SKIP `to skip unused cmake options defined for the platform. +This option supports cmake regular expression. + `LOGFILE_BASE` is used to set the base of the logfile names; by default, this is `config`, and thus the logfiles end up being something like `config-x86-windows-dbg.log`. You can set it to anything you like; @@ -88,7 +94,7 @@ function(vcpkg_cmake_configure) cmake_parse_arguments(PARSE_ARGV 0 "arg" "PREFER_NINJA;DISABLE_PARALLEL_CONFIGURE;WINDOWS_USE_MSBUILD;NO_CHARSET_FLAG" "SOURCE_PATH;GENERATOR;LOGFILE_BASE" - "OPTIONS;OPTIONS_DEBUG;OPTIONS_RELEASE" + "OPTIONS;OPTIONS_DEBUG;OPTIONS_RELEASE;OPTIONS_CHECK_SKIP" ) if(DEFINED CACHE{Z_VCPKG_CMAKE_GENERATOR}) @@ -394,7 +400,7 @@ function(vcpkg_cmake_configure) endif() # Check unused variables - list(APPEND KNOWN_UNUSED_VARS CMAKE_*. _VCPKG_*. BUILD_SHARED_LIBS VCPKG_*. Z_VCPKG_*.) + list(APPEND KNOWN_UNUSED_VARS CMAKE_*. _VCPKG_*. BUILD_SHARED_LIBS VCPKG_*. Z_VCPKG_*. ${arg_OPTIONS_CHECK_SKIP}) foreach(config_log ${CONFIG_LOGS}) if (NOT EXISTS ${config_log}) continue() diff --git a/scripts/cmake/vcpkg_configure_cmake.cmake b/scripts/cmake/vcpkg_configure_cmake.cmake index d4f0058854e2d3..7e6c495369ded7 100644 --- a/scripts/cmake/vcpkg_configure_cmake.cmake +++ b/scripts/cmake/vcpkg_configure_cmake.cmake @@ -15,6 +15,7 @@ vcpkg_configure_cmake( [OPTIONS <-DUSE_THIS_IN_ALL_BUILDS=1>...] [OPTIONS_RELEASE <-DOPTIMIZE=1>...] [OPTIONS_DEBUG <-DDEBUGGABLE=1>...] + [OPTIONS_CHECK_SKIP ...] ) ``` @@ -53,6 +54,9 @@ Additional options passed to CMake during the Release configuration. These are i ### OPTIONS_DEBUG Additional options passed to CMake during the Debug configuration. These are in addition to `OPTIONS`. +### OPTIONS_CHECK_SKIP +Ignore checked unused cmake options, support cmake regular expression + ### LOGNAME Name of the log to write the output of the configure call to. @@ -75,7 +79,7 @@ function(vcpkg_configure_cmake) cmake_parse_arguments(PARSE_ARGV 0 arg "PREFER_NINJA;DISABLE_PARALLEL_CONFIGURE;NO_CHARSET_FLAG" "SOURCE_PATH;GENERATOR;LOGNAME" - "OPTIONS;OPTIONS_DEBUG;OPTIONS_RELEASE" + "OPTIONS;OPTIONS_DEBUG;OPTIONS_RELEASE;OPTIONS_CHECK_SKIP" ) if(NOT VCPKG_PLATFORM_TOOLSET) @@ -352,7 +356,7 @@ function(vcpkg_configure_cmake) endif() # Check unused variables - list(APPEND KNOWN_UNUSED_VARS CMAKE_*. _VCPKG_*. BUILD_SHARED_LIBS VCPKG_*. Z_VCPKG_*.) + list(APPEND KNOWN_UNUSED_VARS CMAKE_*. _VCPKG_*. BUILD_SHARED_LIBS VCPKG_*. Z_VCPKG_*. ${arg_OPTIONS_CHECK_SKIP}) foreach(config_log ${CONFIG_LOGS}) if (NOT EXISTS ${config_log}) continue() From 3c3ba18fd612ed1e6df63b9ba5007fab7bc4cc03 Mon Sep 17 00:00:00 2001 From: JackBoosY Date: Mon, 31 May 2021 23:53:50 -0700 Subject: [PATCH 07/23] Update docs --- docs/maintainers/ports/vcpkg-cmake/vcpkg_cmake_configure.md | 6 ++++++ docs/maintainers/vcpkg_configure_cmake.md | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/docs/maintainers/ports/vcpkg-cmake/vcpkg_cmake_configure.md b/docs/maintainers/ports/vcpkg-cmake/vcpkg_cmake_configure.md index 95830313df41ba..35dadf232d2296 100644 --- a/docs/maintainers/ports/vcpkg-cmake/vcpkg_cmake_configure.md +++ b/docs/maintainers/ports/vcpkg-cmake/vcpkg_cmake_configure.md @@ -18,6 +18,8 @@ vcpkg_cmake_configure( ...] [OPTIONS_DEBUG ...] + [OPTIONS_CHECK_SKIP + ...] ) ``` @@ -56,6 +58,10 @@ By default, this function adds flags to `CMAKE_C_FLAGS` and `CMAKE_CXX_FLAGS` which set the default character set to utf-8 for MSVC. If the library sets its own code page, pass the `NO_CHARSET_FLAG` option. +Check all unused cmake options after the configuration is complete. +Use `OPTIONS_CHECK_SKIP `to skip unused cmake options defined for the platform. +This option supports cmake regular expression. + `LOGFILE_BASE` is used to set the base of the logfile names; by default, this is `config`, and thus the logfiles end up being something like `config-x86-windows-dbg.log`. You can set it to anything you like; diff --git a/docs/maintainers/vcpkg_configure_cmake.md b/docs/maintainers/vcpkg_configure_cmake.md index 195017b3c93e80..d9ae63ea416911 100644 --- a/docs/maintainers/vcpkg_configure_cmake.md +++ b/docs/maintainers/vcpkg_configure_cmake.md @@ -17,6 +17,7 @@ vcpkg_configure_cmake( [OPTIONS <-DUSE_THIS_IN_ALL_BUILDS=1>...] [OPTIONS_RELEASE <-DOPTIMIZE=1>...] [OPTIONS_DEBUG <-DDEBUGGABLE=1>...] + [OPTIONS_CHECK_SKIP ...] ) ``` @@ -55,6 +56,9 @@ Additional options passed to CMake during the Release configuration. These are i ### OPTIONS_DEBUG Additional options passed to CMake during the Debug configuration. These are in addition to `OPTIONS`. +### OPTIONS_CHECK_SKIP +Ignore checked unused cmake options, support cmake regular expression + ### LOGNAME Name of the log to write the output of the configure call to. From ca20f552077d45254814d67e8086aabfc66c78be Mon Sep 17 00:00:00 2001 From: JackBoosY Date: Tue, 1 Jun 2021 01:32:12 -0700 Subject: [PATCH 08/23] Improve the warning message output --- ports/vcpkg-cmake/vcpkg_cmake_configure.cmake | 6 ++++-- scripts/cmake/vcpkg_configure_cmake.cmake | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/ports/vcpkg-cmake/vcpkg_cmake_configure.cmake b/ports/vcpkg-cmake/vcpkg_cmake_configure.cmake index da4c3ac057ed54..e18b7a5def5f68 100644 --- a/ports/vcpkg-cmake/vcpkg_cmake_configure.cmake +++ b/ports/vcpkg-cmake/vcpkg_cmake_configure.cmake @@ -429,10 +429,12 @@ function(vcpkg_cmake_configure) endforeach() endforeach() if (UNUSED_VARS) - message(WARNING "The following variables are not used in CMakeLists.txt,\nPlease recheck them and remove the unnecessary variables in portfile.cmake.") + set(WARNING_MSG "The following variables are not used in CMakeLists.txt:\n") foreach (UNUSED_VAR ${UNUSED_VARS}) - message(" ${UNUSED_VAR}") + string(APPEND WARNING_MSG " ${UNUSED_VAR}\n") endforeach() + string(APPEND WARNING_MSG "Please recheck them and remove the unnecessary variables in portfile.cmake") + message(WARNING ${WARNING_MSG}) endif() endforeach() diff --git a/scripts/cmake/vcpkg_configure_cmake.cmake b/scripts/cmake/vcpkg_configure_cmake.cmake index 7e6c495369ded7..bee8d514267c1a 100644 --- a/scripts/cmake/vcpkg_configure_cmake.cmake +++ b/scripts/cmake/vcpkg_configure_cmake.cmake @@ -385,10 +385,12 @@ function(vcpkg_configure_cmake) endforeach() endforeach() if (UNUSED_VARS) - message(WARNING "The following variables are not used in CMakeLists.txt,\nPlease recheck them and remove the unnecessary variables in portfile.cmake.") + set(WARNING_MSG "The following variables are not used in CMakeLists.txt:\n") foreach (UNUSED_VAR ${UNUSED_VARS}) - message(" ${UNUSED_VAR}") + string(APPEND WARNING_MSG " ${UNUSED_VAR}\n") endforeach() + string(APPEND WARNING_MSG "Please recheck them and remove the unnecessary variables in portfile.cmake") + message(WARNING ${WARNING_MSG}) endif() endforeach() From bcfdc0f75453e9aa141d10189f39e70a38382f05 Mon Sep 17 00:00:00 2001 From: JackBoosY Date: Wed, 2 Jun 2021 19:27:13 -0700 Subject: [PATCH 09/23] update warning message. --- docs/maintainers/ports/vcpkg-cmake/vcpkg_cmake_configure.md | 2 +- ports/vcpkg-cmake/vcpkg_cmake_configure.cmake | 5 +++-- scripts/cmake/vcpkg_configure_cmake.cmake | 3 ++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/docs/maintainers/ports/vcpkg-cmake/vcpkg_cmake_configure.md b/docs/maintainers/ports/vcpkg-cmake/vcpkg_cmake_configure.md index 35dadf232d2296..dd505810eda0aa 100644 --- a/docs/maintainers/ports/vcpkg-cmake/vcpkg_cmake_configure.md +++ b/docs/maintainers/ports/vcpkg-cmake/vcpkg_cmake_configure.md @@ -59,7 +59,7 @@ which set the default character set to utf-8 for MSVC. If the library sets its own code page, pass the `NO_CHARSET_FLAG` option. Check all unused cmake options after the configuration is complete. -Use `OPTIONS_CHECK_SKIP `to skip unused cmake options defined for the platform. +Use `OPTIONS_CHECK_SKIP` to skip unused cmake options defined for the platform. This option supports cmake regular expression. `LOGFILE_BASE` is used to set the base of the logfile names; diff --git a/ports/vcpkg-cmake/vcpkg_cmake_configure.cmake b/ports/vcpkg-cmake/vcpkg_cmake_configure.cmake index e18b7a5def5f68..7bd3b2cf29e2a9 100644 --- a/ports/vcpkg-cmake/vcpkg_cmake_configure.cmake +++ b/ports/vcpkg-cmake/vcpkg_cmake_configure.cmake @@ -58,7 +58,7 @@ which set the default character set to utf-8 for MSVC. If the library sets its own code page, pass the `NO_CHARSET_FLAG` option. Check all unused cmake options after the configuration is complete. -Use `OPTIONS_CHECK_SKIP `to skip unused cmake options defined for the platform. +Use `OPTIONS_CHECK_SKIP` to skip unused cmake options defined for the platform. This option supports cmake regular expression. `LOGFILE_BASE` is used to set the base of the logfile names; @@ -433,7 +433,8 @@ function(vcpkg_cmake_configure) foreach (UNUSED_VAR ${UNUSED_VARS}) string(APPEND WARNING_MSG " ${UNUSED_VAR}\n") endforeach() - string(APPEND WARNING_MSG "Please recheck them and remove the unnecessary variables in portfile.cmake") + string(APPEND WARNING_MSG "Please recheck them and remove the unnecessary variables in `portfile.cmake`.") + string(APPEND WARNING_MSG "If that's expected, please add `OPTIONS_CHECK_SKIP ` to vcpkg_cmake_configure.") message(WARNING ${WARNING_MSG}) endif() endforeach() diff --git a/scripts/cmake/vcpkg_configure_cmake.cmake b/scripts/cmake/vcpkg_configure_cmake.cmake index bee8d514267c1a..c5b910b5b1e698 100644 --- a/scripts/cmake/vcpkg_configure_cmake.cmake +++ b/scripts/cmake/vcpkg_configure_cmake.cmake @@ -389,7 +389,8 @@ function(vcpkg_configure_cmake) foreach (UNUSED_VAR ${UNUSED_VARS}) string(APPEND WARNING_MSG " ${UNUSED_VAR}\n") endforeach() - string(APPEND WARNING_MSG "Please recheck them and remove the unnecessary variables in portfile.cmake") + string(APPEND WARNING_MSG "Please recheck them and remove the unnecessary variables in `portfile.cmake`.") + string(APPEND WARNING_MSG "If that's expected, please add `OPTIONS_CHECK_SKIP ` to vcpkg_configure_cmake.") message(WARNING ${WARNING_MSG}) endif() endforeach() From 2464a3e465661c1d3f61eb8bda65e6e11c769bcf Mon Sep 17 00:00:00 2001 From: nicole mazzuca Date: Thu, 3 Jun 2021 14:58:40 -0500 Subject: [PATCH 10/23] Make Nicole's changes to vcpkg_cmake_configure --- ports/vcpkg-cmake/vcpkg_cmake_configure.cmake | 101 ++++++++++-------- 1 file changed, 56 insertions(+), 45 deletions(-) diff --git a/ports/vcpkg-cmake/vcpkg_cmake_configure.cmake b/ports/vcpkg-cmake/vcpkg_cmake_configure.cmake index 7bd3b2cf29e2a9..ee17af5284e668 100644 --- a/ports/vcpkg-cmake/vcpkg_cmake_configure.cmake +++ b/ports/vcpkg-cmake/vcpkg_cmake_configure.cmake @@ -17,8 +17,8 @@ vcpkg_cmake_configure( ...] [OPTIONS_DEBUG ...] - [OPTIONS_CHECK_SKIP - ...] + [MAYBE_UNUSED_OPTIONS + ...] ) ``` @@ -57,9 +57,12 @@ By default, this function adds flags to `CMAKE_C_FLAGS` and `CMAKE_CXX_FLAGS` which set the default character set to utf-8 for MSVC. If the library sets its own code page, pass the `NO_CHARSET_FLAG` option. -Check all unused cmake options after the configuration is complete. -Use `OPTIONS_CHECK_SKIP` to skip unused cmake options defined for the platform. -This option supports cmake regular expression. +This function makes certain that all options passed in are used by the +underlying CMake build system. If there are options that might be unused, +perhaps on certain platforms, use `MAYBE_UNUSED_OPTIONS`. Each argument +to `MAYBE_UNUSED_OPTIONS` is treated as a regular expression to match the +full name of a variable: in other words, `FOO` will not match `FOOBAR`, +but `FOO.*` will. `LOGFILE_BASE` is used to set the base of the logfile names; by default, this is `config`, and thus the logfiles end up being something like @@ -94,7 +97,7 @@ function(vcpkg_cmake_configure) cmake_parse_arguments(PARSE_ARGV 0 "arg" "PREFER_NINJA;DISABLE_PARALLEL_CONFIGURE;WINDOWS_USE_MSBUILD;NO_CHARSET_FLAG" "SOURCE_PATH;GENERATOR;LOGFILE_BASE" - "OPTIONS;OPTIONS_DEBUG;OPTIONS_RELEASE;OPTIONS_CHECK_SKIP" + "OPTIONS;OPTIONS_DEBUG;OPTIONS_RELEASE;MAYBE_UNUSED_OPTIONS" ) if(DEFINED CACHE{Z_VCPKG_CMAKE_GENERATOR}) @@ -111,6 +114,15 @@ function(vcpkg_cmake_configure) set(arg_LOGFILE_BASE "config-${TARGET_TRIPLET}") endif() + set(manually_specified_variables) + foreach(option IN LISTS arg_OPTIONS arg_OPTIONS_RELEASE arg_OPTIONS_DEBUG) + if(option MATCHES "^-D([^:=]*)[:=]") + list(APPEND manually_specified_variables "${CMAKE_MATCH_1}") + endif() + endforeach() + list(REMOVE_DUPLICATES manually_specified_variables) + debug_message("manually specified variables: ${manually_specified_variables}") + if(CMAKE_HOST_WIN32) if(DEFINED ENV{PROCESSOR_ARCHITEW6432}) set(host_architecture "$ENV{PROCESSOR_ARCHITEW6432}") @@ -359,8 +371,9 @@ function(vcpkg_cmake_configure) WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/vcpkg-parallel-configure" LOGNAME "${arg_LOGFILE_BASE}" ) - list(APPEND CONFIG_LOGS ${CURRENT_BUILDTREES_DIR}/${arg_LOGFILE_BASE}-out.log - ${CURRENT_BUILDTREES_DIR}/${arg_LOGFILE_BASE}-err.log) + list(APPEND config_logs + "${CURRENT_BUILDTREES_DIR}/${arg_LOGFILE_BASE}-out.log" + "${CURRENT_BUILDTREES_DIR}/${arg_LOGFILE_BASE}-err.log") else() if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") message(STATUS "Configuring ${TARGET_TRIPLET}-dbg") @@ -376,8 +389,9 @@ function(vcpkg_cmake_configure) WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg" LOGNAME "${arg_LOGFILE_BASE}-dbg" ) - list(APPEND CONFIG_LOGS ${CURRENT_BUILDTREES_DIR}/${arg_LOGFILE_BASE}-dbg-out.log - ${CURRENT_BUILDTREES_DIR}/${arg_LOGFILE_BASE}-dbg-err.log) + list(APPEND config_logs + "${CURRENT_BUILDTREES_DIR}/${arg_LOGFILE_BASE}-dbg-out.log" + "${CURRENT_BUILDTREES_DIR}/${arg_LOGFILE_BASE}-dbg-err.log") endif() if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") @@ -394,50 +408,47 @@ function(vcpkg_cmake_configure) WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel" LOGNAME "${arg_LOGFILE_BASE}-rel" ) - list(APPEND CONFIG_LOGS ${CURRENT_BUILDTREES_DIR}/${arg_LOGFILE_BASE}-rel-out.log - ${CURRENT_BUILDTREES_DIR}/${arg_LOGFILE_BASE}-rel-err.log) + list(APPEND config_logs + "${CURRENT_BUILDTREES_DIR}/${arg_LOGFILE_BASE}-rel-out.log" + "${CURRENT_BUILDTREES_DIR}/${arg_LOGFILE_BASE}-rel-err.log") endif() endif() - # Check unused variables - list(APPEND KNOWN_UNUSED_VARS CMAKE_*. _VCPKG_*. BUILD_SHARED_LIBS VCPKG_*. Z_VCPKG_*. ${arg_OPTIONS_CHECK_SKIP}) - foreach(config_log ${CONFIG_LOGS}) - if (NOT EXISTS ${config_log}) - continue() - endif() - file(READ "${config_log}" CFG_LOG) - if (NOT CFG_LOG) + list(JOIN arg_MAYBE_UNUSED_OPTIONS ")|(" maybe_unused_variables_regex) + set(maybe_unused_variables_regex "^((${maybe_unused_variables_regex}))$") + debug_message("maybe_unused_variables_regex: ${maybe_unused_variables_regex}") + + set(all_unused_variables) + foreach(config_log IN LISTS config_logs) + if(NOT EXISTS "${config_log}") continue() endif() - debug_message("READING ${config_log}...") - string(REGEX MATCH "Manually-specified variables were not used by the project:\n([^\[]+)-- Build files have been written to" UNUSED_VARS ${CFG_LOG}) - if (NOT UNUSED_VARS) + file(READ "${config_log}" log_contents) + debug_message("Reading configure log ${config_log}...") + if(NOT log_contents MATCHES "Manually-specified variables were not used by the project:\n\n(( [^\n]*\n)*)") continue() endif() - string(REPLACE "Manually-specified variables were not used by the project:\n\n" "" UNUSED_VARS ${UNUSED_VARS}) - string(REPLACE "-- Build files have been written to" "" UNUSED_VARS ${UNUSED_VARS}) - string(REGEX MATCHALL "[^\ |\n]+" UNUSED_VARS ${UNUSED_VARS}) - foreach(known_macro ${KNOWN_UNUSED_VARS}) - foreach(UNUSED_VAR ${UNUSED_VARS}) - debug_message("REGEX: ${UNUSED_VAR} in ${known_macro}") - string(REGEX MATCH "${known_macro}" FOUND_VAR ${UNUSED_VAR}) - debug_message("RESULT: ${FOUND_VAR}") - if (FOUND_VAR) - debug_message("REMOVE ${UNUSED_VAR}") - list(REMOVE_ITEM UNUSED_VARS ${UNUSED_VAR}) - endif() - endforeach() + string(STRIP "${CMAKE_MATCH_1}" unused_variables) # remove leading ` ` and trailing `\n` + string(REPLACE "\n " ";" unused_variables "${unused_variables}") + debug_message("unused variables: ${unused_variables}") + foreach(unused_variable IN LISTS unused_variables) + if(unused_variable IN_LIST manually_specified_variables AND NOT unused_variable MATCHES "${maybe_unused_variables_regex}") + debug_message("manually specified unused variable: ${unused_variable}") + list(APPEND all_unused_variables "${unused_variable}") + else() + debug_message("unused variable (not manually specified): ${unused_variable}") + endif() endforeach() - if (UNUSED_VARS) - set(WARNING_MSG "The following variables are not used in CMakeLists.txt:\n") - foreach (UNUSED_VAR ${UNUSED_VARS}) - string(APPEND WARNING_MSG " ${UNUSED_VAR}\n") - endforeach() - string(APPEND WARNING_MSG "Please recheck them and remove the unnecessary variables in `portfile.cmake`.") - string(APPEND WARNING_MSG "If that's expected, please add `OPTIONS_CHECK_SKIP ` to vcpkg_cmake_configure.") - message(WARNING ${WARNING_MSG}) - endif() endforeach() + if(DEFINED all_unused_variables) + list(REMOVE_DUPLICATES all_unused_variables) + list(JOIN all_unused_variables "\n " all_unused_variables) + message(WARNING "The following variables are not used in CMakeLists.txt: + ${all_unused_variables} +Please recheck them and remove the unnecessary options from the `vcpkg_cmake_configure` call. +If these options should still be passed for whatever reason, please use the `MAYBE_UNUSED_OPTIONS` argument.") + endif() + set(Z_VCPKG_CMAKE_GENERATOR "${generator}" CACHE INTERNAL "The generator which was used to configure CMake.") endfunction() From 209dffc187c8e9fc6016fea8382cc13a92b89493 Mon Sep 17 00:00:00 2001 From: nicole mazzuca Date: Thu, 3 Jun 2021 13:26:06 -0700 Subject: [PATCH 11/23] remove regexness this should probably be a glob instead, but non-regex is better than regex --- ports/vcpkg-cmake/vcpkg_cmake_configure.cmake | 21 +++++++------------ versions/baseline.json | 2 +- versions/v-/vcpkg-cmake.json | 5 +++++ 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/ports/vcpkg-cmake/vcpkg_cmake_configure.cmake b/ports/vcpkg-cmake/vcpkg_cmake_configure.cmake index ee17af5284e668..4f9d82c1127b45 100644 --- a/ports/vcpkg-cmake/vcpkg_cmake_configure.cmake +++ b/ports/vcpkg-cmake/vcpkg_cmake_configure.cmake @@ -17,8 +17,8 @@ vcpkg_cmake_configure( ...] [OPTIONS_DEBUG ...] - [MAYBE_UNUSED_OPTIONS - ...] + [MAYBE_UNUSED_VARIABLES + ...] ) ``` @@ -59,10 +59,8 @@ If the library sets its own code page, pass the `NO_CHARSET_FLAG` option. This function makes certain that all options passed in are used by the underlying CMake build system. If there are options that might be unused, -perhaps on certain platforms, use `MAYBE_UNUSED_OPTIONS`. Each argument -to `MAYBE_UNUSED_OPTIONS` is treated as a regular expression to match the -full name of a variable: in other words, `FOO` will not match `FOOBAR`, -but `FOO.*` will. +perhaps on certain platforms, pass those variable names to +`MAYBE_UNUSED_VARIABLES`. `LOGFILE_BASE` is used to set the base of the logfile names; by default, this is `config`, and thus the logfiles end up being something like @@ -97,7 +95,7 @@ function(vcpkg_cmake_configure) cmake_parse_arguments(PARSE_ARGV 0 "arg" "PREFER_NINJA;DISABLE_PARALLEL_CONFIGURE;WINDOWS_USE_MSBUILD;NO_CHARSET_FLAG" "SOURCE_PATH;GENERATOR;LOGFILE_BASE" - "OPTIONS;OPTIONS_DEBUG;OPTIONS_RELEASE;MAYBE_UNUSED_OPTIONS" + "OPTIONS;OPTIONS_DEBUG;OPTIONS_RELEASE;MAYBE_UNUSED_VARIABLES" ) if(DEFINED CACHE{Z_VCPKG_CMAKE_GENERATOR}) @@ -121,6 +119,7 @@ function(vcpkg_cmake_configure) endif() endforeach() list(REMOVE_DUPLICATES manually_specified_variables) + list(REMOVE_ITEM manually_specified_variables ${arg_MAYBE_UNUSED_VARIABLES}) debug_message("manually specified variables: ${manually_specified_variables}") if(CMAKE_HOST_WIN32) @@ -414,10 +413,6 @@ function(vcpkg_cmake_configure) endif() endif() - list(JOIN arg_MAYBE_UNUSED_OPTIONS ")|(" maybe_unused_variables_regex) - set(maybe_unused_variables_regex "^((${maybe_unused_variables_regex}))$") - debug_message("maybe_unused_variables_regex: ${maybe_unused_variables_regex}") - set(all_unused_variables) foreach(config_log IN LISTS config_logs) if(NOT EXISTS "${config_log}") @@ -432,7 +427,7 @@ function(vcpkg_cmake_configure) string(REPLACE "\n " ";" unused_variables "${unused_variables}") debug_message("unused variables: ${unused_variables}") foreach(unused_variable IN LISTS unused_variables) - if(unused_variable IN_LIST manually_specified_variables AND NOT unused_variable MATCHES "${maybe_unused_variables_regex}") + if(unused_variable IN_LIST manually_specified_variables) debug_message("manually specified unused variable: ${unused_variable}") list(APPEND all_unused_variables "${unused_variable}") else() @@ -447,7 +442,7 @@ function(vcpkg_cmake_configure) message(WARNING "The following variables are not used in CMakeLists.txt: ${all_unused_variables} Please recheck them and remove the unnecessary options from the `vcpkg_cmake_configure` call. -If these options should still be passed for whatever reason, please use the `MAYBE_UNUSED_OPTIONS` argument.") +If these options should still be passed for whatever reason, please use the `MAYBE_UNUSED_VARIABLES` argument.") endif() set(Z_VCPKG_CMAKE_GENERATOR "${generator}" CACHE INTERNAL "The generator which was used to configure CMake.") diff --git a/versions/baseline.json b/versions/baseline.json index d6ee10fef55bde..b64d6a1a3a72d6 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -6366,7 +6366,7 @@ }, "vcpkg-cmake": { "baseline": "2021-02-28", - "port-version": 2 + "port-version": 3 }, "vcpkg-cmake-config": { "baseline": "2021-05-22", diff --git a/versions/v-/vcpkg-cmake.json b/versions/v-/vcpkg-cmake.json index 561945cd6366c8..45db1bc717b416 100644 --- a/versions/v-/vcpkg-cmake.json +++ b/versions/v-/vcpkg-cmake.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "ea06c38f4b312ef7717aab74c1c33ae7e2c2c975", + "version-date": "2021-02-28", + "port-version": 3 + }, { "git-tree": "02fbd92ab46d1512b22280f1264e4e8f8d076ef4", "version-date": "2021-02-28", From 2bb22fb00a69a639739f0af52cc069406ed983c5 Mon Sep 17 00:00:00 2001 From: nicole mazzuca Date: Thu, 3 Jun 2021 14:03:50 -0700 Subject: [PATCH 12/23] nicole CRs --- scripts/cmake/vcpkg_configure_cmake.cmake | 90 +++++++++++-------- .../cmake/vcpkg_internal_get_cmake_vars.cmake | 1 + 2 files changed, 52 insertions(+), 39 deletions(-) diff --git a/scripts/cmake/vcpkg_configure_cmake.cmake b/scripts/cmake/vcpkg_configure_cmake.cmake index c5b910b5b1e698..16670b9c24065d 100644 --- a/scripts/cmake/vcpkg_configure_cmake.cmake +++ b/scripts/cmake/vcpkg_configure_cmake.cmake @@ -15,7 +15,7 @@ vcpkg_configure_cmake( [OPTIONS <-DUSE_THIS_IN_ALL_BUILDS=1>...] [OPTIONS_RELEASE <-DOPTIMIZE=1>...] [OPTIONS_DEBUG <-DDEBUGGABLE=1>...] - [OPTIONS_CHECK_SKIP ...] + [MAYBE_UNUSED_VARIABLES ...] ) ``` @@ -54,7 +54,7 @@ Additional options passed to CMake during the Release configuration. These are i ### OPTIONS_DEBUG Additional options passed to CMake during the Debug configuration. These are in addition to `OPTIONS`. -### OPTIONS_CHECK_SKIP +### MAYBE_UNUSED_OPTIONS Ignore checked unused cmake options, support cmake regular expression ### LOGNAME @@ -77,9 +77,9 @@ function(vcpkg_configure_cmake) endif() cmake_parse_arguments(PARSE_ARGV 0 arg - "PREFER_NINJA;DISABLE_PARALLEL_CONFIGURE;NO_CHARSET_FLAG" + "PREFER_NINJA;DISABLE_PARALLEL_CONFIGURE;NO_CHARSET_FLAG;Z_VCPKG_IGNORE_UNUSED_VARIABLES" "SOURCE_PATH;GENERATOR;LOGNAME" - "OPTIONS;OPTIONS_DEBUG;OPTIONS_RELEASE;OPTIONS_CHECK_SKIP" + "OPTIONS;OPTIONS_DEBUG;OPTIONS_RELEASE;MAYBE_UNUSED_VARIABLES" ) if(NOT VCPKG_PLATFORM_TOOLSET) @@ -91,6 +91,18 @@ function(vcpkg_configure_cmake) set(arg_LOGNAME config-${TARGET_TRIPLET}) endif() + set(manually_specified_variables) + if(NOT arg_Z_VCPKG_IGNORE_UNUSED_VARIABLES) + foreach(option IN LISTS arg_OPTIONS arg_OPTIONS_RELEASE arg_OPTIONS_DEBUG) + if(option MATCHES "^-D([^:=]*)[:=]") + list(APPEND manually_specified_variables "${CMAKE_MATCH_1}") + endif() + endforeach() + list(REMOVE_DUPLICATES manually_specified_variables) + list(REMOVE_ITEM manually_specified_variables ${arg_MAYBE_UNUSED_VARIABLES}) + debug_message("manually specified variables: ${manually_specified_variables}") + endif() + if(CMAKE_HOST_WIN32) if(DEFINED ENV{PROCESSOR_ARCHITEW6432}) set(arg_HOST_ARCHITECTURE $ENV{PROCESSOR_ARCHITEW6432}) @@ -330,7 +342,9 @@ function(vcpkg_configure_cmake) LOGNAME ${arg_LOGNAME} ) - list(APPEND CONFIG_LOGS ${CURRENT_BUILDTREES_DIR}/${arg_LOGNAME}-out.log ${CURRENT_BUILDTREES_DIR}/${arg_LOGNAME}-err.log) + list(APPEND config_logs + "${CURRENT_BUILDTREES_DIR}/${arg_LOGNAME}-out.log" + "${CURRENT_BUILDTREES_DIR}/${arg_LOGNAME}-err.log") else() if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") message(STATUS "Configuring ${TARGET_TRIPLET}-dbg") @@ -340,7 +354,9 @@ function(vcpkg_configure_cmake) WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg LOGNAME ${arg_LOGNAME}-dbg ) - list(APPEND CONFIG_LOGS ${CURRENT_BUILDTREES_DIR}/${arg_LOGNAME}-dbg-out.log ${CURRENT_BUILDTREES_DIR}/${arg_LOGNAME}-dbg-err.log) + list(APPEND config_logs + "${CURRENT_BUILDTREES_DIR}/${arg_LOGNAME}-dbg-out.log" + "${CURRENT_BUILDTREES_DIR}/${arg_LOGNAME}-dbg-err.log") endif() if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") @@ -351,49 +367,45 @@ function(vcpkg_configure_cmake) WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel LOGNAME ${arg_LOGNAME}-rel ) - list(APPEND CONFIG_LOGS ${CURRENT_BUILDTREES_DIR}/${arg_LOGNAME}-rel-out.log ${CURRENT_BUILDTREES_DIR}/${arg_LOGNAME}-rel-err.log) + list(APPEND config_logs + "${CURRENT_BUILDTREES_DIR}/${arg_LOGNAME}-rel-out.log" + "${CURRENT_BUILDTREES_DIR}/${arg_LOGNAME}-rel-err.log") endif() endif() # Check unused variables - list(APPEND KNOWN_UNUSED_VARS CMAKE_*. _VCPKG_*. BUILD_SHARED_LIBS VCPKG_*. Z_VCPKG_*. ${arg_OPTIONS_CHECK_SKIP}) - foreach(config_log ${CONFIG_LOGS}) - if (NOT EXISTS ${config_log}) - continue() - endif() - file(READ "${config_log}" CFG_LOG) - if (NOT CFG_LOG) + set(all_unused_variables) + foreach(config_log IN LISTS config_logs) + if (NOT EXISTS "${config_log}") continue() endif() - debug_message("READING ${config_log}...") - string(REGEX MATCH "Manually-specified variables were not used by the project:\n([^\[]+)-- Build files have been written to" UNUSED_VARS ${CFG_LOG}) - if (NOT UNUSED_VARS) + file(READ "${config_log}" log_contents) + debug_message("Reading configure log ${config_log}...") + if(NOT log_contents MATCHES "Manually-specified variables were not used by the project:\n\n(( [^\n]*\n)*)") continue() endif() - string(REPLACE "Manually-specified variables were not used by the project:\n\n" "" UNUSED_VARS ${UNUSED_VARS}) - string(REPLACE "-- Build files have been written to" "" UNUSED_VARS ${UNUSED_VARS}) - string(REGEX MATCHALL "[^\ |\n]+" UNUSED_VARS ${UNUSED_VARS}) - foreach(known_macro ${KNOWN_UNUSED_VARS}) - foreach(UNUSED_VAR ${UNUSED_VARS}) - debug_message("REGEX: ${UNUSED_VAR} in ${known_macro}") - string(REGEX MATCH "${known_macro}" FOUND_VAR ${UNUSED_VAR}) - debug_message("RESULT: ${FOUND_VAR}") - if (FOUND_VAR) - debug_message("REMOVE ${UNUSED_VAR}") - list(REMOVE_ITEM UNUSED_VARS ${UNUSED_VAR}) - endif() - endforeach() + string(STRIP "${CMAKE_MATCH_1}" unused_variables) # remove leading ` ` and trailing `\n` + string(REPLACE "\n " ";" unused_variables "${unused_variables}") + debug_message("unused variables: ${unused_variables}") + + foreach(unused_variable IN LISTS unused_variables) + if(unused_variable IN_LIST manually_specified_variables) + debug_message("manually specified unused variable: ${unused_variable}") + list(APPEND all_unused_variables "${unused_variable}") + else() + debug_message("unused variable (not manually specified): ${unused_variable}") + endif() endforeach() - if (UNUSED_VARS) - set(WARNING_MSG "The following variables are not used in CMakeLists.txt:\n") - foreach (UNUSED_VAR ${UNUSED_VARS}) - string(APPEND WARNING_MSG " ${UNUSED_VAR}\n") - endforeach() - string(APPEND WARNING_MSG "Please recheck them and remove the unnecessary variables in `portfile.cmake`.") - string(APPEND WARNING_MSG "If that's expected, please add `OPTIONS_CHECK_SKIP ` to vcpkg_configure_cmake.") - message(WARNING ${WARNING_MSG}) - endif() endforeach() + if(DEFINED all_unused_variables) + list(REMOVE_DUPLICATES all_unused_variables) + list(JOIN all_unused_variables "\n " all_unused_variables) + message(WARNING "The following variables are not used in CMakeLists.txt: + ${all_unused_variables} +Please recheck them and remove the unnecessary options from the `vcpkg_cmake_configure` call. +If these options should still be passed for whatever reason, please use the `MAYBE_UNUSED_VARIABLES` argument.") + endif() + set(Z_VCPKG_CMAKE_GENERATOR "${GENERATOR}" PARENT_SCOPE) endfunction() diff --git a/scripts/cmake/vcpkg_internal_get_cmake_vars.cmake b/scripts/cmake/vcpkg_internal_get_cmake_vars.cmake index 6c705ae8f8f429..030d74120d88f5 100644 --- a/scripts/cmake/vcpkg_internal_get_cmake_vars.cmake +++ b/scripts/cmake/vcpkg_internal_get_cmake_vars.cmake @@ -53,6 +53,7 @@ function(vcpkg_internal_get_cmake_vars) OPTIONS_RELEASE "-DVCPKG_OUTPUT_FILE:PATH=${CURRENT_BUILDTREES_DIR}/cmake-vars-${TARGET_TRIPLET}-rel.cmake.log" PREFER_NINJA LOGNAME get-cmake-vars-${TARGET_TRIPLET} + Z_VCPKG_IGNORE_UNUSED_VARIABLES ) set(_include_string) From 82472e872f6c06ae9e6b3378afed3ab2e29da66c Mon Sep 17 00:00:00 2001 From: JackBoosY Date: Thu, 3 Jun 2021 19:27:36 -0700 Subject: [PATCH 13/23] Update docs --- .../ports/vcpkg-cmake/vcpkg_cmake_configure.md | 11 ++++++----- docs/maintainers/vcpkg_configure_cmake.md | 4 ++-- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/docs/maintainers/ports/vcpkg-cmake/vcpkg_cmake_configure.md b/docs/maintainers/ports/vcpkg-cmake/vcpkg_cmake_configure.md index dd505810eda0aa..3745df08058fec 100644 --- a/docs/maintainers/ports/vcpkg-cmake/vcpkg_cmake_configure.md +++ b/docs/maintainers/ports/vcpkg-cmake/vcpkg_cmake_configure.md @@ -18,8 +18,8 @@ vcpkg_cmake_configure( ...] [OPTIONS_DEBUG ...] - [OPTIONS_CHECK_SKIP - ...] + [MAYBE_UNUSED_VARIABLES + ...] ) ``` @@ -58,9 +58,10 @@ By default, this function adds flags to `CMAKE_C_FLAGS` and `CMAKE_CXX_FLAGS` which set the default character set to utf-8 for MSVC. If the library sets its own code page, pass the `NO_CHARSET_FLAG` option. -Check all unused cmake options after the configuration is complete. -Use `OPTIONS_CHECK_SKIP` to skip unused cmake options defined for the platform. -This option supports cmake regular expression. +This function makes certain that all options passed in are used by the +underlying CMake build system. If there are options that might be unused, +perhaps on certain platforms, pass those variable names to +`MAYBE_UNUSED_VARIABLES`. `LOGFILE_BASE` is used to set the base of the logfile names; by default, this is `config`, and thus the logfiles end up being something like diff --git a/docs/maintainers/vcpkg_configure_cmake.md b/docs/maintainers/vcpkg_configure_cmake.md index d9ae63ea416911..d46d718971b28a 100644 --- a/docs/maintainers/vcpkg_configure_cmake.md +++ b/docs/maintainers/vcpkg_configure_cmake.md @@ -17,7 +17,7 @@ vcpkg_configure_cmake( [OPTIONS <-DUSE_THIS_IN_ALL_BUILDS=1>...] [OPTIONS_RELEASE <-DOPTIMIZE=1>...] [OPTIONS_DEBUG <-DDEBUGGABLE=1>...] - [OPTIONS_CHECK_SKIP ...] + [MAYBE_UNUSED_VARIABLES ...] ) ``` @@ -56,7 +56,7 @@ Additional options passed to CMake during the Release configuration. These are i ### OPTIONS_DEBUG Additional options passed to CMake during the Debug configuration. These are in addition to `OPTIONS`. -### OPTIONS_CHECK_SKIP +### MAYBE_UNUSED_OPTIONS Ignore checked unused cmake options, support cmake regular expression ### LOGNAME From 63616c6a7af1fe2abe88c6d977d11c7a7d697ac8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jack=C2=B7Boos=C2=B7Yu?= <47264268+JackBoosY@users.noreply.github.com> Date: Wed, 9 Jun 2021 10:03:28 +0800 Subject: [PATCH 14/23] Update ports/vcpkg-cmake/vcpkg.json --- ports/vcpkg-cmake/vcpkg.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/vcpkg-cmake/vcpkg.json b/ports/vcpkg-cmake/vcpkg.json index 8e2ac9ec664858..54fc8e9e09b2e4 100644 --- a/ports/vcpkg-cmake/vcpkg.json +++ b/ports/vcpkg-cmake/vcpkg.json @@ -1,5 +1,5 @@ { "name": "vcpkg-cmake", "version-date": "2021-02-28", - "port-version": 3 + "port-version": 4 } From 40faf9eb49f133e87d72f6e10298fc9e3360c8b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jack=C2=B7Boos=C2=B7Yu?= <47264268+JackBoosY@users.noreply.github.com> Date: Tue, 15 Jun 2021 15:44:57 +0800 Subject: [PATCH 15/23] Update versions/v-/vcpkg-cmake.json --- versions/v-/vcpkg-cmake.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/v-/vcpkg-cmake.json b/versions/v-/vcpkg-cmake.json index b3a695e63b9745..90db0ed1ca849f 100644 --- a/versions/v-/vcpkg-cmake.json +++ b/versions/v-/vcpkg-cmake.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "ea06c38f4b312ef7717aab74c1c33ae7e2c2c975", + "git-tree": "6404018e597cf6703e4cf3d46a3a4011d8c93efd", "version-date": "2021-02-28", "port-version": 3 }, From 02b8226a4e2fa396aaf5432efd04985e9f25a2b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jack=C2=B7Boos=C2=B7Yu?= <47264268+JackBoosY@users.noreply.github.com> Date: Tue, 22 Jun 2021 10:57:50 +0800 Subject: [PATCH 16/23] Update scripts/cmake/vcpkg_configure_cmake.cmake Co-authored-by: ras0219 <533828+ras0219@users.noreply.github.com> --- scripts/cmake/vcpkg_configure_cmake.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/cmake/vcpkg_configure_cmake.cmake b/scripts/cmake/vcpkg_configure_cmake.cmake index 16670b9c24065d..4326f970d419e6 100644 --- a/scripts/cmake/vcpkg_configure_cmake.cmake +++ b/scripts/cmake/vcpkg_configure_cmake.cmake @@ -403,7 +403,7 @@ function(vcpkg_configure_cmake) list(JOIN all_unused_variables "\n " all_unused_variables) message(WARNING "The following variables are not used in CMakeLists.txt: ${all_unused_variables} -Please recheck them and remove the unnecessary options from the `vcpkg_cmake_configure` call. +Please recheck them and remove the unnecessary options from the `vcpkg_configure_cmake` call. If these options should still be passed for whatever reason, please use the `MAYBE_UNUSED_VARIABLES` argument.") endif() From 9cf00d56845e3a1354bd7cd6f689fcb629a7308e Mon Sep 17 00:00:00 2001 From: nicole mazzuca <83086508+strega-nil-ms@users.noreply.github.com> Date: Wed, 30 Jun 2021 16:09:57 -0700 Subject: [PATCH 17/23] Nicole's CR --- ports/vcpkg-cmake/vcpkg_cmake_configure.cmake | 2 +- scripts/cmake/vcpkg_configure_cmake.cmake | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ports/vcpkg-cmake/vcpkg_cmake_configure.cmake b/ports/vcpkg-cmake/vcpkg_cmake_configure.cmake index 4e8733300e2f8e..551ee2a36cbdd2 100644 --- a/ports/vcpkg-cmake/vcpkg_cmake_configure.cmake +++ b/ports/vcpkg-cmake/vcpkg_cmake_configure.cmake @@ -112,7 +112,7 @@ function(vcpkg_cmake_configure) set(arg_LOGFILE_BASE "config-${TARGET_TRIPLET}") endif() - set(manually_specified_variables) + set(manually_specified_variables "") foreach(option IN LISTS arg_OPTIONS arg_OPTIONS_RELEASE arg_OPTIONS_DEBUG) if(option MATCHES "^-D([^:=]*)[:=]") list(APPEND manually_specified_variables "${CMAKE_MATCH_1}") diff --git a/scripts/cmake/vcpkg_configure_cmake.cmake b/scripts/cmake/vcpkg_configure_cmake.cmake index 4326f970d419e6..1e6cf396d80ddf 100644 --- a/scripts/cmake/vcpkg_configure_cmake.cmake +++ b/scripts/cmake/vcpkg_configure_cmake.cmake @@ -54,8 +54,8 @@ Additional options passed to CMake during the Release configuration. These are i ### OPTIONS_DEBUG Additional options passed to CMake during the Debug configuration. These are in addition to `OPTIONS`. -### MAYBE_UNUSED_OPTIONS -Ignore checked unused cmake options, support cmake regular expression +### MAYBE_UNUSED_VARIABLES +Any CMake variables which are explicitly passed in, but which may not be used on all platforms. ### LOGNAME Name of the log to write the output of the configure call to. @@ -91,7 +91,7 @@ function(vcpkg_configure_cmake) set(arg_LOGNAME config-${TARGET_TRIPLET}) endif() - set(manually_specified_variables) + set(manually_specified_variables "") if(NOT arg_Z_VCPKG_IGNORE_UNUSED_VARIABLES) foreach(option IN LISTS arg_OPTIONS arg_OPTIONS_RELEASE arg_OPTIONS_DEBUG) if(option MATCHES "^-D([^:=]*)[:=]") From d2962ca317cf46c5b7253ffd0185ac841b673136 Mon Sep 17 00:00:00 2001 From: JackBoosY Date: Wed, 30 Jun 2021 19:07:14 -0700 Subject: [PATCH 18/23] Update docs --- docs/maintainers/vcpkg_configure_cmake.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/maintainers/vcpkg_configure_cmake.md b/docs/maintainers/vcpkg_configure_cmake.md index d46d718971b28a..fd6ce13187bb7a 100644 --- a/docs/maintainers/vcpkg_configure_cmake.md +++ b/docs/maintainers/vcpkg_configure_cmake.md @@ -56,8 +56,8 @@ Additional options passed to CMake during the Release configuration. These are i ### OPTIONS_DEBUG Additional options passed to CMake during the Debug configuration. These are in addition to `OPTIONS`. -### MAYBE_UNUSED_OPTIONS -Ignore checked unused cmake options, support cmake regular expression +### MAYBE_UNUSED_VARIABLES +Any CMake variables which are explicitly passed in, but which may not be used on all platforms. ### LOGNAME Name of the log to write the output of the configure call to. From f256a83aaa778a9fb8638b5106073f2a7dca665e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jack=C2=B7Boos=C2=B7Yu?= <47264268+JackBoosY@users.noreply.github.com> Date: Fri, 2 Jul 2021 14:33:50 +0800 Subject: [PATCH 19/23] Update versions/v-/vcpkg-cmake.json --- versions/v-/vcpkg-cmake.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/v-/vcpkg-cmake.json b/versions/v-/vcpkg-cmake.json index 90db0ed1ca849f..1935ef59ae2a1d 100644 --- a/versions/v-/vcpkg-cmake.json +++ b/versions/v-/vcpkg-cmake.json @@ -3,7 +3,7 @@ { "git-tree": "6404018e597cf6703e4cf3d46a3a4011d8c93efd", "version-date": "2021-02-28", - "port-version": 3 + "port-version": 5 }, { "git-tree": "0e8bb94599a00fd9c61fd0ae524c22a067c21420", From 0b0cd52a232e1d0c9525437f13e40ad70a8c6f98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jack=C2=B7Boos=C2=B7Yu?= <47264268+JackBoosY@users.noreply.github.com> Date: Fri, 2 Jul 2021 14:35:44 +0800 Subject: [PATCH 20/23] Update versions/v-/vcpkg-cmake.json --- versions/v-/vcpkg-cmake.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/v-/vcpkg-cmake.json b/versions/v-/vcpkg-cmake.json index 1935ef59ae2a1d..e79dad8d8b6228 100644 --- a/versions/v-/vcpkg-cmake.json +++ b/versions/v-/vcpkg-cmake.json @@ -2,7 +2,7 @@ "versions": [ { "git-tree": "6404018e597cf6703e4cf3d46a3a4011d8c93efd", - "version-date": "2021-02-28", + "version-date": "2021-06-25", "port-version": 5 }, { From 2ab78a58eaea7d85a12a3f517284ffeca3a24834 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jack=C2=B7Boos=C2=B7Yu?= <47264268+JackBoosY@users.noreply.github.com> Date: Fri, 2 Jul 2021 14:40:03 +0800 Subject: [PATCH 21/23] Update versions/v-/vcpkg-cmake.json --- versions/v-/vcpkg-cmake.json | 1 + 1 file changed, 1 insertion(+) diff --git a/versions/v-/vcpkg-cmake.json b/versions/v-/vcpkg-cmake.json index cd18a748a3d36c..21cd0ac3e84b1d 100644 --- a/versions/v-/vcpkg-cmake.json +++ b/versions/v-/vcpkg-cmake.json @@ -5,6 +5,7 @@ "version-date": "2021-06-25", "port-version": 5 }, + { "git-tree": "acc25ec22f8fd8887a865705580b1d6de041616d", "version-date": "2021-06-25", "port-version": 4 From 966d74cf21ca81acd9be567210de4f170235b9ed Mon Sep 17 00:00:00 2001 From: JackBoosY Date: Mon, 5 Jul 2021 00:51:12 -0700 Subject: [PATCH 22/23] update port version --- ports/vcpkg-cmake/vcpkg.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/vcpkg-cmake/vcpkg.json b/ports/vcpkg-cmake/vcpkg.json index ffda714e3fe066..88ee459ff35111 100644 --- a/ports/vcpkg-cmake/vcpkg.json +++ b/ports/vcpkg-cmake/vcpkg.json @@ -1,5 +1,5 @@ { "name": "vcpkg-cmake", "version-date": "2021-06-25", - "port-version": 4 + "port-version": 5 } From 5788f0597ca5987ddda3fa8206b18ca98e863788 Mon Sep 17 00:00:00 2001 From: JackBoosY Date: Mon, 5 Jul 2021 00:51:32 -0700 Subject: [PATCH 23/23] version stuff --- versions/baseline.json | 2 +- versions/v-/vcpkg-cmake.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/versions/baseline.json b/versions/baseline.json index a200b7aee8824e..141b6bd214992c 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -6510,7 +6510,7 @@ }, "vcpkg-cmake": { "baseline": "2021-06-25", - "port-version": 4 + "port-version": 5 }, "vcpkg-cmake-config": { "baseline": "2021-05-22", diff --git a/versions/v-/vcpkg-cmake.json b/versions/v-/vcpkg-cmake.json index 21cd0ac3e84b1d..c632ab855e8929 100644 --- a/versions/v-/vcpkg-cmake.json +++ b/versions/v-/vcpkg-cmake.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "6404018e597cf6703e4cf3d46a3a4011d8c93efd", + "git-tree": "07c3e68ce9ae8f30bcc0b21def7a528dbb8ecb07", "version-date": "2021-06-25", "port-version": 5 },