mirror of
https://github.com/Kitware/CMake.git
synced 2026-03-13 12:59:55 -05:00
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
7 lines
272 B
ReStructuredText
7 lines
272 B
ReStructuredText
file-remove-no-empty
|
|
--------------------
|
|
|
|
* The :command:`file(REMOVE)` and :command:`file(REMOVE_RECURSE)` commands
|
|
were changed to ignore empty arguments with a warning instead of treating
|
|
them as a relative path and removing the contents of the current directory.
|