Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmake_package_config_generate: Fix CMake warnings with CMake 3.23 #792

Merged
merged 1 commit into from
Feb 18, 2022
Merged

cmake_package_config_generate: Fix CMake warnings with CMake 3.23 #792

merged 1 commit into from
Feb 18, 2022

Conversation

Arfrever
Copy link

@Arfrever Arfrever commented Feb 18, 2022

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.

Warnings in verbose test log (${glob_build_dir}/Testing/Temporary/LastTest.log) may look in this way:

CMake Warning:
  Ignoring extra path from command line:

   "${glog_build_dir}/test_package_config/working_config/env"


CMake Warning:
  Ignoring extra path from command line:

   "/usr/bin/cmake"


This type of cmake warning was originally introduced by cmake commit eacf1f879b0933509efbd4fb4d6d72ce99412aa7.

@Arfrever Arfrever changed the title cmake_package_config_generate: Fix cmake warnings with cmake 3.23 cmake_package_config_generate: Fix CMake warnings with CMake 3.23 Feb 18, 2022
@codecov-commenter
Copy link

codecov-commenter commented Feb 18, 2022

Codecov Report

Merging #792 (79790d7) into master (9f0b7d3) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #792   +/-   ##
=======================================
  Coverage   72.78%   72.78%           
=======================================
  Files          17       17           
  Lines        3259     3259           
=======================================
  Hits         2372     2372           
  Misses        887      887           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9f0b7d3...79790d7. Read the comment docs.

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
@sergiud
Copy link
Collaborator

sergiud commented Feb 18, 2022

Thank you!

@sergiud sergiud merged commit b38ed9d into google:master Feb 18, 2022
@Arfrever Arfrever deleted the cmake_package_config_generate branch February 18, 2022 20:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants