@@ -96,6 +96,8 @@ if(CMakePythonDistributions_SUPERBUILD)
9696 endif ()
9797 option (BUILD_CMAKE_FROM_SOURCE "Build CMake from source" ${default} )
9898
99+ option (BUILD_VERBOSE "Build reporting additional information (e.g download progress, ...)" OFF )
100+
99101 set (CMakePythonDistributions_ARCHIVE_DOWNLOAD_DIR "${CMAKE_BINARY_DIR} "
100102 CACHE PATH "Directory where to download archives"
101103 )
@@ -191,6 +193,18 @@ if(CMakePythonDistributions_SUPERBUILD)
191193
192194 set (${PROJECT_NAME} _CMAKE_CACHE_ARG)
193195
196+ set (ep_download_no_progress_args)
197+ set (ep_log_configure_build_args)
198+ if (NOT BUILD_VERBOSE)
199+ set (ep_download_no_progress_args
200+ DOWNLOAD_NO_PROGRESS 1
201+ )
202+ set (ep_log_configure_build_args
203+ LOG_CONFIGURE 1
204+ LOG_BUILD 1
205+ )
206+ endif ()
207+
194208 #
195209 # CMakeProject_SOURCE_DIR: Always expect the sources (needed for `sdist`)
196210 #
@@ -208,6 +222,7 @@ if(CMakePythonDistributions_SUPERBUILD)
208222 BUILD_COMMAND ""
209223 BUILD_IN_SOURCE 1
210224 INSTALL_COMMAND ""
225+ ${ep_download_no_progress_args}
211226 )
212227 message (STATUS "SuperBuild - CMakeProject-src-download" )
213228 message (STATUS "SuperBuild - CMakeProject-src-download - URL: ${${src_archive} _url}" )
@@ -243,6 +258,7 @@ if(CMakePythonDistributions_SUPERBUILD)
243258 -DCMake_INSTALL_DEPENDENCIES:BOOL=ON
244259 USES_TERMINAL_CONFIGURE 1
245260 USES_TERMINAL_BUILD 1
261+ ${ep_log_configure_build_args}
246262 INSTALL_COMMAND ""
247263 DEPENDS
248264 CMakeProject-src-download
@@ -281,6 +297,7 @@ if(CMakePythonDistributions_SUPERBUILD)
281297 BUILD_COMMAND ""
282298 BUILD_IN_SOURCE 1
283299 INSTALL_COMMAND ""
300+ ${ep_download_no_progress_args}
284301 )
285302 message (STATUS "SuperBuild - CMakeProject-binary-download" )
286303 message (STATUS "SuperBuild - CMakeProject-binary-download - URL: ${${binary_archive} _url}" )
@@ -336,7 +353,20 @@ include\(\"${CMakeProject_BINARY_DIR}/cmake_install.cmake\")
336353 if (relative_directory STREQUAL "bin" )
337354 set (type PROGRAMS)
338355 endif ()
339- install (${type} ${file} DESTINATION "${relative_directory} " )
356+ # Skip symlinks like "CMake.app/Contents/Frameworks/QtWidgets.framework/Versions/Current"
357+ if (IS_SYMLINK ${file} )
358+ continue ()
359+ endif ()
360+ set (_permissions)
361+ get_filename_component (filename ${file} NAME )
362+ if (filename MATCHES "ccmake|cmake|cmake-gui|cpack|ctest" )
363+ set (_permissions PERMISSIONS
364+ OWNER_READ OWNER_WRITE OWNER_EXECUTE
365+ GROUP_READ GROUP_EXECUTE
366+ WORLD_READ WORLD_EXECUTE
367+ )
368+ endif ()
369+ install (${type} ${file} DESTINATION "${relative_directory} " ${_permissions} )
340370 endforeach ()
341371 endif ()
342372
0 commit comments