summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2022-06-22 12:42:41 (GMT)
committerKitware Robot <kwrobot@kitware.com>2022-06-22 12:42:50 (GMT)
commit01ba9d3c392650bb14e79744c06d74c239b0ee9d (patch)
tree5a89341975a38767087063e9251a3fbabde2b91c /Modules
parentda27438883d0ce6d9209ac5e181fce94211dac38 (diff)
parent6a1e45fdecdd3b748f37c180259ba3c70fc222b6 (diff)
downloadCMake-01ba9d3c392650bb14e79744c06d74c239b0ee9d.zip
CMake-01ba9d3c392650bb14e79744c06d74c239b0ee9d.tar.gz
CMake-01ba9d3c392650bb14e79744c06d74c239b0ee9d.tar.bz2
Merge topic 'ExternalProject-stamp-cfgdir'
6a1e45fdec Merge branch 'backport-3.23-ExternalProject-stamp-cfgdir' 5022b42f8b ExternalProject: Fix regression in stamp creation for Xcode+iOS 7b622f3e80 ExternalProject: Fix regression in stamp creation for Xcode+iOS Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Craig Scott <craig.scott@crascit.com> Merge-request: !7396
Diffstat (limited to 'Modules')
-rw-r--r--Modules/ExternalProject.cmake4
-rw-r--r--Modules/ExternalProject/mkdirs.cmake.in3
2 files changed, 6 insertions, 1 deletions
diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake
index 701e5fb..c7948cd 100644
--- a/Modules/ExternalProject.cmake
+++ b/Modules/ExternalProject.cmake
@@ -1669,6 +1669,7 @@ function(_ep_set_directories name)
${script_filename}
@ONLY
)
+ unset(cfgdir) # do not leak into mkdirs.cmake script
include(${script_filename})
endfunction()
@@ -2624,11 +2625,12 @@ endfunction()
function(_ep_add_mkdir_command name)
ExternalProject_Get_Property(${name} tmp_dir)
set(script_filename "${tmp_dir}/${name}-mkdirs.cmake")
+ _ep_get_configuration_subdir_genex(cfgdir)
ExternalProject_Add_Step(${name} mkdir
INDEPENDENT TRUE
COMMENT "Creating directories for '${name}'"
- COMMAND ${CMAKE_COMMAND} -P ${script_filename}
+ COMMAND ${CMAKE_COMMAND} -Dcfgdir=${cfgdir} -P ${script_filename}
)
endfunction()
diff --git a/Modules/ExternalProject/mkdirs.cmake.in b/Modules/ExternalProject/mkdirs.cmake.in
index d30a2e7..bb835cf 100644
--- a/Modules/ExternalProject/mkdirs.cmake.in
+++ b/Modules/ExternalProject/mkdirs.cmake.in
@@ -17,3 +17,6 @@ set(configSubDirs @CMAKE_CONFIGURATION_TYPES@)
foreach(subDir IN LISTS configSubDirs)
file(MAKE_DIRECTORY "@stamp_dir@/${subDir}")
endforeach()
+if(cfgdir)
+ file(MAKE_DIRECTORY "@stamp_dir@${cfgdir}") # cfgdir has leading slash
+endif()