Don't warn about dirty source trees when a PATCH_COMMAND is provided (#401)

The patch command will always cause a dirty source tree, which
is expected and not a cause for concern.
This commit is contained in:
Robert Maynard 2022-09-13 17:21:12 -04:00 committed by GitHub
parent 65c760a840
commit 63d0de7114
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -712,7 +712,7 @@ function(CPMAddPackage)
)
cpm_get_fetch_properties("${CPM_ARGS_NAME}")
if(DEFINED CPM_ARGS_GIT_TAG)
if(DEFINED CPM_ARGS_GIT_TAG AND NOT (PATCH_COMMAND IN_LIST CPM_ARGS_UNPARSED_ARGUMENTS))
# warn if cache has been changed since checkout
cpm_check_git_working_dir_is_clean(${download_directory} ${CPM_ARGS_GIT_TAG} IS_CLEAN)
if(NOT ${IS_CLEAN})