1 # Distributed under the OSI-approved BSD 3-Clause License. See accompanying
2 # file Copyright.txt or https://cmake.org/licensing for details.
4 cmake_minimum_required(VERSION 3.13...3.23 FATAL_ERROR)
5 set(CMAKE_USER_MAKE_RULES_OVERRIDE_C ${CMAKE_CURRENT_SOURCE_DIR}/Source/Modules/OverrideC.cmake)
6 set(CMAKE_USER_MAKE_RULES_OVERRIDE_CXX ${CMAKE_CURRENT_SOURCE_DIR}/Source/Modules/OverrideCXX.cmake)
9 cmake_policy(SET CMP0129 NEW) # CMake 3.23
13 unset(CMAKE_USER_MAKE_RULES_OVERRIDE_CXX)
14 unset(CMAKE_USER_MAKE_RULES_OVERRIDE_C)
16 # FIXME: This block should go away after a transition period.
17 if(MSVC AND NOT CMAKE_VERSION VERSION_LESS 3.15)
18 # Filter out MSVC runtime library flags that may have come from
19 # the cache of an existing build tree or from scripts.
20 foreach(l IN ITEMS C CXX)
21 foreach(c IN ITEMS DEBUG MINSIZEREL RELEASE RELWITHDEBINFO)
22 string(REGEX REPLACE "[-/]M[DT]d?( |$)" "" "CMAKE_${l}_FLAGS_${c}" "${CMAKE_${l}_FLAGS_${c}}")
27 # Make sure we can find internal find_package modules only used for
28 # building CMake and not for shipping externally
29 list(INSERT CMAKE_MODULE_PATH 0 ${CMake_SOURCE_DIR}/Source/Modules)
32 # Running from bootstrap script. Set local variable and remove from cache.
33 set(CMAKE_BOOTSTRAP 1)
34 unset(CMAKE_BOOTSTRAP CACHE)
37 if(CMake_TEST_HOST_CMAKE)
38 get_filename_component(CMake_TEST_EXTERNAL_CMAKE "${CMAKE_COMMAND}" DIRECTORY)
41 if(NOT CMake_TEST_EXTERNAL_CMAKE)
42 if(CMAKE_SYSTEM_NAME STREQUAL "HP-UX")
44 "CMake no longer compiles on HP-UX. See\n"
45 " https://gitlab.kitware.com/cmake/cmake/-/issues/17137\n"
46 "Use CMake 3.9 or lower instead."
50 set(CMake_BIN_DIR ${CMake_BINARY_DIR}/bin)
53 if(CMake_GUI_DISTRIBUTE_WITH_Qt_LGPL)
54 if(CMake_GUI_DISTRIBUTE_WITH_Qt_LGPL MATCHES "^3|2\\.1$")
55 set(USE_LGPL "${CMake_GUI_DISTRIBUTE_WITH_Qt_LGPL}")
63 # Use most-recent available language dialects with GNU and Clang
64 if(NOT DEFINED CMAKE_C_STANDARD AND NOT CMake_NO_C_STANDARD)
65 include(${CMake_SOURCE_DIR}/Source/Checks/cm_c11_thread_local.cmake)
66 if(NOT CMake_C11_THREAD_LOCAL_BROKEN)
67 set(CMAKE_C_STANDARD 11)
69 set(CMAKE_C_STANDARD 99)
72 if(NOT DEFINED CMAKE_CXX_STANDARD AND NOT CMake_NO_CXX_STANDARD)
73 if(CMAKE_CXX_COMPILER_ID STREQUAL SunPro AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.14)
74 set(CMAKE_CXX_STANDARD 98)
76 if(NOT CMAKE_VERSION VERSION_LESS 3.8)
77 include(${CMake_SOURCE_DIR}/Source/Checks/cm_cxx17_check.cmake)
79 set(CMake_CXX17_BROKEN 1)
81 if(NOT CMake_CXX17_BROKEN)
82 set(CMAKE_CXX_STANDARD 17)
84 include(${CMake_SOURCE_DIR}/Source/Checks/cm_cxx14_check.cmake)
85 if(NOT CMake_CXX14_BROKEN)
86 set(CMAKE_CXX_STANDARD 14)
88 set(CMAKE_CXX_STANDARD 11)
93 if(NOT CMake_TEST_EXTERNAL_CMAKE)
94 # include special compile flags for some compilers
95 include(CompileFlags.cmake)
97 # check for available C++ features
98 include(${CMake_SOURCE_DIR}/Source/Checks/cm_cxx_features.cmake)
100 if(NOT CMake_HAVE_CXX_UNIQUE_PTR)
101 message(FATAL_ERROR "The C++ compiler does not support C++11 (e.g. std::unique_ptr).")
105 # Inform STL library header wrappers whether to use system versions.
106 configure_file(Utilities/std/cmSTL.hxx.in Utilities/cmSTL.hxx @ONLY)
108 # set the internal encoding of CMake to UTF-8
109 set(KWSYS_ENCODING_DEFAULT_CODEPAGE CP_UTF8)
111 # option to use COMPONENT with install command
112 option(CMake_INSTALL_COMPONENTS "Using components when installing" OFF)
113 mark_as_advanced(CMake_INSTALL_COMPONENTS)
114 macro(CMake_OPTIONAL_COMPONENT NAME)
115 if(CMake_INSTALL_COMPONENTS)
116 set(COMPONENT COMPONENT ${NAME})
122 # option to disable installing 3rd-party dependencies
123 option(CMake_INSTALL_DEPENDENCIES
124 "Whether to install 3rd-party runtime dependencies" OFF)
125 mark_as_advanced(CMake_INSTALL_DEPENDENCIES)
127 # option to build reference for CMake developers
128 option(CMake_BUILD_DEVELOPER_REFERENCE
129 "Build CMake Developer Reference" OFF)
130 mark_as_advanced(CMake_BUILD_DEVELOPER_REFERENCE)
132 # option to build using interprocedural optimizations (IPO/LTO)
133 if(NOT CMAKE_VERSION VERSION_LESS 3.12.2)
134 option(CMake_BUILD_LTO "Compile CMake with link-time optimization if supported" OFF)
136 include(CheckIPOSupported)
137 check_ipo_supported(RESULT HAVE_IPO)
139 set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE)
144 #-----------------------------------------------------------------------
145 # a macro to deal with system libraries, implemented as a macro
146 # simply to improve readability of the main script
147 #-----------------------------------------------------------------------
148 macro(CMAKE_HANDLE_SYSTEM_LIBRARIES)
149 # Options have dependencies.
150 include(CMakeDependentOption)
152 # Allow the user to enable/disable all system utility library options by
153 # defining CMAKE_USE_SYSTEM_LIBRARIES or CMAKE_USE_SYSTEM_LIBRARY_${util}.
154 set(UTILITIES BZIP2 CURL EXPAT FORM JSONCPP LIBARCHIVE LIBLZMA LIBRHASH LIBUV NGHTTP2 ZLIB ZSTD)
155 foreach(util IN LISTS UTILITIES)
156 if(NOT DEFINED CMAKE_USE_SYSTEM_LIBRARY_${util}
157 AND DEFINED CMAKE_USE_SYSTEM_LIBRARIES)
158 set(CMAKE_USE_SYSTEM_LIBRARY_${util} "${CMAKE_USE_SYSTEM_LIBRARIES}")
160 if(DEFINED CMAKE_USE_SYSTEM_LIBRARY_${util})
161 if(CMAKE_USE_SYSTEM_LIBRARY_${util})
162 set(CMAKE_USE_SYSTEM_LIBRARY_${util} ON)
164 set(CMAKE_USE_SYSTEM_LIBRARY_${util} OFF)
167 unset(CMAKE_USE_SYSTEM_LIBRARY_${util} CACHE)
169 string(TOLOWER "${util}" lutil)
170 set(CMAKE_USE_SYSTEM_${util} "${CMAKE_USE_SYSTEM_LIBRARY_${util}}"
171 CACHE BOOL "Use system-installed ${lutil}" FORCE)
173 set(CMAKE_USE_SYSTEM_LIBRARY_${util} OFF)
177 unset(CMAKE_USE_SYSTEM_LIBRARIES CACHE)
180 # Optionally use system utility libraries.
181 option(CMAKE_USE_SYSTEM_LIBARCHIVE "Use system-installed libarchive" "${CMAKE_USE_SYSTEM_LIBRARY_LIBARCHIVE}")
182 option(CMAKE_USE_SYSTEM_CURL "Use system-installed curl" "${CMAKE_USE_SYSTEM_LIBRARY_CURL}")
183 option(CMAKE_USE_SYSTEM_EXPAT "Use system-installed expat" "${CMAKE_USE_SYSTEM_LIBRARY_EXPAT}")
184 CMAKE_DEPENDENT_OPTION(CMAKE_USE_SYSTEM_ZLIB "Use system-installed zlib"
185 "${CMAKE_USE_SYSTEM_LIBRARY_ZLIB}" "NOT CMAKE_USE_SYSTEM_LIBARCHIVE;NOT CMAKE_USE_SYSTEM_CURL" ON)
186 CMAKE_DEPENDENT_OPTION(CMAKE_USE_SYSTEM_BZIP2 "Use system-installed bzip2"
187 "${CMAKE_USE_SYSTEM_LIBRARY_BZIP2}" "NOT CMAKE_USE_SYSTEM_LIBARCHIVE" ON)
188 CMAKE_DEPENDENT_OPTION(CMAKE_USE_SYSTEM_ZSTD "Use system-installed zstd"
189 "${CMAKE_USE_SYSTEM_LIBRARY_ZSTD}" "NOT CMAKE_USE_SYSTEM_LIBARCHIVE" ON)
190 CMAKE_DEPENDENT_OPTION(CMAKE_USE_SYSTEM_LIBLZMA "Use system-installed liblzma"
191 "${CMAKE_USE_SYSTEM_LIBRARY_LIBLZMA}" "NOT CMAKE_USE_SYSTEM_LIBARCHIVE" ON)
192 CMAKE_DEPENDENT_OPTION(CMAKE_USE_SYSTEM_NGHTTP2 "Use system-installed nghttp2"
193 "${CMAKE_USE_SYSTEM_LIBRARY_NGHTTP2}" "NOT CMAKE_USE_SYSTEM_CURL" ON)
194 option(CMAKE_USE_SYSTEM_FORM "Use system-installed libform" "${CMAKE_USE_SYSTEM_LIBRARY_FORM}")
195 option(CMAKE_USE_SYSTEM_JSONCPP "Use system-installed jsoncpp" "${CMAKE_USE_SYSTEM_LIBRARY_JSONCPP}")
196 option(CMAKE_USE_SYSTEM_LIBRHASH "Use system-installed librhash" "${CMAKE_USE_SYSTEM_LIBRARY_LIBRHASH}")
197 option(CMAKE_USE_SYSTEM_LIBUV "Use system-installed libuv" "${CMAKE_USE_SYSTEM_LIBRARY_LIBUV}")
199 # For now use system KWIML only if explicitly requested rather
200 # than activating via the general system libs options.
201 option(CMAKE_USE_SYSTEM_KWIML "Use system-installed KWIML" OFF)
202 mark_as_advanced(CMAKE_USE_SYSTEM_KWIML)
204 # Mention to the user what system libraries are being used.
205 foreach(util IN LISTS UTILITIES ITEMS KWIML)
206 if(CMAKE_USE_SYSTEM_${util})
207 message(STATUS "Using system-installed ${util}")
211 # Inform utility library header wrappers whether to use system versions.
212 configure_file(Utilities/cmThirdParty.h.in Utilities/cmThirdParty.h @ONLY)
216 #-----------------------------------------------------------------------
217 # a macro to determine the generator and ctest executable to use
218 # for testing. Simply to improve readability of the main script.
219 #-----------------------------------------------------------------------
220 macro(CMAKE_SETUP_TESTING)
222 set(CMAKE_TEST_SYSTEM_LIBRARIES 0)
223 foreach(util IN ITEMS CURL EXPAT ZLIB)
224 if(CMAKE_USE_SYSTEM_${util})
225 set(CMAKE_TEST_SYSTEM_LIBRARIES 1)
229 # This variable is set by cmake, however to
230 # test cmake we want to make sure that
231 # the ctest from this cmake is used for testing
232 # and not the ctest from the cmake building and testing
234 if(CMake_TEST_EXTERNAL_CMAKE)
235 set(CMAKE_CTEST_COMMAND "${CMake_TEST_EXTERNAL_CMAKE}/ctest")
236 set(CMAKE_CMAKE_COMMAND "${CMake_TEST_EXTERNAL_CMAKE}/cmake")
237 set(CMAKE_CPACK_COMMAND "${CMake_TEST_EXTERNAL_CMAKE}/cpack")
238 foreach(exe IN ITEMS cmake ctest cpack)
239 add_executable(${exe} IMPORTED)
240 set_property(TARGET ${exe} PROPERTY IMPORTED_LOCATION ${CMake_TEST_EXTERNAL_CMAKE}/${exe})
243 set(CMAKE_CTEST_COMMAND "${CMake_BIN_DIR}/ctest")
244 set(CMAKE_CMAKE_COMMAND "${CMake_BIN_DIR}/cmake")
245 set(CMAKE_CPACK_COMMAND "${CMake_BIN_DIR}/cpack")
249 # configure some files for testing
250 configure_file(Templates/CTestScript.cmake.in CTestScript.cmake @ONLY)
251 configure_file(Tests/.NoDartCoverage Tests/.NoDartCoverage)
252 configure_file(Tests/.NoDartCoverage Modules/.NoDartCoverage)
253 configure_file(CTestCustom.cmake.in CTestCustom.cmake @ONLY)
254 if(BUILD_TESTING AND DART_ROOT)
255 configure_file(CMakeLogo.gif Testing/HTML/TestingResults/Icons/Logo.gif COPYONLY)
257 mark_as_advanced(DART_ROOT)
261 # Provide a way for Visual Studio Express users to turn OFF the new FOLDER
262 # organization feature. Default to ON for non-Express users. Express users must
263 # explicitly turn off this option to build CMake in the Express IDE...
265 option(CMAKE_USE_FOLDERS "Enable folder grouping of projects in IDEs." ON)
266 mark_as_advanced(CMAKE_USE_FOLDERS)
269 option(CMake_RUN_CLANG_TIDY "Run clang-tidy with the compiler." OFF)
270 if(CMake_RUN_CLANG_TIDY)
271 if(CMake_SOURCE_DIR STREQUAL CMake_BINARY_DIR)
272 message(FATAL_ERROR "CMake_RUN_CLANG_TIDY requires an out-of-source build!")
274 find_program(CLANG_TIDY_COMMAND NAMES clang-tidy)
275 if(NOT CLANG_TIDY_COMMAND)
276 message(FATAL_ERROR "CMake_RUN_CLANG_TIDY is ON but clang-tidy is not found!")
278 set(CMAKE_CXX_CLANG_TIDY "${CLANG_TIDY_COMMAND}")
280 # Create a preprocessor definition that depends on .clang-tidy content so
281 # the compile command will change when .clang-tidy changes. This ensures
282 # that a subsequent build re-runs clang-tidy on all sources even if they
283 # do not otherwise need to be recompiled. Nothing actually uses this
284 # definition. We add it to targets on which we run clang-tidy just to
285 # get the build dependency on the .clang-tidy file.
286 file(SHA1 ${CMAKE_CURRENT_SOURCE_DIR}/.clang-tidy clang_tidy_sha1)
287 set(CLANG_TIDY_DEFINITIONS "CLANG_TIDY_SHA1=${clang_tidy_sha1}")
288 unset(clang_tidy_sha1)
291 configure_file(.clang-tidy .clang-tidy COPYONLY)
294 option(CMake_RUN_IWYU "Run include-what-you-use with the compiler." OFF)
296 find_program(IWYU_COMMAND NAMES include-what-you-use iwyu)
298 message(FATAL_ERROR "CMake_RUN_IWYU is ON but include-what-you-use is not found!")
300 set(CMAKE_CXX_INCLUDE_WHAT_YOU_USE
301 "${IWYU_COMMAND};-Xiwyu;--mapping_file=${CMake_SOURCE_DIR}/Utilities/IWYU/mapping.imp;-w")
302 list(APPEND CMAKE_CXX_INCLUDE_WHAT_YOU_USE ${CMake_IWYU_OPTIONS})
306 #-----------------------------------------------------------------------
307 # a macro that only sets the FOLDER target property if it's
309 #-----------------------------------------------------------------------
310 macro(CMAKE_SET_TARGET_FOLDER tgt folder)
311 if(CMAKE_USE_FOLDERS)
312 set_property(GLOBAL PROPERTY USE_FOLDERS ON)
313 if(MSVC AND TARGET ${tgt})
314 set_property(TARGET "${tgt}" PROPERTY FOLDER "${folder}")
317 set_property(GLOBAL PROPERTY USE_FOLDERS OFF)
321 #-----------------------------------------------------------------------
322 if(NOT CMake_TEST_EXTERNAL_CMAKE)
323 if(CMAKE_CXX_PLATFORM_ID MATCHES "OpenBSD")
324 execute_process(COMMAND ${CMAKE_CXX_COMPILER}
325 ${CMAKE_CXX_COMPILER_ARG1} -dumpversion
326 OUTPUT_VARIABLE _GXX_VERSION
328 string(REGEX REPLACE "([0-9])\\.([0-9])(\\.[0-9])?" "\\1\\2"
329 _GXX_VERSION_SHORT ${_GXX_VERSION})
330 if(_GXX_VERSION_SHORT EQUAL 33)
332 "GXX 3.3 on OpenBSD is known to cause CPack to Crash.\n"
333 "Please use GXX 4.2 or greater to build CMake on OpenBSD\n"
334 "${CMAKE_CXX_COMPILER} version is: ${_GXX_VERSION}")
339 #-----------------------------------------------------------------------
340 # The main section of the CMakeLists file
342 #-----------------------------------------------------------------------
343 include(Source/CMakeVersion.cmake)
345 # Include the standard Dart testing module
347 include(${CMAKE_ROOT}/Modules/Dart.cmake)
349 # Set up test-time configuration.
350 set_directory_properties(PROPERTIES
351 TEST_INCLUDE_FILE "${CMake_BINARY_DIR}/Tests/EnforceConfig.cmake")
353 if(NOT CMake_TEST_EXTERNAL_CMAKE)
354 # where to write the resulting executables and libraries
355 set(BUILD_SHARED_LIBS OFF)
356 set(EXECUTABLE_OUTPUT_PATH "" CACHE INTERNAL "No configurable exe dir.")
357 set(LIBRARY_OUTPUT_PATH "" CACHE INTERNAL
358 "Where to put the libraries for CMake")
360 # Load install destinations.
361 include(Source/CMakeInstallDestinations.cmake)
364 include(${CMake_SOURCE_DIR}/Tests/CMakeInstall.cmake)
367 # Checks for cmSystemTools.
370 set(HAVE_ENVIRON_NOT_REQUIRE_PROTOTYPE 1)
372 include(CheckSymbolExists)
373 CHECK_SYMBOL_EXISTS(unsetenv "stdlib.h" HAVE_UNSETENV)
374 CHECK_SYMBOL_EXISTS(environ "stdlib.h" HAVE_ENVIRON_NOT_REQUIRE_PROTOTYPE)
378 # CMAKE_TESTS_CDASH_SERVER: CDash server used by CMake/Tests.
380 # If not defined or "", this variable defaults to the server at
381 # "http://open.cdash.org".
383 # If set explicitly to "NOTFOUND", curl tests and ctest tests that use
384 # the network are skipped.
386 # If set to something starting with "http://localhost/", the CDash is
387 # expected to be an instance of CDash used for CDash testing, pointing
388 # to a cdash4simpletest database. In these cases, the CDash dashboards
389 # should be run first.
391 if("x${CMAKE_TESTS_CDASH_SERVER}" STREQUAL "x" AND NOT CMake_TEST_NO_NETWORK)
392 set(CMAKE_TESTS_CDASH_SERVER "http://open.cdash.org")
395 if(CMake_TEST_EXTERNAL_CMAKE)
396 set(KWIML_TEST_ENABLE 1)
397 add_subdirectory(Utilities/KWIML)
400 if(NOT CMake_TEST_EXTERNAL_CMAKE)
401 find_package(Threads)
402 # build the utilities
403 include(CMakeBuildUtilities)
407 set(CMAKE_BUNDLE_VERSION
408 "${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}.${CMake_VERSION_PATCH}")
409 set(CMAKE_BUNDLE_LOCATION "${CMAKE_INSTALL_PREFIX}")
410 # make sure CMAKE_INSTALL_PREFIX ends in /
411 if(NOT CMAKE_INSTALL_PREFIX MATCHES "/$")
412 string(APPEND CMAKE_INSTALL_PREFIX "/")
414 string(APPEND CMAKE_INSTALL_PREFIX "CMake.app/Contents")
419 # Install executables with the RPATH set for libraries outside the build tree.
420 # This is also suitable for binaries in the build tree. Avoid re-link on install.
421 set(CMAKE_INSTALL_RPATH_USE_LINK_PATH ON CACHE BOOL "Install with RPATH set to find custom-built libraries.")
422 set(CMAKE_BUILD_WITH_INSTALL_RPATH ON CACHE BOOL "Build with RPATH set to match install-tree RPATH.")
423 mark_as_advanced(CMAKE_INSTALL_RPATH_USE_LINK_PATH CMAKE_BUILD_WITH_INSTALL_RPATH)
426 # add the uninstall support
427 configure_file(cmake_uninstall.cmake.in cmake_uninstall.cmake @ONLY)
428 add_custom_target(uninstall
429 "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake")
431 include(CMakeCPack.cmake)
435 # setup some Testing support (a macro defined in this file)
436 CMAKE_SETUP_TESTING()
438 if(NOT CMake_TEST_EXTERNAL_CMAKE)
439 if(NOT CMake_VERSION_IS_RELEASE)
440 if((CMAKE_C_COMPILER_ID STREQUAL "GNU" AND
441 NOT "${CMAKE_C_COMPILER_VERSION}" VERSION_LESS 4.2) OR
442 (CMAKE_C_COMPILER_ID STREQUAL "Clang" AND
443 NOT "${CMAKE_C_COMPILER_VERSION}" VERSION_LESS 3.0 AND
444 NOT "x${CMAKE_C_SIMULATE_ID}" STREQUAL "xMSVC") OR
445 CMAKE_C_COMPILER_ID STREQUAL "AppleClang" OR
446 CMAKE_C_COMPILER_ID STREQUAL "LCC")
447 set(C_FLAGS_LIST -Wcast-align -Werror-implicit-function-declaration -Wchar-subscripts
448 -Wall -W -Wpointer-arith -Wwrite-strings -Wformat-security
449 -Wmissing-format-attribute -fno-common -Wundef
451 set(CXX_FLAGS_LIST -Wnon-virtual-dtor -Wcast-align -Wchar-subscripts -Wall -W
452 -Wshadow -Wpointer-arith -Wformat-security -Wundef
455 foreach(FLAG_LANG IN ITEMS C CXX)
456 foreach(FLAG IN LISTS ${FLAG_LANG}_FLAGS_LIST)
457 if(NOT " ${CMAKE_${FLAG_LANG}_FLAGS} " MATCHES " ${FLAG} ")
458 string(APPEND CMAKE_${FLAG_LANG}_FLAGS " ${FLAG}")
464 unset(CXX_FLAGS_LIST)
468 # build the remaining subdirectories
469 add_subdirectory(Source)
470 add_subdirectory(Utilities)
473 add_subdirectory(Tests)
475 if(NOT CMake_TEST_EXTERNAL_CMAKE)
477 CMAKE_SET_TARGET_FOLDER(CMakeLibTests "Tests")
479 if(TARGET documentation)
480 CMAKE_SET_TARGET_FOLDER(documentation "Documentation")
485 add_test(SystemInformationNew "${CMAKE_CMAKE_COMMAND}"
486 --system-information -G "${CMAKE_GENERATOR}"
490 if(NOT CMake_TEST_EXTERNAL_CMAKE)
491 # Install license file as it requires.
492 install(FILES Copyright.txt DESTINATION ${CMAKE_DOC_DIR})
494 # Install script directories.
496 DIRECTORY Help Modules Templates
497 DESTINATION ${CMAKE_DATA_DIR}
498 FILE_PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
499 DIRECTORY_PERMISSIONS OWNER_READ OWNER_EXECUTE OWNER_WRITE
500 GROUP_READ GROUP_EXECUTE
501 WORLD_READ WORLD_EXECUTE
502 PATTERN "*.sh*" PERMISSIONS OWNER_READ OWNER_EXECUTE OWNER_WRITE
503 GROUP_READ GROUP_EXECUTE
504 WORLD_READ WORLD_EXECUTE
505 REGEX "/(ExportImportList|cpp)$"
506 PERMISSIONS OWNER_READ OWNER_EXECUTE OWNER_WRITE
507 GROUP_READ GROUP_EXECUTE
508 WORLD_READ WORLD_EXECUTE
509 REGEX "Help/(dev|guide)($|/)" EXCLUDE
512 # Install auxiliary files integrating with other tools.
513 add_subdirectory(Auxiliary)
515 # Optionally sign installed binaries.
516 if(CMake_INSTALL_SIGNTOOL)
517 configure_file(Source/CMakeInstallSignTool.cmake.in Source/CMakeInstallSignTool.cmake @ONLY)
518 install(SCRIPT ${CMAKE_CURRENT_BINARY_DIR}/Source/CMakeInstallSignTool.cmake)