summaryrefslogtreecommitdiffstats
path: root/Modules/ExternalProject.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-08-01 15:49:17 (GMT)
committerBrad King <brad.king@kitware.com>2016-08-02 14:14:26 (GMT)
commit52aecc0c382384d5bea3c18d7894e80bc573d8d7 (patch)
tree196ac02b4df587020026561be83a0c17bd52b85b /Modules/ExternalProject.cmake
parent8b9cd61337501b6adb36fcd70e13ad59d1a63b34 (diff)
downloadCMake-52aecc0c382384d5bea3c18d7894e80bc573d8d7.zip
CMake-52aecc0c382384d5bea3c18d7894e80bc573d8d7.tar.gz
CMake-52aecc0c382384d5bea3c18d7894e80bc573d8d7.tar.bz2
ExternalProject: Ignore macOS .DS_Store files in tarball extraction
Do not consider a top-level `.DS_Store` file when deciding whether a tarball contains exactly one directory whose contents should be used as the resulting top-level of the extraction. Fixes #16218. Suggested-by: Patrice Kouame
Diffstat (limited to 'Modules/ExternalProject.cmake')
-rw-r--r--Modules/ExternalProject.cmake1
1 files changed, 1 insertions, 0 deletions
diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake
index 7e179aa..4929848 100644
--- a/Modules/ExternalProject.cmake
+++ b/Modules/ExternalProject.cmake
@@ -993,6 +993,7 @@ endif()
#
message(STATUS \"extracting... [analysis]\")
file(GLOB contents \"\${ut_dir}/*\")
+list(REMOVE_ITEM contents \"\${ut_dir}/.DS_Store\")
list(LENGTH contents n)
if(NOT n EQUAL 1 OR NOT IS_DIRECTORY \"\${contents}\")
set(contents \"\${ut_dir}\")