From b38ed9d08a901d4003b28ce454e74476ba88f67a Mon Sep 17 00:00:00 2001 From: Arfrever Frehtes Taifersar Arahesis Date: Fri, 18 Feb 2022 00:00:00 +0000 Subject: [PATCH] cmake_package_config_generate: Fix CMake warnings with CMake 3.23 Correct syntax to run CMake built-in command-line tools is `cmake -E`: https://cmake.org/cmake/help/v3.23/manual/cmake.1.html#run-a-command-line-tool This test was mistakenly using `cmake env ... cmake ...`, where `env` and second `cmake` were interpreted as paths (of source directory or build directory), resulting in "Ignoring extra path from command line" CMake warnings with CMake 3.23: https://gitlab.kitware.com/cmake/cmake/-/commit/eacf1f879b0933509efbd4fb4d6d72ce99412aa7 --- cmake/TestPackageConfig.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/TestPackageConfig.cmake b/cmake/TestPackageConfig.cmake index e512a1d92..97244ab79 100644 --- a/cmake/TestPackageConfig.cmake +++ b/cmake/TestPackageConfig.cmake @@ -23,7 +23,7 @@ execute_process ( # modified again (e.g., for MinGW AppVeyor CI builds) by adding back the # directory containing git.exe. Incidently, the Git installation directory # also contains sh.exe which causes MinGW Makefile generation to fail. - COMMAND ${CMAKE_COMMAND} env PATH=${PATH} + COMMAND ${CMAKE_COMMAND} -E env PATH=${PATH} ${CMAKE_COMMAND} -C ${INITIAL_CACHE} -G ${GENERATOR} ${_ADDITIONAL_ARGS}