summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/if
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2023-11-28 14:43:17 (GMT)
committerBrad King <brad.king@kitware.com>2023-11-29 12:54:58 (GMT)
commit5589bcb1bf3b7bf6ac74f91d59efb736eb0dc932 (patch)
treec8bd46f089838317531949ca5b623afef51efbd0 /Tests/RunCMake/if
parent165bf3252f00e3485a00b872411a26ecbb324801 (diff)
downloadCMake-5589bcb1bf3b7bf6ac74f91d59efb736eb0dc932.zip
CMake-5589bcb1bf3b7bf6ac74f91d59efb736eb0dc932.tar.gz
CMake-5589bcb1bf3b7bf6ac74f91d59efb736eb0dc932.tar.bz2
Tests: Fix directory removal in RunCMake.if test
Diffstat (limited to 'Tests/RunCMake/if')
-rw-r--r--Tests/RunCMake/if/FilePermissions.cmake8
1 files changed, 5 insertions, 3 deletions
diff --git a/Tests/RunCMake/if/FilePermissions.cmake b/Tests/RunCMake/if/FilePermissions.cmake
index 7881b5f..9d5db64 100644
--- a/Tests/RunCMake/if/FilePermissions.cmake
+++ b/Tests/RunCMake/if/FilePermissions.cmake
@@ -13,9 +13,11 @@ file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/executable.txt" "foo")
file(CHMOD "${CMAKE_CURRENT_BINARY_DIR}/executable.txt" PERMISSIONS OWNER_EXECUTE GROUP_EXECUTE WORLD_EXECUTE)
if(NOT WIN32)
- file(REMOVE "${CMAKE_CURRENT_BINARY_DIR}/readable-dir"
- "${CMAKE_CURRENT_BINARY_DIR}/writable-dir"
- "${CMAKE_CURRENT_BINARY_DIR}/executable-dir")
+ file(REMOVE_RECURSE
+ "${CMAKE_CURRENT_BINARY_DIR}/readable-dir"
+ "${CMAKE_CURRENT_BINARY_DIR}/writable-dir"
+ "${CMAKE_CURRENT_BINARY_DIR}/executable-dir"
+ )
file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/readable-dir")
file(CHMOD "${CMAKE_CURRENT_BINARY_DIR}/readable-dir" PERMISSIONS OWNER_READ GROUP_READ WORLD_READ)