Closed
Conversation
CMake 3.30 and earlier silently ignored unsupported keywords and missing or invalid arguments for the different forms of the add_custom_command() command. CMake 3.31 implements more rigorous argument checking and will flag invalid or missing arguments as errors. The OLD behavior of this policy will accept the same invalid keywords or arguments as CMake 3.30 and earlier. See https://cmake.org/cmake/help/latest/policy/CMP0175.html docs. --- On systems with CMake version 3.31 and higher - let's get rid of the warning.
053bef8 to
18529cd
Compare
Owner
|
Shouldn't we fix the commands instead of silencing the warning? |
Author
|
@Ravbug the culprit is: add_custom_command(POST_BUILD
TARGET "${EXECUTABLE_NAME}"
COMMAND ${CMAKE_COMMAND} -E copy_if_different "${CMAKE_CURRENT_LIST_DIR}/src/${filename}" "${outname}"
DEPENDS "${filename}"
)If we want to fix it - we need to remove the |
Author
Author
|
@Ravbug would you be willing to bump CMake from the current version
|
Owner
|
I ended up fixing it by removing the invalid |
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.


CMake 3.30 and earlier silently ignored unsupported keywords and missing or invalid arguments for the different forms of the
add_custom_command()command. CMake 3.31 implements more rigorous argument checking and will flag invalid or missing arguments as errors.The
OLDbehavior of this policy will accept the same invalid keywords or arguments as CMake 3.30 and earlier.See CMP0175 docs.
On systems with CMake version 3.31 and higher - let's get rid of the warning.