cmake: minor improvements to cmake_uninstall.in.cmake#22201
Closed
vszakats wants to merge 9 commits into
Closed
Conversation
There was a problem hiding this comment.
Pull request overview
This PR performs small CMake-related cleanups and documentation/comment touch-ups to reduce noise and improve clarity in the CMake uninstall script and associated docs.
Changes:
- Refines
cmake_uninstall.in.cmakemessaging (prefix/DESTDIR reporting, less “Uninstalling …” noise for non-existent files). - Minor CMakeLists tidy-ups (remove redundant local var, match existing
configure_file(... @ONLY)formatting). - Documentation/comment corrections (note CMake 3.29+ env support for
CMAKE_INSTALL_PREFIX, fix a copy/paste comment typo).
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| docs/INSTALL-CMAKE.md | Notes CMake 3.29+ behavior for CMAKE_INSTALL_PREFIX in the options list. |
| CMakeLists.txt | Removes an unused intermediate variable and aligns configure_file(... @ONLY) formatting with nearby usage. |
| CMake/CurlTests.c | Fixes a misleading comment for the SIOCGIFADDR test headers. |
| CMake/cmake_uninstall.in.cmake | Improves uninstall script status output and avoids printing “Uninstalling …” when the target doesn’t exist. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
cmake_uninstall.in.cmake
| set(CMAKE_INSTALL_PREFIX "@CMAKE_INSTALL_PREFIX@") | ||
| message(STATUS "Install prefix: @CMAKE_INSTALL_PREFIX@") | ||
| set(_destdir "$ENV{DESTDIR}") | ||
| if(NOT _destdir STREQUAL "") |
…en file is missing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
exists. (and a different message otherwise)
rmcommand withfile(REMOVE). For efficiency.Show manual message if the file could not be deleted.
Ref: https://cmake.org/cmake/help/v3.18/command/file.html#remove
Follow-up to 6d00835 cmake: replace deprecated
removecommand withrmand pass arg safely #22193successful. (and a different message otherwise)
DESTDIRenv value if set.CMAKE_INSTALL_PREFIX.The value was never predefined, also not used, besides showing it,
and showing it is misleading because
--prefixmay override theconfigure-time value, and also superfluous because the filenames
are showing the actual prefix anyway.
Follow-up to 27e2a47