CMakeLists.txt 37 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333
  1. # Distributed under the OSI-approved BSD 3-Clause License. See accompanying
  2. # file Copyright.txt or https://cmake.org/licensing for details.
  3. # To ensure maximum portability across various compilers and platforms
  4. # deactivate any compiler extensions. Skip this for QNX, where additional
  5. # work is needed to build without compiler extensions.
  6. if(NOT CMAKE_SYSTEM_NAME STREQUAL "QNX")
  7. set(CMAKE_C_EXTENSIONS FALSE)
  8. set(CMAKE_CXX_EXTENSIONS FALSE)
  9. endif()
  10. include(CheckIncludeFile)
  11. if(APPLE)
  12. set(CMake_USE_MACH_PARSER 1)
  13. endif()
  14. if(CMAKE_SYSTEM_NAME STREQUAL "AIX")
  15. set(CMake_USE_XCOFF_PARSER 1)
  16. endif()
  17. # Watcom support
  18. if(WIN32 OR CMAKE_SYSTEM_NAME STREQUAL "Linux" OR CMAKE_SYSTEM_NAME STREQUAL "Darwin")
  19. set(CMAKE_USE_WMAKE 1)
  20. endif()
  21. set(CMake_STAT_HAS_ST_MTIM ${KWSYS_CXX_STAT_HAS_ST_MTIM_COMPILED})
  22. set(CMake_STAT_HAS_ST_MTIMESPEC ${KWSYS_CXX_STAT_HAS_ST_MTIMESPEC_COMPILED})
  23. set(EXECUTABLE_OUTPUT_PATH ${CMake_BIN_DIR})
  24. if(WIN32)
  25. # ensure Unicode friendly APIs are used on Windows
  26. add_compile_definitions(UNICODE _UNICODE)
  27. # minimize windows.h content
  28. add_compile_definitions(WIN32_LEAN_AND_MEAN)
  29. endif()
  30. # configure the .dox.in file
  31. if(CMake_BUILD_DEVELOPER_REFERENCE)
  32. configure_file(dir.dox.in dir.dox @ONLY)
  33. endif()
  34. # configure the .h file
  35. configure_file(cmConfigure.cmake.h.in cmConfigure.h)
  36. configure_file(cmVersionConfig.h.in cmVersionConfig.h)
  37. # Tell CMake executable in the build tree where to find the source tree.
  38. configure_file(
  39. CMakeSourceDir.txt.in
  40. "${CMake_BINARY_DIR}/CMakeFiles/CMakeSourceDir.txt"
  41. @ONLY
  42. )
  43. # Add a dummy library and add sources later depends on condition
  44. add_library(ManifestLib INTERFACE)
  45. #
  46. # create a library used by the command line and the GUI
  47. #
  48. add_library(
  49. CMakeLib
  50. # Lexers/Parsers
  51. LexerParser/cmCommandArgumentLexer.cxx
  52. LexerParser/cmCommandArgumentLexer.h
  53. LexerParser/cmCommandArgumentLexer.in.l
  54. LexerParser/cmCommandArgumentParser.cxx
  55. LexerParser/cmCommandArgumentParserTokens.h
  56. LexerParser/cmCommandArgumentParser.y
  57. LexerParser/cmDependsJavaLexer.cxx
  58. LexerParser/cmDependsJavaLexer.h
  59. LexerParser/cmDependsJavaLexer.in.l
  60. LexerParser/cmDependsJavaParser.cxx
  61. LexerParser/cmDependsJavaParserTokens.h
  62. LexerParser/cmDependsJavaParser.y
  63. LexerParser/cmExprLexer.cxx
  64. LexerParser/cmExprLexer.h
  65. LexerParser/cmExprLexer.in.l
  66. LexerParser/cmExprParser.cxx
  67. LexerParser/cmExprParserTokens.h
  68. LexerParser/cmExprParser.y
  69. LexerParser/cmFortranLexer.cxx
  70. LexerParser/cmFortranLexer.h
  71. LexerParser/cmFortranLexer.in.l
  72. LexerParser/cmFortranParser.cxx
  73. LexerParser/cmFortranParserTokens.h
  74. LexerParser/cmFortranParser.y
  75. LexerParser/cmGccDepfileLexer.cxx
  76. LexerParser/cmGccDepfileLexer.h
  77. LexerParser/cmGccDepfileLexer.in.l
  78. LexerParser/cmListFileLexer.c
  79. LexerParser/cmListFileLexer.in.l
  80. cmAffinity.cxx
  81. cmAffinity.h
  82. cmAlgorithms.h
  83. cmArchiveWrite.cxx
  84. cmArgumentParser.cxx
  85. cmArgumentParser.h
  86. cmBase32.cxx
  87. cmBinUtilsLinker.cxx
  88. cmBinUtilsLinker.h
  89. cmBinUtilsLinuxELFGetRuntimeDependenciesTool.cxx
  90. cmBinUtilsLinuxELFGetRuntimeDependenciesTool.h
  91. cmBinUtilsLinuxELFLinker.cxx
  92. cmBinUtilsLinuxELFLinker.h
  93. cmBinUtilsLinuxELFObjdumpGetRuntimeDependenciesTool.cxx
  94. cmBinUtilsLinuxELFObjdumpGetRuntimeDependenciesTool.h
  95. cmBinUtilsMacOSMachOGetRuntimeDependenciesTool.cxx
  96. cmBinUtilsMacOSMachOGetRuntimeDependenciesTool.h
  97. cmBinUtilsMacOSMachOLinker.cxx
  98. cmBinUtilsMacOSMachOLinker.h
  99. cmBinUtilsMacOSMachOOToolGetRuntimeDependenciesTool.cxx
  100. cmBinUtilsMacOSMachOOToolGetRuntimeDependenciesTool.h
  101. cmBinUtilsWindowsPEDumpbinGetRuntimeDependenciesTool.cxx
  102. cmBinUtilsWindowsPEDumpbinGetRuntimeDependenciesTool.h
  103. cmBinUtilsWindowsPEGetRuntimeDependenciesTool.cxx
  104. cmBinUtilsWindowsPEGetRuntimeDependenciesTool.h
  105. cmBinUtilsWindowsPELinker.cxx
  106. cmBinUtilsWindowsPELinker.h
  107. cmBinUtilsWindowsPEObjdumpGetRuntimeDependenciesTool.cxx
  108. cmBinUtilsWindowsPEObjdumpGetRuntimeDependenciesTool.h
  109. cmBuildOptions.h
  110. cmCacheManager.cxx
  111. cmCacheManager.h
  112. cmCLocaleEnvironmentScope.h
  113. cmCLocaleEnvironmentScope.cxx
  114. cmCMakePath.h
  115. cmCMakePath.cxx
  116. cmCMakePresetsErrors.cxx
  117. cmCMakePresetsErrors.h
  118. cmCMakePresetsGraph.cxx
  119. cmCMakePresetsGraph.h
  120. cmCMakePresetsGraphInternal.h
  121. cmCMakePresetsGraphReadJSON.cxx
  122. cmCMakePresetsGraphReadJSONBuildPresets.cxx
  123. cmCMakePresetsGraphReadJSONConfigurePresets.cxx
  124. cmCMakePresetsGraphReadJSONPackagePresets.cxx
  125. cmCMakePresetsGraphReadJSONTestPresets.cxx
  126. cmCMakePresetsGraphReadJSONWorkflowPresets.cxx
  127. cmCommandArgumentParserHelper.cxx
  128. cmCommonTargetGenerator.cxx
  129. cmCommonTargetGenerator.h
  130. cmComputeComponentGraph.cxx
  131. cmComputeComponentGraph.h
  132. cmComputeLinkDepends.cxx
  133. cmComputeLinkDepends.h
  134. cmComputeLinkInformation.cxx
  135. cmComputeLinkInformation.h
  136. cmComputeTargetDepends.h
  137. cmComputeTargetDepends.cxx
  138. cmConfigureLog.h
  139. cmConfigureLog.cxx
  140. cmConsoleBuf.h
  141. cmConsoleBuf.cxx
  142. cmConstStack.h
  143. cmConstStack.tcc
  144. cmCPackPropertiesGenerator.h
  145. cmCPackPropertiesGenerator.cxx
  146. cmCryptoHash.cxx
  147. cmCryptoHash.h
  148. cmCurl.cxx
  149. cmCurl.h
  150. cmCustomCommand.cxx
  151. cmCustomCommand.h
  152. cmCustomCommandGenerator.cxx
  153. cmCustomCommandGenerator.h
  154. cmCustomCommandLines.cxx
  155. cmCustomCommandLines.h
  156. cmCustomCommandTypes.h
  157. cmCxxModuleMapper.cxx
  158. cmCxxModuleMapper.h
  159. cmDefinitions.cxx
  160. cmDefinitions.h
  161. cmDependencyProvider.h
  162. cmDepends.cxx
  163. cmDepends.h
  164. cmDependsC.cxx
  165. cmDependsC.h
  166. cmDependsFortran.cxx
  167. cmDependsFortran.h
  168. cmDependsJava.cxx
  169. cmDependsJava.h
  170. cmDependsJavaParserHelper.cxx
  171. cmDependsJavaParserHelper.h
  172. cmDependsCompiler.cxx
  173. cmDependsCompiler.h
  174. cmDocumentation.cxx
  175. cmDocumentationFormatter.cxx
  176. cmDynamicLoader.cxx
  177. cmDynamicLoader.h
  178. cmDyndepCollation.cxx
  179. cmDyndepCollation.h
  180. cmELF.h
  181. cmELF.cxx
  182. cmEvaluatedTargetProperty.cxx
  183. cmEvaluatedTargetProperty.h
  184. cmExprParserHelper.cxx
  185. cmExportBuildAndroidMKGenerator.h
  186. cmExportBuildAndroidMKGenerator.cxx
  187. cmExportBuildFileGenerator.h
  188. cmExportBuildFileGenerator.cxx
  189. cmExportFileGenerator.h
  190. cmExportFileGenerator.cxx
  191. cmExportInstallAndroidMKGenerator.h
  192. cmExportInstallAndroidMKGenerator.cxx
  193. cmExportInstallFileGenerator.h
  194. cmExportInstallFileGenerator.cxx
  195. cmExportTryCompileFileGenerator.h
  196. cmExportTryCompileFileGenerator.cxx
  197. cmExportSet.h
  198. cmExportSet.cxx
  199. cmExternalMakefileProjectGenerator.cxx
  200. cmExternalMakefileProjectGenerator.h
  201. cmExtraCodeBlocksGenerator.cxx
  202. cmExtraCodeBlocksGenerator.h
  203. cmExtraCodeLiteGenerator.cxx
  204. cmExtraCodeLiteGenerator.h
  205. cmExtraEclipseCDT4Generator.cxx
  206. cmExtraEclipseCDT4Generator.h
  207. cmExtraKateGenerator.cxx
  208. cmExtraKateGenerator.h
  209. cmExtraSublimeTextGenerator.cxx
  210. cmExtraSublimeTextGenerator.h
  211. cmFileAPI.cxx
  212. cmFileAPI.h
  213. cmFileAPICache.cxx
  214. cmFileAPICache.h
  215. cmFileAPICodemodel.cxx
  216. cmFileAPICodemodel.h
  217. cmFileAPIConfigureLog.cxx
  218. cmFileAPIConfigureLog.h
  219. cmFileAPICMakeFiles.cxx
  220. cmFileAPICMakeFiles.h
  221. cmFileAPICommand.cxx
  222. cmFileAPICommand.h
  223. cmFileAPIToolchains.cxx
  224. cmFileAPIToolchains.h
  225. cmFileCopier.cxx
  226. cmFileCopier.h
  227. cmFileInstaller.cxx
  228. cmFileInstaller.h
  229. cmFileLock.cxx
  230. cmFileLock.h
  231. cmFileLockPool.cxx
  232. cmFileLockPool.h
  233. cmFileLockResult.cxx
  234. cmFileLockResult.h
  235. cmFilePathChecksum.cxx
  236. cmFilePathChecksum.h
  237. cmFileSet.cxx
  238. cmFileSet.h
  239. cmFileTime.cxx
  240. cmFileTime.h
  241. cmFileTimeCache.cxx
  242. cmFileTimeCache.h
  243. cmFileTimes.cxx
  244. cmFileTimes.h
  245. cmFortranParserImpl.cxx
  246. cmFSPermissions.cxx
  247. cmFSPermissions.h
  248. cmGccDepfileLexerHelper.cxx
  249. cmGccDepfileLexerHelper.h
  250. cmGccDepfileReader.cxx
  251. cmGccDepfileReader.h
  252. cmGeneratedFileStream.cxx
  253. cmGeneratorExpressionContext.cxx
  254. cmGeneratorExpressionContext.h
  255. cmGeneratorExpressionDAGChecker.cxx
  256. cmGeneratorExpressionDAGChecker.h
  257. cmGeneratorExpressionEvaluationFile.cxx
  258. cmGeneratorExpressionEvaluationFile.h
  259. cmGeneratorExpressionEvaluator.cxx
  260. cmGeneratorExpressionEvaluator.h
  261. cmGeneratorExpressionLexer.cxx
  262. cmGeneratorExpressionLexer.h
  263. cmGeneratorExpressionNode.cxx
  264. cmGeneratorExpressionNode.h
  265. cmGeneratorExpressionParser.cxx
  266. cmGeneratorExpressionParser.h
  267. cmGeneratorExpression.cxx
  268. cmGeneratorExpression.h
  269. cmGeneratorTarget.cxx
  270. cmGeneratorTarget.h
  271. cmLinkItemGraphVisitor.cxx
  272. cmLinkItemGraphVisitor.h
  273. cmGetPipes.cxx
  274. cmGetPipes.h
  275. cmGlobalCommonGenerator.cxx
  276. cmGlobalCommonGenerator.h
  277. cmGlobalGenerator.cxx
  278. cmGlobalGenerator.h
  279. cmGlobalGeneratorFactory.h
  280. cmGlobalUnixMakefileGenerator3.cxx
  281. cmGlobalUnixMakefileGenerator3.h
  282. cmGlobVerificationManager.cxx
  283. cmGlobVerificationManager.h
  284. cmGraphAdjacencyList.h
  285. cmGraphVizWriter.cxx
  286. cmGraphVizWriter.h
  287. cmInstallGenerator.h
  288. cmInstallGenerator.cxx
  289. cmInstallGetRuntimeDependenciesGenerator.h
  290. cmInstallGetRuntimeDependenciesGenerator.cxx
  291. cmInstallExportGenerator.cxx
  292. cmInstalledFile.h
  293. cmInstalledFile.cxx
  294. cmInstallFileSetGenerator.h
  295. cmInstallFileSetGenerator.cxx
  296. cmInstallFilesGenerator.h
  297. cmInstallFilesGenerator.cxx
  298. cmInstallImportedRuntimeArtifactsGenerator.h
  299. cmInstallImportedRuntimeArtifactsGenerator.cxx
  300. cmInstallRuntimeDependencySet.h
  301. cmInstallRuntimeDependencySet.cxx
  302. cmInstallRuntimeDependencySetGenerator.h
  303. cmInstallRuntimeDependencySetGenerator.cxx
  304. cmInstallScriptGenerator.h
  305. cmInstallScriptGenerator.cxx
  306. cmInstallSubdirectoryGenerator.h
  307. cmInstallSubdirectoryGenerator.cxx
  308. cmInstallTargetGenerator.h
  309. cmInstallTargetGenerator.cxx
  310. cmInstallDirectoryGenerator.h
  311. cmInstallDirectoryGenerator.cxx
  312. cmJSONHelpers.cxx
  313. cmJSONHelpers.h
  314. cmJSONState.cxx
  315. cmJSONState.h
  316. cmLDConfigLDConfigTool.cxx
  317. cmLDConfigLDConfigTool.h
  318. cmLDConfigTool.cxx
  319. cmLDConfigTool.h
  320. cmLinkedTree.h
  321. cmLinkItem.cxx
  322. cmLinkItem.h
  323. cmLinkLineComputer.cxx
  324. cmLinkLineComputer.h
  325. cmLinkLineDeviceComputer.cxx
  326. cmLinkLineDeviceComputer.h
  327. cmList.h
  328. cmList.cxx
  329. cmListFileCache.cxx
  330. cmListFileCache.h
  331. cmLocalCommonGenerator.cxx
  332. cmLocalCommonGenerator.h
  333. cmLocalGenerator.cxx
  334. cmLocalGenerator.h
  335. cmPlaceholderExpander.cxx
  336. cmPlaceholderExpander.h
  337. cmRulePlaceholderExpander.cxx
  338. cmRulePlaceholderExpander.h
  339. cmLocalUnixMakefileGenerator3.cxx
  340. cmLocale.h
  341. cmMakefile.cxx
  342. cmMakefile.h
  343. cmMakefileTargetGenerator.cxx
  344. cmMakefileExecutableTargetGenerator.cxx
  345. cmMakefileLibraryTargetGenerator.cxx
  346. cmMakefileProfilingData.cxx
  347. cmMakefileUtilityTargetGenerator.cxx
  348. cmMessageType.h
  349. cmMessenger.cxx
  350. cmMessenger.h
  351. cmMSVC60LinkLineComputer.cxx
  352. cmMSVC60LinkLineComputer.h
  353. cmOSXBundleGenerator.cxx
  354. cmOSXBundleGenerator.h
  355. cmOutputConverter.cxx
  356. cmOutputConverter.h
  357. cmNewLineStyle.h
  358. cmNewLineStyle.cxx
  359. cmOrderDirectories.cxx
  360. cmOrderDirectories.h
  361. cmPlistParser.cxx
  362. cmPlistParser.h
  363. cmPolicies.h
  364. cmPolicies.cxx
  365. cmProcessOutput.cxx
  366. cmProcessOutput.h
  367. cmProcessTools.cxx
  368. cmProcessTools.h
  369. cmValue.cxx
  370. cmValue.h
  371. cmProperty.h
  372. cmPropertyDefinition.cxx
  373. cmPropertyDefinition.h
  374. cmPropertyMap.cxx
  375. cmPropertyMap.h
  376. cmQtAutoGen.cxx
  377. cmQtAutoGen.h
  378. cmQtAutoGenerator.cxx
  379. cmQtAutoGenerator.h
  380. cmQtAutoGenGlobalInitializer.cxx
  381. cmQtAutoGenGlobalInitializer.h
  382. cmQtAutoGenInitializer.cxx
  383. cmQtAutoGenInitializer.h
  384. cmQtAutoMocUic.cxx
  385. cmQtAutoMocUic.h
  386. cmQtAutoRcc.cxx
  387. cmQtAutoRcc.h
  388. cmRST.cxx
  389. cmRST.h
  390. cmRuntimeDependencyArchive.cxx
  391. cmRuntimeDependencyArchive.h
  392. cmScriptGenerator.h
  393. cmScriptGenerator.cxx
  394. cmSourceFile.cxx
  395. cmSourceFile.h
  396. cmSourceFileLocation.cxx
  397. cmSourceFileLocation.h
  398. cmSourceFileLocationKind.h
  399. cmSourceGroup.cxx
  400. cmSourceGroup.h
  401. cmStandardLevelResolver.cxx
  402. cmStandardLevelResolver.h
  403. cmState.cxx
  404. cmState.h
  405. cmStateDirectory.cxx
  406. cmStateDirectory.h
  407. cmStateSnapshot.cxx
  408. cmStateSnapshot.h
  409. cmStateTypes.h
  410. cmStringAlgorithms.cxx
  411. cmStringAlgorithms.h
  412. cmSystemTools.cxx
  413. cmSystemTools.h
  414. cmTarget.cxx
  415. cmTarget.h
  416. cmTargetPropertyComputer.cxx
  417. cmTargetPropertyComputer.h
  418. cmTargetExport.h
  419. cmTest.cxx
  420. cmTest.h
  421. cmTestGenerator.cxx
  422. cmTestGenerator.h
  423. cmTransformDepfile.cxx
  424. cmTransformDepfile.h
  425. cmUuid.cxx
  426. cmUVHandlePtr.cxx
  427. cmUVHandlePtr.h
  428. cmUVProcessChain.cxx
  429. cmUVProcessChain.h
  430. cmUVStream.h
  431. cmUVStreambuf.h
  432. cmUVSignalHackRAII.h
  433. cmVariableWatch.cxx
  434. cmVariableWatch.h
  435. cmVersion.cxx
  436. cmVersion.h
  437. cmWindowsRegistry.cxx
  438. cmWindowsRegistry.h
  439. cmWorkerPool.cxx
  440. cmWorkerPool.h
  441. cmWorkingDirectory.cxx
  442. cmWorkingDirectory.h
  443. cmXcFramework.cxx
  444. cmXcFramework.h
  445. cmXMLParser.cxx
  446. cmXMLParser.h
  447. cmXMLSafe.cxx
  448. cmXMLSafe.h
  449. cmXMLWriter.cxx
  450. cmXMLWriter.h
  451. cmake.cxx
  452. cmake.h
  453. cmCommand.cxx
  454. cmCommand.h
  455. cmCommands.cxx
  456. cmCommands.h
  457. cmAddCompileDefinitionsCommand.cxx
  458. cmAddCompileDefinitionsCommand.h
  459. cmAddCompileOptionsCommand.cxx
  460. cmAddCompileOptionsCommand.h
  461. cmAddLinkOptionsCommand.cxx
  462. cmAddLinkOptionsCommand.h
  463. cmAddCustomCommandCommand.cxx
  464. cmAddCustomCommandCommand.h
  465. cmAddCustomTargetCommand.cxx
  466. cmAddCustomTargetCommand.h
  467. cmAddDefinitionsCommand.cxx
  468. cmAddDefinitionsCommand.h
  469. cmAddDependenciesCommand.cxx
  470. cmAddDependenciesCommand.h
  471. cmAddExecutableCommand.cxx
  472. cmAddExecutableCommand.h
  473. cmAddLibraryCommand.cxx
  474. cmAddLibraryCommand.h
  475. cmAddSubDirectoryCommand.cxx
  476. cmAddSubDirectoryCommand.h
  477. cmAddTestCommand.cxx
  478. cmAddTestCommand.h
  479. cmAuxSourceDirectoryCommand.cxx
  480. cmAuxSourceDirectoryCommand.h
  481. cmBreakCommand.cxx
  482. cmBreakCommand.h
  483. cmBuildCommand.cxx
  484. cmBuildCommand.h
  485. cmBuildNameCommand.cxx
  486. cmBuildNameCommand.h
  487. cmCMakeHostSystemInformationCommand.cxx
  488. cmCMakeHostSystemInformationCommand.h
  489. cmCMakeLanguageCommand.cxx
  490. cmCMakeLanguageCommand.h
  491. cmCMakeMinimumRequired.cxx
  492. cmCMakeMinimumRequired.h
  493. cmCMakePathCommand.h
  494. cmCMakePathCommand.cxx
  495. cmCMakePolicyCommand.cxx
  496. cmCMakePolicyCommand.h
  497. cmConditionEvaluator.cxx
  498. cmConditionEvaluator.h
  499. cmConfigureFileCommand.cxx
  500. cmConfigureFileCommand.h
  501. cmContinueCommand.cxx
  502. cmContinueCommand.h
  503. cmCoreTryCompile.cxx
  504. cmCoreTryCompile.h
  505. cmCreateTestSourceList.cxx
  506. cmCreateTestSourceList.h
  507. cmDefinePropertyCommand.cxx
  508. cmDefinePropertyCommand.h
  509. cmEnableLanguageCommand.cxx
  510. cmEnableLanguageCommand.h
  511. cmEnableTestingCommand.cxx
  512. cmEnableTestingCommand.h
  513. cmExecProgramCommand.cxx
  514. cmExecProgramCommand.h
  515. cmExecuteProcessCommand.cxx
  516. cmExecuteProcessCommand.h
  517. cmExpandedCommandArgument.cxx
  518. cmExpandedCommandArgument.h
  519. cmExperimental.cxx
  520. cmExperimental.h
  521. cmExportCommand.cxx
  522. cmExportCommand.h
  523. cmExportLibraryDependenciesCommand.cxx
  524. cmExportLibraryDependenciesCommand.h
  525. cmFLTKWrapUICommand.cxx
  526. cmFLTKWrapUICommand.h
  527. cmFileCommand.cxx
  528. cmFileCommand.h
  529. cmFindBase.cxx
  530. cmFindBase.h
  531. cmFindCommon.cxx
  532. cmFindCommon.h
  533. cmFindFileCommand.cxx
  534. cmFindFileCommand.h
  535. cmFindLibraryCommand.cxx
  536. cmFindLibraryCommand.h
  537. cmFindPackageCommand.cxx
  538. cmFindPackageCommand.h
  539. cmFindPathCommand.cxx
  540. cmFindPathCommand.h
  541. cmFindProgramCommand.cxx
  542. cmFindProgramCommand.h
  543. cmForEachCommand.cxx
  544. cmForEachCommand.h
  545. cmBlockCommand.cxx
  546. cmBlockCommand.h
  547. cmFunctionBlocker.cxx
  548. cmFunctionBlocker.h
  549. cmFunctionCommand.cxx
  550. cmFunctionCommand.h
  551. cmGetCMakePropertyCommand.cxx
  552. cmGetCMakePropertyCommand.h
  553. cmGetDirectoryPropertyCommand.cxx
  554. cmGetDirectoryPropertyCommand.h
  555. cmGetFilenameComponentCommand.cxx
  556. cmGetFilenameComponentCommand.h
  557. cmGetPropertyCommand.cxx
  558. cmGetPropertyCommand.h
  559. cmGetSourceFilePropertyCommand.cxx
  560. cmGetSourceFilePropertyCommand.h
  561. cmGetTargetPropertyCommand.cxx
  562. cmGetTargetPropertyCommand.h
  563. cmGetTestPropertyCommand.cxx
  564. cmGetTestPropertyCommand.h
  565. cmHexFileConverter.cxx
  566. cmHexFileConverter.h
  567. cmIfCommand.cxx
  568. cmIfCommand.h
  569. cmIncludeCommand.cxx
  570. cmIncludeCommand.h
  571. cmIncludeDirectoryCommand.cxx
  572. cmIncludeDirectoryCommand.h
  573. cmIncludeExternalMSProjectCommand.cxx
  574. cmIncludeExternalMSProjectCommand.h
  575. cmIncludeGuardCommand.cxx
  576. cmIncludeGuardCommand.h
  577. cmIncludeRegularExpressionCommand.cxx
  578. cmIncludeRegularExpressionCommand.h
  579. cmInstallCommand.cxx
  580. cmInstallCommand.h
  581. cmInstallCommandArguments.cxx
  582. cmInstallCommandArguments.h
  583. cmInstallCxxModuleBmiGenerator.cxx
  584. cmInstallCxxModuleBmiGenerator.h
  585. cmInstallFilesCommand.cxx
  586. cmInstallFilesCommand.h
  587. cmInstallProgramsCommand.cxx
  588. cmInstallProgramsCommand.h
  589. cmInstallTargetsCommand.cxx
  590. cmInstallTargetsCommand.h
  591. cmLinkDirectoriesCommand.cxx
  592. cmLinkDirectoriesCommand.h
  593. cmLinkLibrariesCommand.cxx
  594. cmLinkLibrariesCommand.h
  595. cmListCommand.cxx
  596. cmListCommand.h
  597. cmLoadCacheCommand.cxx
  598. cmLoadCacheCommand.h
  599. cmLoadCommandCommand.cxx
  600. cmLoadCommandCommand.h
  601. cmMacroCommand.cxx
  602. cmMacroCommand.h
  603. cmMakeDirectoryCommand.cxx
  604. cmMakeDirectoryCommand.h
  605. cmMarkAsAdvancedCommand.cxx
  606. cmMarkAsAdvancedCommand.h
  607. cmMathCommand.cxx
  608. cmMathCommand.h
  609. cmMessageCommand.cxx
  610. cmMessageCommand.h
  611. cmMessageMetadata.h
  612. cmOptionCommand.cxx
  613. cmOptionCommand.h
  614. cmOutputRequiredFilesCommand.cxx
  615. cmOutputRequiredFilesCommand.h
  616. cmParseArgumentsCommand.cxx
  617. cmParseArgumentsCommand.h
  618. cmPathLabel.cxx
  619. cmPathLabel.h
  620. cmProjectCommand.cxx
  621. cmProjectCommand.h
  622. cmQTWrapCPPCommand.cxx
  623. cmQTWrapCPPCommand.h
  624. cmQTWrapUICommand.cxx
  625. cmQTWrapUICommand.h
  626. cmRemoveCommand.cxx
  627. cmRemoveCommand.h
  628. cmRemoveDefinitionsCommand.cxx
  629. cmRemoveDefinitionsCommand.h
  630. cmReturnCommand.cxx
  631. cmReturnCommand.h
  632. cmSearchPath.cxx
  633. cmSearchPath.h
  634. cmSeparateArgumentsCommand.cxx
  635. cmSeparateArgumentsCommand.h
  636. cmSetCommand.cxx
  637. cmSetCommand.h
  638. cmSetDirectoryPropertiesCommand.cxx
  639. cmSetDirectoryPropertiesCommand.h
  640. cmSetPropertyCommand.cxx
  641. cmSetPropertyCommand.h
  642. cmSetSourceFilesPropertiesCommand.cxx
  643. cmSetSourceFilesPropertiesCommand.h
  644. cmSetTargetPropertiesCommand.cxx
  645. cmSetTargetPropertiesCommand.h
  646. cmSetTestsPropertiesCommand.cxx
  647. cmSetTestsPropertiesCommand.h
  648. cmSiteNameCommand.cxx
  649. cmSiteNameCommand.h
  650. cmSourceGroupCommand.cxx
  651. cmSourceGroupCommand.h
  652. cmString.cxx
  653. cmString.hxx
  654. cmStringReplaceHelper.cxx
  655. cmStringCommand.cxx
  656. cmStringCommand.h
  657. cmSubcommandTable.cxx
  658. cmSubcommandTable.h
  659. cmSubdirCommand.cxx
  660. cmSubdirCommand.h
  661. cmSubdirDependsCommand.cxx
  662. cmSubdirDependsCommand.h
  663. cmTargetCompileDefinitionsCommand.cxx
  664. cmTargetCompileDefinitionsCommand.h
  665. cmTargetCompileFeaturesCommand.cxx
  666. cmTargetCompileFeaturesCommand.h
  667. cmTargetCompileOptionsCommand.cxx
  668. cmTargetCompileOptionsCommand.h
  669. cmTargetIncludeDirectoriesCommand.cxx
  670. cmTargetIncludeDirectoriesCommand.h
  671. cmTargetLinkOptionsCommand.cxx
  672. cmTargetLinkOptionsCommand.h
  673. cmTargetLinkDirectoriesCommand.cxx
  674. cmTargetLinkDirectoriesCommand.h
  675. cmTargetLinkLibrariesCommand.cxx
  676. cmTargetLinkLibrariesCommand.h
  677. cmTargetPrecompileHeadersCommand.cxx
  678. cmTargetPrecompileHeadersCommand.h
  679. cmTargetPropCommandBase.cxx
  680. cmTargetPropCommandBase.h
  681. cmTargetSourcesCommand.cxx
  682. cmTargetSourcesCommand.h
  683. cmTimestamp.cxx
  684. cmTimestamp.h
  685. cmTryCompileCommand.cxx
  686. cmTryCompileCommand.h
  687. cmTryRunCommand.cxx
  688. cmTryRunCommand.h
  689. cmUnsetCommand.cxx
  690. cmUnsetCommand.h
  691. cmUseMangledMesaCommand.cxx
  692. cmUseMangledMesaCommand.h
  693. cmUtilitySourceCommand.cxx
  694. cmUtilitySourceCommand.h
  695. cmVariableRequiresCommand.cxx
  696. cmVariableRequiresCommand.h
  697. cmVariableWatchCommand.cxx
  698. cmVariableWatchCommand.h
  699. cmWhileCommand.cxx
  700. cmWhileCommand.h
  701. cmWriteFileCommand.cxx
  702. cmWriteFileCommand.h
  703. # Ninja support
  704. cmScanDepFormat.cxx
  705. cmGlobalNinjaGenerator.cxx
  706. cmGlobalNinjaGenerator.h
  707. cmNinjaTypes.h
  708. cmLocalNinjaGenerator.cxx
  709. cmLocalNinjaGenerator.h
  710. cmNinjaTargetGenerator.cxx
  711. cmNinjaTargetGenerator.h
  712. cmNinjaNormalTargetGenerator.cxx
  713. cmNinjaNormalTargetGenerator.h
  714. cmNinjaUtilityTargetGenerator.cxx
  715. cmNinjaUtilityTargetGenerator.h
  716. cmNinjaLinkLineComputer.cxx
  717. cmNinjaLinkLineComputer.h
  718. cmNinjaLinkLineDeviceComputer.cxx
  719. cmNinjaLinkLineDeviceComputer.h
  720. cm_get_date.h
  721. cm_get_date.c
  722. cm_utf8.h
  723. cm_utf8.c
  724. cm_codecvt.hxx
  725. cm_codecvt.cxx
  726. cm_fileno.hxx
  727. cm_fileno.cxx
  728. cmDuration.h
  729. cmDuration.cxx
  730. bindexplib.cxx
  731. )
  732. target_include_directories(
  733. CMakeLib
  734. PUBLIC
  735. # add the include path to find the .h
  736. "${CMAKE_CURRENT_BINARY_DIR}"
  737. "${CMAKE_CURRENT_SOURCE_DIR}"
  738. "${CMAKE_CURRENT_SOURCE_DIR}/LexerParser"
  739. ${CMake_HAIKU_INCLUDE_DIRS}
  740. )
  741. target_link_libraries(
  742. CMakeLib
  743. PUBLIC
  744. cmstd
  745. cmsys
  746. CURL::libcurl
  747. EXPAT::EXPAT
  748. JsonCpp::JsonCpp
  749. $<TARGET_NAME_IF_EXISTS:kwiml::kwiml>
  750. LibArchive::LibArchive
  751. LibRHash::LibRHash
  752. LibUV::LibUV
  753. Threads::Threads
  754. ZLIB::ZLIB
  755. )
  756. if(CMake_ENABLE_DEBUGGER)
  757. target_sources(
  758. CMakeLib
  759. PRIVATE
  760. cmDebuggerAdapter.cxx
  761. cmDebuggerAdapter.h
  762. cmDebuggerBreakpointManager.cxx
  763. cmDebuggerBreakpointManager.h
  764. cmDebuggerExceptionManager.cxx
  765. cmDebuggerExceptionManager.h
  766. cmDebuggerProtocol.cxx
  767. cmDebuggerProtocol.h
  768. cmDebuggerSourceBreakpoint.cxx
  769. cmDebuggerSourceBreakpoint.h
  770. cmDebuggerStackFrame.cxx
  771. cmDebuggerStackFrame.h
  772. cmDebuggerThread.cxx
  773. cmDebuggerThread.h
  774. cmDebuggerThreadManager.cxx
  775. cmDebuggerThreadManager.h
  776. cmDebuggerVariables.cxx
  777. cmDebuggerVariables.h
  778. cmDebuggerVariablesHelper.cxx
  779. cmDebuggerVariablesHelper.h
  780. cmDebuggerVariablesManager.cxx
  781. cmDebuggerVariablesManager.h
  782. )
  783. if(WIN32)
  784. target_sources(
  785. CMakeLib
  786. PRIVATE
  787. cmDebuggerWindowsPipeConnection.cxx
  788. cmDebuggerWindowsPipeConnection.h
  789. )
  790. else()
  791. target_sources(
  792. CMakeLib
  793. PRIVATE
  794. cmDebuggerPosixPipeConnection.cxx
  795. cmDebuggerPosixPipeConnection.h
  796. )
  797. endif()
  798. target_link_libraries(CMakeLib PUBLIC cppdap::cppdap)
  799. endif()
  800. # Check if we can build the Mach-O parser.
  801. if(CMake_USE_MACH_PARSER)
  802. target_sources(
  803. CMakeLib
  804. PRIVATE
  805. cmMachO.h
  806. cmMachO.cxx
  807. )
  808. endif()
  809. # Check if we can build the XCOFF parser.
  810. if(CMake_USE_XCOFF_PARSER)
  811. target_sources(
  812. CMakeLib
  813. PRIVATE
  814. cmXCOFF.h
  815. cmXCOFF.cxx
  816. )
  817. endif()
  818. # Xcode only works on Apple
  819. if(APPLE)
  820. target_sources(
  821. CMakeLib
  822. PRIVATE
  823. cmXCodeObject.cxx
  824. cmXCode21Object.cxx
  825. cmXCodeScheme.cxx
  826. cmGlobalXCodeGenerator.cxx
  827. cmGlobalXCodeGenerator.h
  828. cmLocalXCodeGenerator.cxx
  829. cmLocalXCodeGenerator.h
  830. )
  831. endif()
  832. if(WIN32)
  833. target_sources(
  834. CMakeLib
  835. PRIVATE
  836. cmCallVisualStudioMacro.cxx
  837. cmCallVisualStudioMacro.h
  838. )
  839. if(NOT UNIX)
  840. target_sources(
  841. CMakeLib
  842. PRIVATE
  843. cmGlobalBorlandMakefileGenerator.cxx
  844. cmGlobalBorlandMakefileGenerator.h
  845. cmGlobalMSYSMakefileGenerator.cxx
  846. cmGlobalMinGWMakefileGenerator.cxx
  847. cmGlobalNMakeMakefileGenerator.cxx
  848. cmGlobalNMakeMakefileGenerator.h
  849. cmGlobalJOMMakefileGenerator.cxx
  850. cmGlobalJOMMakefileGenerator.h
  851. cmGlobalVisualStudio71Generator.cxx
  852. cmGlobalVisualStudio71Generator.h
  853. cmGlobalVisualStudio7Generator.cxx
  854. cmGlobalVisualStudio7Generator.h
  855. cmGlobalVisualStudio8Generator.cxx
  856. cmGlobalVisualStudio8Generator.h
  857. cmGlobalVisualStudio9Generator.cxx
  858. cmGlobalVisualStudio9Generator.h
  859. cmVisualStudioGeneratorOptions.h
  860. cmVisualStudioGeneratorOptions.cxx
  861. cmVsProjectType.h
  862. cmVisualStudio10TargetGenerator.h
  863. cmVisualStudio10TargetGenerator.cxx
  864. cmLocalVisualStudio10Generator.cxx
  865. cmLocalVisualStudio10Generator.h
  866. cmGlobalVisualStudio10Generator.h
  867. cmGlobalVisualStudio10Generator.cxx
  868. cmGlobalVisualStudio11Generator.h
  869. cmGlobalVisualStudio11Generator.cxx
  870. cmGlobalVisualStudio12Generator.h
  871. cmGlobalVisualStudio12Generator.cxx
  872. cmGlobalVisualStudio14Generator.h
  873. cmGlobalVisualStudio14Generator.cxx
  874. cmGlobalVisualStudioGenerator.cxx
  875. cmGlobalVisualStudioGenerator.h
  876. cmGlobalVisualStudioVersionedGenerator.h
  877. cmGlobalVisualStudioVersionedGenerator.cxx
  878. cmIDEFlagTable.h
  879. cmIDEOptions.cxx
  880. cmIDEOptions.h
  881. cmLocalVisualStudio7Generator.cxx
  882. cmLocalVisualStudio7Generator.h
  883. cmLocalVisualStudioGenerator.cxx
  884. cmLocalVisualStudioGenerator.h
  885. cmVisualStudioSlnData.h
  886. cmVisualStudioSlnData.cxx
  887. cmVisualStudioSlnParser.h
  888. cmVisualStudioSlnParser.cxx
  889. cmVisualStudioWCEPlatformParser.h
  890. cmVisualStudioWCEPlatformParser.cxx
  891. cmVSSetupHelper.cxx
  892. cmVSSetupHelper.h
  893. )
  894. # Add a manifest file to executables on Windows to allow for
  895. # GetVersion to work properly on Windows 8 and above.
  896. target_sources(ManifestLib INTERFACE cmake.version.manifest)
  897. endif()
  898. endif()
  899. # Watcom support
  900. if(CMAKE_USE_WMAKE)
  901. target_sources(
  902. CMakeLib
  903. PRIVATE
  904. cmGlobalWatcomWMakeGenerator.cxx
  905. cmGlobalWatcomWMakeGenerator.h
  906. )
  907. endif()
  908. # GHS support
  909. # Works only for windows and linux
  910. if(WIN32 OR CMAKE_SYSTEM_NAME STREQUAL "Linux")
  911. target_sources(
  912. CMakeLib
  913. PRIVATE
  914. cmGlobalGhsMultiGenerator.cxx
  915. cmGlobalGhsMultiGenerator.h
  916. cmLocalGhsMultiGenerator.cxx
  917. cmLocalGhsMultiGenerator.h
  918. cmGhsMultiTargetGenerator.cxx
  919. cmGhsMultiTargetGenerator.h
  920. cmGhsMultiGpj.cxx
  921. cmGhsMultiGpj.h
  922. )
  923. endif()
  924. if(CMake_BUILD_PCH)
  925. target_precompile_headers(CMakeLib PRIVATE
  926. "$<$<COMPILE_LANGUAGE:CXX>:<string$<ANGLE-R>>"
  927. "$<$<COMPILE_LANGUAGE:CXX>:<iostream$<ANGLE-R>>"
  928. "$<$<COMPILE_LANGUAGE:CXX>:<sstream$<ANGLE-R>>"
  929. "$<$<COMPILE_LANGUAGE:CXX>:<iomanip$<ANGLE-R>>"
  930. "$<$<COMPILE_LANGUAGE:CXX>:<cm/memory$<ANGLE-R>>"
  931. "$<$<COMPILE_LANGUAGE:CXX>:<cm3p/cppdap/protocol.h$<ANGLE-R>>"
  932. "$<$<COMPILE_LANGUAGE:CXX>:cmMakefile.h>"
  933. "$<$<COMPILE_LANGUAGE:CXX>:cmGlobalGenerator.h>"
  934. "$<$<COMPILE_LANGUAGE:CXX>:cmLocalGenerator.h>"
  935. "$<$<COMPILE_LANGUAGE:CXX>:cmGeneratorTarget.h>"
  936. "$<$<COMPILE_LANGUAGE:CXX>:cmGeneratorExpression.h>"
  937. "$<$<COMPILE_LANGUAGE:CXX>:cmArgumentParser.h>"
  938. "$<$<COMPILE_LANGUAGE:CXX>:cmake.h>"
  939. "$<$<COMPILE_LANGUAGE:CXX>:cmCMakePath.h>"
  940. "$<$<COMPILE_LANGUAGE:CXX>:cmCurl.h>")
  941. set_source_files_properties(
  942. "LexerParser/cmFortranLexer.cxx"
  943. PROPERTIES SKIP_PRECOMPILE_HEADERS ON)
  944. if(WIN32)
  945. target_precompile_headers(CMakeLib PRIVATE
  946. "$<$<COMPILE_LANGUAGE:CXX>:<cm3p/uv.h$<ANGLE-R>>"
  947. "$<$<COMPILE_LANGUAGE:CXX>:cmVSSetupHelper.h>")
  948. set_source_files_properties("LexerParser/cmFortranParser.cxx" PROPERTIES SKIP_PRECOMPILE_HEADERS ON)
  949. else()
  950. set_source_files_properties(
  951. "LexerParser/cmCommandArgumentLexer.cxx"
  952. "LexerParser/cmGccDepfileLexer.cxx"
  953. "LexerParser/cmExprLexer.cxx"
  954. "LexerParser/cmDependsJavaLexer.cxx"
  955. PROPERTIES SKIP_PRECOMPILE_HEADERS ON)
  956. endif()
  957. endif()
  958. # Temporary variable for tools targets
  959. set(_tools)
  960. if(WIN32 AND NOT CYGWIN)
  961. set_source_files_properties(cmcldeps.cxx PROPERTIES COMPILE_DEFINITIONS _WIN32_WINNT=0x0501)
  962. add_executable(cmcldeps cmcldeps.cxx)
  963. target_link_libraries(cmcldeps PRIVATE CMakeLib ManifestLib)
  964. list(APPEND _tools cmcldeps)
  965. endif()
  966. # Some atomic instructions are implemented using libatomic on some platforms.
  967. if(CMake_HAVE_CXX_ATOMIC_LIB)
  968. target_link_libraries(CMakeLib PUBLIC atomic)
  969. endif()
  970. # On Apple we need CoreFoundation and CoreServices
  971. if(APPLE)
  972. target_link_libraries(CMakeLib PUBLIC "-framework CoreFoundation")
  973. target_link_libraries(CMakeLib PUBLIC "-framework CoreServices")
  974. endif()
  975. if(WIN32 AND NOT UNIX)
  976. # We need the rpcrt4 library on Windows.
  977. # We need the crypt32 library on Windows for crypto/cert APIs.
  978. target_link_libraries(CMakeLib PUBLIC rpcrt4 crypt32)
  979. endif()
  980. target_compile_definitions(CMakeLib PUBLIC ${CLANG_TIDY_DEFINITIONS})
  981. #
  982. # Build CTestLib
  983. #
  984. add_library(
  985. CTestLib
  986. cmCTest.cxx
  987. CTest/cmProcess.cxx
  988. CTest/cmCTestBinPacker.cxx
  989. CTest/cmCTestBuildAndTestHandler.cxx
  990. CTest/cmCTestBuildCommand.cxx
  991. CTest/cmCTestBuildHandler.cxx
  992. CTest/cmCTestConfigureCommand.cxx
  993. CTest/cmCTestConfigureHandler.cxx
  994. CTest/cmCTestCoverageCommand.cxx
  995. CTest/cmCTestCoverageHandler.cxx
  996. CTest/cmCTestCurl.cxx
  997. CTest/cmParseMumpsCoverage.cxx
  998. CTest/cmParseCacheCoverage.cxx
  999. CTest/cmParseGTMCoverage.cxx
  1000. CTest/cmParseJacocoCoverage.cxx
  1001. CTest/cmParseBlanketJSCoverage.cxx
  1002. CTest/cmParsePHPCoverage.cxx
  1003. CTest/cmParseCoberturaCoverage.cxx
  1004. CTest/cmParseDelphiCoverage.cxx
  1005. CTest/cmCTestEmptyBinaryDirectoryCommand.cxx
  1006. CTest/cmCTestGenericHandler.cxx
  1007. CTest/cmCTestHandlerCommand.cxx
  1008. CTest/cmCTestResourceAllocator.cxx
  1009. CTest/cmCTestResourceSpec.cxx
  1010. CTest/cmCTestLaunch.cxx
  1011. CTest/cmCTestLaunchReporter.cxx
  1012. CTest/cmCTestMemCheckCommand.cxx
  1013. CTest/cmCTestMemCheckHandler.cxx
  1014. CTest/cmCTestMultiProcessHandler.cxx
  1015. CTest/cmCTestReadCustomFilesCommand.cxx
  1016. CTest/cmCTestResourceGroupsLexerHelper.cxx
  1017. CTest/cmCTestRunScriptCommand.cxx
  1018. CTest/cmCTestRunTest.cxx
  1019. CTest/cmCTestScriptHandler.cxx
  1020. CTest/cmCTestSleepCommand.cxx
  1021. CTest/cmCTestStartCommand.cxx
  1022. CTest/cmCTestSubmitCommand.cxx
  1023. CTest/cmCTestSubmitHandler.cxx
  1024. CTest/cmCTestTestCommand.cxx
  1025. CTest/cmCTestTestHandler.cxx
  1026. CTest/cmCTestTestMeasurementXMLParser.cxx
  1027. CTest/cmCTestUpdateCommand.cxx
  1028. CTest/cmCTestUpdateHandler.cxx
  1029. CTest/cmCTestUploadCommand.cxx
  1030. CTest/cmCTestUploadHandler.cxx
  1031. CTest/cmCTestVC.cxx
  1032. CTest/cmCTestVC.h
  1033. CTest/cmCTestGlobalVC.cxx
  1034. CTest/cmCTestGlobalVC.h
  1035. CTest/cmCTestCVS.cxx
  1036. CTest/cmCTestCVS.h
  1037. CTest/cmCTestSVN.cxx
  1038. CTest/cmCTestSVN.h
  1039. CTest/cmCTestBZR.cxx
  1040. CTest/cmCTestBZR.h
  1041. CTest/cmCTestGIT.cxx
  1042. CTest/cmCTestGIT.h
  1043. CTest/cmCTestHG.cxx
  1044. CTest/cmCTestHG.h
  1045. CTest/cmCTestP4.cxx
  1046. CTest/cmCTestP4.h
  1047. LexerParser/cmCTestResourceGroupsLexer.cxx
  1048. LexerParser/cmCTestResourceGroupsLexer.h
  1049. LexerParser/cmCTestResourceGroupsLexer.in.l
  1050. )
  1051. target_include_directories(
  1052. CTestLib
  1053. PUBLIC
  1054. "${CMAKE_CURRENT_SOURCE_DIR}/CTest"
  1055. )
  1056. target_link_libraries(CTestLib PUBLIC CMakeLib)
  1057. if(CMake_BUILD_PCH)
  1058. target_precompile_headers(CTestLib PRIVATE
  1059. "cmDuration.h"
  1060. "cmMakefile.h"
  1061. "cmSystemTools.h"
  1062. "cmGlobalGenerator.h"
  1063. "cmake.h"
  1064. "CTest/cmCTestGenericHandler.h"
  1065. "<sstream>"
  1066. "<cm3p/uv.h>")
  1067. if(WIN32)
  1068. target_precompile_headers(CTestLib PRIVATE "cmCurl.h" "CTest/cmCTestMultiProcessHandler.h")
  1069. else()
  1070. set_source_files_properties("LexerParser/cmCTestResourceGroupsLexer.cxx" PROPERTIES SKIP_PRECOMPILE_HEADERS ON)
  1071. endif()
  1072. endif()
  1073. #
  1074. # Build CPackLib
  1075. #
  1076. add_library(
  1077. CPackLib
  1078. CPack/cmCPackArchiveGenerator.cxx
  1079. CPack/cmCPackComponentGroup.cxx
  1080. CPack/cmCPackDebGenerator.cxx
  1081. CPack/cmCPackExternalGenerator.cxx
  1082. CPack/cmCPackGeneratorFactory.cxx
  1083. CPack/cmCPackGenerator.cxx
  1084. CPack/cmCPackLog.cxx
  1085. CPack/cmCPackInnoSetupGenerator.cxx
  1086. CPack/cmCPackNSISGenerator.cxx
  1087. CPack/cmCPackNuGetGenerator.cxx
  1088. CPack/cmCPackSTGZGenerator.cxx
  1089. # CPack IFW generator
  1090. CPack/IFW/cmCPackIFWCommon.cxx
  1091. CPack/IFW/cmCPackIFWCommon.h
  1092. CPack/IFW/cmCPackIFWGenerator.cxx
  1093. CPack/IFW/cmCPackIFWGenerator.h
  1094. CPack/IFW/cmCPackIFWInstaller.cxx
  1095. CPack/IFW/cmCPackIFWInstaller.h
  1096. CPack/IFW/cmCPackIFWPackage.cxx
  1097. CPack/IFW/cmCPackIFWPackage.h
  1098. CPack/IFW/cmCPackIFWRepository.cxx
  1099. CPack/IFW/cmCPackIFWRepository.h
  1100. )
  1101. target_include_directories(
  1102. CPackLib
  1103. PUBLIC
  1104. "${CMAKE_CURRENT_SOURCE_DIR}/CPack"
  1105. "${CMAKE_CURRENT_BINARY_DIR}/CPack"
  1106. )
  1107. target_link_libraries(CPackLib PUBLIC CMakeLib)
  1108. option(CPACK_ENABLE_FREEBSD_PKG "Add FreeBSD pkg(8) generator to CPack." OFF)
  1109. if(UNIX)
  1110. target_sources(
  1111. CPackLib
  1112. PRIVATE
  1113. CPack/cmCPackRPMGenerator.cxx
  1114. )
  1115. # Optionally, try to use pkg(8)
  1116. if(CPACK_ENABLE_FREEBSD_PKG)
  1117. # On UNIX, you may find FreeBSD's pkg(8) and attendant
  1118. # library -- it can be used on FreeBSD, Dragonfly, NetBSD,
  1119. # OpenBSD and also Linux and OSX. Look for the header and
  1120. # the library; it's a warning on FreeBSD if they're not
  1121. # found, and informational on other platforms.
  1122. find_path(FREEBSD_PKG_INCLUDE_DIRS "pkg.h")
  1123. if(FREEBSD_PKG_INCLUDE_DIRS)
  1124. find_library(FREEBSD_PKG_LIBRARIES
  1125. pkg
  1126. DOC "FreeBSD pkg(8) library")
  1127. if(FREEBSD_PKG_LIBRARIES)
  1128. set(ENABLE_BUILD_FREEBSD_PKG 1)
  1129. target_sources(CPackLib PRIVATE CPack/cmCPackFreeBSDGenerator.cxx)
  1130. target_include_directories(CPackLib PUBLIC ${FREEBSD_PKG_INCLUDE_DIRS})
  1131. target_link_libraries(CPackLib PUBLIC ${FREEBSD_PKG_LIBRARIES})
  1132. endif()
  1133. endif()
  1134. if(NOT FREEBSD_PKG_INCLUDE_DIRS OR NOT FREEBSD_PKG_LIBRARIES)
  1135. message(FATAL_ERROR "CPack needs libpkg(3) to produce FreeBSD packages natively.")
  1136. endif()
  1137. else()
  1138. set(FREEBSD_PKG_INCLUDE_DIRS NOTFOUND)
  1139. set(FREEBSD_PKG_LIBRARIES NOTFOUND)
  1140. endif()
  1141. endif()
  1142. if(CYGWIN)
  1143. target_sources(
  1144. CPackLib
  1145. PRIVATE
  1146. CPack/cmCPackCygwinBinaryGenerator.cxx
  1147. CPack/cmCPackCygwinSourceGenerator.cxx
  1148. )
  1149. find_package(LibUUID)
  1150. endif()
  1151. if(WIN32 OR (CYGWIN AND TARGET LibUUID::LibUUID))
  1152. set(ENABLE_BUILD_WIX_GENERATOR 1)
  1153. target_sources(
  1154. CPackLib
  1155. PRIVATE
  1156. CPack/WiX/cmCMakeToWixPath.cxx
  1157. CPack/WiX/cmCMakeToWixPath.h
  1158. CPack/WiX/cmCPackWIXGenerator.cxx
  1159. CPack/WiX/cmCPackWIXGenerator.h
  1160. CPack/WiX/cmWIXAccessControlList.cxx
  1161. CPack/WiX/cmWIXAccessControlList.h
  1162. CPack/WiX/cmWIXDirectoriesSourceWriter.cxx
  1163. CPack/WiX/cmWIXDirectoriesSourceWriter.h
  1164. CPack/WiX/cmWIXFeaturesSourceWriter.cxx
  1165. CPack/WiX/cmWIXFeaturesSourceWriter.h
  1166. CPack/WiX/cmWIXFilesSourceWriter.cxx
  1167. CPack/WiX/cmWIXFilesSourceWriter.h
  1168. CPack/WiX/cmWIXPatch.cxx
  1169. CPack/WiX/cmWIXPatch.h
  1170. CPack/WiX/cmWIXPatchParser.cxx
  1171. CPack/WiX/cmWIXPatchParser.h
  1172. CPack/WiX/cmWIXRichTextFormatWriter.cxx
  1173. CPack/WiX/cmWIXRichTextFormatWriter.h
  1174. CPack/WiX/cmWIXShortcut.cxx
  1175. CPack/WiX/cmWIXShortcut.h
  1176. CPack/WiX/cmWIXSourceWriter.cxx
  1177. CPack/WiX/cmWIXSourceWriter.h
  1178. )
  1179. target_link_libraries(CPackLib PUBLIC $<TARGET_NAME_IF_EXISTS:LibUUID::LibUUID>)
  1180. endif()
  1181. if(APPLE)
  1182. target_sources(
  1183. CPackLib
  1184. PRIVATE
  1185. CPack/cmCPackBundleGenerator.cxx
  1186. CPack/cmCPackDragNDropGenerator.cxx
  1187. CPack/cmCPackPKGGenerator.cxx
  1188. CPack/cmCPackProductBuildGenerator.cxx
  1189. )
  1190. endif()
  1191. if(APPLE)
  1192. # Some compilers produce errors in the CoreServices framework headers.
  1193. # Ideally such errors should be fixed by either the compiler vendor
  1194. # or the framework source, but we try to workaround it and build anyway.
  1195. # If it does not work, build with reduced functionality and warn.
  1196. check_include_file("CoreServices/CoreServices.h" HAVE_CoreServices)
  1197. if(HAVE_CoreServices)
  1198. target_link_libraries(CPackLib PUBLIC "-framework CoreServices")
  1199. else()
  1200. message(WARNING "This compiler does not appear to support\n"
  1201. " #include <CoreServices/CoreServices.h>\n"
  1202. "Some CPack functionality may be limited.\n"
  1203. "See CMakeFiles/CMakeError.log for details of the failure.")
  1204. endif()
  1205. endif()
  1206. # Render config header file for CPackLib
  1207. configure_file(CPack/cmCPackConfigure.h.in CPack/cmCPackConfigure.h)
  1208. # Build CMake executable
  1209. add_executable(cmake cmakemain.cxx cmcmd.cxx cmcmd.h)
  1210. target_link_libraries(cmake PRIVATE CMakeLib ManifestLib)
  1211. list(APPEND _tools cmake)
  1212. # Build CTest executable
  1213. add_executable(ctest ctest.cxx)
  1214. target_link_libraries(ctest PRIVATE CTestLib ManifestLib)
  1215. list(APPEND _tools ctest)
  1216. # Build CPack executable
  1217. add_executable(cpack CPack/cpack.cxx)
  1218. target_link_libraries(cpack PRIVATE CPackLib ManifestLib)
  1219. list(APPEND _tools cpack)
  1220. # Curses GUI
  1221. if(BUILD_CursesDialog)
  1222. add_subdirectory(CursesDialog)
  1223. endif()
  1224. # Qt GUI
  1225. option(BUILD_QtDialog "Build Qt dialog for CMake" FALSE)
  1226. if(BUILD_QtDialog)
  1227. add_subdirectory(QtDialog)
  1228. endif()
  1229. include(${CMAKE_CURRENT_BINARY_DIR}/LocalUserOptions.cmake OPTIONAL)
  1230. include(${CMAKE_CURRENT_SOURCE_DIR}/LocalUserOptions.cmake OPTIONAL)
  1231. if(WIN32)
  1232. # Compute the binary version that appears in the RC file. Version
  1233. # components in the RC file are 16-bit integers so we may have to
  1234. # split the patch component.
  1235. if(CMake_VERSION_PATCH MATCHES "^([0-9]+)([0-9][0-9][0-9][0-9])$")
  1236. set(CMake_RCVERSION_YEAR "${CMAKE_MATCH_1}")
  1237. set(CMake_RCVERSION_MONTH_DAY "${CMAKE_MATCH_2}")
  1238. string(REGEX REPLACE "^0+" "" CMake_RCVERSION_MONTH_DAY "${CMake_RCVERSION_MONTH_DAY}")
  1239. set(CMake_RCVERSION ${CMake_VERSION_MAJOR},${CMake_VERSION_MINOR},${CMake_RCVERSION_YEAR},${CMake_RCVERSION_MONTH_DAY})
  1240. unset(CMake_RCVERSION_MONTH_DAY)
  1241. unset(CMake_RCVERSION_YEAR)
  1242. else()
  1243. set(CMake_RCVERSION ${CMake_VERSION_MAJOR},${CMake_VERSION_MINOR},${CMake_VERSION_PATCH},0)
  1244. endif()
  1245. set(CMake_RCVERSION_STR ${CMake_VERSION})
  1246. # Add Windows executable version information.
  1247. configure_file(CMakeVersion.rc.in CMakeVersion.rc @ONLY)
  1248. # We use a separate object library for this to work around a limitation of
  1249. # MinGW's windres tool with spaces in the path to the include directories.
  1250. add_library(CMakeVersion OBJECT "${CMAKE_CURRENT_BINARY_DIR}/CMakeVersion.rc")
  1251. set_property(TARGET CMakeVersion PROPERTY INCLUDE_DIRECTORIES "")
  1252. foreach(_tool IN LISTS _tools)
  1253. target_link_libraries(${_tool} PRIVATE CMakeVersion)
  1254. endforeach()
  1255. endif()
  1256. if(CMake_JOB_POOL_LINK_BIN)
  1257. set_property(TARGET ${_tools} PROPERTY JOB_POOL_LINK "link-bin")
  1258. set_property(GLOBAL APPEND PROPERTY JOB_POOLS "link-bin=${CMake_JOB_POOL_LINK_BIN}")
  1259. endif()
  1260. # Install tools
  1261. foreach(_tool IN LISTS _tools)
  1262. CMake_OPTIONAL_COMPONENT(${_tool})
  1263. install(TARGETS ${_tool} DESTINATION ${CMAKE_BIN_DIR} ${COMPONENT})
  1264. endforeach()
  1265. install(FILES cmCPluginAPI.h DESTINATION ${CMAKE_DATA_DIR}/include)
  1266. # Unset temporary variables
  1267. unset(_tools)