Skip to content

Commit 63d0de7

Browse files
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.
1 parent 65c760a commit 63d0de7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cmake/CPM.cmake

+1-1
Original file line numberDiff line numberDiff line change
@@ -712,7 +712,7 @@ function(CPMAddPackage)
712712
)
713713
cpm_get_fetch_properties("${CPM_ARGS_NAME}")
714714

715-
if(DEFINED CPM_ARGS_GIT_TAG)
715+
if(DEFINED CPM_ARGS_GIT_TAG AND NOT (PATCH_COMMAND IN_LIST CPM_ARGS_UNPARSED_ARGUMENTS))
716716
# warn if cache has been changed since checkout
717717
cpm_check_git_working_dir_is_clean(${download_directory} ${CPM_ARGS_GIT_TAG} IS_CLEAN)
718718
if(NOT ${IS_CLEAN})

0 commit comments

Comments
 (0)