CMakeLists.txt 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846
  1. # Distributed under the OSI-approved BSD 3-Clause License. See accompanying
  2. # file Copyright.txt or https://cmake.org/licensing for details.
  3. cmake_minimum_required(VERSION 2.8.12.2 FATAL_ERROR)
  4. if(POLICY CMP0025)
  5. cmake_policy(SET CMP0025 NEW)
  6. endif()
  7. if(POLICY CMP0053)
  8. cmake_policy(SET CMP0053 NEW)
  9. endif()
  10. project(CMake)
  11. # Make sure we can find internal find_package modules only used for
  12. # building CMake and not for shipping externally
  13. list(INSERT CMAKE_MODULE_PATH 0 ${CMake_SOURCE_DIR}/Source/Modules)
  14. if(CMAKE_BOOTSTRAP)
  15. # Running from bootstrap script. Set local variable and remove from cache.
  16. set(CMAKE_BOOTSTRAP 1)
  17. unset(CMAKE_BOOTSTRAP CACHE)
  18. endif()
  19. if(NOT CMake_TEST_EXTERNAL_CMAKE)
  20. if(CMAKE_SYSTEM_NAME STREQUAL "HP-UX")
  21. message(FATAL_ERROR
  22. "CMake no longer compiles on HP-UX. See\n"
  23. " https://gitlab.kitware.com/cmake/cmake/issues/17137\n"
  24. "Use CMake 3.9 or lower instead."
  25. )
  26. endif()
  27. set(CMake_BIN_DIR ${CMake_BINARY_DIR}/bin)
  28. endif()
  29. if(CMake_GUI_DISTRIBUTE_WITH_Qt_LGPL)
  30. if(CMake_GUI_DISTRIBUTE_WITH_Qt_LGPL MATCHES "^3|2\\.1$")
  31. set(USE_LGPL "${CMake_GUI_DISTRIBUTE_WITH_Qt_LGPL}")
  32. else()
  33. set(USE_LGPL "2.1")
  34. endif()
  35. else()
  36. set(USE_LGPL "")
  37. endif()
  38. if("${CMake_SOURCE_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}")
  39. # Disallow architecture-specific try_run. It may not run on the host.
  40. macro(TRY_RUN)
  41. if(CMAKE_TRY_COMPILE_OSX_ARCHITECTURES)
  42. message(FATAL_ERROR "TRY_RUN not allowed with CMAKE_TRY_COMPILE_OSX_ARCHITECTURES=[${CMAKE_TRY_COMPILE_OSX_ARCHITECTURES}]")
  43. else()
  44. _TRY_RUN(${ARGV})
  45. endif()
  46. endmacro()
  47. endif()
  48. # Use most-recent available language dialects with GNU and Clang
  49. if(NOT DEFINED CMAKE_C_STANDARD AND NOT CMake_NO_C_STANDARD)
  50. include(${CMake_SOURCE_DIR}/Source/Checks/cm_c11_thread_local.cmake)
  51. if(NOT CMake_C11_THREAD_LOCAL_BROKEN)
  52. set(CMAKE_C_STANDARD 11)
  53. else()
  54. set(CMAKE_C_STANDARD 99)
  55. endif()
  56. endif()
  57. if(NOT DEFINED CMAKE_CXX_STANDARD AND NOT CMake_NO_CXX_STANDARD)
  58. if (CMAKE_CXX_COMPILER_ID STREQUAL SunPro AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.14)
  59. set(CMAKE_CXX_STANDARD 98)
  60. else()
  61. include(${CMake_SOURCE_DIR}/Source/Checks/cm_cxx14_cstdio.cmake)
  62. if(NOT CMake_CXX14_CSTDIO_BROKEN)
  63. set(CMAKE_CXX_STANDARD 14)
  64. else()
  65. set(CMAKE_CXX_STANDARD 11)
  66. endif()
  67. endif()
  68. endif()
  69. if(NOT CMake_TEST_EXTERNAL_CMAKE)
  70. # include special compile flags for some compilers
  71. include(CompileFlags.cmake)
  72. # check for available C++ features
  73. include(${CMake_SOURCE_DIR}/Source/Checks/cm_cxx_features.cmake)
  74. endif()
  75. # set the internal encoding of CMake to UTF-8
  76. set(KWSYS_ENCODING_DEFAULT_CODEPAGE CP_UTF8)
  77. # option to use COMPONENT with install command
  78. option(CMake_INSTALL_COMPONENTS "Using components when installing" OFF)
  79. mark_as_advanced(CMake_INSTALL_COMPONENTS)
  80. macro(CMake_OPTIONAL_COMPONENT NAME)
  81. if(CMake_INSTALL_COMPONENTS)
  82. set(COMPONENT COMPONENT ${NAME})
  83. else()
  84. set(COMPONENT)
  85. endif()
  86. endmacro()
  87. # option to disable installing 3rd-party dependencies
  88. option(CMake_INSTALL_DEPENDENCIES
  89. "Whether to install 3rd-party runtime dependencies" OFF)
  90. mark_as_advanced(CMake_INSTALL_DEPENDENCIES)
  91. # option to build reference for CMake developers
  92. option(CMake_BUILD_DEVELOPER_REFERENCE
  93. "Build CMake Developer Reference" OFF)
  94. mark_as_advanced(CMake_BUILD_DEVELOPER_REFERENCE)
  95. #-----------------------------------------------------------------------
  96. # a macro to deal with system libraries, implemented as a macro
  97. # simply to improve readability of the main script
  98. #-----------------------------------------------------------------------
  99. macro(CMAKE_HANDLE_SYSTEM_LIBRARIES)
  100. # Options have dependencies.
  101. include(CMakeDependentOption)
  102. # Optionally use system xmlrpc. We no longer build or use it by default.
  103. option(CTEST_USE_XMLRPC "Enable xmlrpc submission method in CTest." OFF)
  104. mark_as_advanced(CTEST_USE_XMLRPC)
  105. # Allow the user to enable/disable all system utility library options by
  106. # defining CMAKE_USE_SYSTEM_LIBRARIES or CMAKE_USE_SYSTEM_LIBRARY_${util}.
  107. set(UTILITIES BZIP2 CURL EXPAT FORM JSONCPP LIBARCHIVE LIBLZMA LIBRHASH LIBUV ZLIB)
  108. foreach(util ${UTILITIES})
  109. if(NOT DEFINED CMAKE_USE_SYSTEM_LIBRARY_${util}
  110. AND DEFINED CMAKE_USE_SYSTEM_LIBRARIES)
  111. set(CMAKE_USE_SYSTEM_LIBRARY_${util} "${CMAKE_USE_SYSTEM_LIBRARIES}")
  112. endif()
  113. if(DEFINED CMAKE_USE_SYSTEM_LIBRARY_${util})
  114. if(CMAKE_USE_SYSTEM_LIBRARY_${util})
  115. set(CMAKE_USE_SYSTEM_LIBRARY_${util} ON)
  116. else()
  117. set(CMAKE_USE_SYSTEM_LIBRARY_${util} OFF)
  118. endif()
  119. if(CMAKE_BOOTSTRAP)
  120. unset(CMAKE_USE_SYSTEM_LIBRARY_${util} CACHE)
  121. endif()
  122. string(TOLOWER "${util}" lutil)
  123. set(CMAKE_USE_SYSTEM_${util} "${CMAKE_USE_SYSTEM_LIBRARY_${util}}"
  124. CACHE BOOL "Use system-installed ${lutil}" FORCE)
  125. else()
  126. set(CMAKE_USE_SYSTEM_LIBRARY_${util} OFF)
  127. endif()
  128. endforeach()
  129. if(CMAKE_BOOTSTRAP)
  130. unset(CMAKE_USE_SYSTEM_LIBRARIES CACHE)
  131. endif()
  132. # Optionally use system utility libraries.
  133. option(CMAKE_USE_SYSTEM_LIBARCHIVE "Use system-installed libarchive" "${CMAKE_USE_SYSTEM_LIBRARY_LIBARCHIVE}")
  134. CMAKE_DEPENDENT_OPTION(CMAKE_USE_SYSTEM_CURL "Use system-installed curl"
  135. "${CMAKE_USE_SYSTEM_LIBRARY_CURL}" "NOT CTEST_USE_XMLRPC" ON)
  136. CMAKE_DEPENDENT_OPTION(CMAKE_USE_SYSTEM_EXPAT "Use system-installed expat"
  137. "${CMAKE_USE_SYSTEM_LIBRARY_EXPAT}" "NOT CTEST_USE_XMLRPC" ON)
  138. CMAKE_DEPENDENT_OPTION(CMAKE_USE_SYSTEM_ZLIB "Use system-installed zlib"
  139. "${CMAKE_USE_SYSTEM_LIBRARY_ZLIB}" "NOT CMAKE_USE_SYSTEM_LIBARCHIVE;NOT CMAKE_USE_SYSTEM_CURL" ON)
  140. CMAKE_DEPENDENT_OPTION(CMAKE_USE_SYSTEM_BZIP2 "Use system-installed bzip2"
  141. "${CMAKE_USE_SYSTEM_LIBRARY_BZIP2}" "NOT CMAKE_USE_SYSTEM_LIBARCHIVE" ON)
  142. CMAKE_DEPENDENT_OPTION(CMAKE_USE_SYSTEM_LIBLZMA "Use system-installed liblzma"
  143. "${CMAKE_USE_SYSTEM_LIBRARY_LIBLZMA}" "NOT CMAKE_USE_SYSTEM_LIBARCHIVE" ON)
  144. option(CMAKE_USE_SYSTEM_FORM "Use system-installed libform" "${CMAKE_USE_SYSTEM_LIBRARY_FORM}")
  145. option(CMAKE_USE_SYSTEM_JSONCPP "Use system-installed jsoncpp" "${CMAKE_USE_SYSTEM_LIBRARY_JSONCPP}")
  146. option(CMAKE_USE_SYSTEM_LIBRHASH "Use system-installed librhash" "${CMAKE_USE_SYSTEM_LIBRARY_LIBRHASH}")
  147. option(CMAKE_USE_SYSTEM_LIBUV "Use system-installed libuv" "${CMAKE_USE_SYSTEM_LIBRARY_LIBUV}")
  148. # For now use system KWIML only if explicitly requested rather
  149. # than activating via the general system libs options.
  150. option(CMAKE_USE_SYSTEM_KWIML "Use system-installed KWIML" OFF)
  151. mark_as_advanced(CMAKE_USE_SYSTEM_KWIML)
  152. # Mention to the user what system libraries are being used.
  153. foreach(util ${UTILITIES} KWIML)
  154. if(CMAKE_USE_SYSTEM_${util})
  155. message(STATUS "Using system-installed ${util}")
  156. endif()
  157. endforeach()
  158. # Inform utility library header wrappers whether to use system versions.
  159. configure_file(${CMake_SOURCE_DIR}/Utilities/cmThirdParty.h.in
  160. ${CMake_BINARY_DIR}/Utilities/cmThirdParty.h
  161. @ONLY)
  162. endmacro()
  163. #-----------------------------------------------------------------------
  164. # a macro to determine the generator and ctest executable to use
  165. # for testing. Simply to improve readability of the main script.
  166. #-----------------------------------------------------------------------
  167. macro(CMAKE_SETUP_TESTING)
  168. if(BUILD_TESTING)
  169. set(CMAKE_TEST_SYSTEM_LIBRARIES 0)
  170. foreach(util CURL EXPAT XMLRPC ZLIB)
  171. if(CMAKE_USE_SYSTEM_${util})
  172. set(CMAKE_TEST_SYSTEM_LIBRARIES 1)
  173. endif()
  174. endforeach()
  175. # This variable is set by cmake, however to
  176. # test cmake we want to make sure that
  177. # the ctest from this cmake is used for testing
  178. # and not the ctest from the cmake building and testing
  179. # cmake.
  180. if(CMake_TEST_EXTERNAL_CMAKE)
  181. set(CMAKE_CTEST_COMMAND "${CMake_TEST_EXTERNAL_CMAKE}/ctest")
  182. set(CMAKE_CMAKE_COMMAND "${CMake_TEST_EXTERNAL_CMAKE}/cmake")
  183. set(CMAKE_CPACK_COMMAND "${CMake_TEST_EXTERNAL_CMAKE}/cpack")
  184. foreach(exe cmake ctest cpack)
  185. add_executable(${exe} IMPORTED)
  186. set_property(TARGET ${exe} PROPERTY IMPORTED_LOCATION ${CMake_TEST_EXTERNAL_CMAKE}/${exe})
  187. endforeach()
  188. else()
  189. set(CMAKE_CTEST_COMMAND "${CMake_BIN_DIR}/ctest")
  190. set(CMAKE_CMAKE_COMMAND "${CMake_BIN_DIR}/cmake")
  191. set(CMAKE_CPACK_COMMAND "${CMake_BIN_DIR}/cpack")
  192. endif()
  193. endif()
  194. # configure some files for testing
  195. configure_file("${CMAKE_CURRENT_SOURCE_DIR}/Templates/CTestScript.cmake.in"
  196. "${CMAKE_CURRENT_BINARY_DIR}/CTestScript.cmake"
  197. @ONLY)
  198. configure_file(${CMake_SOURCE_DIR}/Tests/.NoDartCoverage
  199. ${CMake_BINARY_DIR}/Tests/.NoDartCoverage)
  200. configure_file(${CMake_SOURCE_DIR}/Tests/.NoDartCoverage
  201. ${CMake_BINARY_DIR}/Modules/.NoDartCoverage)
  202. configure_file(${CMake_SOURCE_DIR}/CTestCustom.cmake.in
  203. ${CMake_BINARY_DIR}/CTestCustom.cmake @ONLY)
  204. if(BUILD_TESTING AND DART_ROOT)
  205. configure_file(${CMake_SOURCE_DIR}/CMakeLogo.gif
  206. ${CMake_BINARY_DIR}/Testing/HTML/TestingResults/Icons/Logo.gif COPYONLY)
  207. endif()
  208. mark_as_advanced(DART_ROOT)
  209. mark_as_advanced(CURL_TESTING)
  210. endmacro()
  211. # Provide a way for Visual Studio Express users to turn OFF the new FOLDER
  212. # organization feature. Default to ON for non-Express users. Express users must
  213. # explicitly turn off this option to build CMake in the Express IDE...
  214. #
  215. option(CMAKE_USE_FOLDERS "Enable folder grouping of projects in IDEs." ON)
  216. mark_as_advanced(CMAKE_USE_FOLDERS)
  217. option(CMake_RUN_CLANG_TIDY "Run clang-tidy with the compiler." OFF)
  218. if(CMake_RUN_CLANG_TIDY)
  219. if(CMake_SOURCE_DIR STREQUAL CMake_BINARY_DIR)
  220. message(FATAL_ERROR "CMake_RUN_CLANG_TIDY requires an out-of-source build!")
  221. endif()
  222. find_program(CLANG_TIDY_COMMAND NAMES clang-tidy)
  223. if(NOT CLANG_TIDY_COMMAND)
  224. message(FATAL_ERROR "CMake_RUN_CLANG_TIDY is ON but clang-tidy is not found!")
  225. endif()
  226. set(CMAKE_CXX_CLANG_TIDY "${CLANG_TIDY_COMMAND}")
  227. endif()
  228. configure_file(.clang-tidy .clang-tidy COPYONLY)
  229. option(CMake_RUN_IWYU "Run include-what-you-use with the compiler." OFF)
  230. if(CMake_RUN_IWYU)
  231. find_program(IWYU_COMMAND NAMES include-what-you-use iwyu)
  232. if(NOT IWYU_COMMAND)
  233. message(FATAL_ERROR "CMake_RUN_IWYU is ON but include-what-you-use is not found!")
  234. endif()
  235. set(CMAKE_CXX_INCLUDE_WHAT_YOU_USE
  236. "${IWYU_COMMAND};-Xiwyu;--mapping_file=${CMake_SOURCE_DIR}/Utilities/IWYU/mapping.imp")
  237. endif()
  238. #-----------------------------------------------------------------------
  239. # a macro that only sets the FOLDER target property if it's
  240. # "appropriate"
  241. #-----------------------------------------------------------------------
  242. macro(CMAKE_SET_TARGET_FOLDER tgt folder)
  243. if(CMAKE_USE_FOLDERS)
  244. set_property(GLOBAL PROPERTY USE_FOLDERS ON)
  245. if(MSVC AND TARGET ${tgt})
  246. set_property(TARGET "${tgt}" PROPERTY FOLDER "${folder}")
  247. endif()
  248. else()
  249. set_property(GLOBAL PROPERTY USE_FOLDERS OFF)
  250. endif()
  251. endmacro()
  252. #-----------------------------------------------------------------------
  253. # a macro to build the utilities used by CMake
  254. # Simply to improve readability of the main script.
  255. #-----------------------------------------------------------------------
  256. macro (CMAKE_BUILD_UTILITIES)
  257. #---------------------------------------------------------------------
  258. # Create the kwsys library for CMake.
  259. set(KWSYS_NAMESPACE cmsys)
  260. set(KWSYS_USE_SystemTools 1)
  261. set(KWSYS_USE_Directory 1)
  262. set(KWSYS_USE_RegularExpression 1)
  263. set(KWSYS_USE_Base64 1)
  264. set(KWSYS_USE_MD5 1)
  265. set(KWSYS_USE_Process 1)
  266. set(KWSYS_USE_CommandLineArguments 1)
  267. set(KWSYS_USE_ConsoleBuf 1)
  268. set(KWSYS_HEADER_ROOT ${CMake_BINARY_DIR}/Source)
  269. set(KWSYS_INSTALL_DOC_DIR "${CMAKE_DOC_DIR}")
  270. add_subdirectory(Source/kwsys)
  271. set(kwsys_folder "Utilities/KWSys")
  272. CMAKE_SET_TARGET_FOLDER(${KWSYS_NAMESPACE} "${kwsys_folder}")
  273. CMAKE_SET_TARGET_FOLDER(${KWSYS_NAMESPACE}_c "${kwsys_folder}")
  274. if(BUILD_TESTING)
  275. CMAKE_SET_TARGET_FOLDER(${KWSYS_NAMESPACE}TestDynload "${kwsys_folder}")
  276. CMAKE_SET_TARGET_FOLDER(${KWSYS_NAMESPACE}TestProcess "${kwsys_folder}")
  277. CMAKE_SET_TARGET_FOLDER(${KWSYS_NAMESPACE}TestsC "${kwsys_folder}")
  278. CMAKE_SET_TARGET_FOLDER(${KWSYS_NAMESPACE}TestsCxx "${kwsys_folder}")
  279. CMAKE_SET_TARGET_FOLDER(${KWSYS_NAMESPACE}TestSharedForward "${kwsys_folder}")
  280. endif()
  281. #---------------------------------------------------------------------
  282. # Setup third-party libraries.
  283. # Everything in the tree should be able to include files from the
  284. # Utilities directory.
  285. include_directories(
  286. ${CMake_BINARY_DIR}/Utilities
  287. ${CMake_SOURCE_DIR}/Utilities
  288. )
  289. # check for the use of system libraries versus builtin ones
  290. # (a macro defined in this file)
  291. CMAKE_HANDLE_SYSTEM_LIBRARIES()
  292. if(CMAKE_USE_SYSTEM_KWIML)
  293. find_package(KWIML 1.0)
  294. if(NOT KWIML_FOUND)
  295. message(FATAL_ERROR "CMAKE_USE_SYSTEM_KWIML is ON but KWIML is not found!")
  296. endif()
  297. set(CMake_KWIML_LIBRARIES kwiml::kwiml)
  298. else()
  299. set(CMake_KWIML_LIBRARIES "")
  300. if(BUILD_TESTING)
  301. set(KWIML_TEST_ENABLE 1)
  302. endif()
  303. add_subdirectory(Utilities/KWIML)
  304. endif()
  305. if(CMAKE_USE_SYSTEM_LIBRHASH)
  306. if(NOT CMAKE_VERSION VERSION_LESS 3.0)
  307. find_package(LibRHash)
  308. else()
  309. message(FATAL_ERROR "CMAKE_USE_SYSTEM_LIBRHASH requires CMake >= 3.0")
  310. endif()
  311. if(NOT LibRHash_FOUND)
  312. message(FATAL_ERROR
  313. "CMAKE_USE_SYSTEM_LIBRHASH is ON but LibRHash is not found!")
  314. endif()
  315. set(CMAKE_LIBRHASH_LIBRARIES LibRHash::LibRHash)
  316. else()
  317. set(CMAKE_LIBRHASH_LIBRARIES cmlibrhash)
  318. add_subdirectory(Utilities/cmlibrhash)
  319. CMAKE_SET_TARGET_FOLDER(cmlibrhash "Utilities/3rdParty")
  320. endif()
  321. #---------------------------------------------------------------------
  322. # Build zlib library for Curl, CMake, and CTest.
  323. set(CMAKE_ZLIB_HEADER "cm_zlib.h")
  324. if(CMAKE_USE_SYSTEM_ZLIB)
  325. find_package(ZLIB)
  326. if(NOT ZLIB_FOUND)
  327. message(FATAL_ERROR
  328. "CMAKE_USE_SYSTEM_ZLIB is ON but a zlib is not found!")
  329. endif()
  330. set(CMAKE_ZLIB_INCLUDES ${ZLIB_INCLUDE_DIR})
  331. set(CMAKE_ZLIB_LIBRARIES ${ZLIB_LIBRARIES})
  332. else()
  333. set(CMAKE_ZLIB_INCLUDES ${CMake_SOURCE_DIR}/Utilities)
  334. set(CMAKE_ZLIB_LIBRARIES cmzlib)
  335. add_subdirectory(Utilities/cmzlib)
  336. CMAKE_SET_TARGET_FOLDER(cmzlib "Utilities/3rdParty")
  337. endif()
  338. #---------------------------------------------------------------------
  339. # Build Curl library for CTest.
  340. if(CMAKE_USE_SYSTEM_CURL)
  341. find_package(CURL)
  342. if(NOT CURL_FOUND)
  343. message(FATAL_ERROR
  344. "CMAKE_USE_SYSTEM_CURL is ON but a curl is not found!")
  345. endif()
  346. set(CMAKE_CURL_INCLUDES ${CURL_INCLUDE_DIRS})
  347. set(CMAKE_CURL_LIBRARIES ${CURL_LIBRARIES})
  348. else()
  349. set(CURL_SPECIAL_ZLIB_H ${CMAKE_ZLIB_HEADER})
  350. set(CURL_SPECIAL_LIBZ_INCLUDES ${CMAKE_ZLIB_INCLUDES})
  351. set(CURL_SPECIAL_LIBZ ${CMAKE_ZLIB_LIBRARIES})
  352. add_definitions(-DCURL_STATICLIB)
  353. set(CMAKE_CURL_INCLUDES)
  354. set(CMAKE_CURL_LIBRARIES cmcurl)
  355. if(CMAKE_TESTS_CDASH_SERVER)
  356. set(CMAKE_CURL_TEST_URL "${CMAKE_TESTS_CDASH_SERVER}/user.php")
  357. endif()
  358. set(_CMAKE_USE_OPENSSL_DEFAULT OFF)
  359. if(NOT DEFINED CMAKE_USE_OPENSSL AND NOT WIN32 AND NOT APPLE
  360. AND CMAKE_SYSTEM_NAME MATCHES "(Linux|FreeBSD)")
  361. find_package(OpenSSL QUIET)
  362. if(OPENSSL_FOUND)
  363. set(_CMAKE_USE_OPENSSL_DEFAULT ON)
  364. endif()
  365. endif()
  366. option(CMAKE_USE_OPENSSL "Use OpenSSL." ${_CMAKE_USE_OPENSSL_DEFAULT})
  367. mark_as_advanced(CMAKE_USE_OPENSSL)
  368. if(CMAKE_USE_OPENSSL)
  369. set(CURL_CA_BUNDLE "" CACHE FILEPATH "Path to SSL CA Certificate Bundle")
  370. set(CURL_CA_PATH "" CACHE PATH "Path to SSL CA Certificate Directory")
  371. mark_as_advanced(CURL_CA_BUNDLE CURL_CA_PATH)
  372. endif()
  373. add_subdirectory(Utilities/cmcurl)
  374. CMAKE_SET_TARGET_FOLDER(cmcurl "Utilities/3rdParty")
  375. CMAKE_SET_TARGET_FOLDER(LIBCURL "Utilities/3rdParty")
  376. endif()
  377. #---------------------------------------------------------------------
  378. # Build Compress library for CTest.
  379. set(CMAKE_COMPRESS_INCLUDES
  380. "${CMAKE_CURRENT_BINARY_DIR}/Utilities/cmcompress")
  381. set(CMAKE_COMPRESS_LIBRARIES "cmcompress")
  382. add_subdirectory(Utilities/cmcompress)
  383. CMAKE_SET_TARGET_FOLDER(cmcompress "Utilities/3rdParty")
  384. #---------------------------------------------------------------------
  385. # Build expat library for CMake, CTest, and libarchive.
  386. if(CMAKE_USE_SYSTEM_EXPAT)
  387. find_package(EXPAT)
  388. if(NOT EXPAT_FOUND)
  389. message(FATAL_ERROR
  390. "CMAKE_USE_SYSTEM_EXPAT is ON but a expat is not found!")
  391. endif()
  392. set(CMAKE_EXPAT_INCLUDES ${EXPAT_INCLUDE_DIRS})
  393. set(CMAKE_EXPAT_LIBRARIES ${EXPAT_LIBRARIES})
  394. else()
  395. set(CMAKE_EXPAT_INCLUDES)
  396. set(CMAKE_EXPAT_LIBRARIES cmexpat)
  397. add_subdirectory(Utilities/cmexpat)
  398. CMAKE_SET_TARGET_FOLDER(cmexpat "Utilities/3rdParty")
  399. endif()
  400. #---------------------------------------------------------------------
  401. # Build or use system libbz2 for libarchive.
  402. if(NOT CMAKE_USE_SYSTEM_LIBARCHIVE)
  403. if(CMAKE_USE_SYSTEM_BZIP2)
  404. find_package(BZip2)
  405. else()
  406. set(BZIP2_INCLUDE_DIR
  407. "${CMAKE_CURRENT_SOURCE_DIR}/Utilities/cmbzip2")
  408. set(BZIP2_LIBRARIES cmbzip2)
  409. add_subdirectory(Utilities/cmbzip2)
  410. CMAKE_SET_TARGET_FOLDER(cmbzip2 "Utilities/3rdParty")
  411. endif()
  412. endif()
  413. #---------------------------------------------------------------------
  414. # Build or use system liblzma for libarchive.
  415. if(NOT CMAKE_USE_SYSTEM_LIBARCHIVE)
  416. if(CMAKE_USE_SYSTEM_LIBLZMA)
  417. find_package(LibLZMA)
  418. if(NOT LIBLZMA_FOUND)
  419. message(FATAL_ERROR "CMAKE_USE_SYSTEM_LIBLZMA is ON but LibLZMA is not found!")
  420. endif()
  421. else()
  422. add_subdirectory(Utilities/cmliblzma)
  423. CMAKE_SET_TARGET_FOLDER(cmliblzma "Utilities/3rdParty")
  424. set(LIBLZMA_HAS_AUTO_DECODER 1)
  425. set(LIBLZMA_HAS_EASY_ENCODER 1)
  426. set(LIBLZMA_HAS_LZMA_PRESET 1)
  427. set(LIBLZMA_INCLUDE_DIR
  428. "${CMAKE_CURRENT_SOURCE_DIR}/Utilities/cmliblzma/liblzma/api")
  429. set(LIBLZMA_LIBRARY cmliblzma)
  430. endif()
  431. endif()
  432. #---------------------------------------------------------------------
  433. # Build or use system libarchive for CMake and CTest.
  434. if(CMAKE_USE_SYSTEM_LIBARCHIVE)
  435. find_package(LibArchive 3.0.0)
  436. if(NOT LibArchive_FOUND)
  437. message(FATAL_ERROR "CMAKE_USE_SYSTEM_LIBARCHIVE is ON but LibArchive is not found!")
  438. endif()
  439. set(CMAKE_TAR_INCLUDES ${LibArchive_INCLUDE_DIRS})
  440. set(CMAKE_TAR_LIBRARIES ${LibArchive_LIBRARIES})
  441. else()
  442. set(EXPAT_INCLUDE_DIR ${CMAKE_EXPAT_INCLUDES})
  443. set(EXPAT_LIBRARY ${CMAKE_EXPAT_LIBRARIES})
  444. set(ZLIB_INCLUDE_DIR ${CMAKE_ZLIB_INCLUDES})
  445. set(ZLIB_LIBRARY ${CMAKE_ZLIB_LIBRARIES})
  446. add_definitions(-DLIBARCHIVE_STATIC)
  447. set(ENABLE_NETTLE OFF CACHE INTERNAL "Enable use of Nettle")
  448. set(ENABLE_OPENSSL ${CMAKE_USE_OPENSSL} CACHE INTERNAL "Enable use of OpenSSL")
  449. set(ENABLE_LZMA ON CACHE INTERNAL "Enable the use of the system LZMA library if found")
  450. set(ENABLE_LZO OFF CACHE INTERNAL "Enable the use of the system LZO library if found")
  451. set(ENABLE_ZLIB ON CACHE INTERNAL "Enable the use of the system ZLIB library if found")
  452. set(ENABLE_BZip2 ON CACHE INTERNAL "Enable the use of the system BZip2 library if found")
  453. set(ENABLE_LIBXML2 OFF CACHE INTERNAL "Enable the use of the system libxml2 library if found")
  454. set(ENABLE_EXPAT ON CACHE INTERNAL "Enable the use of the system EXPAT library if found")
  455. set(ENABLE_PCREPOSIX OFF CACHE INTERNAL "Enable the use of the system PCREPOSIX library if found")
  456. set(ENABLE_LibGCC OFF CACHE INTERNAL "Enable the use of the system LibGCC library if found")
  457. set(ENABLE_XATTR OFF CACHE INTERNAL "Enable extended attribute support")
  458. set(ENABLE_ACL OFF CACHE INTERNAL "Enable ACL support")
  459. set(ENABLE_ICONV OFF CACHE INTERNAL "Enable iconv support")
  460. set(ENABLE_CNG OFF CACHE INTERNAL "Enable the use of CNG(Crypto Next Generation)")
  461. add_subdirectory(Utilities/cmlibarchive)
  462. CMAKE_SET_TARGET_FOLDER(cmlibarchive "Utilities/3rdParty")
  463. set(CMAKE_TAR_LIBRARIES cmlibarchive ${BZIP2_LIBRARIES})
  464. endif()
  465. #---------------------------------------------------------------------
  466. # Build jsoncpp library.
  467. if(CMAKE_USE_SYSTEM_JSONCPP)
  468. if(NOT CMAKE_VERSION VERSION_LESS 3.0)
  469. find_package(JsonCpp)
  470. else()
  471. message(FATAL_ERROR "CMAKE_USE_SYSTEM_JSONCPP requires CMake >= 3.0")
  472. endif()
  473. if(NOT JsonCpp_FOUND)
  474. message(FATAL_ERROR
  475. "CMAKE_USE_SYSTEM_JSONCPP is ON but a JsonCpp is not found!")
  476. endif()
  477. set(CMAKE_JSONCPP_LIBRARIES JsonCpp::JsonCpp)
  478. else()
  479. set(CMAKE_JSONCPP_LIBRARIES cmjsoncpp)
  480. add_subdirectory(Utilities/cmjsoncpp)
  481. CMAKE_SET_TARGET_FOLDER(cmjsoncpp "Utilities/3rdParty")
  482. endif()
  483. #---------------------------------------------------------------------
  484. # Build libuv library.
  485. if(NOT DEFINED CMAKE_USE_LIBUV)
  486. set(CMAKE_USE_LIBUV 1)
  487. if(APPLE)
  488. include(CheckCSourceCompiles)
  489. check_c_source_compiles("
  490. #include <CoreServices/CoreServices.h>
  491. #include <AvailabilityMacros.h>
  492. #ifndef MAC_OS_X_VERSION_10_5
  493. #error \"MAC_OS_X_VERSION_10_5 is not defined\"
  494. #endif
  495. int main(void) { return 0; }
  496. " HAVE_CoreServices_OS_X_10_5)
  497. if(NOT HAVE_CoreServices_OS_X_10_5)
  498. set(CMAKE_USE_LIBUV 0)
  499. endif()
  500. endif()
  501. endif()
  502. if(CMAKE_USE_LIBUV)
  503. if(CMAKE_USE_SYSTEM_LIBUV)
  504. if(NOT CMAKE_VERSION VERSION_LESS 3.0)
  505. find_package(LibUV 1.0.0)
  506. else()
  507. message(FATAL_ERROR "CMAKE_USE_SYSTEM_LIBUV requires CMake >= 3.0")
  508. endif()
  509. if(NOT LIBUV_FOUND)
  510. message(FATAL_ERROR
  511. "CMAKE_USE_SYSTEM_LIBUV is ON but a libuv is not found!")
  512. endif()
  513. set(CMAKE_LIBUV_LIBRARIES LibUV::LibUV)
  514. else()
  515. set(CMAKE_LIBUV_LIBRARIES cmlibuv)
  516. add_subdirectory(Utilities/cmlibuv)
  517. CMAKE_SET_TARGET_FOLDER(cmlibuv "Utilities/3rdParty")
  518. endif()
  519. else()
  520. set(CMAKE_LIBUV_LIBRARIES)
  521. endif()
  522. #---------------------------------------------------------------------
  523. # Build XMLRPC library for CMake and CTest.
  524. if(CTEST_USE_XMLRPC)
  525. find_package(XMLRPC QUIET REQUIRED libwww-client)
  526. if(NOT XMLRPC_FOUND)
  527. message(FATAL_ERROR
  528. "CTEST_USE_XMLRPC is ON but xmlrpc is not found!")
  529. endif()
  530. set(CMAKE_XMLRPC_INCLUDES ${XMLRPC_INCLUDE_DIRS})
  531. set(CMAKE_XMLRPC_LIBRARIES ${XMLRPC_LIBRARIES})
  532. endif()
  533. #---------------------------------------------------------------------
  534. # Use curses?
  535. if (UNIX)
  536. # there is a bug in the Syllable libraries which makes linking ccmake fail, Alex
  537. if(NOT CMAKE_SYSTEM_NAME MATCHES syllable)
  538. set(CURSES_NEED_NCURSES TRUE)
  539. find_package(Curses QUIET)
  540. if (CURSES_LIBRARY)
  541. option(BUILD_CursesDialog "Build the CMake Curses Dialog ccmake" ON)
  542. else ()
  543. message("Curses libraries were not found. Curses GUI for CMake will not be built.")
  544. set(BUILD_CursesDialog 0)
  545. endif ()
  546. else()
  547. set(BUILD_CursesDialog 0)
  548. endif()
  549. else ()
  550. set(BUILD_CursesDialog 0)
  551. endif ()
  552. if(BUILD_CursesDialog)
  553. if(NOT CMAKE_USE_SYSTEM_FORM)
  554. add_subdirectory(Source/CursesDialog/form)
  555. elseif(NOT CURSES_FORM_LIBRARY)
  556. message( FATAL_ERROR "CMAKE_USE_SYSTEM_FORM in ON but CURSES_FORM_LIBRARY is not set!" )
  557. endif()
  558. endif()
  559. endmacro ()
  560. #-----------------------------------------------------------------------
  561. if(NOT CMake_TEST_EXTERNAL_CMAKE)
  562. if(CMAKE_CXX_PLATFORM_ID MATCHES "OpenBSD")
  563. execute_process(COMMAND ${CMAKE_CXX_COMPILER}
  564. ${CMAKE_CXX_COMPILER_ARG1} -dumpversion
  565. OUTPUT_VARIABLE _GXX_VERSION
  566. )
  567. string(REGEX REPLACE "([0-9])\\.([0-9])(\\.[0-9])?" "\\1\\2"
  568. _GXX_VERSION_SHORT ${_GXX_VERSION})
  569. if(_GXX_VERSION_SHORT EQUAL 33)
  570. message(FATAL_ERROR
  571. "GXX 3.3 on OpenBSD is known to cause CPack to Crash.\n"
  572. "Please use GXX 4.2 or greater to build CMake on OpenBSD\n"
  573. "${CMAKE_CXX_COMPILER} version is: ${_GXX_VERSION}")
  574. endif()
  575. endif()
  576. endif()
  577. #-----------------------------------------------------------------------
  578. # The main section of the CMakeLists file
  579. #
  580. #-----------------------------------------------------------------------
  581. # Compute CMake_VERSION, etc.
  582. include(Source/CMakeVersionCompute.cmake)
  583. # Include the standard Dart testing module
  584. enable_testing()
  585. include (${CMAKE_ROOT}/Modules/Dart.cmake)
  586. # Set up test-time configuration.
  587. set_directory_properties(PROPERTIES
  588. TEST_INCLUDE_FILE "${CMake_BINARY_DIR}/Tests/EnforceConfig.cmake")
  589. if(NOT CMake_TEST_EXTERNAL_CMAKE)
  590. # where to write the resulting executables and libraries
  591. set(BUILD_SHARED_LIBS OFF)
  592. set(EXECUTABLE_OUTPUT_PATH "" CACHE INTERNAL "No configurable exe dir.")
  593. set(LIBRARY_OUTPUT_PATH "" CACHE INTERNAL
  594. "Where to put the libraries for CMake")
  595. # The CMake executables usually do not need any rpath to run in the build or
  596. # install tree.
  597. set(CMAKE_SKIP_RPATH ON CACHE INTERNAL "CMake does not need RPATHs.")
  598. # Load install destinations.
  599. include(Source/CMakeInstallDestinations.cmake)
  600. if(BUILD_TESTING)
  601. include(${CMake_SOURCE_DIR}/Tests/CMakeInstall.cmake)
  602. endif()
  603. # no clue why we are testing for this here
  604. include(CheckSymbolExists)
  605. CHECK_SYMBOL_EXISTS(unsetenv "stdlib.h" HAVE_UNSETENV)
  606. CHECK_SYMBOL_EXISTS(environ "stdlib.h" HAVE_ENVIRON_NOT_REQUIRE_PROTOTYPE)
  607. endif()
  608. # CMAKE_TESTS_CDASH_SERVER: CDash server used by CMake/Tests.
  609. #
  610. # If not defined or "", this variable defaults to the server at
  611. # "http://open.cdash.org".
  612. #
  613. # If set explicitly to "NOTFOUND", curl tests and ctest tests that use
  614. # the network are skipped.
  615. #
  616. # If set to something starting with "http://localhost/", the CDash is
  617. # expected to be an instance of CDash used for CDash testing, pointing
  618. # to a cdash4simpletest database. In these cases, the CDash dashboards
  619. # should be run first.
  620. #
  621. if("x${CMAKE_TESTS_CDASH_SERVER}" STREQUAL "x")
  622. set(CMAKE_TESTS_CDASH_SERVER "http://open.cdash.org")
  623. endif()
  624. if(CMake_TEST_EXTERNAL_CMAKE)
  625. set(KWIML_TEST_ENABLE 1)
  626. add_subdirectory(Utilities/KWIML)
  627. endif()
  628. if(NOT CMake_TEST_EXTERNAL_CMAKE)
  629. # build the utilities (a macro defined in this file)
  630. CMAKE_BUILD_UTILITIES()
  631. # On NetBSD ncurses is required, since curses doesn't have the wsyncup()
  632. # function. ncurses is installed via pkgsrc, so the library is in /usr/pkg/lib,
  633. # which isn't in the default linker search path. So without RPATH ccmake
  634. # doesn't run and the build doesn't succeed since ccmake is executed for
  635. # generating the documentation.
  636. if(BUILD_CursesDialog)
  637. get_filename_component(_CURSES_DIR "${CURSES_LIBRARY}" PATH)
  638. set(CURSES_NEED_RPATH FALSE)
  639. if(NOT "${_CURSES_DIR}" STREQUAL "/lib" AND NOT "${_CURSES_DIR}" STREQUAL "/usr/lib" AND NOT "${_CURSES_DIR}" STREQUAL "/lib64" AND NOT "${_CURSES_DIR}" STREQUAL "/usr/lib64")
  640. set(CURSES_NEED_RPATH TRUE)
  641. endif()
  642. endif()
  643. if(BUILD_QtDialog)
  644. if(APPLE)
  645. set(CMAKE_BUNDLE_VERSION
  646. "${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}.${CMake_VERSION_PATCH}")
  647. set(CMAKE_BUNDLE_LOCATION "${CMAKE_INSTALL_PREFIX}")
  648. # make sure CMAKE_INSTALL_PREFIX ends in /
  649. if(NOT CMAKE_INSTALL_PREFIX MATCHES "/$")
  650. set(CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/")
  651. endif()
  652. set(CMAKE_INSTALL_PREFIX
  653. "${CMAKE_INSTALL_PREFIX}CMake.app/Contents")
  654. endif()
  655. set(QT_NEED_RPATH FALSE)
  656. if(NOT "${QT_LIBRARY_DIR}" STREQUAL "/lib" AND NOT "${QT_LIBRARY_DIR}" STREQUAL "/usr/lib" AND NOT "${QT_LIBRARY_DIR}" STREQUAL "/lib64" AND NOT "${QT_LIBRARY_DIR}" STREQUAL "/usr/lib64")
  657. set(QT_NEED_RPATH TRUE)
  658. endif()
  659. endif()
  660. # The same might be true on other systems for other libraries.
  661. # Then only enable RPATH if we have are building at least with cmake 2.4,
  662. # since this one has much better RPATH features than cmake 2.2.
  663. # The executables are then built with the RPATH for the libraries outside
  664. # the build tree, which is both the build and the install RPATH.
  665. if (UNIX)
  666. if( CMAKE_USE_SYSTEM_CURL OR CMAKE_USE_SYSTEM_ZLIB
  667. OR CMAKE_USE_SYSTEM_EXPAT OR CTEST_USE_XMLRPC OR CURSES_NEED_RPATH OR QT_NEED_RPATH)
  668. set(CMAKE_SKIP_RPATH OFF CACHE INTERNAL "CMake built with RPATH.")
  669. set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
  670. set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
  671. endif()
  672. endif ()
  673. # add the uninstall support
  674. configure_file(
  675. "${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in"
  676. "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
  677. @ONLY)
  678. add_custom_target(uninstall
  679. "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake")
  680. include (CMakeCPack.cmake)
  681. endif()
  682. # setup some Testing support (a macro defined in this file)
  683. CMAKE_SETUP_TESTING()
  684. # Check whether to build server mode or not:
  685. if(NOT CMake_TEST_EXTERNAL_CMAKE)
  686. if(NOT DEFINED CMake_ENABLE_SERVER_MODE)
  687. list(FIND CMAKE_CXX_COMPILE_FEATURES cxx_auto_type CMake_HAVE_CXX_AUTO_TYPE)
  688. list(FIND CMAKE_CXX_COMPILE_FEATURES cxx_range_for CMake_HAVE_CXX_RANGE_FOR)
  689. if(CMAKE_USE_LIBUV
  690. AND CMake_HAVE_CXX_AUTO_TYPE
  691. AND CMake_HAVE_CXX_MAKE_UNIQUE
  692. AND CMake_HAVE_CXX_RANGE_FOR
  693. )
  694. set(CMake_ENABLE_SERVER_MODE 1)
  695. else()
  696. set(CMake_ENABLE_SERVER_MODE 0)
  697. endif()
  698. endif()
  699. if(CMake_ENABLE_SERVER_MODE AND NOT CMAKE_USE_LIBUV)
  700. message(FATAL_ERROR "The server mode requires libuv!")
  701. endif()
  702. else()
  703. set(CMake_ENABLE_SERVER_MODE 0)
  704. endif()
  705. if(NOT DEFINED CMake_TEST_SERVER_MODE)
  706. set(CMake_TEST_SERVER_MODE ${CMake_ENABLE_SERVER_MODE})
  707. endif()
  708. if(NOT CMake_TEST_EXTERNAL_CMAKE)
  709. if(NOT CMake_VERSION_IS_RELEASE)
  710. if(CMAKE_C_COMPILER_ID STREQUAL "GNU" AND
  711. NOT "${CMAKE_C_COMPILER_VERSION}" VERSION_LESS 4.2)
  712. set(C_FLAGS_LIST -Wcast-align -Werror-implicit-function-declaration -Wchar-subscripts
  713. -Wall -W -Wpointer-arith -Wwrite-strings -Wformat-security
  714. -Wmissing-format-attribute -fno-common -Wundef
  715. )
  716. set(CXX_FLAGS_LIST -Wnon-virtual-dtor -Wcast-align -Wchar-subscripts -Wall -W
  717. -Wshadow -Wpointer-arith -Wformat-security -Wundef
  718. )
  719. foreach(FLAG_LANG C CXX)
  720. foreach(FLAG ${${FLAG_LANG}_FLAGS_LIST})
  721. if(NOT " ${CMAKE_${FLAG_LANG}_FLAGS} " MATCHES " ${FLAG} ")
  722. set(CMAKE_${FLAG_LANG}_FLAGS "${CMAKE_${FLAG_LANG}_FLAGS} ${FLAG}")
  723. endif()
  724. endforeach()
  725. endforeach()
  726. unset(C_FLAGS_LIST)
  727. unset(CXX_FLAGS_LIST)
  728. endif()
  729. endif()
  730. # build the remaining subdirectories
  731. add_subdirectory(Source)
  732. add_subdirectory(Utilities)
  733. endif()
  734. add_subdirectory(Tests)
  735. if(NOT CMake_TEST_EXTERNAL_CMAKE)
  736. if(BUILD_TESTING)
  737. CMAKE_SET_TARGET_FOLDER(CMakeLibTests "Tests")
  738. endif()
  739. if(TARGET documentation)
  740. CMAKE_SET_TARGET_FOLDER(documentation "Documentation")
  741. endif()
  742. endif()
  743. # add a test
  744. add_test(SystemInformationNew "${CMAKE_CMAKE_COMMAND}"
  745. --system-information -G "${CMAKE_GENERATOR}" )
  746. if(NOT CMake_TEST_EXTERNAL_CMAKE)
  747. # Install license file as it requires.
  748. install(FILES Copyright.txt DESTINATION ${CMAKE_DOC_DIR})
  749. # Install script directories.
  750. install(
  751. DIRECTORY Help Modules Templates
  752. DESTINATION ${CMAKE_DATA_DIR}
  753. FILE_PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
  754. DIRECTORY_PERMISSIONS OWNER_READ OWNER_EXECUTE OWNER_WRITE
  755. GROUP_READ GROUP_EXECUTE
  756. WORLD_READ WORLD_EXECUTE
  757. PATTERN "*.sh*" PERMISSIONS OWNER_READ OWNER_EXECUTE OWNER_WRITE
  758. GROUP_READ GROUP_EXECUTE
  759. WORLD_READ WORLD_EXECUTE
  760. REGEX "Help/dev($|/)" EXCLUDE
  761. )
  762. # Install auxiliary files integrating with other tools.
  763. add_subdirectory(Auxiliary)
  764. endif()