• Brad King's avatar
    file: Change REMOVE to ignore empty names · a1eb0356
    Brad King authored
    Previously code like
    
        file(REMOVE_RECURSE "${accidentally_missing_variable}")
    
    treated the empty string as a relative path with respect to the
    current directory and removed its contents.  Change this behavior
    to ignore the empty string with a warning instead.
    
    Normally such behavior changes are done with a policy, but in this case
    such code is likely a real bug in project code that can delete data.
    
    Fixes: #19274
    a1eb0356
Name
Last commit
Last update
..
dir Loading commit data...
from Loading commit data...
subdir_test_unlock Loading commit data...
CMakeLists.txt Loading commit data...
CREATE_LINK-COPY_ON_ERROR.cmake Loading commit data...
CREATE_LINK-SYMBOLIC-noexist.cmake Loading commit data...
CREATE_LINK-SYMBOLIC.cmake Loading commit data...
CREATE_LINK-noarg-result.txt Loading commit data...
CREATE_LINK-noarg-stderr.txt Loading commit data...
CREATE_LINK-noarg.cmake Loading commit data...
CREATE_LINK-noexist-stderr.txt Loading commit data...
CREATE_LINK-noexist.cmake Loading commit data...
CREATE_LINK.cmake Loading commit data...
DOWNLOAD-hash-mismatch-result.txt Loading commit data...
DOWNLOAD-hash-mismatch-stderr.txt Loading commit data...
DOWNLOAD-hash-mismatch.cmake Loading commit data...
DOWNLOAD-hash-mismatch.txt Loading commit data...
DOWNLOAD-httpheader-not-set-result.txt Loading commit data...
DOWNLOAD-httpheader-not-set-stderr.txt Loading commit data...
DOWNLOAD-httpheader-not-set.cmake Loading commit data...
DOWNLOAD-netrc-bad-result.txt Loading commit data...
DOWNLOAD-netrc-bad-stderr.txt Loading commit data...
DOWNLOAD-netrc-bad.cmake Loading commit data...
DOWNLOAD-netrc-bad.txt Loading commit data...
DOWNLOAD-pass-not-set-result.txt Loading commit data...
DOWNLOAD-pass-not-set-stderr.txt Loading commit data...
DOWNLOAD-pass-not-set.cmake Loading commit data...
DOWNLOAD-unused-argument-result.txt Loading commit data...
DOWNLOAD-unused-argument-stderr.txt Loading commit data...
DOWNLOAD-unused-argument.cmake Loading commit data...
DOWNLOAD-unused-argument.txt Loading commit data...
FileOpenFailRead-result.txt Loading commit data...
FileOpenFailRead-stderr.txt Loading commit data...
FileOpenFailRead.cmake Loading commit data...
GLOB-CONFIGURE_DEPENDS-RerunCMake-build-stdout.txt Loading commit data...
GLOB-CONFIGURE_DEPENDS-RerunCMake-rebuild_first-stdout.txt Loading commit data...
GLOB-CONFIGURE_DEPENDS-RerunCMake-rebuild_second-stdout.txt Loading commit data...
GLOB-CONFIGURE_DEPENDS-RerunCMake-stdout.txt Loading commit data...
GLOB-CONFIGURE_DEPENDS-RerunCMake.cmake Loading commit data...
GLOB-error-CONFIGURE_DEPENDS-SCRIPT_MODE-result.txt Loading commit data...
GLOB-error-CONFIGURE_DEPENDS-SCRIPT_MODE-stderr.txt Loading commit data...
GLOB-error-CONFIGURE_DEPENDS-SCRIPT_MODE.cmake Loading commit data...
GLOB-error-CONFIGURE_DEPENDS-modified-result.txt Loading commit data...
GLOB-error-CONFIGURE_DEPENDS-modified-stderr.txt Loading commit data...
GLOB-error-CONFIGURE_DEPENDS-modified.cmake Loading commit data...
GLOB-error-LIST_DIRECTORIES-no-arg-result.txt Loading commit data...
GLOB-error-LIST_DIRECTORIES-no-arg-stderr.txt Loading commit data...
GLOB-error-LIST_DIRECTORIES-no-arg.cmake Loading commit data...
GLOB-error-LIST_DIRECTORIES-not-boolean-result.txt Loading commit data...
GLOB-error-LIST_DIRECTORIES-not-boolean-stderr.txt Loading commit data...
GLOB-error-LIST_DIRECTORIES-not-boolean.cmake Loading commit data...
GLOB-error-RELATIVE-no-arg-result.txt Loading commit data...
GLOB-error-RELATIVE-no-arg-stderr.txt Loading commit data...
GLOB-error-RELATIVE-no-arg.cmake Loading commit data...
GLOB-noexp-CONFIGURE_DEPENDS-result.txt Loading commit data...
GLOB-noexp-CONFIGURE_DEPENDS-stderr.txt Loading commit data...
GLOB-noexp-CONFIGURE_DEPENDS.cmake Loading commit data...
GLOB-noexp-FOLLOW_SYMLINKS.cmake Loading commit data...
GLOB-noexp-LIST_DIRECTORIES.cmake Loading commit data...
GLOB-noexp-RELATIVE-result.txt Loading commit data...
GLOB-noexp-RELATIVE-stderr.txt Loading commit data...
GLOB-noexp-RELATIVE.cmake Loading commit data...
GLOB-sort-dedup-stderr.txt Loading commit data...
GLOB-sort-dedup.cmake Loading commit data...
GLOB-stderr.txt Loading commit data...
GLOB-warn-CONFIGURE_DEPENDS-late-stderr.txt Loading commit data...
GLOB-warn-CONFIGURE_DEPENDS-late.cmake Loading commit data...
GLOB.cmake Loading commit data...
GLOB_RECURSE-cyclic-recursion-stderr.txt Loading commit data...
GLOB_RECURSE-cyclic-recursion.cmake Loading commit data...
GLOB_RECURSE-noexp-FOLLOW_SYMLINKS-result.txt Loading commit data...
GLOB_RECURSE-noexp-FOLLOW_SYMLINKS-stderr.txt Loading commit data...
GLOB_RECURSE-noexp-FOLLOW_SYMLINKS.cmake Loading commit data...
GLOB_RECURSE-stderr.txt Loading commit data...
GLOB_RECURSE-warn-CONFIGURE_DEPENDS-ninja-version-stderr.txt Loading commit data...
GLOB_RECURSE-warn-CONFIGURE_DEPENDS-ninja-version.cmake Loading commit data...
GLOB_RECURSE.cmake Loading commit data...
INSTALL-DIRECTORY-stdout.txt Loading commit data...
INSTALL-DIRECTORY.cmake Loading commit data...
INSTALL-FILES_FROM_DIR-bad-result.txt Loading commit data...
INSTALL-FILES_FROM_DIR-bad-stderr.txt Loading commit data...
INSTALL-FILES_FROM_DIR-bad.cmake Loading commit data...
INSTALL-FILES_FROM_DIR-stdout.txt Loading commit data...
INSTALL-FILES_FROM_DIR.cmake Loading commit data...
INSTALL-FOLLOW_SYMLINK_CHAIN.cmake Loading commit data...
INSTALL-MESSAGE-bad-result.txt Loading commit data...
INSTALL-MESSAGE-bad-stderr.txt Loading commit data...
INSTALL-MESSAGE-bad.cmake Loading commit data...
INSTALL-SYMLINK-stdout.txt Loading commit data...
INSTALL-SYMLINK.cmake Loading commit data...
LOCK-error-file-create-fail-result.txt Loading commit data...
LOCK-error-file-create-fail-stderr.txt Loading commit data...
LOCK-error-file-create-fail.cmake Loading commit data...
LOCK-error-guard-incorrect-result.txt Loading commit data...
LOCK-error-guard-incorrect-stderr.txt Loading commit data...
LOCK-error-guard-incorrect.cmake Loading commit data...
LOCK-error-incorrect-timeout-result.txt Loading commit data...
LOCK-error-incorrect-timeout-stderr.txt Loading commit data...
LOCK-error-incorrect-timeout-trail-result.txt Loading commit data...
LOCK-error-incorrect-timeout-trail-stderr.txt Loading commit data...
LOCK-error-incorrect-timeout-trail.cmake Loading commit data...
LOCK-error-incorrect-timeout.cmake Loading commit data...
LOCK-error-lock-fail-result.txt Loading commit data...
LOCK-error-lock-fail-stderr.txt Loading commit data...
LOCK-error-lock-fail.cmake Loading commit data...
LOCK-error-negative-timeout-result.txt Loading commit data...
LOCK-error-negative-timeout-stderr.txt Loading commit data...
LOCK-error-negative-timeout.cmake Loading commit data...
LOCK-error-no-function-result.txt Loading commit data...
LOCK-error-no-function-stderr.txt Loading commit data...
LOCK-error-no-function.cmake Loading commit data...
LOCK-error-no-guard-result.txt Loading commit data...
LOCK-error-no-guard-stderr.txt Loading commit data...
LOCK-error-no-guard.cmake Loading commit data...
LOCK-error-no-path-result.txt Loading commit data...
LOCK-error-no-path-stderr.txt Loading commit data...
LOCK-error-no-path.cmake Loading commit data...
LOCK-error-no-result-variable-result.txt Loading commit data...
LOCK-error-no-result-variable-stderr.txt Loading commit data...
LOCK-error-no-result-variable.cmake Loading commit data...
LOCK-error-no-timeout-result.txt Loading commit data...
LOCK-error-no-timeout-stderr.txt Loading commit data...
LOCK-error-no-timeout.cmake Loading commit data...
LOCK-error-timeout-result.txt Loading commit data...
LOCK-error-timeout-stderr.txt Loading commit data...
LOCK-error-timeout-stdout.txt Loading commit data...
LOCK-error-timeout.cmake Loading commit data...
LOCK-error-unknown-option-result.txt Loading commit data...
LOCK-error-unknown-option-stderr.txt Loading commit data...
LOCK-error-unknown-option.cmake Loading commit data...
LOCK-lowercase.cmake Loading commit data...
LOCK-stdout.txt Loading commit data...
LOCK.cmake Loading commit data...
READ_ELF-result.txt Loading commit data...
READ_ELF-stderr.txt Loading commit data...
READ_ELF.cmake Loading commit data...
READ_SYMLINK-noexist-result.txt Loading commit data...
READ_SYMLINK-noexist-stderr.txt Loading commit data...
READ_SYMLINK-noexist.cmake Loading commit data...
READ_SYMLINK-notsymlink-result.txt Loading commit data...
READ_SYMLINK-notsymlink-stderr.txt Loading commit data...
READ_SYMLINK-notsymlink.cmake Loading commit data...
READ_SYMLINK.cmake Loading commit data...
REMOVE-empty-stderr.txt Loading commit data...
REMOVE-empty.cmake Loading commit data...
RunCMakeTest.cmake Loading commit data...
SIZE-error-does-not-exist-result.txt Loading commit data...
SIZE-error-does-not-exist-stderr.txt Loading commit data...
SIZE-error-does-not-exist.cmake Loading commit data...
SIZE.cmake Loading commit data...
TOUCH-error-in-source-directory-result.txt Loading commit data...
TOUCH-error-in-source-directory-stderr.txt Loading commit data...
TOUCH-error-in-source-directory.cmake Loading commit data...
TOUCH-error-missing-directory-result.txt Loading commit data...
TOUCH-error-missing-directory-stderr.txt Loading commit data...
TOUCH-error-missing-directory.cmake Loading commit data...
TOUCH-result.txt Loading commit data...
TOUCH-stderr.txt Loading commit data...
TOUCH.cmake Loading commit data...
UPLOAD-httpheader-not-set-result.txt Loading commit data...
UPLOAD-httpheader-not-set-stderr.txt Loading commit data...
UPLOAD-httpheader-not-set.cmake Loading commit data...
UPLOAD-netrc-bad-result.txt Loading commit data...
UPLOAD-netrc-bad-stderr.txt Loading commit data...
UPLOAD-netrc-bad.cmake Loading commit data...
UPLOAD-netrc-bad.txt Loading commit data...
UPLOAD-pass-not-set-result.txt Loading commit data...
UPLOAD-pass-not-set-stderr.txt Loading commit data...
UPLOAD-pass-not-set.cmake Loading commit data...
UPLOAD-unused-argument-result.txt Loading commit data...
UPLOAD-unused-argument-stderr.txt Loading commit data...
UPLOAD-unused-argument.cmake Loading commit data...
UPLOAD-unused-argument.txt Loading commit data...
timeout-script.cmake Loading commit data...