Skip to content

Commit

Permalink
cmake_package_config_generate: Fix CMake warnings with CMake 3.23
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Arfrever Frehtes Taifersar Arahesis authored and sergiud committed Feb 18, 2022
1 parent 9f0b7d3 commit b38ed9d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmake/TestPackageConfig.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down

0 comments on commit b38ed9d

Please sign in to comment.