summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2013-10-06 10:58:26 (GMT)
committerGeorg Brandl <georg@python.org>2013-10-06 10:58:26 (GMT)
commitf70acb7874e6d17b266c1e85a45e40e45b607c00 (patch)
tree5361acc1b811ee3947f78b0f128f76e503f61d67
parent93c85a9d1b3e6862e8133f13baf512106ba254cf (diff)
parent2070e83f28008e0110f3caf021e129ecb3b33558 (diff)
downloadcpython-f70acb7874e6d17b266c1e85a45e40e45b607c00.zip
cpython-f70acb7874e6d17b266c1e85a45e40e45b607c00.tar.gz
cpython-f70acb7874e6d17b266c1e85a45e40e45b607c00.tar.bz2
merge with 3.3
-rw-r--r--Doc/library/re.rst2
1 files changed, 1 insertions, 1 deletions
diff --git a/Doc/library/re.rst b/Doc/library/re.rst
index 1421f35..762ca49 100644
--- a/Doc/library/re.rst
+++ b/Doc/library/re.rst
@@ -327,7 +327,7 @@ the second character. For example, ``\$`` matches the character ``'$'``.
``\number``
Matches the contents of the group of the same number. Groups are numbered
starting from 1. For example, ``(.+) \1`` matches ``'the the'`` or ``'55 55'``,
- but not ``'the end'`` (note the space after the group). This special sequence
+ but not ``'thethe'`` (note the space after the group). This special sequence
can only be used to match one of the first 99 groups. If the first digit of
*number* is 0, or *number* is 3 octal digits long, it will not be interpreted as
a group match, but as the character with octal value *number*. Inside the
table> -rw-r--r--Help/prop_tgt/ENABLE_EXPORTS.rst4
-rw-r--r--Help/prop_tgt/FRAMEWORK.rst28
-rw-r--r--Help/prop_tgt/FRAMEWORK_VERSION.rst3
-rw-r--r--Help/prop_tgt/MACOSX_BUNDLE.rst16
-rw-r--r--Help/prop_tgt/MACOSX_BUNDLE_INFO_PLIST.rst4
-rw-r--r--Help/prop_tgt/MACOSX_FRAMEWORK_INFO_PLIST.rst4
-rw-r--r--Help/prop_tgt/MACOSX_RPATH.rst19
-rw-r--r--Help/prop_tgt/OSX_ARCHITECTURES_CONFIG.rst2
-rw-r--r--Help/prop_tgt/PRIVATE_HEADER.rst10
-rw-r--r--Help/prop_tgt/PUBLIC_HEADER.rst12
-rw-r--r--Help/prop_tgt/RESOURCE.rst12
-rw-r--r--Help/release/dev/0-sample-topic.rst7
-rw-r--r--Help/release/dev/FindFLEX-DEFINES_FILE.rst6
-rw-r--r--Help/release/dev/FindGTK2_GTK2_TARGETS.rst7
-rw-r--r--Help/release/dev/FindGTK2_sigc++_c++11.rst7
-rw-r--r--Help/release/dev/FindOpenSSL-msvc-static-rt.rst6
-rw-r--r--Help/release/dev/FindXercesC-imported-targets.rst4
-rw-r--r--Help/release/dev/add-armcc-toolchain.rst4
-rw-r--r--Help/release/dev/add-cray-linux-platform.rst7
-rw-r--r--Help/release/dev/better-looking-mac-packages.rst8
-rw-r--r--Help/release/dev/cmake-gui-select-toolset.rst6
-rw-r--r--Help/release/dev/cpack-deb-config-file-source-field.rst6
-rw-r--r--Help/release/dev/cpack-deb-new-component-vars.rst7
-rw-r--r--Help/release/dev/cpack-dmg-multilanguage-sla.rst7
-rw-r--r--Help/release/dev/cpack-nsis-bitmap.rst6
-rw-r--r--Help/release/dev/deprecate-CMakeForceCompiler.rst5
-rw-r--r--Help/release/index.rst2
-rw-r--r--Help/variable/APPLE.rst4
-rw-r--r--Help/variable/CMAKE_BINARY_DIR.rst5
-rw-r--r--Help/variable/CMAKE_CURRENT_BINARY_DIR.rst5
-rw-r--r--Help/variable/CMAKE_CURRENT_SOURCE_DIR.rst5
-rw-r--r--Help/variable/CMAKE_ENABLE_EXPORTS.rst8
-rw-r--r--Help/variable/CMAKE_HOST_SYSTEM_NAME.rst2
-rw-r--r--Help/variable/CMAKE_INSTALL_NAME_DIR.rst2
-rw-r--r--Help/variable/CMAKE_LANG_COMPILER_ID.rst1
-rw-r--r--Help/variable/CMAKE_MACOSX_RPATH.rst2
-rw-r--r--Help/variable/CMAKE_OSX_ARCHITECTURES.rst2
-rw-r--r--Help/variable/CMAKE_SOURCE_DIR.rst5
-rw-r--r--Modules/CMakeCCompiler.cmake.in1
-rw-r--r--Modules/CMakeCCompilerId.c.in1
-rw-r--r--Modules/CMakeCInformation.cmake4
-rw-r--r--Modules/CMakeCXXCompiler.cmake.in1
-rw-r--r--Modules/CMakeCXXCompilerId.cpp.in1
-rw-r--r--Modules/CMakeCXXInformation.cmake4
-rw-r--r--Modules/CMakeCompilerIdDetection.cmake1
-rw-r--r--Modules/CMakeDetermineASMCompiler.cmake4
-rw-r--r--Modules/CMakeDetermineCompilerId.cmake8
-rw-r--r--Modules/CMakeForceCompiler.cmake18
-rw-r--r--Modules/CMakeFortranCompiler.cmake.in1
-rw-r--r--Modules/CMakeFortranCompilerId.F.in2
-rw-r--r--Modules/CMakeFortranInformation.cmake4
-rw-r--r--Modules/CPack.cmake2
-rw-r--r--Modules/CPackDMG.cmake33
-rw-r--r--Modules/CPackDeb.cmake105
-rw-r--r--Modules/CPackNSIS.cmake8
-rw-r--r--Modules/CheckCSourceCompiles.cmake2
-rw-r--r--Modules/CheckCSourceRuns.cmake2
-rw-r--r--Modules/CheckCXXSourceCompiles.cmake2
-rw-r--r--Modules/CheckCXXSourceRuns.cmake2
-rw-r--r--Modules/CheckForPthreads.c4
-rw-r--r--Modules/CheckFortranSourceCompiles.cmake2
-rw-r--r--Modules/Compiler/ARMCC-ASM.cmake7
-rw-r--r--Modules/Compiler/ARMCC-C.cmake2
-rw-r--r--Modules/Compiler/ARMCC-CXX.cmake2
-rw-r--r--Modules/Compiler/ARMCC-DetermineCompiler.cmake16
-rw-r--r--Modules/Compiler/ARMCC.cmake36
-rw-r--r--Modules/Compiler/AppleClang-C.cmake3
-rw-r--r--Modules/Compiler/AppleClang-CXX.cmake3
-rw-r--r--Modules/Compiler/Clang-C.cmake7
-rw-r--r--Modules/Compiler/Clang-CXX.cmake3
-rw-r--r--Modules/Compiler/GNU-C.cmake7
-rw-r--r--Modules/Compiler/GNU-CXX.cmake3
-rw-r--r--Modules/Compiler/SunPro-CXX.cmake3
-rw-r--r--Modules/FindCUDA.cmake12
-rw-r--r--Modules/FindFLEX.cmake87
-rw-r--r--Modules/FindGTK2.cmake69
-rw-r--r--Modules/FindGTest.cmake6
-rw-r--r--Modules/FindGit.cmake6
-rw-r--r--Modules/FindOpenSSL.cmake27
-rw-r--r--Modules/FindPkgConfig.cmake8
-rw-r--r--Modules/FindXercesC.cmake67
-rw-r--r--Modules/NSIS.template.in2
-rw-r--r--Modules/Platform/CrayLinuxEnvironment.cmake112
-rw-r--r--Modules/Platform/CrayPrgEnv.cmake149
-rw-r--r--Modules/Platform/SunOS.cmake6
-rw-r--r--Modules/Platform/Windows-MSVC.cmake2
-rw-r--r--Packaging/CMakeDMGBackground.tifbin0 -> 95690 bytes-rw-r--r--Packaging/CMakeDMGSetup.scpt42
-rw-r--r--README.rst2
-rw-r--r--Source/CMakeLists.txt18
-rw-r--r--Source/CMakeVersion.cmake4
-rw-r--r--Source/CPack/IFW/cmCPackIFWGenerator.cxx1
-rw-r--r--Source/CPack/WiX/cmCPackWIXGenerator.cxx1
-rw-r--r--Source/CPack/WiX/cmWIXPatch.cxx32
-rw-r--r--Source/CPack/WiX/cmWIXPatch.h3
-rw-r--r--Source/CPack/WiX/cmWIXPatchParser.cxx52
-rw-r--r--Source/CPack/WiX/cmWIXPatchParser.h29
-rw-r--r--Source/CPack/WiX/cmWIXSourceWriter.cxx19
-rw-r--r--Source/CPack/WiX/cmWIXSourceWriter.h2
-rw-r--r--Source/CPack/cmCPackArchiveGenerator.cxx1
-rw-r--r--Source/CPack/cmCPackCygwinBinaryGenerator.cxx1
-rw-r--r--Source/CPack/cmCPackCygwinSourceGenerator.cxx1
-rw-r--r--Source/CPack/cmCPackDebGenerator.cxx7
-rw-r--r--Source/CPack/cmCPackDragNDropGenerator.cxx481
-rw-r--r--Source/CPack/cmCPackDragNDropGenerator.h12
-rw-r--r--Source/CPack/cmCPackGenerator.cxx4
-rw-r--r--Source/CPack/cmCPackNSISGenerator.cxx23
-rw-r--r--Source/CPack/cmCPackOSXX11Generator.cxx1
-rw-r--r--Source/CPack/cmCPackPackageMakerGenerator.cxx1
-rw-r--r--Source/CPack/cmCPackSTGZGenerator.cxx1
-rw-r--r--Source/CPack/cpack.cxx4
-rw-r--r--Source/CTest/cmCTestBuildHandler.cxx1
-rw-r--r--Source/CTest/cmCTestCoverageHandler.cxx48
-rw-r--r--Source/CTest/cmCTestLaunch.cxx4
-rw-r--r--Source/CTest/cmCTestScriptHandler.cxx24
-rw-r--r--Source/CTest/cmCTestScriptHandler.h2
-rw-r--r--Source/CTest/cmCTestStartCommand.cxx1
-rw-r--r--Source/CTest/cmCTestTestHandler.cxx6
-rw-r--r--Source/CTest/cmCTestUpdateHandler.cxx1
-rw-r--r--Source/QtDialog/CMakeSetupDialog.cxx1
-rw-r--r--Source/QtDialog/FirstConfigure.cxx70
-rw-r--r--Source/QtDialog/FirstConfigure.h15
-rw-r--r--Source/QtDialog/QCMake.cxx36
-rw-r--r--Source/QtDialog/QCMake.h13
-rw-r--r--Source/bindexplib.cxx63
-rw-r--r--Source/bindexplib.h29
-rw-r--r--Source/cmAddDependenciesCommand.cxx1
-rw-r--r--Source/cmAddExecutableCommand.cxx8
-rw-r--r--Source/cmAddLibraryCommand.cxx66
-rw-r--r--Source/cmArchiveWrite.cxx4
-rw-r--r--Source/cmAuxSourceDirectoryCommand.cxx8
-rw-r--r--Source/cmBuildCommand.cxx1
-rw-r--r--Source/cmCPackPropertiesGenerator.cxx4
-rw-r--r--Source/cmCPluginAPI.cxx18
-rw-r--r--Source/cmCTest.cxx3
-rw-r--r--Source/cmCacheManager.cxx97
-rw-r--r--Source/cmCacheManager.h13
-rw-r--r--Source/cmCommonTargetGenerator.cxx41
-rw-r--r--Source/cmCommonTargetGenerator.h4
-rw-r--r--Source/cmComputeLinkDepends.cxx50
-rw-r--r--Source/cmComputeLinkDepends.h17
-rw-r--r--Source/cmComputeLinkInformation.cxx124
-rw-r--r--Source/cmComputeLinkInformation.h17
-rw-r--r--Source/cmComputeTargetDepends.cxx65
-rw-r--r--Source/cmCoreTryCompile.cxx19
-rw-r--r--Source/cmCustomCommandGenerator.cxx15
-rw-r--r--Source/cmDependsFortran.cxx2
-rw-r--r--Source/cmELF.cxx8
-rw-r--r--Source/cmEnableTestingCommand.cxx1
-rw-r--r--Source/cmExportBuildFileGenerator.cxx98
-rw-r--r--Source/cmExportBuildFileGenerator.h19
-rw-r--r--Source/cmExportCommand.cxx7
-rw-r--r--Source/cmExportFileGenerator.cxx139
-rw-r--r--Source/cmExportFileGenerator.h33
-rw-r--r--Source/cmExportInstallFileGenerator.cxx65
-rw-r--r--Source/cmExportInstallFileGenerator.h11
-rw-r--r--Source/cmExportLibraryDependenciesCommand.cxx10
-rw-r--r--Source/cmExportSet.cxx10
-rw-r--r--Source/cmExportSet.h3
-rw-r--r--Source/cmExportTryCompileFileGenerator.cxx63
-rw-r--r--Source/cmExportTryCompileFileGenerator.h22
-rw-r--r--Source/cmExtraCodeBlocksGenerator.cxx144
-rw-r--r--Source/cmExtraCodeBlocksGenerator.h10
-rw-r--r--Source/cmExtraCodeLiteGenerator.cxx64
-rw-r--r--Source/cmExtraEclipseCDT4Generator.cxx144
-rw-r--r--Source/cmExtraEclipseCDT4Generator.h2
-rw-r--r--Source/cmExtraKateGenerator.cxx96
-rw-r--r--Source/cmExtraKateGenerator.h11
-rw-r--r--Source/cmExtraSublimeTextGenerator.cxx77
-rw-r--r--Source/cmExtraSublimeTextGenerator.h6
-rw-r--r--Source/cmFLTKWrapUICommand.cxx39
-rw-r--r--Source/cmFileCommand.cxx1
-rw-r--r--Source/cmFileTimeComparison.cxx39
-rw-r--r--Source/cmFortranLexer.cxx592
-rw-r--r--Source/cmFortranLexer.h16
-rw-r--r--Source/cmFortranLexer.in.l3
-rw-r--r--Source/cmFortranParser.cxx473
-rw-r--r--Source/cmFortranParser.h2
-rw-r--r--Source/cmFortranParser.y10
-rw-r--r--Source/cmFortranParserImpl.cxx26
-rw-r--r--Source/cmFortranParserTokens.h108
-rw-r--r--Source/cmFunctionBlocker.h2
-rw-r--r--Source/cmGeneratorExpression.cxx24
-rw-r--r--Source/cmGeneratorExpression.h32
-rw-r--r--Source/cmGeneratorExpressionContext.cxx9
-rw-r--r--Source/cmGeneratorExpressionContext.h27
-rw-r--r--Source/cmGeneratorExpressionDAGChecker.cxx8
-rw-r--r--Source/cmGeneratorExpressionEvaluationFile.cxx10
-rw-r--r--Source/cmGeneratorExpressionEvaluator.h6
-rw-r--r--Source/cmGeneratorExpressionNode.cxx146
-rw-r--r--Source/cmGeneratorExpressionNode.h7
-rw-r--r--Source/cmGeneratorExpressionParser.h2
-rw-r--r--Source/cmGeneratorTarget.cxx2168
-rw-r--r--Source/cmGeneratorTarget.h262
-rw-r--r--Source/cmGetCMakePropertyCommand.cxx1
-rw-r--r--Source/cmGetPropertyCommand.cxx1
-rw-r--r--Source/cmGhsMultiTargetGenerator.cxx99
-rw-r--r--Source/cmGhsMultiTargetGenerator.h15
-rw-r--r--Source/cmGlobalGenerator.cxx404
-rw-r--r--Source/cmGlobalGenerator.h66
-rw-r--r--Source/cmGlobalGeneratorFactory.h6
-rw-r--r--Source/cmGlobalGhsMultiGenerator.cxx21
-rw-r--r--Source/cmGlobalGhsMultiGenerator.h11
-rw-r--r--Source/cmGlobalKdevelopGenerator.cxx32
-rw-r--r--Source/cmGlobalNinjaGenerator.cxx96
-rw-r--r--Source/cmGlobalNinjaGenerator.h25
-rw-r--r--Source/cmGlobalUnixMakefileGenerator3.cxx201
-rw-r--r--Source/cmGlobalUnixMakefileGenerator3.h14
-rw-r--r--Source/cmGlobalVisualStudio10Generator.cxx26
-rw-r--r--Source/cmGlobalVisualStudio10Generator.h6
-rw-r--r--Source/cmGlobalVisualStudio11Generator.cxx8
-rw-r--r--Source/cmGlobalVisualStudio11Generator.h2
-rw-r--r--Source/cmGlobalVisualStudio12Generator.cxx2
-rw-r--r--Source/cmGlobalVisualStudio14Generator.cxx2
-rw-r--r--Source/cmGlobalVisualStudio6Generator.cxx29
-rw-r--r--Source/cmGlobalVisualStudio6Generator.h12
-rw-r--r--Source/cmGlobalVisualStudio71Generator.cxx14
-rw-r--r--Source/cmGlobalVisualStudio71Generator.h6
-rw-r--r--Source/cmGlobalVisualStudio7Generator.cxx70
-rw-r--r--Source/cmGlobalVisualStudio7Generator.h21
-rw-r--r--Source/cmGlobalVisualStudio8Generator.cxx60
-rw-r--r--Source/cmGlobalVisualStudio8Generator.h11
-rw-r--r--Source/cmGlobalVisualStudio9Generator.cxx2
-rw-r--r--Source/cmGlobalVisualStudioGenerator.cxx123
-rw-r--r--Source/cmGlobalVisualStudioGenerator.h34
-rw-r--r--Source/cmGlobalXCodeGenerator.cxx641
-rw-r--r--Source/cmGlobalXCodeGenerator.h51
-rw-r--r--Source/cmGraphVizWriter.cxx71
-rw-r--r--Source/cmGraphVizWriter.h9
-rw-r--r--Source/cmIfCommand.cxx1
-rw-r--r--Source/cmIncludeExternalMSProjectCommand.cxx2
-rw-r--r--Source/cmInstallCommand.cxx35
-rw-r--r--Source/cmInstallDirectoryGenerator.cxx3
-rw-r--r--Source/cmInstallExportGenerator.cxx3
-rw-r--r--Source/cmInstallFilesGenerator.cxx4
-rw-r--r--Source/cmInstallTargetGenerator.cxx90
-rw-r--r--Source/cmInstallTargetGenerator.h3
-rw-r--r--Source/cmLinkItem.h34
-rw-r--r--Source/cmLinkLibrariesCommand.cxx4
-rw-r--r--Source/cmListFileCache.cxx2
-rw-r--r--Source/cmListFileCache.h9
-rw-r--r--Source/cmLocalGenerator.cxx308
-rw-r--r--Source/cmLocalGenerator.h71
-rw-r--r--Source/cmLocalGhsMultiGenerator.cxx11
-rw-r--r--Source/cmLocalNinjaGenerator.cxx46
-rw-r--r--Source/cmLocalNinjaGenerator.h12
-rw-r--r--Source/cmLocalUnixMakefileGenerator3.cxx188
-rw-r--r--Source/cmLocalUnixMakefileGenerator3.h34
-rw-r--r--Source/cmLocalVisualStudio10Generator.cxx14
-rw-r--r--Source/cmLocalVisualStudio6Generator.cxx388
-rw-r--r--Source/cmLocalVisualStudio6Generator.h32
-rw-r--r--Source/cmLocalVisualStudio7Generator.cxx322
-rw-r--r--Source/cmLocalVisualStudio7Generator.h38
-rw-r--r--Source/cmLocalVisualStudioGenerator.cxx12
-rw-r--r--Source/cmLocalVisualStudioGenerator.h6
-rw-r--r--Source/cmLocalXCodeGenerator.cxx16
-rw-r--r--Source/cmLocalXCodeGenerator.h3
-rw-r--r--Source/cmMakeDepend.cxx361
-rw-r--r--Source/cmMakeDepend.h150
-rw-r--r--Source/cmMakefile.cxx314
-rw-r--r--Source/cmMakefile.h66
-rw-r--r--Source/cmMakefileExecutableTargetGenerator.cxx45
-rw-r--r--Source/cmMakefileLibraryTargetGenerator.cxx123
-rw-r--r--Source/cmMakefileTargetGenerator.cxx123
-rw-r--r--Source/cmMakefileTargetGenerator.h3
-rw-r--r--Source/cmMakefileUtilityTargetGenerator.cxx18
-rw-r--r--Source/cmMarkAsAdvancedCommand.cxx3
-rw-r--r--Source/cmNinjaNormalTargetGenerator.cxx125
-rw-r--r--Source/cmNinjaTargetGenerator.cxx90
-rw-r--r--Source/cmNinjaTargetGenerator.h5
-rw-r--r--Source/cmNinjaUtilityTargetGenerator.cxx26
-rw-r--r--Source/cmOSXBundleGenerator.cxx25
-rw-r--r--Source/cmOrderDirectories.cxx4
-rw-r--r--Source/cmOutputRequiredFilesCommand.cxx598
-rw-r--r--Source/cmOutputRequiredFilesCommand.h3
-rw-r--r--Source/cmPolicies.h17
-rw-r--r--Source/cmQtAutoGeneratorInitializer.cxx1146
-rw-r--r--Source/cmQtAutoGeneratorInitializer.h41
-rw-r--r--Source/cmQtAutoGenerators.cxx8
-rw-r--r--Source/cmSetTargetPropertiesCommand.cxx1
-rw-r--r--Source/cmSourceFile.cxx7
-rw-r--r--Source/cmSourceFileLocation.cxx13
-rw-r--r--Source/cmStandardIncludes.h6
-rw-r--r--Source/cmState.cxx271
-rw-r--r--Source/cmState.h46
-rw-r--r--Source/cmSystemTools.cxx3
-rw-r--r--Source/cmTarget.cxx1909
-rw-r--r--Source/cmTarget.h239
-rw-r--r--Source/cmTargetExport.h5
-rw-r--r--Source/cmTargetLinkLibrariesCommand.cxx36
-rw-r--r--Source/cmTargetLinkLibrariesCommand.h2
-rw-r--r--Source/cmTargetPropCommandBase.cxx14
-rw-r--r--Source/cmTestGenerator.cxx12
-rw-r--r--Source/cmUtilitySourceCommand.cxx10
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx353
-rw-r--r--Source/cmVisualStudio10TargetGenerator.h4
-rw-r--r--Source/cmXCodeObject.h12
-rw-r--r--Source/cmake.cxx197
-rw-r--r--Source/cmake.h16
-rw-r--r--Source/cmcmd.cxx19
-rw-r--r--Source/kwsys/CMakeLists.txt11
-rw-r--r--Source/kwsys/Configure.hxx.in4
-rw-r--r--Source/kwsys/EncodingCXX.cxx1
-rw-r--r--Source/kwsys/SystemTools.cxx37
-rw-r--r--Source/kwsys/SystemTools.hxx.in4
-rw-r--r--Source/kwsys/Terminal.c11
-rw-r--r--Source/kwsys/kwsysPlatformTestsCXX.cxx15
-rw-r--r--Tests/AliasTarget/CMakeLists.txt4
-rw-r--r--Tests/AliasTarget/subdir/CMakeLists.txt3
-rw-r--r--Tests/AliasTarget/subdir/empty.cpp7
-rw-r--r--Tests/CMakeLists.txt22
-rw-r--r--Tests/CPackComponentsDEB/MyLibCPackConfig-components-source.cmake.in33
-rw-r--r--Tests/CPackComponentsDEB/MyLibCPackConfig-compression.cmake.in11
-rw-r--r--Tests/CPackComponentsDEB/RunCPackVerifyResult-components-source.cmake75
-rw-r--r--Tests/CPackComponentsDEB/RunCPackVerifyResult-compression.cmake54
-rw-r--r--Tests/CPackComponentsDEB/RunCPackVerifyResult.cmake6
-rw-r--r--Tests/DelphiCoverage/UTCovTest(UTCovTest.pas).html.in (renamed from Tests/DelphiCoverage/UTCovTest(UTCovTest.pas).html)0
-rw-r--r--Tests/FindXercesC/CMakeLists.txt10
-rw-r--r--Tests/FindXercesC/Test/CMakeLists.txt17
-rw-r--r--Tests/FindXercesC/Test/main.cxx7
-rw-r--r--Tests/MSManifest/Subdir/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/AutoExportDll/sub/sub.cxx2
-rw-r--r--Tests/RunCMake/BuildDepends/Custom-Always.cmake24
-rw-r--r--Tests/RunCMake/BuildDepends/RunCMakeTest.cmake2
-rw-r--r--Tests/RunCMake/CMakeLists.txt6
-rw-r--r--Tests/RunCMake/CommandLine/P_working-dir.cmake14
-rw-r--r--Tests/RunCMake/CommandLine/RunCMakeTest.cmake1
-rwxr-xr-xTests/RunCMake/FindPkgConfig/dummy-pkg-config.sh5
-rw-r--r--Tests/RunCMake/Framework/CMakeLists.txt3
-rw-r--r--Tests/RunCMake/Framework/FrameworkLayout.cmake5
-rw-r--r--Tests/RunCMake/Framework/OSXFrameworkLayout-build-check.cmake20
-rw-r--r--Tests/RunCMake/Framework/RunCMakeTest.cmake33
-rw-r--r--Tests/RunCMake/Framework/foo.c1
-rw-r--r--Tests/RunCMake/Framework/iOSFrameworkLayout-build-check.cmake20
-rw-r--r--Tests/RunCMake/Framework/ios.cmake25
-rw-r--r--Tests/RunCMake/Framework/osx.cmake18
-rw-r--r--Tests/RunCMake/VisibilityPreset/CMP0063-WARN-exe-stderr.txt15
-rw-r--r--Tests/RunCMake/VisibilityPreset/CMP0063-WARN-exe.cmake (renamed from Tests/RunCMake/VisibilityPreset/CMP0063-WARN-yes.cmake)5
-rw-r--r--Tests/RunCMake/VisibilityPreset/CMP0063-WARN-obj-stderr.txt15
-rw-r--r--Tests/RunCMake/VisibilityPreset/CMP0063-WARN-obj.cmake11
-rw-r--r--Tests/RunCMake/VisibilityPreset/CMP0063-WARN-sta-stderr.txt15
-rw-r--r--Tests/RunCMake/VisibilityPreset/CMP0063-WARN-sta.cmake11
-rw-r--r--Tests/RunCMake/VisibilityPreset/CMP0063-WARN-yes-stderr.txt50
-rw-r--r--Tests/RunCMake/VisibilityPreset/RunCMakeTest.cmake4
-rw-r--r--Tests/RunCMake/XcodeProject/RunCMakeTest.cmake35
-rw-r--r--Tests/RunCMake/XcodeProject/XcodeBundles.cmake30
-rw-r--r--Tests/RunCMake/XcodeProject/XcodeOptimizationFlags-check.cmake7
-rw-r--r--Tests/RunCMake/XcodeProject/XcodeOptimizationFlags.cmake20
-rw-r--r--Tests/RunCMake/XcodeProject/XcodePreserveNonOptimizationFlags-check.cmake8
-rw-r--r--Tests/RunCMake/XcodeProject/XcodePreserveNonOptimizationFlags.cmake12
-rw-r--r--Tests/RunCMake/XcodeProject/XcodePreserveObjcFlag-check.cmake7
-rw-r--r--Tests/RunCMake/XcodeProject/XcodePreserveObjcFlag.cmake6
-rw-r--r--Tests/RunCMake/add_subdirectory/Function-stdout.txt10
-rw-r--r--Tests/RunCMake/add_subdirectory/Function.cmake17
-rw-r--r--Tests/RunCMake/add_subdirectory/Function/CMakeLists.txt5
-rw-r--r--Tests/RunCMake/add_subdirectory/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/ctest_test/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/ctest_test/TestOutputSize-check.cmake10
-rw-r--r--Tests/SubDir/CMakeLists.txt4
-rw-r--r--Tests/SubDir/Executable/CMakeLists.txt12
-rw-r--r--Utilities/Release/create-cmake-release.cmake3
-rw-r--r--Utilities/Release/dash2win64_cygwin.cmake2
-rw-r--r--Utilities/Release/dashmacmini2_release.cmake25
-rw-r--r--Utilities/Release/release_cmake.cmake19
-rw-r--r--Utilities/cmlibarchive/CMakeLists.txt77
-rw-r--r--Utilities/cmlibarchive/COPYING5
-rw-r--r--Utilities/cmlibarchive/README-CMake.txt8
-rw-r--r--Utilities/cmlibarchive/build/cmake/CreatePkgConfigFile.cmake6
-rw-r--r--Utilities/cmlibarchive/build/cmake/config.h.in41
-rw-r--r--Utilities/cmlibarchive/libarchive/CMakeLists.txt21
-rw-r--r--Utilities/cmlibarchive/libarchive/archive.h186
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_cryptor.c435
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_cryptor_private.h152
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_digest.c (renamed from Utilities/cmlibarchive/libarchive/archive_crypto.c)10
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_digest_private.h (renamed from Utilities/cmlibarchive/libarchive/archive_crypto_private.h)42
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_entry.32
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_entry.c130
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_entry.h59
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_entry_acl.32
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_entry_paths.32
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_entry_perms.32
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_entry_stat.34
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_entry_time.32
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_entry_xattr.c5
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_hmac.c234
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_hmac_private.h95
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_match.c9
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_pathmatch.c8
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_private.h19
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_random.c269
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_random_private.h36
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_read.34
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_read.c74
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_read_add_passphrase.374
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_read_add_passphrase.c186
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_read_append_filter.c6
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_read_data.32
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_read_disk_entry_from_file.c8
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_read_disk_posix.c23
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_read_disk_private.h5
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_read_disk_set_standard_lookup.c2
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_read_disk_windows.c19
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_read_extract.c17
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_read_extract2.c21
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_read_filter.317
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_read_open.34
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_read_open_fd.c29
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_read_open_memory.c12
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_read_private.h43
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_read_set_options.c7
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_read_support_filter_all.c2
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_read_support_filter_compress.c24
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_read_support_filter_lz4.c728
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_read_support_filter_lzop.c7
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_read_support_filter_uu.c3
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_read_support_filter_xz.c2
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_read_support_format_7zip.c48
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_read_support_format_all.c1
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_read_support_format_ar.c21
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_read_support_format_cpio.c22
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_read_support_format_iso9660.c72
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_read_support_format_lha.c480
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_read_support_format_mtree.c266
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_read_support_format_rar.c34
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_read_support_format_tar.c44
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_read_support_format_warc.c794
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_read_support_format_xar.c34
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_read_support_format_zip.c1074
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_string.c91
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_util.c143
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_windows.h2
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_write.315
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_write.c11
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_write_add_filter.c1
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_write_add_filter_by_name.c1
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_write_add_filter_lz4.c646
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_write_add_filter_xz.c44
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_write_data.314
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_write_disk.310
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_write_disk_posix.c87
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_write_disk_set_standard_lookup.c7
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_write_disk_windows.c6
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_write_filter.318
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_write_finish_entry.32
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_write_format.316
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_write_open.32
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_write_open_filename.c5
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_write_private.h15
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_write_set_format.c1
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_write_set_format_by_name.c1
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_write_set_format_filter_by_ext.c142
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_write_set_format_iso9660.c10
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_write_set_format_mtree.c4
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_write_set_format_warc.c439
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_write_set_format_xar.c63
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_write_set_format_zip.c678
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_write_set_options.342
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_write_set_passphrase.374
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_write_set_passphrase.c95
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_xxhash.h47
-rw-r--r--Utilities/cmlibarchive/libarchive/libarchive.34
-rw-r--r--Utilities/cmlibarchive/libarchive/libarchive_internals.32
-rw-r--r--Utilities/cmlibarchive/libarchive/mtree.518
-rw-r--r--Utilities/cmlibarchive/libarchive/tar.52
-rw-r--r--Utilities/cmlibarchive/libarchive/xxhash.c500
-rwxr-xr-xbootstrap23
475 files changed, 19169 insertions, 9303 deletions
diff --git a/Auxiliary/cmake-mode.el b/Auxiliary/cmake-mode.el
index e50ae7b..08ac490 100644
--- a/Auxiliary/cmake-mode.el
+++ b/Auxiliary/cmake-mode.el
@@ -177,7 +177,7 @@ the indentation. Otherwise it retains the same position on the line"
(interactive)
(save-excursion
(goto-char (point-min))
- (while (re-search-forward "^\\([ \t]*\\)\\(\\w+\\)\\([ \t]*(\\)" nil t)
+ (while (re-search-forward "^\\([ \t]*\\)\\_<\\(\\(?:\\w\\|\\s_\\)+\\)\\_>\\([ \t]*(\\)" nil t)
(replace-match
(concat
(match-string 1)
diff --git a/CMakeCPackOptions.cmake.in b/CMakeCPackOptions.cmake.in
index b6013ef..ae00653 100644
--- a/CMakeCPackOptions.cmake.in
+++ b/CMakeCPackOptions.cmake.in
@@ -183,6 +183,13 @@ if("${CPACK_GENERATOR}" STREQUAL "PackageMaker")
endif()
endif()
+if("${CPACK_GENERATOR}" STREQUAL "DragNDrop")
+ set(CPACK_DMG_BACKGROUND_IMAGE
+ "@CMake_SOURCE_DIR@/Packaging/CMakeDMGBackground.tif")
+ set(CPACK_DMG_DS_STORE_SETUP_SCRIPT
+ "@CMake_SOURCE_DIR@/Packaging/CMakeDMGSetup.scpt")
+endif()
+
if("${CPACK_GENERATOR}" STREQUAL "WIX")
# Reset CPACK_PACKAGE_VERSION to deal with WiX restriction.
# But the file names still use the full CMake_VERSION value:
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c96f68b..ebee14b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -372,12 +372,14 @@ macro (CMAKE_BUILD_UTILITIES)
set(ENABLE_LZMA ON CACHE INTERNAL "Enable the use of the system found LZMA library if found")
set(ENABLE_ZLIB ON CACHE INTERNAL "Enable the use of the system found ZLIB library if found")
set(ENABLE_BZip2 ON CACHE INTERNAL "Enable the use of the system found BZip2 library if found")
+ set(ENABLE_LIBXML2 OFF CACHE INTERNAL "Enable the use of the system found libxml2 library if found")
set(ENABLE_EXPAT OFF CACHE INTERNAL "Enable the use of the system found EXPAT library if found")
set(ENABLE_PCREPOSIX OFF CACHE INTERNAL "Enable the use of the system found PCREPOSIX library if found")
set(ENABLE_LibGCC OFF CACHE INTERNAL "Enable the use of the system found LibGCC library if found")
set(ENABLE_XATTR OFF CACHE INTERNAL "Enable extended attribute support")
set(ENABLE_ACL OFF CACHE INTERNAL "Enable ACL support")
set(ENABLE_ICONV OFF CACHE INTERNAL "Enable iconv support")
+ set(ENABLE_CNG OFF CACHE INTERNAL "Enable the use of CNG(Crypto Next Generation)")
add_subdirectory(Utilities/cmlibarchive)
CMAKE_SET_TARGET_FOLDER(cmlibarchive "Utilities/3rdParty")
set(CMAKE_TAR_LIBRARIES cmlibarchive ${BZIP2_LIBRARIES})
diff --git a/Help/manual/cmake-buildsystem.7.rst b/Help/manual/cmake-buildsystem.7.rst
index bc633e6..4a04f31 100644
--- a/Help/manual/cmake-buildsystem.7.rst
+++ b/Help/manual/cmake-buildsystem.7.rst
@@ -95,15 +95,18 @@ Apple Frameworks
""""""""""""""""
A ``SHARED`` library may be marked with the :prop_tgt:`FRAMEWORK`
-target property to create an OS X Framework:
+target property to create an OS X or iOS Framework Bundle.
+The ``MACOSX_FRAMEWORK_IDENTIFIER`` sets ``CFBundleIdentifier`` key
+and it uniquely identifies the bundle.
.. code-block:: cmake
add_library(MyFramework SHARED MyFramework.cpp)
set_target_properties(MyFramework PROPERTIES
- FRAMEWORK 1
+ FRAMEWORK TRUE
FRAMEWORK_VERSION A
- )
+ MACOSX_FRAMEWORK_IDENTIFIER org.cmake.MyFramework
+ )
.. _`Object Libraries`:
diff --git a/Help/manual/cmake-toolchains.7.rst b/Help/manual/cmake-toolchains.7.rst
index 492fcac..7b294a8 100644
--- a/Help/manual/cmake-toolchains.7.rst
+++ b/Help/manual/cmake-toolchains.7.rst
@@ -151,6 +151,36 @@ target system prefixes, whereas executables which must be run as part of the bui
should be found only on the host and not on the target. This is the purpose of
the ``CMAKE_FIND_ROOT_PATH_MODE_*`` variables.
+.. _`Cray Cross-Compile`:
+
+Cross Compiling for the Cray Linux Environment
+----------------------------------------------
+
+Cross compiling for compute nodes in the Cray Linux Environment can be done
+without needing a separate toolchain file. Specifying
+``-DCMAKE_SYSTEM_NAME=CrayLinuxEnvironment`` on the CMake command line will
+ensure that the appropriate build settings and search paths are configured.
+The platform will pull its configuration from the current environment
+variables and will configure a project to use the compiler wrappers from the
+Cray Programming Environment's ``PrgEnv-*`` modules if present and loaded.
+
+The default configuration of the Cray Programming Environment is to only
+support static libraries. This can be overridden and shared libraries
+enabled by setting the ``CRAYPE_LINK_TYPE`` environment variable to
+``dynamic``.
+
+Running CMake without specifying :variable:`CMAKE_SYSTEM_NAME` will
+run the configure step in host mode assuming a standard Linux environment.
+If not overridden, the ``PrgEnv-*`` compiler wrappers will end up getting used,
+which if targeting the either the login node or compute node, is likely not the
+desired behavior. The exception to this would be if you are building directly
+on a NID instead of cross-compiling from a login node. If trying to build
+software for a login node, you will need to either first unload the
+currently loaded ``PrgEnv-*`` module or explicitly tell CMake to use the
+system compilers in ``/usr/bin`` instead of the Cray wrappers. If instead
+targeting a compute node is desired, just specify the
+:variable:`CMAKE_SYSTEM_NAME` as mentioned above.
+
Cross Compiling using Clang
---------------------------
diff --git a/Help/prop_dir/CLEAN_NO_CUSTOM.rst b/Help/prop_dir/CLEAN_NO_CUSTOM.rst
index 9a4173e..5ae78bf 100644
--- a/Help/prop_dir/CLEAN_NO_CUSTOM.rst
+++ b/Help/prop_dir/CLEAN_NO_CUSTOM.rst
@@ -1,7 +1,6 @@
CLEAN_NO_CUSTOM
---------------
-Should the output of custom commands be left.
-
-If this is true then the outputs of custom commands for this directory
-will not be removed during the "make clean" stage.
+Set to true to tell :ref:`Makefile Generators` not to remove the outputs of
+custom commands for this directory during the ``make clean`` operation.
+This is ignored on other generators because it is not possible to implement.
diff --git a/Help/prop_sf/MACOSX_PACKAGE_LOCATION.rst b/Help/prop_sf/MACOSX_PACKAGE_LOCATION.rst
index 27f2929..69cdcb7 100644
--- a/Help/prop_sf/MACOSX_PACKAGE_LOCATION.rst
+++ b/Help/prop_sf/MACOSX_PACKAGE_LOCATION.rst
@@ -1,19 +1,23 @@
MACOSX_PACKAGE_LOCATION
-----------------------
-Place a source file inside a Mac OS X bundle, CFBundle, or framework.
+Place a source file inside a Application Bundle
+(:prop_tgt:`MACOSX_BUNDLE`), Core Foundation Bundle (:prop_tgt:`BUNDLE`),
+or Framework Bundle (:prop_tgt:`FRAMEWORK`). It is applicable for OS X
+and iOS.
-Executable targets with the MACOSX_BUNDLE property set are built as
-Mac OS X application bundles on Apple platforms. Shared library
-targets with the FRAMEWORK property set are built as Mac OS X
-frameworks on Apple platforms. Module library targets with the BUNDLE
-property set are built as Mac OS X CFBundle bundles on Apple
-platforms. Source files listed in the target with this property set
-will be copied to a directory inside the bundle or framework content
-folder specified by the property value. For bundles the content
-folder is "<name>.app/Contents". For frameworks the content folder is
-"<name>.framework/Versions/<version>". For cfbundles the content
-folder is "<name>.bundle/Contents" (unless the extension is changed).
-See the PUBLIC_HEADER, PRIVATE_HEADER, and RESOURCE target properties
-for specifying files meant for Headers, PrivateHeaders, or Resources
-directories.
+Executable targets with the :prop_tgt:`MACOSX_BUNDLE` property set are
+built as OS X or iOS application bundles on Apple platforms. Shared
+library targets with the :prop_tgt:`FRAMEWORK` property set are built as
+OS X or iOS frameworks on Apple platforms. Module library targets with
+the :prop_tgt:`BUNDLE` property set are built as OS X ``CFBundle`` bundles
+on Apple platforms. Source files listed in the target with this property
+set will be copied to a directory inside the bundle or framework content
+folder specified by the property value. For OS X Application Bundles the
+content folder is ``<name>.app/Contents``. For OS X Frameworks the
+content folder is ``<name>.framework/Versions/<version>``. For OS X
+CFBundles the content folder is ``<name>.bundle/Contents`` (unless the
+extension is changed). See the :prop_tgt:`PUBLIC_HEADER`,
+:prop_tgt:`PRIVATE_HEADER`, and :prop_tgt:`RESOURCE` target properties for
+specifying files meant for ``Headers``, ``PrivateHeaders``, or
+``Resources`` directories.
diff --git a/Help/prop_tgt/BUNDLE.rst b/Help/prop_tgt/BUNDLE.rst
index 166659f..075f017 100644
--- a/Help/prop_tgt/BUNDLE.rst
+++ b/Help/prop_tgt/BUNDLE.rst
@@ -1,9 +1,9 @@
BUNDLE
------
-This target is a CFBundle on the Mac.
+This target is a ``CFBundle`` on the OS X.
If a module library target has this property set to true it will be
-built as a CFBundle when built on the mac. It will have the directory
-structure required for a CFBundle and will be suitable to be used for
+built as a ``CFBundle`` when built on the mac. It will have the directory
+structure required for a ``CFBundle`` and will be suitable to be used for
creating Browser Plugins or other application resources.
diff --git a/Help/prop_tgt/BUNDLE_EXTENSION.rst b/Help/prop_tgt/BUNDLE_EXTENSION.rst
index 94ac935..ea265b3 100644
--- a/Help/prop_tgt/BUNDLE_EXTENSION.rst
+++ b/Help/prop_tgt/BUNDLE_EXTENSION.rst
@@ -1,7 +1,7 @@
BUNDLE_EXTENSION
----------------
-The file extension used to name a BUNDLE target on the Mac.
+The file extension used to name a :prop_tgt:`BUNDLE` target on the OS X and iOS.
-The default value is "bundle" - you can also use "plugin" or whatever
+The default value is ``bundle`` - you can also use ``plugin`` or whatever
file extension is required by the host app for your bundle.
diff --git a/Help/prop_tgt/ENABLE_EXPORTS.rst b/Help/prop_tgt/ENABLE_EXPORTS.rst
index dfd4af7..9e22309 100644
--- a/Help/prop_tgt/ENABLE_EXPORTS.rst
+++ b/Help/prop_tgt/ENABLE_EXPORTS.rst
@@ -12,9 +12,9 @@ dependency on the executable is created for targets that link to it.
For DLL platforms an import library will be created for the exported
symbols and then used for linking. All Windows-based systems
including Cygwin are DLL platforms. For non-DLL platforms that
-require all symbols to be resolved at link time, such as Mac OS X, the
+require all symbols to be resolved at link time, such as OS X, the
module will "link" to the executable using a flag like
-"-bundle_loader". For other non-DLL platforms the link rule is simply
+``-bundle_loader``. For other non-DLL platforms the link rule is simply
ignored since the dynamic loader will automatically bind symbols when
the module is loaded.
diff --git a/Help/prop_tgt/FRAMEWORK.rst b/Help/prop_tgt/FRAMEWORK.rst
index dcb6d3b..6c212c3 100644
--- a/Help/prop_tgt/FRAMEWORK.rst
+++ b/Help/prop_tgt/FRAMEWORK.rst
@@ -1,11 +1,31 @@
FRAMEWORK
---------
-This target is a framework on the Mac.
+Build ``SHARED`` library as Framework Bundle on the OS X and iOS.
-If a shared library target has this property set to true it will be
-built as a framework when built on the mac. It will have the
+If a ``SHARED`` library target has this property set to ``TRUE`` it will be
+built as a framework when built on the OS X and iOS. It will have the
directory structure required for a framework and will be suitable to
be used with the ``-framework`` option
-See also the :prop_tgt:`FRAMEWORK_VERSION` target property.
+To customize ``Info.plist`` file in the framework, use
+:prop_tgt:`MACOSX_FRAMEWORK_INFO_PLIST` target property.
+
+For OS X see also the :prop_tgt:`FRAMEWORK_VERSION` target property.
+
+Example of creation ``dynamicFramework``:
+
+.. code-block:: cmake
+
+ add_library(dynamicFramework SHARED
+ dynamicFramework.c
+ dynamicFramework.h
+ )
+ set_target_properties(dynamicFramework PROPERTIES
+ FRAMEWORK TRUE
+ FRAMEWORK_VERSION C
+ MACOSX_FRAMEWORK_IDENTIFIER com.cmake.dynamicFramework
+ MACOSX_FRAMEWORK_INFO_PLIST Info.plist
+ PUBLIC_HEADER dynamicFramework.h
+ XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "iPhone Developer"
+ )
diff --git a/Help/prop_tgt/FRAMEWORK_VERSION.rst b/Help/prop_tgt/FRAMEWORK_VERSION.rst
index bf650a7..6aa3026 100644
--- a/Help/prop_tgt/FRAMEWORK_VERSION.rst
+++ b/Help/prop_tgt/FRAMEWORK_VERSION.rst
@@ -3,3 +3,6 @@ FRAMEWORK_VERSION
Version of a framework created using the :prop_tgt:`FRAMEWORK` target
property (e.g. ``A``).
+
+This property only affects OS X, as iOS doesn't have versioned
+directory structure.
diff --git a/Help/prop_tgt/MACOSX_BUNDLE.rst b/Help/prop_tgt/MACOSX_BUNDLE.rst
index ff21e61..8d7d914 100644
--- a/Help/prop_tgt/MACOSX_BUNDLE.rst
+++ b/Help/prop_tgt/MACOSX_BUNDLE.rst
@@ -1,12 +1,12 @@
MACOSX_BUNDLE
-------------
-Build an executable as an application bundle on Mac OS X.
+Build an executable as an Application Bundle on OS X or iOS.
-When this property is set to true the executable when built on Mac OS
-X will be created as an application bundle. This makes it a GUI
-executable that can be launched from the Finder. See the
-MACOSX_BUNDLE_INFO_PLIST target property for information about
-creation of the Info.plist file for the application bundle. This
-property is initialized by the value of the variable
-CMAKE_MACOSX_BUNDLE if it is set when a target is created.
+When this property is set to true the executable when built on OS X
+or iOS will be created as an application bundle. This makes it
+a GUI executable that can be launched from the Finder. See the
+:prop_tgt:`MACOSX_FRAMEWORK_INFO_PLIST` target property for information about
+creation of the ``Info.plist`` file for the application bundle.
+This property is initialized by the value of the variable
+:variable:`CMAKE_MACOSX_BUNDLE` if it is set when a target is created.
diff --git a/Help/prop_tgt/MACOSX_BUNDLE_INFO_PLIST.rst b/Help/prop_tgt/MACOSX_BUNDLE_INFO_PLIST.rst
index 07a933f..8515acc 100644
--- a/Help/prop_tgt/MACOSX_BUNDLE_INFO_PLIST.rst
+++ b/Help/prop_tgt/MACOSX_BUNDLE_INFO_PLIST.rst
@@ -1,10 +1,10 @@
MACOSX_BUNDLE_INFO_PLIST
------------------------
-Specify a custom ``Info.plist`` template for a Mac OS X App Bundle.
+Specify a custom ``Info.plist`` template for a OS X and iOS Application Bundle.
An executable target with :prop_tgt:`MACOSX_BUNDLE` enabled will be built as an
-application bundle on Mac OS X. By default its ``Info.plist`` file is created
+application bundle on OS X. By default its ``Info.plist`` file is created
by configuring a template called ``MacOSXBundleInfo.plist.in`` located in the
:variable:`CMAKE_MODULE_PATH`. This property specifies an alternative template
file name which may be a full path.
diff --git a/Help/prop_tgt/MACOSX_FRAMEWORK_INFO_PLIST.rst b/Help/prop_tgt/MACOSX_FRAMEWORK_INFO_PLIST.rst
index 548c3ac..58f31d4 100644
--- a/Help/prop_tgt/MACOSX_FRAMEWORK_INFO_PLIST.rst
+++ b/Help/prop_tgt/MACOSX_FRAMEWORK_INFO_PLIST.rst
@@ -1,10 +1,10 @@
MACOSX_FRAMEWORK_INFO_PLIST
---------------------------
-Specify a custom ``Info.plist`` template for a Mac OS X Framework.
+Specify a custom ``Info.plist`` template for a OS X and iOS Framework.
A library target with :prop_tgt:`FRAMEWORK` enabled will be built as a
-framework on Mac OS X. By default its ``Info.plist`` file is created by
+framework on OS X. By default its ``Info.plist`` file is created by
configuring a template called ``MacOSXFrameworkInfo.plist.in`` located in the
:variable:`CMAKE_MODULE_PATH`. This property specifies an alternative template
file name which may be a full path.
diff --git a/Help/prop_tgt/MACOSX_RPATH.rst b/Help/prop_tgt/MACOSX_RPATH.rst
index d3934ba..41bb8cc 100644
--- a/Help/prop_tgt/MACOSX_RPATH.rst
+++ b/Help/prop_tgt/MACOSX_RPATH.rst
@@ -1,18 +1,23 @@
MACOSX_RPATH
------------
-Whether to use rpaths on Mac OS X.
+Whether this target on OS X or iOS is located at runtime using rpaths.
When this property is set to true, the directory portion of
-the "install_name" field of shared libraries will be ``@rpath``
-unless overridden by :prop_tgt:`INSTALL_NAME_DIR`. Runtime
-paths will also be embedded in binaries using this target and
-can be controlled by the :prop_tgt:`INSTALL_RPATH` target property.
+the "install_name" field of this shared library will be ``@rpath``
+unless overridden by :prop_tgt:`INSTALL_NAME_DIR`. This indicates
+the shared library is to be found at runtime using runtime
+paths (rpaths).
+
This property is initialized by the value of the variable
:variable:`CMAKE_MACOSX_RPATH` if it is set when a target is
created.
-Policy CMP0042 was introduced to change the default value of
-MACOSX_RPATH to ON. This is because use of ``@rpath`` is a
+Runtime paths will also be embedded in binaries using this target and
+can be controlled by the :prop_tgt:`INSTALL_RPATH` target property on
+the target linking to this target.
+
+Policy :policy:`CMP0042` was introduced to change the default value of
+``MACOSX_RPATH`` to ``TRUE. This is because use of ``@rpath`` is a
more flexible and powerful alternative to ``@executable_path`` and
``@loader_path``.
diff --git a/Help/prop_tgt/OSX_ARCHITECTURES_CONFIG.rst b/Help/prop_tgt/OSX_ARCHITECTURES_CONFIG.rst
index f8fdcff..fb78177 100644
--- a/Help/prop_tgt/OSX_ARCHITECTURES_CONFIG.rst
+++ b/Help/prop_tgt/OSX_ARCHITECTURES_CONFIG.rst
@@ -1,7 +1,7 @@
OSX_ARCHITECTURES_<CONFIG>
--------------------------
-Per-configuration OS X binary architectures for a target.
+Per-configuration OS X and iOS binary architectures for a target.
This property is the configuration-specific version of
:prop_tgt:`OSX_ARCHITECTURES`.
diff --git a/Help/prop_tgt/PRIVATE_HEADER.rst b/Help/prop_tgt/PRIVATE_HEADER.rst
index da2127b..c4412ed 100644
--- a/Help/prop_tgt/PRIVATE_HEADER.rst
+++ b/Help/prop_tgt/PRIVATE_HEADER.rst
@@ -1,11 +1,11 @@
PRIVATE_HEADER
--------------
-Specify private header files in a FRAMEWORK shared library target.
+Specify private header files in a :prop_tgt:`FRAMEWORK` shared library target.
-Shared library targets marked with the FRAMEWORK property generate
-frameworks on OS X and normal shared libraries on other platforms.
+Shared library targets marked with the :prop_tgt:`FRAMEWORK` property generate
+frameworks on OS X, iOS and normal shared libraries on other platforms.
This property may be set to a list of header files to be placed in the
PrivateHeaders directory inside the framework folder. On non-Apple
-platforms these headers may be installed using the PRIVATE_HEADER
-option to the install(TARGETS) command.
+platforms these headers may be installed using the ``PRIVATE_HEADER``
+option to the ``install(TARGETS)`` command.
diff --git a/Help/prop_tgt/PUBLIC_HEADER.rst b/Help/prop_tgt/PUBLIC_HEADER.rst
index 6e25d94..d4a636c 100644
--- a/Help/prop_tgt/PUBLIC_HEADER.rst
+++ b/Help/prop_tgt/PUBLIC_HEADER.rst
@@ -1,11 +1,11 @@
PUBLIC_HEADER
-------------
-Specify public header files in a FRAMEWORK shared library target.
+Specify public header files in a :prop_tgt:`FRAMEWORK` shared library target.
-Shared library targets marked with the FRAMEWORK property generate
-frameworks on OS X and normal shared libraries on other platforms.
+Shared library targets marked with the :prop_tgt:`FRAMEWORK` property generate
+frameworks on OS X, iOS and normal shared libraries on other platforms.
This property may be set to a list of header files to be placed in the
-Headers directory inside the framework folder. On non-Apple platforms
-these headers may be installed using the PUBLIC_HEADER option to the
-install(TARGETS) command.
+``Headers`` directory inside the framework folder. On non-Apple platforms
+these headers may be installed using the ``PUBLIC_HEADER`` option to the
+``install(TARGETS)`` command.
diff --git a/Help/prop_tgt/RESOURCE.rst b/Help/prop_tgt/RESOURCE.rst
index 1e9921d..5dad3ea 100644
--- a/Help/prop_tgt/RESOURCE.rst
+++ b/Help/prop_tgt/RESOURCE.rst
@@ -1,11 +1,11 @@
RESOURCE
--------
-Specify resource files in a FRAMEWORK shared library target.
+Specify resource files in a :prop_tgt:`FRAMEWORK` shared library target.
-Shared library targets marked with the FRAMEWORK property generate
-frameworks on OS X and normal shared libraries on other platforms.
+Shared library targets marked with the :prop_tgt:`FRAMEWORK` property generate
+frameworks on OS X, iOS and normal shared libraries on other platforms.
This property may be set to a list of files to be placed in the
-Resources directory inside the framework folder. On non-Apple
-platforms these files may be installed using the RESOURCE option to
-the install(TARGETS) command.
+``Resources`` directory inside the framework folder. On non-Apple
+platforms these files may be installed using the ``RESOURCE`` option to
+the ``install(TARGETS)`` command.
diff --git a/Help/release/dev/0-sample-topic.rst b/Help/release/dev/0-sample-topic.rst
new file mode 100644
index 0000000..e4cc01e
--- /dev/null
+++ b/Help/release/dev/0-sample-topic.rst
@@ -0,0 +1,7 @@
+0-sample-topic
+--------------
+
+* This is a sample release note for the change in a topic.
+ Developers should add similar notes for each topic branch
+ making a noteworthy change. Each document should be named
+ and titled to match the topic name to avoid merge conflicts.
diff --git a/Help/release/dev/FindFLEX-DEFINES_FILE.rst b/Help/release/dev/FindFLEX-DEFINES_FILE.rst
new file mode 100644
index 0000000..95133aa
--- /dev/null
+++ b/Help/release/dev/FindFLEX-DEFINES_FILE.rst
@@ -0,0 +1,6 @@
+FindFLEX-DEFINES_FILE
+---------------------
+
+* The :module:`FindFLEX` module ``FLEX_TARGET`` macro learned a
+ new ``DEFINES_FILE`` option to specify a custom output header
+ to be generated.
diff --git a/Help/release/dev/FindGTK2_GTK2_TARGETS.rst b/Help/release/dev/FindGTK2_GTK2_TARGETS.rst
new file mode 100644
index 0000000..76e3657
--- /dev/null
+++ b/Help/release/dev/FindGTK2_GTK2_TARGETS.rst
@@ -0,0 +1,7 @@
+FindGTK2_GTK2_TARGETS
+---------------------
+
+* The :module:`FindGTK2` module, when ``GTK2_USE_IMPORTED_TARGETS`` is
+ enabled, now sets ``GTK2_LIBRARIES`` to contain the list of imported
+ targets instead of the paths to the libraries. Moreover it now sets
+ a new ``GTK2_TARGETS`` variable containing all the targets imported.
diff --git a/Help/release/dev/FindGTK2_sigc++_c++11.rst b/Help/release/dev/FindGTK2_sigc++_c++11.rst
new file mode 100644
index 0000000..2ba1459
--- /dev/null
+++ b/Help/release/dev/FindGTK2_sigc++_c++11.rst
@@ -0,0 +1,7 @@
+FindGTK2_sigc++_c++11
+---------------------
+
+* Starting with sigc++ 2.5.1, c++11 must be enabled in order to use
+ sigc++. The GTK2::sigc++ imported target will automatically enable the
+ required build flags in order to build with the version found on the
+ system.
diff --git a/Help/release/dev/FindOpenSSL-msvc-static-rt.rst b/Help/release/dev/FindOpenSSL-msvc-static-rt.rst
new file mode 100644
index 0000000..6e0ee27
--- /dev/null
+++ b/Help/release/dev/FindOpenSSL-msvc-static-rt.rst
@@ -0,0 +1,6 @@
+FindOpenSSL-msvc-static-rt
+--------------------------
+
+* The :module:`FindOpenSSL` module gained a new
+ ``OPENSSL_MSVC_STATIC_RT`` option to search for libraries using
+ the MSVC static runtime.
diff --git a/Help/release/dev/FindXercesC-imported-targets.rst b/Help/release/dev/FindXercesC-imported-targets.rst
new file mode 100644
index 0000000..69cec5c
--- /dev/null
+++ b/Help/release/dev/FindXercesC-imported-targets.rst
@@ -0,0 +1,4 @@
+FindXercesC-imported-targets
+----------------------------
+
+* The :module:`FindXercesC` module now provides imported targets.
diff --git a/Help/release/dev/add-armcc-toolchain.rst b/Help/release/dev/add-armcc-toolchain.rst
new file mode 100644
index 0000000..2cf6414
--- /dev/null
+++ b/Help/release/dev/add-armcc-toolchain.rst
@@ -0,0 +1,4 @@
+add-armcc-toolchain
+-------------------
+
+* Support was added for the ARM Compiler (arm.com) with compiler id ``ARMCC``.
diff --git a/Help/release/dev/add-cray-linux-platform.rst b/Help/release/dev/add-cray-linux-platform.rst
new file mode 100644
index 0000000..7000382
--- /dev/null
+++ b/Help/release/dev/add-cray-linux-platform.rst
@@ -0,0 +1,7 @@
+add-cray-linux-platform
+-----------------------
+
+* A new platform file for cross-compiling in the Cray Linux Environment to
+ target compute nodes was added. See
+ :ref:`Cross Compiling for the Cray Linux Environment <Cray Cross-Compile>`
+ for usage details.
diff --git a/Help/release/dev/better-looking-mac-packages.rst b/Help/release/dev/better-looking-mac-packages.rst
new file mode 100644
index 0000000..ef1b8e8
--- /dev/null
+++ b/Help/release/dev/better-looking-mac-packages.rst
@@ -0,0 +1,8 @@
+better-looking-mac-packages
+---------------------------
+
+* The :module:`CPackDMG` module learned new variable to specify AppleScript
+ file run to customize appearance of ``DragNDrop`` installer folder,
+ including background image setting using supplied PNG or multi-resolution
+ TIFF file. See the :variable:`CPACK_DMG_DS_STORE_SETUP_SCRIPT` and
+ :variable:`CPACK_DMG_BACKGROUND_IMAGE` variables.
diff --git a/Help/release/dev/cmake-gui-select-toolset.rst b/Help/release/dev/cmake-gui-select-toolset.rst
new file mode 100644
index 0000000..5186f91
--- /dev/null
+++ b/Help/release/dev/cmake-gui-select-toolset.rst
@@ -0,0 +1,6 @@
+cmake-gui-select-toolset
+------------------------
+
+* The :manual:`cmake-gui(1)` learned an option to set the toolset
+ to be used with VS IDE and Xcode generators, much like the
+ existing ``-T`` option to :manual:`cmake(1)`.
diff --git a/Help/release/dev/cpack-deb-config-file-source-field.rst b/Help/release/dev/cpack-deb-config-file-source-field.rst
new file mode 100644
index 0000000..bbc2aa6
--- /dev/null
+++ b/Help/release/dev/cpack-deb-config-file-source-field.rst
@@ -0,0 +1,6 @@
+cpack-deb-config-file-source-field
+----------------------------------
+
+* The :module:`CPackDeb` module learned to set optional config
+ file ``Source`` field - monolithic and per-component variable.
+ See :variable:`CPACK_DEBIAN_PACKAGE_SOURCE`.
diff --git a/Help/release/dev/cpack-deb-new-component-vars.rst b/Help/release/dev/cpack-deb-new-component-vars.rst
new file mode 100644
index 0000000..e30afdb
--- /dev/null
+++ b/Help/release/dev/cpack-deb-new-component-vars.rst
@@ -0,0 +1,7 @@
+cpack-deb-new-component-vars
+----------------------------
+
+* The :module:`CPackDeb` module learned to set Package, Section
+ and Priority control fields per-component.
+ See :variable:`CPACK_DEBIAN_<COMPONENT>_PACKAGE_SECTION`
+ and :variable:`CPACK_DEBIAN_<COMPONENT>_PACKAGE_PRIORITY`.
diff --git a/Help/release/dev/cpack-dmg-multilanguage-sla.rst b/Help/release/dev/cpack-dmg-multilanguage-sla.rst
new file mode 100644
index 0000000..9e28fa2
--- /dev/null
+++ b/Help/release/dev/cpack-dmg-multilanguage-sla.rst
@@ -0,0 +1,7 @@
+cpack-dmg-multilanguage-sla
+---------------------------
+
+* The :module:`CPack DragNDrop generator <CPackDMG>` learned to add
+ multi-lingual SLAs to a DMG which is presented to the user when they try to
+ mount the DMG. See the :variable:`CPACK_DMG_SLA_LANGUAGES` and
+ :variable:`CPACK_DMG_SLA_DIR` variables for details.
diff --git a/Help/release/dev/cpack-nsis-bitmap.rst b/Help/release/dev/cpack-nsis-bitmap.rst
new file mode 100644
index 0000000..c5ccfb5
--- /dev/null
+++ b/Help/release/dev/cpack-nsis-bitmap.rst
@@ -0,0 +1,6 @@
+cpack-nsis-bitmap
+-----------------
+
+* The :module:`CPackNSIS` module learned new variables to add bitmaps to the
+ installer. See the :variable:`CPACK_NSIS_MUI_WELCOMEFINISHPAGE_BITMAP`
+ and :variable:`CPACK_NSIS_MUI_UNWELCOMEFINISHPAGE_BITMAP` variables.
diff --git a/Help/release/dev/deprecate-CMakeForceCompiler.rst b/Help/release/dev/deprecate-CMakeForceCompiler.rst
new file mode 100644
index 0000000..dc6e817
--- /dev/null
+++ b/Help/release/dev/deprecate-CMakeForceCompiler.rst
@@ -0,0 +1,5 @@
+deprecate-CMakeForceCompiler
+----------------------------
+
+* The :module:`CMakeForceCompiler` module and its macros are now deprecated.
+ See module documentation for an explanation.
diff --git a/Help/release/index.rst b/Help/release/index.rst
index 5d1a3f7..752acbd 100644
--- a/Help/release/index.rst
+++ b/Help/release/index.rst
@@ -5,6 +5,8 @@ CMake Release Notes
This file should include the adjacent "dev.txt" file
in development versions but not in release versions.
+.. include:: dev.txt
+
Releases
========
diff --git a/Help/variable/APPLE.rst b/Help/variable/APPLE.rst
index a8d2429..75eecf1 100644
--- a/Help/variable/APPLE.rst
+++ b/Help/variable/APPLE.rst
@@ -1,6 +1,6 @@
APPLE
-----
-``True`` if running on Mac OS X.
+``True`` if running on OS X.
-Set to ``true`` on Mac OS X.
+Set to ``true`` on OS X.
diff --git a/Help/variable/CMAKE_BINARY_DIR.rst b/Help/variable/CMAKE_BINARY_DIR.rst
index f8dd8ab..3b323b7 100644
--- a/Help/variable/CMAKE_BINARY_DIR.rst
+++ b/Help/variable/CMAKE_BINARY_DIR.rst
@@ -6,3 +6,8 @@ The path to the top level of the build tree.
This is the full path to the top level of the current CMake build
tree. For an in-source build, this would be the same as
:variable:`CMAKE_SOURCE_DIR`.
+
+When run in -P script mode, CMake sets the variables
+:variable:`CMAKE_BINARY_DIR`, :variable:`CMAKE_SOURCE_DIR`,
+:variable:`CMAKE_CURRENT_BINARY_DIR` and
+:variable:`CMAKE_CURRENT_SOURCE_DIR` to the current working directory.
diff --git a/Help/variable/CMAKE_CURRENT_BINARY_DIR.rst b/Help/variable/CMAKE_CURRENT_BINARY_DIR.rst
index cc3b639..40496b5 100644
--- a/Help/variable/CMAKE_CURRENT_BINARY_DIR.rst
+++ b/Help/variable/CMAKE_CURRENT_BINARY_DIR.rst
@@ -8,3 +8,8 @@ processed by cmake. Each directory added by :command:`add_subdirectory` will
create a binary directory in the build tree, and as it is being
processed this variable will be set. For in-source builds this is the
current source directory being processed.
+
+When run in -P script mode, CMake sets the variables
+:variable:`CMAKE_BINARY_DIR`, :variable:`CMAKE_SOURCE_DIR`,
+:variable:`CMAKE_CURRENT_BINARY_DIR` and
+:variable:`CMAKE_CURRENT_SOURCE_DIR` to the current working directory.
diff --git a/Help/variable/CMAKE_CURRENT_SOURCE_DIR.rst b/Help/variable/CMAKE_CURRENT_SOURCE_DIR.rst
index db063a4..c1b755a 100644
--- a/Help/variable/CMAKE_CURRENT_SOURCE_DIR.rst
+++ b/Help/variable/CMAKE_CURRENT_SOURCE_DIR.rst
@@ -5,3 +5,8 @@ The path to the source directory currently being processed.
This the full path to the source directory that is currently being
processed by cmake.
+
+When run in -P script mode, CMake sets the variables
+:variable:`CMAKE_BINARY_DIR`, :variable:`CMAKE_SOURCE_DIR`,
+:variable:`CMAKE_CURRENT_BINARY_DIR` and
+:variable:`CMAKE_CURRENT_SOURCE_DIR` to the current working directory.
diff --git a/Help/variable/CMAKE_ENABLE_EXPORTS.rst b/Help/variable/CMAKE_ENABLE_EXPORTS.rst
index 1f9ba6f..9a877e7 100644
--- a/Help/variable/CMAKE_ENABLE_EXPORTS.rst
+++ b/Help/variable/CMAKE_ENABLE_EXPORTS.rst
@@ -6,15 +6,15 @@ Specify whether an executable exports symbols for loadable modules.
Normally an executable does not export any symbols because it is the
final program. It is possible for an executable to export symbols to
be used by loadable modules. When this property is set to true CMake
-will allow other targets to "link" to the executable with the
+will allow other targets to ``link`` to the executable with the
:command:`TARGET_LINK_LIBRARIES` command. On all platforms a target-level
dependency on the executable is created for targets that link to it.
For DLL platforms an import library will be created for the exported
symbols and then used for linking. All Windows-based systems
including Cygwin are DLL platforms. For non-DLL platforms that
-require all symbols to be resolved at link time, such as Mac OS X, the
-module will "link" to the executable using a flag like
-"-bundle_loader". For other non-DLL platforms the link rule is simply
+require all symbols to be resolved at link time, such as OS X, the
+module will ``link`` to the executable using a flag like
+``-bundle_loader``. For other non-DLL platforms the link rule is simply
ignored since the dynamic loader will automatically bind symbols when
the module is loaded.
diff --git a/Help/variable/CMAKE_HOST_SYSTEM_NAME.rst b/Help/variable/CMAKE_HOST_SYSTEM_NAME.rst
index e5e6f67..c673592 100644
--- a/Help/variable/CMAKE_HOST_SYSTEM_NAME.rst
+++ b/Help/variable/CMAKE_HOST_SYSTEM_NAME.rst
@@ -4,5 +4,5 @@ CMAKE_HOST_SYSTEM_NAME
Name of the OS CMake is running on.
On systems that have the uname command, this variable is set to the
-output of ``uname -s``. ``Linux``, ``Windows``, and ``Darwin`` for Mac OS X
+output of ``uname -s``. ``Linux``, ``Windows``, and ``Darwin`` for OS X
are the values found on the big three operating systems.
diff --git a/Help/variable/CMAKE_INSTALL_NAME_DIR.rst b/Help/variable/CMAKE_INSTALL_NAME_DIR.rst
index 961d712..1f2d62b 100644
--- a/Help/variable/CMAKE_INSTALL_NAME_DIR.rst
+++ b/Help/variable/CMAKE_INSTALL_NAME_DIR.rst
@@ -1,7 +1,7 @@
CMAKE_INSTALL_NAME_DIR
----------------------
-Mac OS X directory name for installed targets.
+OS X directory name for installed targets.
``CMAKE_INSTALL_NAME_DIR`` is used to initialize the
:prop_tgt:`INSTALL_NAME_DIR` property on all targets. See that target
diff --git a/Help/variable/CMAKE_LANG_COMPILER_ID.rst b/Help/variable/CMAKE_LANG_COMPILER_ID.rst
index 1c3b134..81976a9 100644
--- a/Help/variable/CMAKE_LANG_COMPILER_ID.rst
+++ b/Help/variable/CMAKE_LANG_COMPILER_ID.rst
@@ -11,6 +11,7 @@ include:
Absoft = Absoft Fortran (absoft.com)
ADSP = Analog VisualDSP++ (analog.com)
AppleClang = Apple Clang (apple.com)
+ ARMCC = ARM Compiler (arm.com)
CCur = Concurrent Fortran (ccur.com)
Clang = LLVM Clang (clang.llvm.org)
Cray = Cray Compiler (cray.com)
diff --git a/Help/variable/CMAKE_MACOSX_RPATH.rst b/Help/variable/CMAKE_MACOSX_RPATH.rst
index ac897c0..042e807 100644
--- a/Help/variable/CMAKE_MACOSX_RPATH.rst
+++ b/Help/variable/CMAKE_MACOSX_RPATH.rst
@@ -1,7 +1,7 @@
CMAKE_MACOSX_RPATH
-------------------
-Whether to use rpaths on Mac OS X.
+Whether to use rpaths on OS X and iOS.
This variable is used to initialize the :prop_tgt:`MACOSX_RPATH` property on
all targets.
diff --git a/Help/variable/CMAKE_OSX_ARCHITECTURES.rst b/Help/variable/CMAKE_OSX_ARCHITECTURES.rst
index b9de518..93916dd 100644
--- a/Help/variable/CMAKE_OSX_ARCHITECTURES.rst
+++ b/Help/variable/CMAKE_OSX_ARCHITECTURES.rst
@@ -1,7 +1,7 @@
CMAKE_OSX_ARCHITECTURES
-----------------------
-Target specific architectures for OS X.
+Target specific architectures for OS X and iOS.
This variable is used to initialize the :prop_tgt:`OSX_ARCHITECTURES`
property on each target as it is creaed. See that target property
diff --git a/Help/variable/CMAKE_SOURCE_DIR.rst b/Help/variable/CMAKE_SOURCE_DIR.rst
index 3df0226..416fbe1 100644
--- a/Help/variable/CMAKE_SOURCE_DIR.rst
+++ b/Help/variable/CMAKE_SOURCE_DIR.rst
@@ -6,3 +6,8 @@ The path to the top level of the source tree.
This is the full path to the top level of the current CMake source
tree. For an in-source build, this would be the same as
:variable:`CMAKE_BINARY_DIR`.
+
+When run in -P script mode, CMake sets the variables
+:variable:`CMAKE_BINARY_DIR`, :variable:`CMAKE_SOURCE_DIR`,
+:variable:`CMAKE_CURRENT_BINARY_DIR` and
+:variable:`CMAKE_CURRENT_SOURCE_DIR` to the current working directory.
diff --git a/Modules/CMakeCCompiler.cmake.in b/Modules/CMakeCCompiler.cmake.in
index a1bfc70..c72e338 100644
--- a/Modules/CMakeCCompiler.cmake.in
+++ b/Modules/CMakeCCompiler.cmake.in
@@ -2,7 +2,6 @@ set(CMAKE_C_COMPILER "@CMAKE_C_COMPILER@")
set(CMAKE_C_COMPILER_ARG1 "@CMAKE_C_COMPILER_ARG1@")
set(CMAKE_C_COMPILER_ID "@CMAKE_C_COMPILER_ID@")
set(CMAKE_C_COMPILER_VERSION "@CMAKE_C_COMPILER_VERSION@")
-set(CMAKE_C_COMPILER_LINKS_STATICALLY "@CMAKE_C_COMPILER_LINKS_STATICALLY@")
set(CMAKE_C_STANDARD_COMPUTED_DEFAULT "@CMAKE_C_STANDARD_COMPUTED_DEFAULT@")
set(CMAKE_C_COMPILE_FEATURES "@CMAKE_C_COMPILE_FEATURES@")
set(CMAKE_C90_COMPILE_FEATURES "@CMAKE_C90_COMPILE_FEATURES@")
diff --git a/Modules/CMakeCCompilerId.c.in b/Modules/CMakeCCompilerId.c.in
index b224007..63f8787 100644
--- a/Modules/CMakeCCompilerId.c.in
+++ b/Modules/CMakeCCompilerId.c.in
@@ -55,6 +55,7 @@ int main(int argc, char* argv[])
#ifdef SIMULATE_VERSION_MAJOR
require += info_simulate_version[argc];
#endif
+ require += info_language_dialect_default[argc];
(void)argv;
return require;
}
diff --git a/Modules/CMakeCInformation.cmake b/Modules/CMakeCInformation.cmake
index 0d102a1..d2417aa 100644
--- a/Modules/CMakeCInformation.cmake
+++ b/Modules/CMakeCInformation.cmake
@@ -75,10 +75,6 @@ if(CMAKE_C_SIZEOF_DATA_PTR)
unset(CMAKE_C_ABI_FILES)
endif()
-if(CMAKE_C_COMPILER_LINKS_STATICALLY)
- set_property(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS FALSE)
-endif()
-
# This should be included before the _INIT variables are
# used to initialize the cache. Since the rule variables
# have if blocks on them, users can still define them here.
diff --git a/Modules/CMakeCXXCompiler.cmake.in b/Modules/CMakeCXXCompiler.cmake.in
index 4218a6d..52e44f6 100644
--- a/Modules/CMakeCXXCompiler.cmake.in
+++ b/Modules/CMakeCXXCompiler.cmake.in
@@ -2,7 +2,6 @@ set(CMAKE_CXX_COMPILER "@CMAKE_CXX_COMPILER@")
set(CMAKE_CXX_COMPILER_ARG1 "@CMAKE_CXX_COMPILER_ARG1@")
set(CMAKE_CXX_COMPILER_ID "@CMAKE_CXX_COMPILER_ID@")
set(CMAKE_CXX_COMPILER_VERSION "@CMAKE_CXX_COMPILER_VERSION@")
-set(CMAKE_CXX_COMPILER_LINKS_STATICALLY "@CMAKE_CXX_COMPILER_LINKS_STATICALLY@")
set(CMAKE_CXX_STANDARD_COMPUTED_DEFAULT "@CMAKE_CXX_STANDARD_COMPUTED_DEFAULT@")
set(CMAKE_CXX_COMPILE_FEATURES "@CMAKE_CXX_COMPILE_FEATURES@")
set(CMAKE_CXX98_COMPILE_FEATURES "@CMAKE_CXX98_COMPILE_FEATURES@")
diff --git a/Modules/CMakeCXXCompilerId.cpp.in b/Modules/CMakeCXXCompilerId.cpp.in
index d467507..61cd790 100644
--- a/Modules/CMakeCXXCompilerId.cpp.in
+++ b/Modules/CMakeCXXCompilerId.cpp.in
@@ -49,6 +49,7 @@ int main(int argc, char* argv[])
#ifdef SIMULATE_VERSION_MAJOR
require += info_simulate_version[argc];
#endif
+ require += info_language_dialect_default[argc];
(void)argv;
return require;
}
diff --git a/Modules/CMakeCXXInformation.cmake b/Modules/CMakeCXXInformation.cmake
index dad7969..091627b 100644
--- a/Modules/CMakeCXXInformation.cmake
+++ b/Modules/CMakeCXXInformation.cmake
@@ -74,10 +74,6 @@ if(CMAKE_CXX_SIZEOF_DATA_PTR)
unset(CMAKE_CXX_ABI_FILES)
endif()
-if(CMAKE_CXX_COMPILER_LINKS_STATICALLY)
- set_property(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS FALSE)
-endif()
-
# This should be included before the _INIT variables are
# used to initialize the cache. Since the rule variables
# have if blocks on them, users can still define them here.
diff --git a/Modules/CMakeCompilerIdDetection.cmake b/Modules/CMakeCompilerIdDetection.cmake
index 19bcbcc..cbc0055 100644
--- a/Modules/CMakeCompilerIdDetection.cmake
+++ b/Modules/CMakeCompilerIdDetection.cmake
@@ -89,6 +89,7 @@ function(compiler_id_detection outvar lang)
MSVC
ADSP
IAR
+ ARMCC
)
if (lang STREQUAL C)
list(APPEND ordered_compilers
diff --git a/Modules/CMakeDetermineASMCompiler.cmake b/Modules/CMakeDetermineASMCompiler.cmake
index 25af3e3..91111d2 100644
--- a/Modules/CMakeDetermineASMCompiler.cmake
+++ b/Modules/CMakeDetermineASMCompiler.cmake
@@ -92,6 +92,10 @@ if(NOT CMAKE_ASM${ASM_DIALECT}_COMPILER_ID)
set(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_FLAGS_IAR )
set(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_REGEX_IAR "IAR Assembler")
+ list(APPEND CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDORS ARMCC)
+ set(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_FLAGS_ARMCC )
+ set(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_REGEX_ARMCC "(ARM Compiler)|(ARM Assembler)")
+
include(CMakeDetermineCompilerId)
CMAKE_DETERMINE_COMPILER_ID_VENDOR(ASM${ASM_DIALECT})
diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake
index 2e74100..81c2509 100644
--- a/Modules/CMakeDetermineCompilerId.cmake
+++ b/Modules/CMakeDetermineCompilerId.cmake
@@ -106,7 +106,6 @@ function(CMAKE_DETERMINE_COMPILER_ID lang flagvar src)
set(MSVC_${lang}_ARCHITECTURE_ID "${MSVC_${lang}_ARCHITECTURE_ID}"
PARENT_SCOPE)
set(CMAKE_${lang}_CL_SHOWINCLUDES_PREFIX "${CMAKE_${lang}_CL_SHOWINCLUDES_PREFIX}" PARENT_SCOPE)
- set(CMAKE_${lang}_COMPILER_LINKS_STATICALLY "${CMAKE_${lang}_COMPILER_LINKS_STATICALLY}" PARENT_SCOPE)
set(CMAKE_${lang}_COMPILER_VERSION "${CMAKE_${lang}_COMPILER_VERSION}" PARENT_SCOPE)
set(CMAKE_${lang}_SIMULATE_ID "${CMAKE_${lang}_SIMULATE_ID}" PARENT_SCOPE)
set(CMAKE_${lang}_SIMULATE_VERSION "${CMAKE_${lang}_SIMULATE_VERSION}" PARENT_SCOPE)
@@ -533,13 +532,6 @@ function(CMAKE_DETERMINE_COMPILER_ID_CHECK lang file)
endif()
endif()
- if(UNIX)
- execute_process(COMMAND file "${file}" OUTPUT_VARIABLE out ERROR_VARIABLE out)
- if(out MATCHES "statically linked")
- set(CMAKE_${lang}_COMPILER_LINKS_STATICALLY 1 PARENT_SCOPE)
- endif()
- endif()
-
# Check if a valid compiler and platform were found.
if(COMPILER_ID AND NOT COMPILER_ID_TWICE)
set(CMAKE_${lang}_COMPILER_ID "${COMPILER_ID}")
diff --git a/Modules/CMakeForceCompiler.cmake b/Modules/CMakeForceCompiler.cmake
index 1d8b110..343ab3f 100644
--- a/Modules/CMakeForceCompiler.cmake
+++ b/Modules/CMakeForceCompiler.cmake
@@ -2,11 +2,17 @@
# CMakeForceCompiler
# ------------------
#
+# Deprecated. Do not use.
#
+# The macros provided by this module were once intended for use by
+# cross-compiling toolchain files when CMake was not able to automatically
+# detect the compiler identification. Since the introduction of this module,
+# CMake's compiler identification capabilities have improved and can now be
+# taught to recognize any compiler. Furthermore, the suite of information
+# CMake detects from a compiler is now too extensive to be provided by
+# toolchain files using these macros.
#
-# This module defines macros intended for use by cross-compiling
-# toolchain files when CMake is not able to automatically detect the
-# compiler identification.
+# -------------------------------------------------------------------------
#
# Macro CMAKE_FORCE_C_COMPILER has the following signature:
#
@@ -64,6 +70,8 @@
# License text for the above reference.)
macro(CMAKE_FORCE_C_COMPILER compiler id)
+ message(DEPRECATION "The CMAKE_FORCE_C_COMPILER macro is deprecated. "
+ "Instead just set CMAKE_C_COMPILER and allow CMake to identify the compiler.")
set(CMAKE_C_COMPILER "${compiler}")
set(CMAKE_C_COMPILER_ID_RUN TRUE)
set(CMAKE_C_COMPILER_ID ${id})
@@ -76,6 +84,8 @@ macro(CMAKE_FORCE_C_COMPILER compiler id)
endmacro()
macro(CMAKE_FORCE_CXX_COMPILER compiler id)
+ message(DEPRECATION "The CMAKE_FORCE_CXX_COMPILER macro is deprecated. "
+ "Instead just set CMAKE_CXX_COMPILER and allow CMake to identify the compiler.")
set(CMAKE_CXX_COMPILER "${compiler}")
set(CMAKE_CXX_COMPILER_ID_RUN TRUE)
set(CMAKE_CXX_COMPILER_ID ${id})
@@ -88,6 +98,8 @@ macro(CMAKE_FORCE_CXX_COMPILER compiler id)
endmacro()
macro(CMAKE_FORCE_Fortran_COMPILER compiler id)
+ message(DEPRECATION "The CMAKE_FORCE_Fortran_COMPILER macro is deprecated. "
+ "Instead just set CMAKE_Fortran_COMPILER and allow CMake to identify the compiler.")
set(CMAKE_Fortran_COMPILER "${compiler}")
set(CMAKE_Fortran_COMPILER_ID_RUN TRUE)
set(CMAKE_Fortran_COMPILER_ID ${id})
diff --git a/Modules/CMakeFortranCompiler.cmake.in b/Modules/CMakeFortranCompiler.cmake.in
index 6b984e5..14fdd60 100644
--- a/Modules/CMakeFortranCompiler.cmake.in
+++ b/Modules/CMakeFortranCompiler.cmake.in
@@ -2,7 +2,6 @@ set(CMAKE_Fortran_COMPILER "@CMAKE_Fortran_COMPILER@")
set(CMAKE_Fortran_COMPILER_ARG1 "@CMAKE_Fortran_COMPILER_ARG1@")
set(CMAKE_Fortran_COMPILER_ID "@CMAKE_Fortran_COMPILER_ID@")
set(CMAKE_Fortran_COMPILER_VERSION "@CMAKE_Fortran_COMPILER_VERSION@")
-set(CMAKE_Fortran_COMPILER_LINKS_STATICALLY "@CMAKE_Fortran_COMPILER_LINKS_STATICALLY@")
set(CMAKE_Fortran_PLATFORM_ID "@CMAKE_Fortran_PLATFORM_ID@")
set(CMAKE_Fortran_SIMULATE_ID "@CMAKE_Fortran_SIMULATE_ID@")
set(CMAKE_Fortran_SIMULATE_VERSION "@CMAKE_Fortran_SIMULATE_VERSION@")
diff --git a/Modules/CMakeFortranCompilerId.F.in b/Modules/CMakeFortranCompilerId.F.in
index 017af91..2f7f40e 100644
--- a/Modules/CMakeFortranCompilerId.F.in
+++ b/Modules/CMakeFortranCompilerId.F.in
@@ -47,6 +47,8 @@
# define COMPILER_VERSION_PATCH HEX(__SUNPRO_F90 & 0xF)
#elif defined(_CRAYFTN)
PRINT *, 'INFO:compiler[Cray]'
+# define COMPILER_VERSION_MAJOR DEC(_RELEASE_MAJOR)
+# define COMPILER_VERSION_MINOR DEC(_RELEASE_MINOR)
#elif defined(__G95__)
PRINT *, 'INFO:compiler[G95]'
# define COMPILER_VERSION_MAJOR DEC(__G95__)
diff --git a/Modules/CMakeFortranInformation.cmake b/Modules/CMakeFortranInformation.cmake
index aa48df7..79393d3 100644
--- a/Modules/CMakeFortranInformation.cmake
+++ b/Modules/CMakeFortranInformation.cmake
@@ -51,10 +51,6 @@ if(CMAKE_Fortran_SIZEOF_DATA_PTR)
unset(CMAKE_Fortran_ABI_FILES)
endif()
-if(CMAKE_Fortran_COMPILER_LINKS_STATICALLY)
- set_property(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS FALSE)
-endif()
-
# This should be included before the _INIT variables are
# used to initialize the cache. Since the rule variables
# have if blocks on them, users can still define them here.
diff --git a/Modules/CPack.cmake b/Modules/CPack.cmake
index 5756001..77f854d 100644
--- a/Modules/CPack.cmake
+++ b/Modules/CPack.cmake
@@ -586,7 +586,7 @@ _cpack_set_default(CPACK_WIX_SIZEOF_VOID_P "${CMAKE_SIZEOF_VOID_P}")
# set sysroot so SDK tools can be used
if(CMAKE_OSX_SYSROOT)
- _cpack_set_default(CPACK_OSX_SYSROOT "${CMAKE_OSX_SYSROOT}")
+ _cpack_set_default(CPACK_OSX_SYSROOT "${_CMAKE_OSX_SYSROOT_PATH}")
endif()
if(DEFINED CPACK_COMPONENTS_ALL)
diff --git a/Modules/CPackDMG.cmake b/Modules/CPackDMG.cmake
index b7a6ba5..6b5af7e 100644
--- a/Modules/CPackDMG.cmake
+++ b/Modules/CPackDMG.cmake
@@ -26,15 +26,38 @@
# Path to a custom DS_Store file. This .DS_Store file e.g. can be used to
# specify the Finder window position/geometry and layout (such as hidden
# toolbars, placement of the icons etc.). This file has to be generated by
-# the Finder (either manually or through OSA-script) using a normal folder
+# the Finder (either manually or through AppleScript) using a normal folder
# from which the .DS_Store file can then be extracted.
#
+# .. variable:: CPACK_DMG_DS_STORE_SETUP_SCRIPT
+#
+# Path to a custom AppleScript file. This AppleScript is used to generate
+# a .DS_Store file which specifies the Finder window position/geometry and
+# layout (such as hidden toolbars, placement of the icons etc.).
+# By specifying a custom AppleScript there is no need to use
+# CPACK_DMG_DS_STORE, as the .DS_Store that is generated by the AppleScript
+# will be packaged.
+#
# .. variable:: CPACK_DMG_BACKGROUND_IMAGE
#
-# Path to a background image file. This file will be used as the background
-# for the Finder Window when the disk image is opened. By default no
-# background image is set. The background image is applied after applying the
-# custom .DS_Store file.
+# Path to an image file to be used as the background. This file will be
+# copied to .background/background.<ext>, where ext is the original image file
+# extension. The background image is installed into the image before
+# CPACK_DMG_DS_STORE_SETUP_SCRIPT is executed or CPACK_DMG_DS_STORE is
+# installed. By default no background image is set.
+#
+# .. variable:: CPACK_DMG_SLA_DIR
+#
+# Directory where license and menu files for different languages are stored.
+#
+# .. variable:: CPACK_DMG_SLA_LANGUAGES
+#
+# Languages for which a license agreement is provided when mounting the
+# generated DMG.
+#
+# For every language in this list, CPack will try to find files
+# ``<language>.menu.txt`` and ``<language>.license.txt`` in the directory
+# specified by the :variable:`CPACK_DMG_SLA_DIR` variable.
#
# .. variable:: CPACK_COMMAND_HDIUTIL
#
diff --git a/Modules/CPackDeb.cmake b/Modules/CPackDeb.cmake
index 60e0d1f..2aaef61 100644
--- a/Modules/CPackDeb.cmake
+++ b/Modules/CPackDeb.cmake
@@ -8,7 +8,7 @@
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#
# CPackDeb may be used to create Deb package using CPack.
-# CPackDeb is a CPack generator thus it uses the CPACK_XXX variables
+# CPackDeb is a CPack generator thus it uses the ``CPACK_XXX`` variables
# used by CPack : https://cmake.org/Wiki/CMake:CPackConfiguration.
# CPackDeb generator should work on any linux host but it will produce
# better deb package when Debian specific tools 'dpkg-xxx' are usable on
@@ -18,7 +18,7 @@
# :code:`CPACK_DEBIAN_XXX` variables.
#
# :code:`CPACK_DEBIAN_<COMPONENT>_XXXX` variables may be used in order to have
-# **component** specific values. Note however that <COMPONENT> refers to the
+# **component** specific values. Note however that ``<COMPONENT>`` refers to the
# **grouping name** written in upper case. It may be either a component name or
# a component GROUP name.
#
@@ -27,11 +27,20 @@
# However as a handy reminder here comes the list of specific variables:
#
# .. variable:: CPACK_DEBIAN_PACKAGE_NAME
+# CPACK_DEBIAN_<COMPONENT>_PACKAGE_NAME
#
-# The Debian package summary
+# Set Package control field (variable is automatically transformed to lower
+# case).
#
# * Mandatory : YES
-# * Default : :variable:`CPACK_PACKAGE_NAME` (lower case)
+# * Default :
+#
+# - :variable:`CPACK_PACKAGE_NAME` for non-component based
+# installations
+# - :variable:`CPACK_DEBIAN_PACKAGE_NAME` suffixed with -<COMPONENT>
+# for component-based installations.
+#
+# See https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Source
#
#
# .. variable:: CPACK_DEBIAN_PACKAGE_VERSION
@@ -100,10 +109,16 @@
#
#
# .. variable:: CPACK_DEBIAN_PACKAGE_SECTION
+# CPACK_DEBIAN_<COMPONENT>_PACKAGE_SECTION
+#
+# Set Section control field e.g. admin, devel, doc, ...
#
# * Mandatory : YES
# * Default : 'devel'
#
+# See https://www.debian.org/doc/debian-policy/ch-archive.html#s-subsections
+#
+#
# .. variable:: CPACK_DEBIAN_COMPRESSION_TYPE
#
# The compression used for creating the Debian package.
@@ -114,12 +129,16 @@
#
#
# .. variable:: CPACK_DEBIAN_PACKAGE_PRIORITY
+# CPACK_DEBIAN_<COMPONENT>_PACKAGE_PRIORITY
#
-# The Debian package priority
+# Set Priority control field e.g. required, important, standard, optional,
+# extra
#
# * Mandatory : YES
# * Default : 'optional'
#
+# See https://www.debian.org/doc/debian-policy/ch-archive.html#s-priorities
+#
#
# .. variable:: CPACK_DEBIAN_PACKAGE_HOMEPAGE
#
@@ -354,7 +373,28 @@
# set by Debian policy
# https://www.debian.org/doc/debian-policy/ch-files.html#s-permissions-owners
#
-
+# .. variable:: CPACK_DEBIAN_PACKAGE_SOURCE
+# CPACK_DEBIAN_<COMPONENT>_PACKAGE_SOURCE
+#
+# Sets the ``Source`` field of the binary Debian package.
+# When the binary package name is not the same as the source package name
+# (in particular when several components/binaries are generated from one
+# source) the source from which the binary has been generated should be
+# indicated with the field ``Source``.
+#
+# * Mandatory : NO
+# * Default :
+#
+# - An empty string for non-component based installations
+# - :variable:`CPACK_DEBIAN_PACKAGE_SOURCE` for component-based
+# installations.
+#
+# See https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Source
+#
+# .. note::
+#
+# This value is not interpreted. It is possible to pass an optional
+# revision number of the referenced source package as well.
#=============================================================================
# Copyright 2007-2009 Kitware, Inc.
@@ -554,24 +594,33 @@ function(cpack_deb_prepare_package_vars)
)
endif()
+ # Source: (optional)
+ # in case several packages are constructed from a unique source
+ # (multipackaging), the source may be indicated as well.
+ # The source might contain a version if the generated package
+ # version is different from the source version
+ if(NOT CPACK_DEBIAN_PACKAGE_SOURCE)
+ set(CPACK_DEBIAN_PACKAGE_SOURCE "")
+ endif()
+
# have a look at get_property(result GLOBAL PROPERTY ENABLED_FEATURES),
# this returns the successful find_package() calls, maybe this can help
# Depends:
# You should set: DEBIAN_PACKAGE_DEPENDS
# TODO: automate 'objdump -p | grep NEEDED'
- # if per-component dependency, overrides the global CPACK_DEBIAN_PACKAGE_${dependency_type_}
+ # if per-component variable, overrides the global CPACK_DEBIAN_PACKAGE_${variable_type_}
# automatic dependency discovery will be performed afterwards.
if(CPACK_DEB_PACKAGE_COMPONENT)
- foreach(dependency_type_ DEPENDS RECOMMENDS SUGGESTS PREDEPENDS ENHANCES BREAKS CONFLICTS PROVIDES REPLACES)
- set(_component_var "CPACK_DEBIAN_${_local_component_name}_PACKAGE_${dependency_type_}")
+ foreach(value_type_ DEPENDS RECOMMENDS SUGGESTS PREDEPENDS ENHANCES BREAKS CONFLICTS PROVIDES REPLACES SOURCE SECTION PRIORITY NAME)
+ set(_component_var "CPACK_DEBIAN_${_local_component_name}_PACKAGE_${value_type_}")
- # if set, overrides the global dependency
+ # if set, overrides the global variable
if(DEFINED ${_component_var})
- set(CPACK_DEBIAN_PACKAGE_${dependency_type_} "${${_component_var}}")
+ set(CPACK_DEBIAN_PACKAGE_${value_type_} "${${_component_var}}")
if(CPACK_DEBIAN_PACKAGE_DEBUG)
- message("CPackDeb Debug: component '${_local_component_name}' ${dependency_type_}"
- "dependencies set to '${CPACK_DEBIAN_PACKAGE_${dependency_}}'")
+ message("CPackDeb Debug: component '${_local_component_name}' ${value_type_} "
+ "value set to '${CPACK_DEBIAN_PACKAGE_${value_type_}}'")
endif()
endif()
endforeach()
@@ -664,23 +713,25 @@ function(cpack_deb_prepare_package_vars)
endif()
endforeach()
- set(CPACK_DEB_PACKAGE_COMPONENT_PART_NAME "-${CPACK_DEB_PACKAGE_COMPONENT}")
- string(TOLOWER "${CPACK_PACKAGE_NAME}${CPACK_DEB_PACKAGE_COMPONENT_PART_NAME}" CPACK_DEBIAN_PACKAGE_NAME)
- else()
- set(CPACK_DEB_PACKAGE_COMPONENT_PART_NAME "")
+ if(CPACK_DEBIAN_${_local_component_name}_PACKAGE_NAME)
+ string(TOLOWER "${CPACK_DEBIAN_${_local_component_name}_PACKAGE_NAME}" CPACK_DEBIAN_PACKAGE_NAME)
+ else()
+ string(TOLOWER "${CPACK_DEBIAN_PACKAGE_NAME}-${CPACK_DEB_PACKAGE_COMPONENT}" CPACK_DEBIAN_PACKAGE_NAME)
+ endif()
endif()
# Print out some debug information if we were asked for that
if(CPACK_DEBIAN_PACKAGE_DEBUG)
- message("CPackDeb:Debug: CPACK_TOPLEVEL_DIRECTORY = ${CPACK_TOPLEVEL_DIRECTORY}")
- message("CPackDeb:Debug: CPACK_TOPLEVEL_TAG = ${CPACK_TOPLEVEL_TAG}")
- message("CPackDeb:Debug: CPACK_TEMPORARY_DIRECTORY = ${CPACK_TEMPORARY_DIRECTORY}")
- message("CPackDeb:Debug: CPACK_OUTPUT_FILE_NAME = ${CPACK_OUTPUT_FILE_NAME}")
- message("CPackDeb:Debug: CPACK_OUTPUT_FILE_PATH = ${CPACK_OUTPUT_FILE_PATH}")
- message("CPackDeb:Debug: CPACK_PACKAGE_FILE_NAME = ${CPACK_PACKAGE_FILE_NAME}")
- message("CPackDeb:Debug: CPACK_PACKAGE_INSTALL_DIRECTORY = ${CPACK_PACKAGE_INSTALL_DIRECTORY}")
- message("CPackDeb:Debug: CPACK_TEMPORARY_PACKAGE_FILE_NAME = ${CPACK_TEMPORARY_PACKAGE_FILE_NAME}")
- message("CPackDeb:Debug: CPACK_DEBIAN_PACKAGE_CONTROL_STRICT_PERMISSION = ${CPACK_DEBIAN_PACKAGE_CONTROL_STRICT_PERMISSION}")
+ message("CPackDeb:Debug: CPACK_TOPLEVEL_DIRECTORY = '${CPACK_TOPLEVEL_DIRECTORY}'")
+ message("CPackDeb:Debug: CPACK_TOPLEVEL_TAG = '${CPACK_TOPLEVEL_TAG}'")
+ message("CPackDeb:Debug: CPACK_TEMPORARY_DIRECTORY = '${CPACK_TEMPORARY_DIRECTORY}'")
+ message("CPackDeb:Debug: CPACK_OUTPUT_FILE_NAME = '${CPACK_OUTPUT_FILE_NAME}'")
+ message("CPackDeb:Debug: CPACK_OUTPUT_FILE_PATH = '${CPACK_OUTPUT_FILE_PATH}'")
+ message("CPackDeb:Debug: CPACK_PACKAGE_FILE_NAME = '${CPACK_PACKAGE_FILE_NAME}'")
+ message("CPackDeb:Debug: CPACK_PACKAGE_INSTALL_DIRECTORY = '${CPACK_PACKAGE_INSTALL_DIRECTORY}'")
+ message("CPackDeb:Debug: CPACK_TEMPORARY_PACKAGE_FILE_NAME = '${CPACK_TEMPORARY_PACKAGE_FILE_NAME}'")
+ message("CPackDeb:Debug: CPACK_DEBIAN_PACKAGE_CONTROL_STRICT_PERMISSION = '${CPACK_DEBIAN_PACKAGE_CONTROL_STRICT_PERMISSION}'")
+ message("CPackDeb:Debug: CPACK_DEBIAN_PACKAGE_SOURCE = '${CPACK_DEBIAN_PACKAGE_SOURCE}'")
endif()
# For debian source packages:
@@ -719,6 +770,8 @@ function(cpack_deb_prepare_package_vars)
set(GEN_CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "${CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA}" PARENT_SCOPE)
set(GEN_CPACK_DEBIAN_PACKAGE_CONTROL_STRICT_PERMISSION
"${CPACK_DEBIAN_PACKAGE_CONTROL_STRICT_PERMISSION}" PARENT_SCOPE)
+ set(GEN_CPACK_DEBIAN_PACKAGE_SOURCE
+ "${CPACK_DEBIAN_PACKAGE_SOURCE}" PARENT_SCOPE)
set(GEN_WDIR "${WDIR}" PARENT_SCOPE)
endfunction()
diff --git a/Modules/CPackNSIS.cmake b/Modules/CPackNSIS.cmake
index c6b3d19..db5984a 100644
--- a/Modules/CPackNSIS.cmake
+++ b/Modules/CPackNSIS.cmake
@@ -30,6 +30,14 @@
#
# undocumented.
#
+# .. variable:: CPACK_NSIS_MUI_WELCOMEFINISHPAGE_BITMAP
+#
+# The filename of a bitmap to use as the NSIS MUI_WELCOMEFINISHPAGE_BITMAP.
+#
+# .. variable:: CPACK_NSIS_MUI_UNWELCOMEFINISHPAGE_BITMAP
+#
+# The filename of a bitmap to use as the NSIS MUI_UNWELCOMEFINISHPAGE_BITMAP.
+#
# .. variable:: CPACK_NSIS_EXTRA_PREINSTALL_COMMANDS
#
# Extra NSIS commands that will be added to the beginning of the install
diff --git a/Modules/CheckCSourceCompiles.cmake b/Modules/CheckCSourceCompiles.cmake
index 6e80fb5..c2b1723 100644
--- a/Modules/CheckCSourceCompiles.cmake
+++ b/Modules/CheckCSourceCompiles.cmake
@@ -93,7 +93,7 @@ macro(CHECK_C_SOURCE_COMPILES SOURCE VAR)
message(STATUS "Performing Test ${VAR} - Success")
endif()
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
- "Performing C SOURCE FILE Test ${VAR} succeded with the following output:\n"
+ "Performing C SOURCE FILE Test ${VAR} succeeded with the following output:\n"
"${OUTPUT}\n"
"Source file was:\n${SOURCE}\n")
else()
diff --git a/Modules/CheckCSourceRuns.cmake b/Modules/CheckCSourceRuns.cmake
index 0ce423c..5afeab6 100644
--- a/Modules/CheckCSourceRuns.cmake
+++ b/Modules/CheckCSourceRuns.cmake
@@ -81,7 +81,7 @@ macro(CHECK_C_SOURCE_RUNS SOURCE VAR)
message(STATUS "Performing Test ${VAR} - Success")
endif()
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
- "Performing C SOURCE FILE Test ${VAR} succeded with the following output:\n"
+ "Performing C SOURCE FILE Test ${VAR} succeeded with the following output:\n"
"${OUTPUT}\n"
"Return value: ${${VAR}}\n"
"Source file was:\n${SOURCE}\n")
diff --git a/Modules/CheckCXXSourceCompiles.cmake b/Modules/CheckCXXSourceCompiles.cmake
index 6d52ec6..f8736e2 100644
--- a/Modules/CheckCXXSourceCompiles.cmake
+++ b/Modules/CheckCXXSourceCompiles.cmake
@@ -94,7 +94,7 @@ macro(CHECK_CXX_SOURCE_COMPILES SOURCE VAR)
message(STATUS "Performing Test ${VAR} - Success")
endif()
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
- "Performing C++ SOURCE FILE Test ${VAR} succeded with the following output:\n"
+ "Performing C++ SOURCE FILE Test ${VAR} succeeded with the following output:\n"
"${OUTPUT}\n"
"Source file was:\n${SOURCE}\n")
else()
diff --git a/Modules/CheckCXXSourceRuns.cmake b/Modules/CheckCXXSourceRuns.cmake
index 3c06d75..84b661d 100644
--- a/Modules/CheckCXXSourceRuns.cmake
+++ b/Modules/CheckCXXSourceRuns.cmake
@@ -82,7 +82,7 @@ macro(CHECK_CXX_SOURCE_RUNS SOURCE VAR)
message(STATUS "Performing Test ${VAR} - Success")
endif()
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
- "Performing C++ SOURCE FILE Test ${VAR} succeded with the following output:\n"
+ "Performing C++ SOURCE FILE Test ${VAR} succeeded with the following output:\n"
"${OUTPUT}\n"
"Return value: ${${VAR}}\n"
"Source file was:\n${SOURCE}\n")
diff --git a/Modules/CheckForPthreads.c b/Modules/CheckForPthreads.c
index 2732957..344c81b 100644
--- a/Modules/CheckForPthreads.c
+++ b/Modules/CheckForPthreads.c
@@ -16,8 +16,8 @@ int main(int ac, char*av[]){
pthread_create(&tid[0], 0, runner, (void*)1);
pthread_create(&tid[1], 0, runner, (void*)2);
-#if defined(__BEOS__) && !defined(__ZETA__) // (no usleep on BeOS 5.)
- usleep(1); // for strange behavior on single-processor sun
+#if defined(__BEOS__) && !defined(__ZETA__) /* (no usleep on BeOS 5.) */
+ usleep(1); /* for strange behavior on single-processor sun */
#endif
pthread_join(tid[0], 0);
diff --git a/Modules/CheckFortranSourceCompiles.cmake b/Modules/CheckFortranSourceCompiles.cmake
index f90d05b..0bdcffa 100644
--- a/Modules/CheckFortranSourceCompiles.cmake
+++ b/Modules/CheckFortranSourceCompiles.cmake
@@ -94,7 +94,7 @@ macro(CHECK_Fortran_SOURCE_COMPILES SOURCE VAR)
message(STATUS "Performing Test ${VAR} - Success")
endif()
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
- "Performing Fortran SOURCE FILE Test ${VAR} succeded with the following output:\n"
+ "Performing Fortran SOURCE FILE Test ${VAR} succeeded with the following output:\n"
"${OUTPUT}\n"
"Source file was:\n${SOURCE}\n")
else()
diff --git a/Modules/Compiler/ARMCC-ASM.cmake b/Modules/Compiler/ARMCC-ASM.cmake
new file mode 100644
index 0000000..8e3cfc5
--- /dev/null
+++ b/Modules/Compiler/ARMCC-ASM.cmake
@@ -0,0 +1,7 @@
+include(Compiler/ARMCC)
+
+set(CMAKE_ASM_OUTPUT_EXTENSION ".o")
+set(CMAKE_ASM_OUTPUT_EXTENSION_REPLACE 1)
+
+set(CMAKE_ASM_COMPILE_OBJECT "<CMAKE_ASM_COMPILER> <FLAGS> -o <OBJECT> <SOURCE>")
+set(CMAKE_ASM_SOURCE_FILE_EXTENSIONS s;asm;msa)
diff --git a/Modules/Compiler/ARMCC-C.cmake b/Modules/Compiler/ARMCC-C.cmake
new file mode 100644
index 0000000..dcdcaab
--- /dev/null
+++ b/Modules/Compiler/ARMCC-C.cmake
@@ -0,0 +1,2 @@
+include(Compiler/ARMCC)
+__compiler_armcc(C)
diff --git a/Modules/Compiler/ARMCC-CXX.cmake b/Modules/Compiler/ARMCC-CXX.cmake
new file mode 100644
index 0000000..811fc93
--- /dev/null
+++ b/Modules/Compiler/ARMCC-CXX.cmake
@@ -0,0 +1,2 @@
+include(Compiler/ARMCC)
+__compiler_armcc(CXX)
diff --git a/Modules/Compiler/ARMCC-DetermineCompiler.cmake b/Modules/Compiler/ARMCC-DetermineCompiler.cmake
new file mode 100644
index 0000000..a3667d7
--- /dev/null
+++ b/Modules/Compiler/ARMCC-DetermineCompiler.cmake
@@ -0,0 +1,16 @@
+# ARMCC Toolchain
+set(_compiler_id_pp_test "defined(__ARMCC_VERSION)")
+
+set(_compiler_id_version_compute "
+#if __ARMCC_VERSION >= 1000000
+ /* __ARMCC_VERSION = VRRPPPP */
+ # define @PREFIX@COMPILER_VERSION_MAJOR @MACRO_DEC@(__ARMCC_VERSION/1000000)
+ # define @PREFIX@COMPILER_VERSION_MINOR @MACRO_DEC@(__ARMCC_VERSION/10000 % 100)
+ # define @PREFIX@COMPILER_VERSION_PATCH @MACRO_DEC@(__ARMCC_VERSION % 10000)
+#else
+ /* __ARMCC_VERSION = VRPPPP */
+ # define @PREFIX@COMPILER_VERSION_MAJOR @MACRO_DEC@(__ARMCC_VERSION/100000)
+ # define @PREFIX@COMPILER_VERSION_MINOR @MACRO_DEC@(__ARMCC_VERSION/10000 % 10)
+ # define @PREFIX@COMPILER_VERSION_PATCH @MACRO_DEC@(__ARMCC_VERSION % 10000)
+#endif
+")
diff --git a/Modules/Compiler/ARMCC.cmake b/Modules/Compiler/ARMCC.cmake
new file mode 100644
index 0000000..3cf628c
--- /dev/null
+++ b/Modules/Compiler/ARMCC.cmake
@@ -0,0 +1,36 @@
+if(_ARMCC_CMAKE_LOADED)
+ return()
+endif()
+set(_ARMCC_CMAKE_LOADED TRUE)
+
+# See ARM Compiler documentation at:
+# http://infocenter.arm.com/help/topic/com.arm.doc.set.swdev/index.html
+
+get_filename_component(_CMAKE_C_TOOLCHAIN_LOCATION "${CMAKE_C_COMPILER}" PATH)
+get_filename_component(_CMAKE_CXX_TOOLCHAIN_LOCATION "${CMAKE_CXX_COMPILER}" PATH)
+
+set(CMAKE_EXECUTABLE_SUFFIX ".elf")
+
+find_program(CMAKE_ARMCC_LINKER armlink HINTS "${_CMAKE_C_TOOLCHAIN_LOCATION}" "${_CMAKE_CXX_TOOLCHAIN_LOCATION}" )
+find_program(CMAKE_ARMCC_AR armar HINTS "${_CMAKE_C_TOOLCHAIN_LOCATION}" "${_CMAKE_CXX_TOOLCHAIN_LOCATION}" )
+
+set(CMAKE_LINKER "${CMAKE_ARMCC_LINKER}" CACHE FILEPATH "The ARMCC linker" FORCE)
+mark_as_advanced(CMAKE_ARMCC_LINKER)
+set(CMAKE_AR "${CMAKE_ARMCC_AR}" CACHE FILEPATH "The ARMCC archiver" FORCE)
+mark_as_advanced(CMAKE_ARMCC_AR)
+
+macro(__compiler_armcc lang)
+ set(CMAKE_${lang}_FLAGS_INIT "")
+ set(CMAKE_${lang}_FLAGS_DEBUG_INIT "-g")
+ set(CMAKE_${lang}_FLAGS_MINSIZEREL_INIT "-Ospace -DNDEBUG")
+ set(CMAKE_${lang}_FLAGS_RELEASE_INIT "-Otime -DNDEBUG")
+ set(CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT "-O2 -g")
+
+ set(CMAKE_${lang}_OUTPUT_EXTENSION ".o")
+ set(CMAKE_${lang}_OUTPUT_EXTENSION_REPLACE 1)
+
+ set(CMAKE_${lang}_LINK_EXECUTABLE "<CMAKE_LINKER> <CMAKE_${lang}_LINK_FLAGS> <LINK_FLAGS> <LINK_LIBRARIES> <OBJECTS> -o <TARGET> --list <TARGET_BASE>.map")
+ set(CMAKE_${lang}_CREATE_STATIC_LIBRARY "<CMAKE_AR> --create -cr <TARGET> <LINK_FLAGS> <OBJECTS>")
+
+ set(CMAKE_DEPFILE_FLAGS_${lang} "--depend=<DEPFILE> --depend_single_line --no_depend_system_headers")
+endmacro()
diff --git a/Modules/Compiler/AppleClang-C.cmake b/Modules/Compiler/AppleClang-C.cmake
index 5908c26..1cc72c0 100644
--- a/Modules/Compiler/AppleClang-C.cmake
+++ b/Modules/Compiler/AppleClang-C.cmake
@@ -18,6 +18,9 @@ if(NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.0)
message(FATAL_ERROR "CMAKE_C_STANDARD_COMPUTED_DEFAULT should be set for ${CMAKE_C_COMPILER_ID} (${CMAKE_C_COMPILER}) version ${CMAKE_C_COMPILER_VERSION}")
endif()
set(CMAKE_C_STANDARD_DEFAULT ${CMAKE_C_STANDARD_COMPUTED_DEFAULT})
+ elseif(NOT DEFINED CMAKE_C_STANDARD_DEFAULT)
+ # Compiler id was forced so just guess the default standard level.
+ set(CMAKE_C_STANDARD_DEFAULT 99)
endif()
endif()
diff --git a/Modules/Compiler/AppleClang-CXX.cmake b/Modules/Compiler/AppleClang-CXX.cmake
index c4e342b..95bc79a 100644
--- a/Modules/Compiler/AppleClang-CXX.cmake
+++ b/Modules/Compiler/AppleClang-CXX.cmake
@@ -28,6 +28,9 @@ if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.0)
message(FATAL_ERROR "CMAKE_CXX_STANDARD_COMPUTED_DEFAULT should be set for ${CMAKE_CXX_COMPILER_ID} (${CMAKE_CXX_COMPILER}) version ${CMAKE_CXX_COMPILER_VERSION}")
endif()
set(CMAKE_CXX_STANDARD_DEFAULT ${CMAKE_CXX_STANDARD_COMPUTED_DEFAULT})
+ elseif(NOT DEFINED CMAKE_CXX_STANDARD_DEFAULT)
+ # Compiler id was forced so just guess the default standard level.
+ set(CMAKE_CXX_STANDARD_DEFAULT 98)
endif()
endif()
diff --git a/Modules/Compiler/Clang-C.cmake b/Modules/Compiler/Clang-C.cmake
index a2e81c1..d8b7743 100644
--- a/Modules/Compiler/Clang-C.cmake
+++ b/Modules/Compiler/Clang-C.cmake
@@ -23,6 +23,13 @@ if(NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 3.4)
message(FATAL_ERROR "CMAKE_C_STANDARD_COMPUTED_DEFAULT should be set for ${CMAKE_C_COMPILER_ID} (${CMAKE_C_COMPILER}) version ${CMAKE_C_COMPILER_VERSION}")
endif()
set(CMAKE_C_STANDARD_DEFAULT ${CMAKE_C_STANDARD_COMPUTED_DEFAULT})
+ elseif(NOT DEFINED CMAKE_C_STANDARD_DEFAULT)
+ # Compiler id was forced so just guess the default standard level.
+ if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 3.6)
+ set(CMAKE_C_STANDARD_DEFAULT 11)
+ else()
+ set(CMAKE_C_STANDARD_DEFAULT 99)
+ endif()
endif()
endif()
diff --git a/Modules/Compiler/Clang-CXX.cmake b/Modules/Compiler/Clang-CXX.cmake
index 055a8ee..6a0a5e2 100644
--- a/Modules/Compiler/Clang-CXX.cmake
+++ b/Modules/Compiler/Clang-CXX.cmake
@@ -37,6 +37,9 @@ if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.4)
message(FATAL_ERROR "CMAKE_CXX_STANDARD_COMPUTED_DEFAULT should be set for ${CMAKE_CXX_COMPILER_ID} (${CMAKE_CXX_COMPILER}) version ${CMAKE_CXX_COMPILER_VERSION}")
endif()
set(CMAKE_CXX_STANDARD_DEFAULT ${CMAKE_CXX_STANDARD_COMPUTED_DEFAULT})
+ elseif(NOT DEFINED CMAKE_CXX_STANDARD_DEFAULT)
+ # Compiler id was forced so just guess the default standard level.
+ set(CMAKE_CXX_STANDARD_DEFAULT 98)
endif()
endif()
diff --git a/Modules/Compiler/GNU-C.cmake b/Modules/Compiler/GNU-C.cmake
index d979fb7..2c478da 100644
--- a/Modules/Compiler/GNU-C.cmake
+++ b/Modules/Compiler/GNU-C.cmake
@@ -28,6 +28,13 @@ if(NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.4)
message(FATAL_ERROR "CMAKE_C_STANDARD_COMPUTED_DEFAULT should be set for ${CMAKE_C_COMPILER_ID} (${CMAKE_C_COMPILER}) version ${CMAKE_C_COMPILER_VERSION}")
endif()
set(CMAKE_C_STANDARD_DEFAULT ${CMAKE_C_STANDARD_COMPUTED_DEFAULT})
+ elseif(NOT DEFINED CMAKE_C_STANDARD_DEFAULT)
+ # Compiler id was forced so just guess the default standard level.
+ if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 5.0)
+ set(CMAKE_C_STANDARD_DEFAULT 11)
+ else()
+ set(CMAKE_C_STANDARD_DEFAULT 90)
+ endif()
endif()
endif()
diff --git a/Modules/Compiler/GNU-CXX.cmake b/Modules/Compiler/GNU-CXX.cmake
index a7e71c3..e1c555b 100644
--- a/Modules/Compiler/GNU-CXX.cmake
+++ b/Modules/Compiler/GNU-CXX.cmake
@@ -40,6 +40,9 @@ if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.4)
message(FATAL_ERROR "CMAKE_CXX_STANDARD_COMPUTED_DEFAULT should be set for ${CMAKE_CXX_COMPILER_ID} (${CMAKE_CXX_COMPILER}) version ${CMAKE_CXX_COMPILER_VERSION}")
endif()
set(CMAKE_CXX_STANDARD_DEFAULT ${CMAKE_CXX_STANDARD_COMPUTED_DEFAULT})
+ elseif(NOT DEFINED CMAKE_CXX_STANDARD_DEFAULT)
+ # Compiler id was forced so just guess the default standard level.
+ set(CMAKE_CXX_STANDARD_DEFAULT 98)
endif()
endif()
diff --git a/Modules/Compiler/SunPro-CXX.cmake b/Modules/Compiler/SunPro-CXX.cmake
index 50d68ee..b4a5591 100644
--- a/Modules/Compiler/SunPro-CXX.cmake
+++ b/Modules/Compiler/SunPro-CXX.cmake
@@ -42,6 +42,9 @@ if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.13)
message(FATAL_ERROR "CMAKE_CXX_STANDARD_COMPUTED_DEFAULT should be set for ${CMAKE_CXX_COMPILER_ID} (${CMAKE_CXX_COMPILER}) version ${CMAKE_CXX_COMPILER_VERSION}")
endif()
set(CMAKE_CXX_STANDARD_DEFAULT ${CMAKE_CXX_STANDARD_COMPUTED_DEFAULT})
+ elseif(NOT DEFINED CMAKE_CXX_STANDARD_DEFAULT)
+ # Compiler id was forced so just guess the default standard level.
+ set(CMAKE_CXX_STANDARD_DEFAULT 98)
endif()
endif()
diff --git a/Modules/FindCUDA.cmake b/Modules/FindCUDA.cmake
index 1fc582f..ada5b8a 100644
--- a/Modules/FindCUDA.cmake
+++ b/Modules/FindCUDA.cmake
@@ -653,6 +653,9 @@ set(CUDA_VERSION_STRING "${CUDA_VERSION}")
# Support for arm cross compilation with CUDA 5.5
if(CUDA_VERSION VERSION_GREATER "5.0" AND CMAKE_CROSSCOMPILING AND CMAKE_SYSTEM_PROCESSOR MATCHES "arm" AND EXISTS "${CUDA_TOOLKIT_ROOT_DIR}/targets/armv7-linux-gnueabihf")
set(CUDA_TOOLKIT_TARGET_DIR "${CUDA_TOOLKIT_ROOT_DIR}/targets/armv7-linux-gnueabihf" CACHE PATH "Toolkit target location.")
+# Support for aarch64 cross compilation with CUDA 7.0
+elseif(CUDA_VERSION VERSION_GREATER "6.5" AND CMAKE_CROSSCOMPILING AND CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64" AND EXISTS "${CUDA_TOOLKIT_ROOT_DIR}/targets/aarch64-linux")
+ set(CUDA_TOOLKIT_TARGET_DIR "${CUDA_TOOLKIT_ROOT_DIR}/targets/aarch64-linux" CACHE PATH "Toolkit target location.")
else()
set(CUDA_TOOLKIT_TARGET_DIR "${CUDA_TOOLKIT_ROOT_DIR}" CACHE PATH "Toolkit target location.")
endif()
@@ -764,13 +767,9 @@ if(CUDA_USE_STATIC_CUDA_RUNTIME)
if (NOT APPLE)
# Here is librt that has things such as, clock_gettime, shm_open, and shm_unlink.
find_library(CUDA_rt_LIBRARY rt)
- find_library(CUDA_dl_LIBRARY dl)
if (NOT CUDA_rt_LIBRARY)
message(WARNING "Expecting to find librt for libcudart_static, but didn't find it.")
endif()
- if (NOT CUDA_dl_LIBRARY)
- message(WARNING "Expecting to find libdl for libcudart_static, but didn't find it.")
- endif()
endif()
endif()
endif()
@@ -793,13 +792,10 @@ set(CUDA_LIBRARIES)
if(CUDA_BUILD_EMULATION AND CUDA_CUDARTEMU_LIBRARY)
list(APPEND CUDA_LIBRARIES ${CUDA_CUDARTEMU_LIBRARY})
elseif(CUDA_USE_STATIC_CUDA_RUNTIME AND CUDA_cudart_static_LIBRARY)
- list(APPEND CUDA_LIBRARIES ${CUDA_cudart_static_LIBRARY} ${CMAKE_THREAD_LIBS_INIT})
+ list(APPEND CUDA_LIBRARIES ${CUDA_cudart_static_LIBRARY} ${CMAKE_THREAD_LIBS_INIT} ${CMAKE_DL_LIBS})
if (CUDA_rt_LIBRARY)
list(APPEND CUDA_LIBRARIES ${CUDA_rt_LIBRARY})
endif()
- if (CUDA_dl_LIBRARY)
- list(APPEND CUDA_LIBRARIES ${CUDA_dl_LIBRARY})
- endif()
if(APPLE)
# We need to add the default path to the driver (libcuda.dylib) as an rpath, so that
# the static cuda runtime can find it at runtime.
diff --git a/Modules/FindFLEX.cmake b/Modules/FindFLEX.cmake
index c837c52..ca66493 100644
--- a/Modules/FindFLEX.cmake
+++ b/Modules/FindFLEX.cmake
@@ -27,13 +27,17 @@
#
# ::
#
-# FLEX_TARGET(Name FlexInput FlexOutput [COMPILE_FLAGS <string>])
+# FLEX_TARGET(Name FlexInput FlexOutput
+# [COMPILE_FLAGS <string>]
+# [DEFINES_FILE <string>]
+# )
#
# which creates a custom command to generate the <FlexOutput> file from
# the <FlexInput> file. If COMPILE_FLAGS option is specified, the next
-# parameter is added to the flex command line. Name is an alias used to
-# get details of this custom command. Indeed the macro defines the
-# following variables:
+# parameter is added to the flex command line. If flex is configured to
+# output a header file, the DEFINES_FILE option may be used to specify its
+# name. Name is an alias used to get details of this custom command.
+# Indeed the macro defines the following variables:
#
# ::
#
@@ -41,6 +45,7 @@
# FLEX_${Name}_OUTPUTS - the source file generated by the custom rule, an
# alias for FlexOutput
# FLEX_${Name}_INPUT - the flex source file, an alias for ${FlexInput}
+# FLEX_${Name}_OUTPUT_HEADER - the header flex output, if any.
#
#
#
@@ -113,6 +118,8 @@ find_path(FLEX_INCLUDE_DIR FlexLexer.h
mark_as_advanced(FL_LIBRARY FLEX_INCLUDE_DIR)
+include(${CMAKE_CURRENT_LIST_DIR}/CMakeParseArguments.cmake)
+
set(FLEX_INCLUDE_DIRS ${FLEX_INCLUDE_DIR})
set(FLEX_LIBRARIES ${FL_LIBRARY})
@@ -145,31 +152,55 @@ if(FLEX_EXECUTABLE)
#============================================================
#
macro(FLEX_TARGET Name Input Output)
- set(FLEX_TARGET_usage "FLEX_TARGET(<Name> <Input> <Output> [COMPILE_FLAGS <string>]")
- if(${ARGC} GREATER 3)
- if(${ARGC} EQUAL 5)
- if("${ARGV3}" STREQUAL "COMPILE_FLAGS")
- set(FLEX_EXECUTABLE_opts "${ARGV4}")
- separate_arguments(FLEX_EXECUTABLE_opts)
- else()
- message(SEND_ERROR ${FLEX_TARGET_usage})
- endif()
+ set(FLEX_TARGET_outputs "${Output}")
+ set(FLEX_EXECUTABLE_opts "")
+
+ set(FLEX_TARGET_PARAM_OPTIONS)
+ set(FLEX_TARGET_PARAM_ONE_VALUE_KEYWORDS
+ COMPILE_FLAGS
+ DEFINES_FILE
+ )
+ set(FLEX_TARGET_PARAM_MULTI_VALUE_KEYWORDS)
+
+ cmake_parse_arguments(
+ FLEX_TARGET_ARG
+ "${FLEX_TARGET_PARAM_OPTIONS}"
+ "${FLEX_TARGET_PARAM_ONE_VALUE_KEYWORDS}"
+ "${FLEX_TARGET_MULTI_VALUE_KEYWORDS}"
+ ${ARGN}
+ )
+
+ set(FLEX_TARGET_usage "FLEX_TARGET(<Name> <Input> <Output> [COMPILE_FLAGS <string>] [DEFINES_FILE <string>]")
+
+ if(NOT "${FLEX_TARGET_ARG_UNPARSED_ARGUMENTS}" STREQUAL "")
+ message(SEND_ERROR ${FLEX_TARGET_usage})
+ else()
+ if(NOT "${FLEX_TARGET_ARG_COMPILE_FLAGS}" STREQUAL "")
+ set(FLEX_EXECUTABLE_opts "${FLEX_TARGET_ARG_COMPILE_FLAGS}")
+ separate_arguments(FLEX_EXECUTABLE_opts)
+ endif()
+ if(NOT "${FLEX_TARGET_ARG_DEFINES_FILE}" STREQUAL "")
+ list(APPEND FLEX_TARGET_outputs "${FLEX_TARGET_ARG_DEFINES_FILE}")
+ list(APPEND FLEX_EXECUTABLE_opts --header-file=${FLEX_TARGET_ARG_DEFINES_FILE})
+ endif()
+
+ add_custom_command(OUTPUT ${FLEX_TARGET_outputs}
+ COMMAND ${FLEX_EXECUTABLE}
+ ARGS ${FLEX_EXECUTABLE_opts} -o${Output} ${Input}
+ DEPENDS ${Input}
+ COMMENT "[FLEX][${Name}] Building scanner with flex ${FLEX_VERSION}"
+ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
+
+ set(FLEX_${Name}_DEFINED TRUE)
+ set(FLEX_${Name}_OUTPUTS ${Output})
+ set(FLEX_${Name}_INPUT ${Input})
+ set(FLEX_${Name}_COMPILE_FLAGS ${FLEX_EXECUTABLE_opts})
+ if("${FLEX_TARGET_ARG_DEFINES_FILE}" STREQUAL "")
+ set(FLEX_${Name}_OUTPUT_HEADER "")
else()
- message(SEND_ERROR ${FLEX_TARGET_usage})
+ set(FLEX_${Name}_OUTPUT_HEADER ${FLEX_TARGET_ARG_DEFINES_FILE})
endif()
endif()
-
- add_custom_command(OUTPUT ${Output}
- COMMAND ${FLEX_EXECUTABLE}
- ARGS ${FLEX_EXECUTABLE_opts} -o${Output} ${Input}
- DEPENDS ${Input}
- COMMENT "[FLEX][${Name}] Building scanner with flex ${FLEX_VERSION}"
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
-
- set(FLEX_${Name}_DEFINED TRUE)
- set(FLEX_${Name}_OUTPUTS ${Output})
- set(FLEX_${Name}_INPUT ${Input})
- set(FLEX_${Name}_COMPILE_FLAGS ${FLEX_EXECUTABLE_opts})
endmacro()
#============================================================
@@ -181,11 +212,11 @@ if(FLEX_EXECUTABLE)
macro(ADD_FLEX_BISON_DEPENDENCY FlexTarget BisonTarget)
if(NOT FLEX_${FlexTarget}_OUTPUTS)
- message(SEND_ERROR "Flex target `${FlexTarget}' does not exists.")
+ message(SEND_ERROR "Flex target `${FlexTarget}' does not exist.")
endif()
if(NOT BISON_${BisonTarget}_OUTPUT_HEADER)
- message(SEND_ERROR "Bison target `${BisonTarget}' does not exists.")
+ message(SEND_ERROR "Bison target `${BisonTarget}' does not exist.")
endif()
set_source_files_properties(${FLEX_${FlexTarget}_OUTPUTS}
diff --git a/Modules/FindGTK2.cmake b/Modules/FindGTK2.cmake
index 72bb8eb..6e4a7f2 100644
--- a/Modules/FindGTK2.cmake
+++ b/Modules/FindGTK2.cmake
@@ -34,6 +34,7 @@
# GTK2_FOUND - Were all of your specified components found?
# GTK2_INCLUDE_DIRS - All include directories
# GTK2_LIBRARIES - All libraries
+# GTK2_TARGETS - All imported targets
# GTK2_DEFINITIONS - Additional compiler flags
#
#
@@ -202,6 +203,43 @@ function(_GTK2_GET_VERSION _OUT_major _OUT_minor _OUT_micro _gtkversion_hdr)
endif()
endfunction()
+
+#=============================================================
+# _GTK2_SIGCXX_GET_VERSION
+# Internal function to parse the version number in
+# sigc++config.h
+# _OUT_major = Major version number
+# _OUT_minor = Minor version number
+# _OUT_micro = Micro version number
+# _sigcxxversion_hdr = Header file to parse
+#=============================================================
+
+function(_GTK2_SIGCXX_GET_VERSION _OUT_major _OUT_minor _OUT_micro _sigcxxversion_hdr)
+ file(STRINGS ${_sigcxxversion_hdr} _contents REGEX "#define SIGCXX_M[A-Z]+_VERSION[ \t]+")
+ if(_contents)
+ string(REGEX REPLACE ".*#define SIGCXX_MAJOR_VERSION[ \t]+([0-9]+).*" "\\1" ${_OUT_major} "${_contents}")
+ string(REGEX REPLACE ".*#define SIGCXX_MINOR_VERSION[ \t]+([0-9]+).*" "\\1" ${_OUT_minor} "${_contents}")
+ string(REGEX REPLACE ".*#define SIGCXX_MICRO_VERSION[ \t]+([0-9]+).*" "\\1" ${_OUT_micro} "${_contents}")
+
+ if(NOT ${_OUT_major} MATCHES "[0-9]+")
+ message(FATAL_ERROR "Version parsing failed for SIGCXX_MAJOR_VERSION!")
+ endif()
+ if(NOT ${_OUT_minor} MATCHES "[0-9]+")
+ message(FATAL_ERROR "Version parsing failed for SIGCXX_MINOR_VERSION!")
+ endif()
+ if(NOT ${_OUT_micro} MATCHES "[0-9]+")
+ message(FATAL_ERROR "Version parsing failed for SIGCXX_MICRO_VERSION!")
+ endif()
+
+ set(${_OUT_major} ${${_OUT_major}} PARENT_SCOPE)
+ set(${_OUT_minor} ${${_OUT_minor}} PARENT_SCOPE)
+ set(${_OUT_micro} ${${_OUT_micro}} PARENT_SCOPE)
+ else()
+ message(FATAL_ERROR "Include file ${_gtkversion_hdr} does not exist")
+ endif()
+endfunction()
+
+
#=============================================================
# _GTK2_FIND_INCLUDE_DIR
# Internal function to find the GTK include directories
@@ -513,6 +551,9 @@ function(_GTK2_ADD_TARGET _var)
add_library(GTK2::${_basename} UNKNOWN IMPORTED)
+ set(GTK2_TARGETS ${GTK2_TARGETS} GTK2::${_basename})
+ set(GTK2_TARGETS ${GTK2_TARGETS} PARENT_SCOPE)
+
if(GTK2_${_var}_LIBRARY_RELEASE)
set_property(TARGET GTK2::${_basename} APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
set_property(TARGET GTK2::${_basename} PROPERTY IMPORTED_LOCATION_RELEASE "${GTK2_${_var}_LIBRARY_RELEASE}" )
@@ -565,6 +606,7 @@ endfunction()
set(GTK2_FOUND)
set(GTK2_INCLUDE_DIRS)
set(GTK2_LIBRARIES)
+set(GTK2_TARGETS)
set(GTK2_DEFINITIONS)
if(NOT GTK2_FIND_COMPONENTS)
@@ -734,6 +776,27 @@ foreach(_GTK2_component ${GTK2_FIND_COMPONENTS})
_GTK2_FIND_INCLUDE_DIR(SIGC++CONFIG sigc++config.h)
_GTK2_FIND_LIBRARY (SIGC++ sigc true true)
_GTK2_ADD_TARGET (SIGC++)
+ # Since sigc++ 2.5.1 c++11 support is required
+ if(GTK2_SIGC++CONFIG_INCLUDE_DIR)
+ _GTK2_SIGCXX_GET_VERSION(GTK2_SIGC++_VERSION_MAJOR
+ GTK2_SIGC++_VERSION_MINOR
+ GTK2_SIGC++_VERSION_MICRO
+ ${GTK2_SIGC++CONFIG_INCLUDE_DIR}/sigc++config.h)
+ if(NOT ${GTK2_SIGC++_VERSION_MAJOR}.${GTK2_SIGC++_VERSION_MINOR}.${GTK2_SIGC++_VERSION_MICRO} VERSION_LESS 2.5.1)
+ # These are the features needed by clients in order to include the
+ # project headers:
+ set_property(TARGET GTK2::sigc++
+ PROPERTY INTERFACE_COMPILE_FEATURES cxx_alias_templates
+ cxx_auto_type
+ cxx_decltype
+ cxx_deleted_functions
+ cxx_noexcept
+ cxx_nullptr
+ cxx_right_angle_brackets
+ cxx_rvalue_references
+ cxx_variadic_templates)
+ endif()
+ endif()
_GTK2_FIND_INCLUDE_DIR(GLIBMM glibmm.h)
_GTK2_FIND_INCLUDE_DIR(GLIBMMCONFIG glibmmconfig.h)
@@ -882,6 +945,11 @@ foreach(_GTK2_component ${GTK2_FIND_COMPONENTS})
endif()
endforeach()
+if(GTK2_USE_IMPORTED_TARGETS)
+ set(GTK2_LIBRARIES ${GTK2_TARGETS})
+endif()
+
+
if(_GTK2_did_we_find_everything AND NOT GTK2_VERSION_CHECK_FAILED)
set(GTK2_FOUND true)
else()
@@ -893,6 +961,7 @@ else()
set(GTK2_VERSION_PATCH)
set(GTK2_INCLUDE_DIRS)
set(GTK2_LIBRARIES)
+ set(GTK2_TARGETS)
set(GTK2_DEFINITIONS)
endif()
diff --git a/Modules/FindGTest.cmake b/Modules/FindGTest.cmake
index fccf877..eb7abfd 100644
--- a/Modules/FindGTest.cmake
+++ b/Modules/FindGTest.cmake
@@ -124,11 +124,11 @@ function(GTEST_ADD_TESTS executable extra_args)
string(REGEX MATCH "${gtest_test_type_regex}" test_type ${hit})
# Parameterized tests have a different signature for the filter
- if(${test_type} STREQUAL "TEST_P")
+ if("x${test_type}" STREQUAL "xTEST_P")
string(REGEX REPLACE ${gtest_case_name_regex} "*/\\1.\\2/*" test_name ${hit})
- elseif(${test_type} STREQUAL "TEST_F" OR ${test_type} STREQUAL "TEST")
+ elseif("x${test_type}" STREQUAL "xTEST_F" OR "x${test_type}" STREQUAL "xTEST")
string(REGEX REPLACE ${gtest_case_name_regex} "\\1.\\2" test_name ${hit})
- elseif(${test_type} STREQUAL "TYPED_TEST")
+ elseif("x${test_type}" STREQUAL "xTYPED_TEST")
string(REGEX REPLACE ${gtest_case_name_regex} "\\1/*.\\2" test_name ${hit})
else()
message(WARNING "Could not parse GTest ${hit} for adding to CTest.")
diff --git a/Modules/FindGit.cmake b/Modules/FindGit.cmake
index b4f7b4b..2c3e5fd 100644
--- a/Modules/FindGit.cmake
+++ b/Modules/FindGit.cmake
@@ -48,17 +48,21 @@ if(WIN32)
# GitHub search path for Windows
set(github_path "$ENV{LOCALAPPDATA}/Github/PortableGit*/bin")
file(GLOB github_path "${github_path}")
+ # SourceTree search path for Windows
+ set(_git_sourcetree_path "$ENV{LOCALAPPDATA}/Atlassian/SourceTree/git_local/bin")
endif()
endif()
find_program(GIT_EXECUTABLE
NAMES ${git_names}
- PATHS ${github_path}
+ PATHS ${github_path} ${_git_sourcetree_path}
PATH_SUFFIXES Git/cmd Git/bin
DOC "git command line client"
)
mark_as_advanced(GIT_EXECUTABLE)
+unset(_git_sourcetree_path)
+
if(GIT_EXECUTABLE)
execute_process(COMMAND ${GIT_EXECUTABLE} --version
OUTPUT_VARIABLE git_version
diff --git a/Modules/FindOpenSSL.cmake b/Modules/FindOpenSSL.cmake
index d75e8ab..8b4b988 100644
--- a/Modules/FindOpenSSL.cmake
+++ b/Modules/FindOpenSSL.cmake
@@ -37,6 +37,7 @@
#
# Set ``OPENSSL_ROOT_DIR`` to the root directory of an OpenSSL installation.
# Set ``OPENSSL_USE_STATIC_LIBS`` to ``TRUE`` to look for static libraries.
+# Set ``OPENSSL_MSVC_STATIC_RT`` set ``TRUE`` to choose the MT version of the lib.
#=============================================================================
# Copyright 2006-2009 Kitware, Inc.
@@ -113,7 +114,7 @@ if(WIN32 AND NOT CYGWIN)
# /MD and /MDd are the standard values - if someone wants to use
# others, the libnames have to change here too
# use also ssl and ssleay32 in debug as fallback for openssl < 0.9.8b
- # TODO: handle /MT and static lib
+ # enable OPENSSL_MSVC_STATIC_RT to get the libs build /MT (Multithreaded no-DLL)
# In Visual C++ naming convention each of these four kinds of Windows libraries has it's standard suffix:
# * MD for dynamic-release
# * MDd for dynamic-debug
@@ -126,6 +127,12 @@ if(WIN32 AND NOT CYGWIN)
# ssleay32MD.lib is identical to ../ssleay32.lib
# enable OPENSSL_USE_STATIC_LIBS to use the static libs located in lib/VC/static
+ if (OPENSSL_MSVC_STATIC_RT)
+ set(_OPENSSL_MSVC_RT_MODE "MT")
+ else ()
+ set(_OPENSSL_MSVC_RT_MODE "MD")
+ endif ()
+
if(OPENSSL_USE_STATIC_LIBS)
set(_OPENSSL_PATH_SUFFIXES
"lib"
@@ -142,7 +149,7 @@ if(WIN32 AND NOT CYGWIN)
find_library(LIB_EAY_DEBUG
NAMES
- libeay32MDd
+ libeay32${_OPENSSL_MSVC_RT_MODE}d
libeay32d
${_OPENSSL_ROOT_HINTS_AND_PATHS}
PATH_SUFFIXES
@@ -151,7 +158,7 @@ if(WIN32 AND NOT CYGWIN)
find_library(LIB_EAY_RELEASE
NAMES
- libeay32MD
+ libeay32${_OPENSSL_MSVC_RT_MODE}
libeay32
${_OPENSSL_ROOT_HINTS_AND_PATHS}
PATH_SUFFIXES
@@ -160,7 +167,7 @@ if(WIN32 AND NOT CYGWIN)
find_library(SSL_EAY_DEBUG
NAMES
- ssleay32MDd
+ ssleay32${_OPENSSL_MSVC_RT_MODE}d
ssleay32d
${_OPENSSL_ROOT_HINTS_AND_PATHS}
PATH_SUFFIXES
@@ -169,7 +176,7 @@ if(WIN32 AND NOT CYGWIN)
find_library(SSL_EAY_RELEASE
NAMES
- ssleay32MD
+ ssleay32${_OPENSSL_MSVC_RT_MODE}
ssleay32
ssl
${_OPENSSL_ROOT_HINTS_AND_PATHS}
@@ -193,12 +200,8 @@ if(WIN32 AND NOT CYGWIN)
set(OPENSSL_LIBRARIES ${SSL_EAY_LIBRARY} ${LIB_EAY_LIBRARY} )
elseif(MINGW)
# same player, for MinGW
- set(LIB_EAY_NAMES libeay32)
- set(SSL_EAY_NAMES ssleay32)
- if(CMAKE_CROSSCOMPILING)
- list(APPEND LIB_EAY_NAMES crypto)
- list(APPEND SSL_EAY_NAMES ssl)
- endif()
+ set(LIB_EAY_NAMES crypto libeay32)
+ set(SSL_EAY_NAMES ssl ssleay32)
find_library(LIB_EAY
NAMES
${LIB_EAY_NAMES}
@@ -318,7 +321,7 @@ endfunction()
if (OPENSSL_INCLUDE_DIR)
if(OPENSSL_INCLUDE_DIR AND EXISTS "${OPENSSL_INCLUDE_DIR}/openssl/opensslv.h")
file(STRINGS "${OPENSSL_INCLUDE_DIR}/openssl/opensslv.h" openssl_version_str
- REGEX "^# *define[\t ]+OPENSSL_VERSION_NUMBER[\t ]+0x([0-9a-fA-F])+.*")
+ REGEX "^#[\t ]*define[\t ]+OPENSSL_VERSION_NUMBER[\t ]+0x([0-9a-fA-F])+.*")
# The version number is encoded as 0xMNNFFPPS: major minor fix patch status
# The status gives if this is a developer or prerelease and is ignored here.
diff --git a/Modules/FindPkgConfig.cmake b/Modules/FindPkgConfig.cmake
index e822b9c..d519c1d 100644
--- a/Modules/FindPkgConfig.cmake
+++ b/Modules/FindPkgConfig.cmake
@@ -328,7 +328,7 @@ macro(_pkg_check_modules_internal _is_required _is_silent _no_cmake_path _no_cma
if (_pkg_check_modules_pkg_op)
list(APPEND _pkg_check_modules_exist_query "${_pkg_check_modules_pkg_ver}")
else()
- list(APPEND _pkg_check_modules_exist_query --exists)
+ list(APPEND _pkg_check_modules_exist_query --exists --print-errors --short-errors)
endif()
_pkgconfig_unset(${_prefix}_${_pkg_check_modules_pkg_name}_VERSION)
@@ -342,12 +342,14 @@ macro(_pkg_check_modules_internal _is_required _is_silent _no_cmake_path _no_cma
# execute the query
execute_process(
COMMAND ${PKG_CONFIG_EXECUTABLE} ${_pkg_check_modules_exist_query}
- RESULT_VARIABLE _pkgconfig_retval)
+ RESULT_VARIABLE _pkgconfig_retval
+ ERROR_VARIABLE _pkgconfig_error
+ ERROR_STRIP_TRAILING_WHITESPACE)
# evaluate result and tell failures
if (_pkgconfig_retval)
if(NOT ${_is_silent})
- message(STATUS " Package '${_pkg_check_modules_pkg}' not found")
+ message(STATUS " ${_pkgconfig_error}")
endif()
set(_pkg_check_modules_failed 1)
diff --git a/Modules/FindXercesC.cmake b/Modules/FindXercesC.cmake
index cf84826..a4b80e5 100644
--- a/Modules/FindXercesC.cmake
+++ b/Modules/FindXercesC.cmake
@@ -4,23 +4,42 @@
#
# Find the Apache Xerces-C++ validating XML parser headers and libraries.
#
-# This module reports information about the Xerces installation in
-# several variables. General variables::
+# Imported targets
+# ^^^^^^^^^^^^^^^^
#
-# XercesC_FOUND - true if the Xerces headers and libraries were found
-# XercesC_VERSION - Xerces release version
-# XercesC_INCLUDE_DIRS - the directory containing the Xerces headers
-# XercesC_LIBRARIES - Xerces libraries to be linked
+# This module defines the following :prop_tgt:`IMPORTED` targets:
#
-# The following cache variables may also be set::
+# ``XercesC::XercesC``
+# The Xerces-C++ ``xerces-c`` library, if found.
#
-# XercesC_INCLUDE_DIR - the directory containing the Xerces headers
-# XercesC_LIBRARY - the Xerces library
+# Result variables
+# ^^^^^^^^^^^^^^^^
+#
+# This module will set the following variables in your project:
+#
+# ``XercesC_FOUND``
+# true if the Xerces headers and libraries were found
+# ``XercesC_VERSION``
+# Xerces release version
+# ``XercesC_INCLUDE_DIRS``
+# the directory containing the Xerces headers
+# ``XercesC_LIBRARIES``
+# Xerces libraries to be linked
+#
+# Cache variables
+# ^^^^^^^^^^^^^^^
+#
+# The following cache variables may also be set:
+#
+# ``XercesC_INCLUDE_DIR``
+# the directory containing the Xerces headers
+# ``XercesC_LIBRARY``
+# the Xerces library
# Written by Roger Leigh <rleigh@codelibre.net>
#=============================================================================
-# Copyright 2014 University of Dundee
+# Copyright 2014-2015 University of Dundee
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
@@ -90,4 +109,32 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS(XercesC
if(XercesC_FOUND)
set(XercesC_INCLUDE_DIRS "${XercesC_INCLUDE_DIR}")
set(XercesC_LIBRARIES "${XercesC_LIBRARY}")
+
+ # For header-only libraries
+ if(NOT TARGET XercesC::XercesC)
+ add_library(XercesC::XercesC UNKNOWN IMPORTED)
+ if(XercesC_INCLUDE_DIRS)
+ set_target_properties(XercesC::XercesC PROPERTIES
+ INTERFACE_INCLUDE_DIRECTORIES "${XercesC_INCLUDE_DIRS}")
+ endif()
+ if(EXISTS "${XercesC_LIBRARY}")
+ set_target_properties(XercesC::XercesC PROPERTIES
+ IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
+ IMPORTED_LOCATION "${XercesC_LIBRARY}")
+ endif()
+ if(EXISTS "${XercesC_LIBRARY_DEBUG}")
+ set_property(TARGET XercesC::XercesC APPEND PROPERTY
+ IMPORTED_CONFIGURATIONS DEBUG)
+ set_target_properties(XercesC::XercesC PROPERTIES
+ IMPORTED_LINK_INTERFACE_LANGUAGES_DEBUG "CXX"
+ IMPORTED_LOCATION_DEBUG "${XercesC_LIBRARY_DEBUG}")
+ endif()
+ if(EXISTS "${XercesC_LIBRARY_RELEASE}")
+ set_property(TARGET XercesC::XercesC APPEND PROPERTY
+ IMPORTED_CONFIGURATIONS RELEASE)
+ set_target_properties(XercesC::XercesC PROPERTIES
+ IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "CXX"
+ IMPORTED_LOCATION_RELEASE "${XercesC_LIBRARY_RELEASE}")
+ endif()
+ endif()
endif()
diff --git a/Modules/NSIS.template.in b/Modules/NSIS.template.in
index 76310af..1ef3d28 100644
--- a/Modules/NSIS.template.in
+++ b/Modules/NSIS.template.in
@@ -542,6 +542,8 @@ FunctionEnd
; Define some macro setting for the gui
@CPACK_NSIS_INSTALLER_MUI_ICON_CODE@
@CPACK_NSIS_INSTALLER_ICON_CODE@
+@CPACK_NSIS_INSTALLER_MUI_WELCOMEFINISH_CODE@
+@CPACK_NSIS_INSTALLER_MUI_UNWELCOMEFINISH_CODE@
@CPACK_NSIS_INSTALLER_MUI_COMPONENTS_DESC@
@CPACK_NSIS_INSTALLER_MUI_FINISHPAGE_RUN_CODE@
diff --git a/Modules/Platform/CrayLinuxEnvironment.cmake b/Modules/Platform/CrayLinuxEnvironment.cmake
new file mode 100644
index 0000000..19a0f71
--- /dev/null
+++ b/Modules/Platform/CrayLinuxEnvironment.cmake
@@ -0,0 +1,112 @@
+# Compute Node Linux doesn't quite work the same as native Linux so all of this
+# needs to be custom. We use the variables defined through Cray's environment
+# modules to set up the right paths for things.
+
+# Guard against multiple inclusions
+if(__CrayLinuxEnvironment)
+ return()
+endif()
+set(__CrayLinuxEnvironment 1)
+
+set(UNIX 1)
+
+if(DEFINED ENV{CRAYOS_VERSION})
+ set(CMAKE_SYSTEM_VERSION "$ENV{CRAYOS_VERSION}")
+elseif(DEFINED ENV{XTOS_VERSION})
+ set(CMAKE_SYSTEM_VERSION "$ENV{XTOS_VERSION}")
+else()
+ message(FATAL_ERROR "Neither the CRAYOS_VERSION or XTOS_VERSION environment variables are defined. This platform file should be used inside the Cray Linux Environment for targeting compute nodes (NIDs)")
+endif()
+message(STATUS "Cray Linux Environment ${CMAKE_SYSTEM_VERSION}")
+
+# All cray systems are x86 CPUs and have been for quite some time
+# Note: this may need to change in the future with 64-bit ARM
+set(CMAKE_SYSTEM_PROCESSOR "x86_64")
+
+set(CMAKE_SHARED_LIBRARY_PREFIX "lib")
+set(CMAKE_SHARED_LIBRARY_SUFFIX ".so")
+set(CMAKE_STATIC_LIBRARY_PREFIX "lib")
+set(CMAKE_STATIC_LIBRARY_SUFFIX ".a")
+
+set(CMAKE_FIND_LIBRARY_PREFIXES "lib")
+set(CMAKE_FIND_LIBRARY_SUFFIXES ".so" ".a")
+set_property(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS TRUE)
+
+set(CMAKE_DL_LIBS dl)
+
+# Note: Much of this is pulled from UnixPaths.cmake but adjusted to the Cray
+# environment accordingly
+
+# Get the install directory of the running cmake to the search directories
+# CMAKE_ROOT is CMAKE_INSTALL_PREFIX/share/cmake, so we need to go two levels up
+get_filename_component(__cmake_install_dir "${CMAKE_ROOT}" PATH)
+get_filename_component(__cmake_install_dir "${__cmake_install_dir}" PATH)
+
+
+# Note: Some Cray's have the SYSROOT_DIR variable defined, pointing to a copy
+# of the NIDs userland. If so, then we'll use it. Otherwise, just assume
+# the userland from the login node is ok
+
+# List common installation prefixes. These will be used for all
+# search types.
+list(APPEND CMAKE_SYSTEM_PREFIX_PATH
+ # Standard
+ $ENV{SYSROOT_DIR}/usr/local $ENV{SYSROOT_DIR}/usr $ENV{SYSROOT_DIR}/
+
+ # CMake install location
+ "${__cmake_install_dir}"
+ )
+if (NOT CMAKE_FIND_NO_INSTALL_PREFIX)
+ list(APPEND CMAKE_SYSTEM_PREFIX_PATH
+ # Project install destination.
+ "${CMAKE_INSTALL_PREFIX}"
+ )
+ if(CMAKE_STAGING_PREFIX)
+ list(APPEND CMAKE_SYSTEM_PREFIX_PATH
+ # User-supplied staging prefix.
+ "${CMAKE_STAGING_PREFIX}"
+ )
+ endif()
+endif()
+
+list(APPEND CMAKE_SYSTEM_INCLUDE_PATH
+ $ENV{SYSROOT_DIR}/usr/include
+ $ENV{SYSROOT_DIR}/usr/include/X11
+)
+list(APPEND CMAKE_SYSTEM_LIBRARY_PATH
+ $ENV{SYSROOT_DIR}/usr/local/lib64
+ $ENV{SYSROOT_DIR}/usr/lib64
+ $ENV{SYSROOT_DIR}/lib64
+)
+
+list(APPEND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES
+ $ENV{SYSROOT_DIR}/usr/local/lib64
+ $ENV{SYSROOT_DIR}/usr/lib64
+ $ENV{SYSROOT_DIR}/lib64
+)
+list(APPEND CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES
+ $ENV{SYSROOT_DIR}/usr/include
+)
+list(APPEND CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES
+ $ENV{SYSROOT_DIR}/usr/include
+)
+list(APPEND CMAKE_Fortran_IMPLICIT_INCLUDE_DIRECTORIES
+ $ENV{SYSROOT_DIR}/usr/include
+)
+
+# Enable use of lib64 search path variants by default.
+set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS TRUE)
+
+# Check to see if we're using the cray compiler wrappers and load accordingly
+# if we are
+if(DEFINED ENV{CRAYPE_DIR})
+ set(_CRAYPE_ROOT "$ENV{CRAYPE_DIR}")
+elseif(DEFINED ENV{ASYNCPE_DIR})
+ set(_CRAYPE_ROOT "$ENV{ASYNCPE_DIR}")
+endif()
+if(_CRAYPE_ROOT AND
+ ((CMAKE_C_COMPILER MATCHES "${_CRAYPE_ROOT}") OR
+ (CMAKE_CXX_COMPILER MATCHES "${_CRAYPE_ROOT}") OR
+ (CMAKE_Fortran_COMPILER MATCHES "${_CRAYPE_ROOT}")))
+ include(Platform/CrayPrgEnv)
+endif()
diff --git a/Modules/Platform/CrayPrgEnv.cmake b/Modules/Platform/CrayPrgEnv.cmake
new file mode 100644
index 0000000..d60266b
--- /dev/null
+++ b/Modules/Platform/CrayPrgEnv.cmake
@@ -0,0 +1,149 @@
+# Guard against multiple inclusions
+if(__CrayPrgEnv)
+ return()
+endif()
+set(__CrayPrgEnv 1)
+if(DEFINED ENV{CRAYPE_VERSION})
+ message(STATUS "Cray Programming Environment $ENV{CRAYPE_VERSION}")
+ set(__verbose_flag "-craype-verbose")
+elseif(DEFINED ENV{ASYNCPE_VERSION})
+ message(STATUS "Cray Programming Environment $ENV{ASYNCPE_VERSION}")
+ set(__verbose_flag "-v")
+else()
+ message(STATUS "Cray Programming Environment")
+endif()
+
+if(NOT __CrayLinuxEnvironment)
+ message(FATAL_ERROR "The CrayPrgEnv platform file must not be used on its own and is intented to be included by the CrayLinuxEnvironment platform file")
+endif()
+
+# Flags for the Cray wrappers
+foreach(__lang C CXX Fortran)
+ set(CMAKE_STATIC_LIBRARY_LINK_${__lang}_FLAGS "-static")
+ set(CMAKE_SHARED_LIBRARY_${__lang}_FLAGS "")
+ set(CMAKE_SHARED_LIBRARY_CREATE_${__lang}_FLAGS "-shared")
+ set(CMAKE_SHARED_LIBRARY_LINK_${__lang}_FLAGS "-dynamic")
+endforeach()
+
+# If the link type is not explicitly specified in the environment then
+# the Cray wrappers assume that the code will be built staticly so
+# we check the following condition(s) are NOT met
+# Compiler flags are explicitly dynamic
+# Env var is dynamic and compiler flags are not explicitly static
+if(NOT (((CMAKE_C_FLAGS MATCHES "(^| )-dynamic($| )") OR
+ (CMAKE_CXX_FLAGS MATCHES "(^| )-dynamic($| )") OR
+ (CMAKE_Fortran_FLAGS MATCHES "(^| )-dynamic($| )") OR
+ (CMAKE_EXE_LINKER_FLAGS MATCHES "(^| )-dynamic($| )"))
+ OR
+ (("$ENV{CRAYPE_LINK_TYPE}" STREQUAL "dynamic") AND
+ NOT ((CMAKE_C_FLAGS MATCHES "(^| )-static($| )") OR
+ (CMAKE_CXX_FLAGS MATCHES "(^| )-static($| )") OR
+ (CMAKE_Fortran_FLAGS MATCHES "(^| )-static($| )") OR
+ (CMAKE_EXE_LINKER_FLAGS MATCHES "(^| )-static($| )")))))
+ set_property(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS FALSE)
+ set(BUILD_SHARED_LIBS FALSE CACHE BOOL "")
+ set(CMAKE_FIND_LIBRARY_SUFFIXES ".a")
+ set(CMAKE_LINK_SEARCH_START_STATIC TRUE)
+endif()
+
+function(__cray_parse_flags_with_sep OUTPUT FLAG_TAG SEP INPUT)
+ string(REGEX MATCHALL "${SEP}${FLAG_TAG}([^${SEP}]+)" FLAG_ARGS "${INPUT}")
+ foreach(FLAG_ARG IN LISTS FLAG_ARGS)
+ string(REGEX REPLACE
+ "^${SEP}${FLAG_TAG}([^${SEP}]+)" "\\1" FLAG_VALUE
+ "${FLAG_ARG}")
+ list(APPEND ${OUTPUT} ${FLAG_VALUE})
+ endforeach()
+ set(${OUTPUT} ${${OUTPUT}} PARENT_SCOPE)
+endfunction()
+macro(__cray_parse_flags OUTPUT FLAG_TAG INPUT)
+ __cray_parse_flags_with_sep(${OUTPUT} ${FLAG_TAG} " " "${INPUT}")
+endmacro()
+
+# Remove duplicates in a list
+macro(__cray_list_remove_duplicates VAR)
+ if(${VAR})
+ list(REMOVE_DUPLICATES ${VAR})
+ endif()
+endmacro()
+
+# Compute the intersection of several lists
+function(__cray_list_intersect OUTPUT INPUT0)
+ if(ARGC EQUAL 2)
+ list(APPEND ${OUTPUT} ${${INPUT0}})
+ else()
+ foreach(I IN LISTS ${INPUT0})
+ set(__is_common 1)
+ foreach(L IN LISTS ARGN)
+ list(FIND ${L} "${I}" __idx)
+ if(__idx EQUAL -1)
+ set(__is_common 0)
+ break()
+ endif()
+ endforeach()
+ if(__is_common)
+ list(APPEND ${OUTPUT} "${I}")
+ endif()
+ endforeach()
+ endif()
+ set(${OUTPUT} ${${OUTPUT}} PARENT_SCOPE)
+endfunction()
+
+# Parse the implicit directories used by the wrappers
+get_property(__langs GLOBAL PROPERTY ENABLED_LANGUAGES)
+foreach(__lang IN LISTS __langs)
+ if(__lang STREQUAL "C")
+ set(__empty empty.c)
+ elseif(__lang STREQUAL CXX)
+ set(__empty empty.cxx)
+ elseif(__lang STREQUAL Fortran)
+ set(__empty empty.f90)
+ else()
+ continue()
+ endif()
+
+ execute_process(
+ COMMAND ${CMAKE_${__lang}_COMPILER} ${__verbose_flag} ${__empty}
+ OUTPUT_VARIABLE __cmd_out
+ ERROR_QUIET
+ )
+ string(REGEX MATCH "(^|\n)[^\n]*${__empty}[^\n]*" __driver "${__cmd_out}")
+
+ # Parse include paths
+ set(__cray_flag_args)
+ __cray_parse_flags(__cray_flag_args "-I" "${__driver}")
+ __cray_parse_flags(__cray_flag_args "-isystem " "${__driver}")
+ list(APPEND CMAKE_${__lang}_IMPLICIT_INCLUDE_DIRECTORIES ${__cray_flag_args})
+ __cray_list_remove_duplicates(CMAKE_${__lang}_IMPLICIT_INCLUDE_DIRECTORIES)
+
+ # Parse library paths
+ set(__cray_flag_args)
+ __cray_parse_flags(__cray_flag_args "-L" "${__driver}")
+ list(APPEND CMAKE_${__lang}_IMPLICIT_LINK_DIRECTORIES ${__cray_flag_args})
+ __cray_list_remove_duplicates(CMAKE_${__lang}_IMPLICIT_LINK_DIRECTORIES)
+
+ # Parse libraries
+ set(__cray_flag_args)
+ __cray_parse_flags(__cray_flag_args "-l" "${__driver}")
+ __cray_parse_flags(__cray_linker_flags "-Wl" "${__driver}")
+ foreach(F IN LISTS __cray_linker_flags)
+ __cray_parse_flags_with_sep(__cray_flag_args "-l" "," "${F}")
+ endforeach()
+ list(APPEND CMAKE_${__lang}_IMPLICIT_LINK_LIBRARIES ${__cray_flag_args})
+ __cray_list_remove_duplicates(CMAKE_${__lang}_IMPLICIT_LINK_LIBRARIES)
+endforeach()
+
+# Determine the common directories between all languages and add them
+# as system search paths
+set(__cray_inc_path_vars)
+set(__cray_lib_path_vars)
+foreach(__lang IN LISTS __langs)
+ list(APPEND __cray_inc_path_vars CMAKE_${__lang}_IMPLICIT_INCLUDE_DIRECTORIES)
+ list(APPEND __cray_lib_path_vars CMAKE_${__lang}_IMPLICIT_LINK_DIRECTORIES)
+endforeach()
+if(__cray_inc_path_vars)
+ __cray_list_intersect(CMAKE_SYSTEM_INCLUDE_PATH ${__cray_inc_path_vars})
+endif()
+if(__cray_lib_path_vars)
+ __cray_list_intersect(CMAKE_SYSTEM_LIBRARY_PATH ${__cray_lib_path_vars})
+endif()
diff --git a/Modules/Platform/SunOS.cmake b/Modules/Platform/SunOS.cmake
index 77946f2..58398c0 100644
--- a/Modules/Platform/SunOS.cmake
+++ b/Modules/Platform/SunOS.cmake
@@ -9,12 +9,6 @@ endif()
include(Platform/UnixPaths)
-# Add the compiler's implicit link directories.
-if("${CMAKE_C_COMPILER_ID} ${CMAKE_CXX_COMPILER_ID}" MATCHES SunPro)
- list(APPEND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES
- /opt/SUNWspro/lib /opt/SUNWspro/prod/lib /usr/ccs/lib)
-endif()
-
# The Sun linker needs to find transitive shared library dependencies
# in the -L path.
set(CMAKE_LINK_DEPENDENT_LIBRARY_DIRS 1)
diff --git a/Modules/Platform/Windows-MSVC.cmake b/Modules/Platform/Windows-MSVC.cmake
index b421b0d..a61413a 100644
--- a/Modules/Platform/Windows-MSVC.cmake
+++ b/Modules/Platform/Windows-MSVC.cmake
@@ -302,6 +302,7 @@ macro(__windows_compiler_msvc lang)
set(CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT "/MD /Zi /O2 /Ob1 /D NDEBUG")
set(CMAKE_${lang}_FLAGS_MINSIZEREL_INIT "/MD /O1 /Ob1 /D NDEBUG")
set(CMAKE_${lang}_LINKER_SUPPORTS_PDB ON)
+ set(CMAKE_NINJA_DEPTYPE_${lang} msvc)
if(NOT CMAKE_RC_COMPILER_INIT)
set(CMAKE_RC_COMPILER_INIT rc)
@@ -311,4 +312,5 @@ macro(__windows_compiler_msvc lang)
endif()
enable_language(RC)
+ set(CMAKE_NINJA_CMCLDEPS_RC 1)
endmacro()
diff --git a/Packaging/CMakeDMGBackground.tif b/Packaging/CMakeDMGBackground.tif
new file mode 100644
index 0000000..91c4b13
--- /dev/null
+++ b/Packaging/CMakeDMGBackground.tif
Binary files differ
diff --git a/Packaging/CMakeDMGSetup.scpt b/Packaging/CMakeDMGSetup.scpt
new file mode 100644
index 0000000..c7ddcfb
--- /dev/null
+++ b/Packaging/CMakeDMGSetup.scpt
@@ -0,0 +1,42 @@
+on run argv
+ set image_name to item 1 of argv
+
+ tell application "Finder"
+ tell disk image_name
+
+ -- open the image the first time and save a DS_Store with just
+ -- background and icon setup
+ open
+ set current view of container window to icon view
+ set theViewOptions to the icon view options of container window
+ set background picture of theViewOptions to file ".background:background.tif"
+ set arrangement of theViewOptions to not arranged
+ set icon size of theViewOptions to 128
+ delay 1
+ close
+
+ -- next setup the position of the app and Applications symlink
+ -- plus hide all the window decoration
+ open
+ update without registering applications
+ tell container window
+ set sidebar width to 0
+ set statusbar visible to false
+ set toolbar visible to false
+ set the bounds to { 400, 100, 900, 465 }
+ set position of item "CMake.app" to { 133, 200 }
+ set position of item "Applications" to { 378, 200 }
+ end tell
+ update without registering applications
+ delay 1
+ close
+
+ -- one last open and close so you can see everything looks correct
+ open
+ delay 5
+ close
+
+ end tell
+ delay 1
+end tell
+end run
diff --git a/README.rst b/README.rst
index 5e7a323..9599a04 100644
--- a/README.rst
+++ b/README.rst
@@ -46,7 +46,7 @@ UNIX/Mac OSX/MinGW/MSYS/Cygwin
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
You need to have a compiler and a make installed.
-Run the ``bootstrap`` script you find the in the source directory of CMake.
+Run the ``bootstrap`` script you find in the source directory of CMake.
You can use the ``--help`` option to see the supported options.
You may use the ``--prefix=<install_prefix>`` option to specify a custom
installation directory for CMake. You can run the ``bootstrap`` script from
diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt
index ae5b03f..f23331b 100644
--- a/Source/CMakeLists.txt
+++ b/Source/CMakeLists.txt
@@ -299,8 +299,6 @@ set(SRCS
cmLocalUnixMakefileGenerator3.cxx
cmLocale.h
${MACH_SRCS}
- cmMakeDepend.cxx
- cmMakeDepend.h
cmMakefile.cxx
cmMakefile.h
cmMakefileTargetGenerator.cxx
@@ -548,6 +546,19 @@ foreach(v CURL_CA_BUNDLE CURL_CA_PATH)
endif()
endforeach()
+foreach(check
+ STAT_HAS_ST_MTIM
+ STAT_HAS_ST_MTIMESPEC
+ )
+ if(KWSYS_CXX_${check}_COMPILED) # abuse KWSys check cache entry
+ set(CMake_${check} 1)
+ else()
+ set(CMake_${check} 0)
+ endif()
+ set_property(SOURCE cmFileTimeComparison.cxx APPEND PROPERTY
+ COMPILE_DEFINITIONS CMake_${check}=${CMake_${check}})
+endforeach()
+
# create a library used by the command line and the GUI
add_library(CMakeLib ${SRCS})
target_link_libraries(CMakeLib cmsys
@@ -715,6 +726,9 @@ endif()
# Build CPackLib
add_library(CPackLib ${CPACK_SRCS})
target_link_libraries(CPackLib CMakeLib)
+if(APPLE)
+ target_link_libraries(CPackLib "-framework Carbon")
+endif()
if(APPLE)
add_executable(cmakexbuild cmakexbuild.cxx)
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index 0ce1696..c5a9682 100644
--- a/Source/CMakeVersion.cmake
+++ b/Source/CMakeVersion.cmake
@@ -1,5 +1,5 @@
# CMake version number components.
set(CMake_VERSION_MAJOR 3)
set(CMake_VERSION_MINOR 4)
-set(CMake_VERSION_PATCH 0)
-#set(CMake_VERSION_RC 0)
+set(CMake_VERSION_PATCH 20151125)
+#set(CMake_VERSION_RC 1)
diff --git a/Source/CPack/IFW/cmCPackIFWGenerator.cxx b/Source/CPack/IFW/cmCPackIFWGenerator.cxx
index 43d34ee..4eb23c1 100644
--- a/Source/CPack/IFW/cmCPackIFWGenerator.cxx
+++ b/Source/CPack/IFW/cmCPackIFWGenerator.cxx
@@ -24,7 +24,6 @@
#include <cmsys/RegularExpression.hxx>
#include <cmGlobalGenerator.h>
-#include <cmLocalGenerator.h>
#include <cmSystemTools.h>
#include <cmMakefile.h>
#include <cmGeneratedFileStream.h>
diff --git a/Source/CPack/WiX/cmCPackWIXGenerator.cxx b/Source/CPack/WiX/cmCPackWIXGenerator.cxx
index 6f25e50..d5246db 100644
--- a/Source/CPack/WiX/cmCPackWIXGenerator.cxx
+++ b/Source/CPack/WiX/cmCPackWIXGenerator.cxx
@@ -482,6 +482,7 @@ bool cmCPackWIXGenerator::CreateWiXSourceFiles()
featureDefinitions.BeginElement("Feature");
featureDefinitions.AddAttribute("Id", "ProductFeature");
featureDefinitions.AddAttribute("Display", "expand");
+ featureDefinitions.AddAttribute("Absent", "disallow");
featureDefinitions.AddAttribute("ConfigurableDirectory", "INSTALL_ROOT");
std::string cpackPackageName;
diff --git a/Source/CPack/WiX/cmWIXPatch.cxx b/Source/CPack/WiX/cmWIXPatch.cxx
index 5a8dc63..471c3a4 100644
--- a/Source/CPack/WiX/cmWIXPatch.cxx
+++ b/Source/CPack/WiX/cmWIXPatch.cxx
@@ -33,13 +33,30 @@ void cmWIXPatch::ApplyFragment(
if(i == Fragments.end()) return;
const cmWIXPatchElement& fragment = i->second;
+
+ this->ApplyElementChildren(fragment, writer);
+
+ Fragments.erase(i);
+}
+
+void cmWIXPatch::ApplyElementChildren(
+ const cmWIXPatchElement& element, cmWIXSourceWriter& writer)
+{
for(cmWIXPatchElement::child_list_t::const_iterator
- j = fragment.children.begin(); j != fragment.children.end(); ++j)
+ j = element.children.begin(); j != element.children.end(); ++j)
+ {
+ cmWIXPatchNode *node = *j;
+
+ switch(node->type())
{
- ApplyElement(**j, writer);
+ case cmWIXPatchNode::ELEMENT:
+ ApplyElement(dynamic_cast<const cmWIXPatchElement&>(*node), writer);
+ break;
+ case cmWIXPatchNode::TEXT:
+ writer.AddTextNode(dynamic_cast<const cmWIXPatchText&>(*node).text);
+ break;
}
-
- Fragments.erase(i);
+ }
}
void cmWIXPatch::ApplyElement(
@@ -53,16 +70,11 @@ void cmWIXPatch::ApplyElement(
writer.AddAttribute(i->first, i->second);
}
- for(cmWIXPatchElement::child_list_t::const_iterator
- i = element.children.begin(); i != element.children.end(); ++i)
- {
- ApplyElement(**i, writer);
- }
+ this->ApplyElementChildren(element, writer);
writer.EndElement(element.name);
}
-
bool cmWIXPatch::CheckForUnappliedFragments()
{
std::string fragmentList;
diff --git a/Source/CPack/WiX/cmWIXPatch.h b/Source/CPack/WiX/cmWIXPatch.h
index 7b7b2f1..d53fcb4 100644
--- a/Source/CPack/WiX/cmWIXPatch.h
+++ b/Source/CPack/WiX/cmWIXPatch.h
@@ -33,6 +33,9 @@ public:
bool CheckForUnappliedFragments();
private:
+ void ApplyElementChildren(const cmWIXPatchElement& element,
+ cmWIXSourceWriter& writer);
+
void ApplyElement(const cmWIXPatchElement& element,
cmWIXSourceWriter& writer);
diff --git a/Source/CPack/WiX/cmWIXPatchParser.cxx b/Source/CPack/WiX/cmWIXPatchParser.cxx
index e066c28..14c5413 100644
--- a/Source/CPack/WiX/cmWIXPatchParser.cxx
+++ b/Source/CPack/WiX/cmWIXPatchParser.cxx
@@ -16,6 +16,21 @@
#include <cm_expat.h>
+cmWIXPatchNode::Type cmWIXPatchText::type()
+{
+ return cmWIXPatchNode::TEXT;
+}
+
+cmWIXPatchNode::Type cmWIXPatchElement::type()
+{
+ return cmWIXPatchNode::ELEMENT;
+}
+
+cmWIXPatchNode::~cmWIXPatchNode()
+{
+
+}
+
cmWIXPatchElement::~cmWIXPatchElement()
{
for(child_list_t::iterator i = children.begin(); i != children.end(); ++i)
@@ -63,20 +78,20 @@ void cmWIXPatchParser::StartElement(const std::string& name, const char **atts)
{
cmWIXPatchElement &parent = *ElementStack.back();
- parent.children.resize(parent.children.size() + 1);
- cmWIXPatchElement*& currentElement = parent.children.back();
- currentElement = new cmWIXPatchElement;
- currentElement->name = name;
+ cmWIXPatchElement *element = new cmWIXPatchElement;
+ parent.children.push_back(element);
+
+ element->name = name;
for(size_t i = 0; atts[i]; i += 2)
{
std::string key = atts[i];
std::string value = atts[i+1];
- currentElement->attributes[key] = value;
+ element->attributes[key] = value;
}
- ElementStack.push_back(currentElement);
+ ElementStack.push_back(element);
}
}
@@ -117,11 +132,34 @@ void cmWIXPatchParser::EndElement(const std::string& name)
}
else
{
- ElementStack.pop_back();
+ ElementStack.pop_back();
}
}
}
+void cmWIXPatchParser::CharacterDataHandler(const char* data, int length)
+{
+ const char* whitespace = "\x20\x09\x0d\x0a";
+
+ if(State == INSIDE_FRAGMENT)
+ {
+ cmWIXPatchElement &parent = *ElementStack.back();
+
+ std::string text(data, length);
+
+ std::string::size_type first = text.find_first_not_of(whitespace);
+ std::string::size_type last = text.find_last_not_of(whitespace);
+
+ if(first != std::string::npos && last != std::string::npos)
+ {
+ cmWIXPatchText *text_node = new cmWIXPatchText;
+ text_node->text = text.substr(first, last - first + 1);
+
+ parent.children.push_back(text_node);
+ }
+ }
+}
+
void cmWIXPatchParser::ReportError(int line, int column, const char* msg)
{
cmCPackLogger(cmCPackLog::LOG_ERROR,
diff --git a/Source/CPack/WiX/cmWIXPatchParser.h b/Source/CPack/WiX/cmWIXPatchParser.h
index acfb4c0..acaeae3 100644
--- a/Source/CPack/WiX/cmWIXPatchParser.h
+++ b/Source/CPack/WiX/cmWIXPatchParser.h
@@ -20,11 +20,33 @@
#include <map>
#include <list>
-struct cmWIXPatchElement
+struct cmWIXPatchNode
{
+ enum Type
+ {
+ TEXT,
+ ELEMENT
+ };
+
+ virtual ~cmWIXPatchNode();
+
+ virtual Type type() = 0;
+};
+
+struct cmWIXPatchText : public cmWIXPatchNode
+{
+ virtual Type type();
+
+ std::string text;
+};
+
+struct cmWIXPatchElement : cmWIXPatchNode
+{
+ virtual Type type();
+
~cmWIXPatchElement();
- typedef std::list<cmWIXPatchElement*> child_list_t;
+ typedef std::list<cmWIXPatchNode*> child_list_t;
typedef std::map<std::string, std::string> attributes_t;
std::string name;
@@ -48,6 +70,9 @@ private:
void StartFragment(const char **attributes);
virtual void EndElement(const std::string& name);
+
+ virtual void CharacterDataHandler(const char* data, int length);
+
virtual void ReportError(int line, int column, const char* msg);
void ReportValidationError(std::string const& message);
diff --git a/Source/CPack/WiX/cmWIXSourceWriter.cxx b/Source/CPack/WiX/cmWIXSourceWriter.cxx
index 8d38e9b..63acb27 100644
--- a/Source/CPack/WiX/cmWIXSourceWriter.cxx
+++ b/Source/CPack/WiX/cmWIXSourceWriter.cxx
@@ -102,6 +102,25 @@ void cmWIXSourceWriter::EndElement(std::string const& name)
State = DEFAULT;
}
+void cmWIXSourceWriter::AddTextNode(std::string const& text)
+{
+ if(State == BEGIN)
+ {
+ File << ">";
+ }
+
+ if(Elements.empty())
+ {
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "can not add text without open WiX element in '" <<
+ SourceFilename << "'" << std::endl);
+ return;
+ }
+
+ File << this->EscapeAttributeValue(text);
+ State = DEFAULT;
+}
+
void cmWIXSourceWriter::AddProcessingInstruction(
std::string const& target, std::string const& content)
{
diff --git a/Source/CPack/WiX/cmWIXSourceWriter.h b/Source/CPack/WiX/cmWIXSourceWriter.h
index 3b9999c..9e303f0 100644
--- a/Source/CPack/WiX/cmWIXSourceWriter.h
+++ b/Source/CPack/WiX/cmWIXSourceWriter.h
@@ -34,6 +34,8 @@ public:
void EndElement(std::string const& name);
+ void AddTextNode(std::string const& text);
+
void AddProcessingInstruction(
std::string const& target, std::string const& content);
diff --git a/Source/CPack/cmCPackArchiveGenerator.cxx b/Source/CPack/cmCPackArchiveGenerator.cxx
index 70de757..db985db 100644
--- a/Source/CPack/cmCPackArchiveGenerator.cxx
+++ b/Source/CPack/cmCPackArchiveGenerator.cxx
@@ -14,7 +14,6 @@
#include "cmake.h"
#include "cmGlobalGenerator.h"
-#include "cmLocalGenerator.h"
#include "cmSystemTools.h"
#include "cmMakefile.h"
#include "cmGeneratedFileStream.h"
diff --git a/Source/CPack/cmCPackCygwinBinaryGenerator.cxx b/Source/CPack/cmCPackCygwinBinaryGenerator.cxx
index 6605f16..1f905c0 100644
--- a/Source/CPack/cmCPackCygwinBinaryGenerator.cxx
+++ b/Source/CPack/cmCPackCygwinBinaryGenerator.cxx
@@ -14,7 +14,6 @@
#include "cmake.h"
#include "cmGlobalGenerator.h"
-#include "cmLocalGenerator.h"
#include "cmSystemTools.h"
#include "cmMakefile.h"
#include "cmGeneratedFileStream.h"
diff --git a/Source/CPack/cmCPackCygwinSourceGenerator.cxx b/Source/CPack/cmCPackCygwinSourceGenerator.cxx
index f1e8539..f5cb53c 100644
--- a/Source/CPack/cmCPackCygwinSourceGenerator.cxx
+++ b/Source/CPack/cmCPackCygwinSourceGenerator.cxx
@@ -14,7 +14,6 @@
#include "cmake.h"
#include "cmGlobalGenerator.h"
-#include "cmLocalGenerator.h"
#include "cmSystemTools.h"
#include "cmMakefile.h"
#include "cmGeneratedFileStream.h"
diff --git a/Source/CPack/cmCPackDebGenerator.cxx b/Source/CPack/cmCPackDebGenerator.cxx
index 04efb71..13c8d8f 100644
--- a/Source/CPack/cmCPackDebGenerator.cxx
+++ b/Source/CPack/cmCPackDebGenerator.cxx
@@ -339,6 +339,9 @@ int cmCPackDebGenerator::createDeb()
this->GetOption("GEN_CPACK_DEBIAN_PACKAGE_PROVIDES");
const char* debian_pkg_replaces =
this->GetOption("GEN_CPACK_DEBIAN_PACKAGE_REPLACES");
+ const char* debian_pkg_source =
+ this->GetOption("GEN_CPACK_DEBIAN_PACKAGE_SOURCE");
+
{ // the scope is needed for cmGeneratedFileStream
cmGeneratedFileStream out(ctlfilename.c_str());
@@ -347,6 +350,10 @@ int cmCPackDebGenerator::createDeb()
out << "Section: " << debian_pkg_section << "\n";
out << "Priority: " << debian_pkg_priority << "\n";
out << "Architecture: " << debian_pkg_arch << "\n";
+ if(debian_pkg_source && *debian_pkg_source)
+ {
+ out << "Source: " << debian_pkg_source << "\n";
+ }
if(debian_pkg_dep && *debian_pkg_dep)
{
out << "Depends: " << debian_pkg_dep << "\n";
diff --git a/Source/CPack/cmCPackDragNDropGenerator.cxx b/Source/CPack/cmCPackDragNDropGenerator.cxx
index 4c400d9..b5df2d0 100644
--- a/Source/CPack/cmCPackDragNDropGenerator.cxx
+++ b/Source/CPack/cmCPackDragNDropGenerator.cxx
@@ -18,6 +18,24 @@
#include <cmsys/RegularExpression.hxx>
#include <cmsys/FStream.hxx>
+#include <iomanip>
+
+#include <CoreFoundation/CFBase.h>
+#include <CoreFoundation/CFString.h>
+#include <CoreFoundation/CFLocale.h>
+
+// The carbon framework is deprecated, but the Region codes it supplies are
+// needed for the LPic data structure used for generating multi-lingual SLAs.
+// There does not seem to be a replacement API for these region codes.
+#if defined(__clang__)
+# pragma clang diagnostic push
+# pragma clang diagnostic ignored "-Wdeprecated-declarations"
+#endif
+#include <Carbon/Carbon.h>
+#if defined(__clang__)
+# pragma clang diagnostic pop
+#endif
+
static const char* SLAHeader =
"data 'LPic' (5000) {\n"
" $\"0002 0011 0003 0001 0000 0000 0002 0000\"\n"
@@ -103,6 +121,69 @@ int cmCPackDragNDropGenerator::InitializeInternal()
}
this->SetOptionIfNotSet("CPACK_COMMAND_REZ", rez_path.c_str());
+ if(this->IsSet("CPACK_DMG_SLA_DIR"))
+ {
+ slaDirectory = this->GetOption("CPACK_DMG_SLA_DIR");
+ if(!slaDirectory.empty() && this->IsSet("CPACK_RESOURCE_FILE_LICENSE"))
+ {
+ std::string license_file =
+ this->GetOption("CPACK_RESOURCE_FILE_LICENSE");
+ if(!license_file.empty() &&
+ (license_file.find("CPack.GenericLicense.txt") == std::string::npos))
+ {
+ cmCPackLogger(cmCPackLog::LOG_WARNING,
+ "Both CPACK_DMG_SLA_DIR and CPACK_RESOURCE_FILE_LICENSE specified, "
+ "defaulting to CPACK_DMG_SLA_DIR"
+ << std::endl);
+ }
+ }
+ if(!this->IsSet("CPACK_DMG_SLA_LANGUAGES"))
+ {
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "CPACK_DMG_SLA_DIR set but no languages defined "
+ "(set CPACK_DMG_SLA_LANGUAGES)"
+ << std::endl);
+ return 0;
+ }
+ if(!cmSystemTools::FileExists(slaDirectory, false))
+ {
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "CPACK_DMG_SLA_DIR does not exist"
+ << std::endl);
+ return 0;
+ }
+
+ std::vector<std::string> languages;
+ cmSystemTools::ExpandListArgument(
+ this->GetOption("CPACK_DMG_SLA_LANGUAGES"), languages);
+ if(languages.empty())
+ {
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "CPACK_DMG_SLA_LANGUAGES set but empty"
+ << std::endl);
+ return 0;
+ }
+ for(size_t i = 0; i < languages.size(); ++i)
+ {
+ std::string license = slaDirectory + "/" + languages[i] + ".license.txt";
+ if (!cmSystemTools::FileExists(license))
+ {
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "Missing license file " << languages[i] << ".license.txt"
+ << std::endl);
+ return 0;
+ }
+ std::string menu = slaDirectory + "/" + languages[i] + ".menu.txt";
+ if (!cmSystemTools::FileExists(menu))
+ {
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "Missing menu file " << languages[i] << ".menu.txt"
+ << std::endl);
+ return 0;
+ }
+ }
+ }
+
return this->Superclass::InitializeInternal();
}
@@ -190,6 +271,28 @@ bool cmCPackDragNDropGenerator::CopyFile(std::ostringstream& source,
}
//----------------------------------------------------------------------
+bool cmCPackDragNDropGenerator::CreateEmptyFile(std::ostringstream& target,
+ size_t size)
+{
+ cmsys::ofstream fout(target.str().c_str(),
+ std::ios::out | std::ios::binary);
+ if(!fout)
+ {
+ return false;
+ }
+ else
+ {
+ // Seek to desired size - 1 byte
+ fout.seekp(size - 1, std::ios_base::beg);
+ char byte = 0;
+ // Write one byte to ensure file grows
+ fout.write(&byte, 1);
+ }
+
+ return true;
+}
+
+//----------------------------------------------------------------------
bool cmCPackDragNDropGenerator::RunCommand(std::ostringstream& command,
std::string* output)
{
@@ -246,12 +349,27 @@ int cmCPackDragNDropGenerator::CreateDMG(const std::string& src_dir,
this->GetOption("CPACK_DMG_DS_STORE")
? this->GetOption("CPACK_DMG_DS_STORE") : "";
+ const std::string cpack_dmg_languages =
+ this->GetOption("CPACK_DMG_SLA_LANGUAGES")
+ ? this->GetOption("CPACK_DMG_SLA_LANGUAGES") : "";
+
+ const std::string cpack_dmg_ds_store_setup_script =
+ this->GetOption("CPACK_DMG_DS_STORE_SETUP_SCRIPT")
+ ? this->GetOption("CPACK_DMG_DS_STORE_SETUP_SCRIPT") : "";
+
// only put license on dmg if is user provided
if(!cpack_license_file.empty() &&
cpack_license_file.find("CPack.GenericLicense.txt") != std::string::npos)
- {
+ {
+ cpack_license_file = "";
+ }
+
+ // use sla_dir if both sla_dir and license_file are set
+ if(!cpack_license_file.empty() &&
+ !slaDirectory.empty())
+ {
cpack_license_file = "";
- }
+ }
// The staging directory contains everything that will end-up inside the
// final disk image ...
@@ -307,13 +425,18 @@ int cmCPackDragNDropGenerator::CreateDMG(const std::string& src_dir,
}
// Optionally add a custom background image ...
+ // Make sure the background file type is the same as the custom image
+ // and that the file is hidden so it doesn't show up.
if(!cpack_dmg_background_image.empty())
{
+ const std::string extension =
+ cmSystemTools::GetFilenameLastExtension(cpack_dmg_background_image);
std::ostringstream package_background_source;
package_background_source << cpack_dmg_background_image;
std::ostringstream package_background_destination;
- package_background_destination << staging.str() << "/background.png";
+ package_background_destination << staging.str()
+ << "/.background/background" << extension;
if(!this->CopyFile(package_background_source,
package_background_destination))
@@ -325,18 +448,22 @@ int cmCPackDragNDropGenerator::CreateDMG(const std::string& src_dir,
return 0;
}
+ }
- std::ostringstream temp_background_hiding_command;
- temp_background_hiding_command << this->GetOption("CPACK_COMMAND_SETFILE");
- temp_background_hiding_command << " -a V \"";
- temp_background_hiding_command << package_background_destination.str();
- temp_background_hiding_command << "\"";
+ bool remount_image = !cpack_package_icon.empty() ||
+ !cpack_dmg_ds_store_setup_script.empty();
- if(!this->RunCommand(temp_background_hiding_command))
+ // Create 1 MB dummy padding file in staging area when we need to remount
+ // image, so we have enough space for storing changes ...
+ if(remount_image)
+ {
+ std::ostringstream dummy_padding;
+ dummy_padding << staging.str() << "/.dummy-padding-file";
+ if(!this->CreateEmptyFile(dummy_padding, 1048576))
{
- cmCPackLogger(cmCPackLog::LOG_ERROR,
- "Error setting attributes on disk volume background image."
- << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "Error creating dummy padding file."
+ << std::endl);
return 0;
}
@@ -365,10 +492,11 @@ int cmCPackDragNDropGenerator::CreateDMG(const std::string& src_dir,
return 0;
}
- // Optionally set the custom icon flag for the image ...
- if(!cpack_package_icon.empty())
+ if(remount_image)
{
- std::ostringstream temp_mount;
+ // Store that we have a failure so that we always unmount the image
+ // before we exit.
+ bool had_error = false;
std::ostringstream attach_command;
attach_command << this->GetOption("CPACK_COMMAND_HDIUTIL");
@@ -387,20 +515,57 @@ int cmCPackDragNDropGenerator::CreateDMG(const std::string& src_dir,
cmsys::RegularExpression mountpoint_regex(".*(/Volumes/[^\n]+)\n.*");
mountpoint_regex.find(attach_output.c_str());
+ std::ostringstream temp_mount;
temp_mount << mountpoint_regex.match(1);
- std::ostringstream setfile_command;
- setfile_command << this->GetOption("CPACK_COMMAND_SETFILE");
- setfile_command << " -a C";
- setfile_command << " \"" << temp_mount.str() << "\"";
-
- if(!this->RunCommand(setfile_command))
+ // Remove dummy padding file so we have enough space on RW image ...
+ std::ostringstream dummy_padding;
+ dummy_padding << temp_mount.str() << "/.dummy-padding-file";
+ if(!cmSystemTools::RemoveFile(dummy_padding.str()))
{
cmCPackLogger(cmCPackLog::LOG_ERROR,
- "Error assigning custom icon to temporary disk image."
+ "Error removing dummy padding file."
<< std::endl);
- return 0;
+ had_error = true;
+ }
+
+ // Optionally set the custom icon flag for the image ...
+ if(!had_error && !cpack_package_icon.empty())
+ {
+ std::ostringstream setfile_command;
+ setfile_command << this->GetOption("CPACK_COMMAND_SETFILE");
+ setfile_command << " -a C";
+ setfile_command << " \"" << temp_mount.str() << "\"";
+
+ if(!this->RunCommand(setfile_command))
+ {
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "Error assigning custom icon to temporary disk image."
+ << std::endl);
+
+ had_error = true;
+ }
+ }
+
+ // Optionally we can execute a custom apple script to generate
+ // the .DS_Store for the volume folder ...
+ if(!had_error && !cpack_dmg_ds_store_setup_script.empty())
+ {
+ std::ostringstream setup_script_command;
+ setup_script_command << "osascript"
+ << " \"" << cpack_dmg_ds_store_setup_script << "\""
+ << " \"" << cpack_dmg_volume_name << "\"";
+ std::string error;
+ if(!this->RunCommand(setup_script_command, &error))
+ {
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "Error executing custom script on disk image." << std::endl
+ << error
+ << std::endl);
+
+ had_error = true;
+ }
}
std::ostringstream detach_command;
@@ -416,56 +581,129 @@ int cmCPackDragNDropGenerator::CreateDMG(const std::string& src_dir,
return 0;
}
+
+ if(had_error)
+ {
+ return 0;
+ }
}
- if(!cpack_license_file.empty())
- {
+ if(!cpack_license_file.empty() || !slaDirectory.empty())
+ {
+ // Use old hardcoded style if sla_dir is not set
+ bool oldStyle = slaDirectory.empty();
std::string sla_r = this->GetOption("CPACK_TOPLEVEL_DIRECTORY");
sla_r += "/sla.r";
- cmsys::ifstream ifs;
- ifs.open(cpack_license_file.c_str());
- if(ifs.is_open())
- {
- cmGeneratedFileStream osf(sla_r.c_str());
- osf << "#include <CoreServices/CoreServices.r>\n\n";
- osf << SLAHeader;
- osf << "\n";
- osf << "data 'TEXT' (5002, \"English\") {\n";
- while(ifs.good())
+ std::vector<std::string> languages;
+ if(!oldStyle)
{
- std::string line;
- std::getline(ifs, line);
- // escape quotes
- std::string::size_type pos = line.find('\"');
- while(pos != std::string::npos)
+ cmSystemTools::ExpandListArgument(cpack_dmg_languages, languages);
+ }
+
+ cmGeneratedFileStream ofs(sla_r.c_str());
+ ofs << "#include <CoreServices/CoreServices.r>\n\n";
+ if(oldStyle)
+ {
+ ofs << SLAHeader;
+ ofs << "\n";
+ }
+ else
+ {
+ /*
+ * LPic Layout
+ * (https://github.com/pypt/dmg-add-license/blob/master/main.c)
+ * as far as I can tell (no official documentation seems to exist):
+ * struct LPic {
+ * uint16_t default_language; // points to a resid, defaulting to 0,
+ * // which is the first set language
+ * uint16_t length;
+ * struct {
+ * uint16_t language_code;
+ * uint16_t resid;
+ * uint16_t encoding; // Encoding from TextCommon.h,
+ * // forcing MacRoman (0) for now. Might need to
+ * // allow overwrite per license by user later
+ * } item[1];
+ * }
+ */
+
+ // Create vector first for readability, then iterate to write to ofs
+ std::vector<uint16_t> header_data;
+ header_data.push_back(0);
+ header_data.push_back(languages.size());
+ for(size_t i = 0; i < languages.size(); ++i)
{
- line.replace(pos, 1, "\\\"");
- pos = line.find('\"', pos+2);
+ CFStringRef language_cfstring = CFStringCreateWithCString(
+ NULL, languages[i].c_str(), kCFStringEncodingUTF8);
+ CFStringRef iso_language =
+ CFLocaleCreateCanonicalLanguageIdentifierFromString(
+ NULL, language_cfstring);
+ if (!iso_language)
+ {
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ languages[i] << " is not a recognized language"
+ << std::endl);
+ }
+ char *iso_language_cstr = (char *) malloc(65);
+ CFStringGetCString(iso_language, iso_language_cstr, 64,
+ kCFStringEncodingMacRoman);
+ LangCode lang = 0;
+ RegionCode region = 0;
+ OSStatus err = LocaleStringToLangAndRegionCodes(iso_language_cstr,
+ &lang, &region);
+ if (err != noErr)
+ {
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "No language/region code available for " << iso_language_cstr
+ << std::endl);
+ free(iso_language_cstr);
+ return 0;
+ }
+ free(iso_language_cstr);
+ header_data.push_back(region);
+ header_data.push_back(i);
+ header_data.push_back(0);
}
- // break up long lines to avoid Rez errors
- std::vector<std::string> lines;
- const size_t max_line_length = 512;
- for(size_t i=0; i<line.size(); i+= max_line_length)
+ ofs << "data 'LPic' (5000) {\n";
+ ofs << std::hex << std::uppercase << std::setfill('0');
+
+ for(size_t i = 0; i < header_data.size(); ++i)
+ {
+ if(i % 8 == 0)
{
- int line_length = max_line_length;
- if(i+max_line_length > line.size())
- line_length = line.size()-i;
- lines.push_back(line.substr(i, line_length));
+ ofs << " $\"";
}
- for(size_t i=0; i<lines.size(); i++)
+ ofs << std::setw(4) << header_data[i];
+
+ if(i % 8 == 7 || i == header_data.size() - 1)
{
- osf << " \"" << lines[i] << "\"\n";
+ ofs << "\"\n";
}
- osf << " \"\\n\"\n";
+ else
+ {
+ ofs << " ";
+ }
+ }
+ ofs << "};\n\n";
+ // Reset ofs options
+ ofs << std::dec << std::nouppercase << std::setfill(' ');
}
- osf << "};\n";
- osf << "\n";
- osf << SLASTREnglish;
- ifs.close();
- osf.close();
- }
+
+ if(oldStyle)
+ {
+ WriteLicense(ofs, 0, "", cpack_license_file);
+ }
+ else
+ {
+ for(size_t i = 0; i < languages.size(); ++i)
+ {
+ WriteLicense(ofs, i + 5000, languages[i]);
+ }
+ }
+
+ ofs.Close();
// convert to UDCO
std::string temp_udco = this->GetOption("CPACK_TOPLEVEL_DIRECTORY");
@@ -539,7 +777,7 @@ int cmCPackDragNDropGenerator::CreateDMG(const std::string& src_dir,
}
temp_image = temp_udco;
- }
+ }
// Create the final compressed read-only disk image ...
@@ -607,3 +845,126 @@ cmCPackDragNDropGenerator::GetComponentInstallDirNameSuffix(
return GetComponentPackageFileName(package_file_name, componentName, false);
}
+
+void
+cmCPackDragNDropGenerator::WriteLicense(cmGeneratedFileStream& outputStream,
+ int licenseNumber, std::string licenseLanguage, std::string licenseFile)
+{
+ if(!licenseFile.empty())
+ {
+ licenseNumber = 5002;
+ licenseLanguage = "English";
+ }
+
+ // License header
+ outputStream << "data 'TEXT' (" << licenseNumber << ", \""
+ << licenseLanguage << "\") {\n";
+ // License body
+ std::string actual_license = !licenseFile.empty() ? licenseFile :
+ (slaDirectory + "/" + licenseLanguage + ".license.txt");
+ cmsys::ifstream license_ifs;
+ license_ifs.open(actual_license.c_str());
+ if(license_ifs.is_open())
+ {
+ while(license_ifs.good())
+ {
+ std::string line;
+ std::getline(license_ifs, line);
+ if(!line.empty())
+ {
+ EscapeQuotes(line);
+ std::vector<std::string> lines;
+ BreakLongLine(line, lines);
+ for(size_t i = 0; i < lines.size(); ++i)
+ {
+ outputStream << " \"" << lines[i] << "\"\n";
+ }
+ }
+ outputStream << " \"\\n\"\n";
+ }
+ license_ifs.close();
+ }
+
+ // End of License
+ outputStream << "};\n\n";
+ if(!licenseFile.empty())
+ {
+ outputStream << SLASTREnglish;
+ }
+ else
+ {
+ // Menu header
+ outputStream << "resource 'STR#' (" << licenseNumber << ", \""
+ << licenseLanguage << "\") {\n";
+ outputStream << " {\n";
+
+ // Menu body
+ cmsys::ifstream menu_ifs;
+ menu_ifs.open((slaDirectory+"/"+licenseLanguage+".menu.txt").c_str());
+ if(menu_ifs.is_open())
+ {
+ size_t lines_written = 0;
+ while(menu_ifs.good())
+ {
+ // Lines written from original file, not from broken up lines
+ std::string line;
+ std::getline(menu_ifs, line);
+ if(!line.empty())
+ {
+ EscapeQuotes(line);
+ std::vector<std::string> lines;
+ BreakLongLine(line, lines);
+ for(size_t i = 0; i < lines.size(); ++i)
+ {
+ std::string comma;
+ // We need a comma after every complete string,
+ // but not on the very last line
+ if(lines_written != 8 && i == lines.size() - 1)
+ {
+ comma = ",";
+ }
+ else
+ {
+ comma = "";
+ }
+ outputStream << " \"" << lines[i] << "\"" << comma << "\n";
+ }
+ ++lines_written;
+ }
+ }
+ menu_ifs.close();
+ }
+
+ //End of menu
+ outputStream << " }\n";
+ outputStream << "};\n";
+ outputStream << "\n";
+ }
+}
+
+void
+cmCPackDragNDropGenerator::BreakLongLine(const std::string& line,
+ std::vector<std::string>& lines)
+{
+ const size_t max_line_length = 512;
+ for(size_t i = 0; i < line.size(); i += max_line_length)
+ {
+ int line_length = max_line_length;
+ if(i + max_line_length > line.size())
+ {
+ line_length = line.size() - i;
+ }
+ lines.push_back(line.substr(i, line_length));
+ }
+}
+
+void
+cmCPackDragNDropGenerator::EscapeQuotes(std::string& line)
+{
+ std::string::size_type pos = line.find('\"');
+ while(pos != std::string::npos)
+ {
+ line.replace(pos, 1, "\\\"");
+ pos = line.find('\"', pos + 2);
+ }
+}
diff --git a/Source/CPack/cmCPackDragNDropGenerator.h b/Source/CPack/cmCPackDragNDropGenerator.h
index 1c84d49..53d38c4 100644
--- a/Source/CPack/cmCPackDragNDropGenerator.h
+++ b/Source/CPack/cmCPackDragNDropGenerator.h
@@ -15,6 +15,8 @@
#include "cmCPackGenerator.h"
+class cmGeneratedFileStream;
+
/** \class cmCPackDragNDropGenerator
* \brief A generator for OSX drag-n-drop installs
*/
@@ -34,6 +36,7 @@ protected:
bool CopyFile(std::ostringstream& source, std::ostringstream& target);
+ bool CreateEmptyFile(std::ostringstream& target, size_t size);
bool RunCommand(std::ostringstream& command, std::string* output = 0);
std::string
@@ -42,6 +45,15 @@ protected:
int CreateDMG(const std::string& src_dir, const std::string& output_file);
std::string InstallPrefix;
+
+private:
+ std::string slaDirectory;
+
+ void WriteLicense(cmGeneratedFileStream& outputStream, int licenseNumber,
+ std::string licenseLanguage, std::string licenseFile = "");
+ void BreakLongLine(const std::string& line,
+ std::vector<std::string>& lines);
+ void EscapeQuotes(std::string& line);
};
#endif
diff --git a/Source/CPack/cmCPackGenerator.cxx b/Source/CPack/cmCPackGenerator.cxx
index def9fc7..22d4bf0 100644
--- a/Source/CPack/cmCPackGenerator.cxx
+++ b/Source/CPack/cmCPackGenerator.cxx
@@ -16,7 +16,6 @@
#include "cmCPackLog.h"
#include "cmake.h"
#include "cmGlobalGenerator.h"
-#include "cmLocalGenerator.h"
#include "cmGeneratedFileStream.h"
#include "cmCPackComponentGroup.h"
#include "cmXMLSafe.h"
@@ -718,13 +717,12 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects(
cmake cm;
cm.SetHomeDirectory("");
cm.SetHomeOutputDirectory("");
+ cm.GetCurrentSnapshot().SetDefaultDefinitions();
cm.AddCMakePaths();
cm.SetProgressCallback(cmCPackGeneratorProgress, this);
cmGlobalGenerator gg(&cm);
cmsys::auto_ptr<cmMakefile> mf(
new cmMakefile(&gg, cm.GetCurrentSnapshot()));
- cmsys::auto_ptr<cmLocalGenerator> lg(
- gg.CreateLocalGenerator(mf.get()));
std::string realInstallDirectory = tempInstallDirectory;
if ( !installSubDirectory.empty() && installSubDirectory != "/" )
{
diff --git a/Source/CPack/cmCPackNSISGenerator.cxx b/Source/CPack/cmCPackNSISGenerator.cxx
index 6cdda28..5ba639f 100644
--- a/Source/CPack/cmCPackNSISGenerator.cxx
+++ b/Source/CPack/cmCPackNSISGenerator.cxx
@@ -13,7 +13,6 @@
#include "cmCPackNSISGenerator.h"
#include "cmGlobalGenerator.h"
-#include "cmLocalGenerator.h"
#include "cmSystemTools.h"
#include "cmMakefile.h"
#include "cmGeneratedFileStream.h"
@@ -158,6 +157,28 @@ int cmCPackNSISGenerator::PackageFiles()
installerIconCode.c_str());
}
+ if (this->IsSet("CPACK_NSIS_MUI_WELCOMEFINISHPAGE_BITMAP"))
+ {
+ std::string installerBitmapCode =
+ "!define MUI_WELCOMEFINISHPAGE_BITMAP \"";
+ installerBitmapCode +=
+ this->GetOption("CPACK_NSIS_MUI_WELCOMEFINISHPAGE_BITMAP");
+ installerBitmapCode += "\"\n";
+ this->SetOptionIfNotSet("CPACK_NSIS_INSTALLER_MUI_WELCOMEFINISH_CODE",
+ installerBitmapCode.c_str());
+ }
+
+ if (this->IsSet("CPACK_NSIS_MUI_UNWELCOMEFINISHPAGE_BITMAP"))
+ {
+ std::string installerBitmapCode =
+ "!define MUI_UNWELCOMEFINISHPAGE_BITMAP \"";
+ installerBitmapCode +=
+ this->GetOption("CPACK_NSIS_MUI_UNWELCOMEFINISHPAGE_BITMAP");
+ installerBitmapCode += "\"\n";
+ this->SetOptionIfNotSet("CPACK_NSIS_INSTALLER_MUI_UNWELCOMEFINISH_CODE",
+ installerBitmapCode.c_str());
+ }
+
if(this->IsSet("CPACK_NSIS_MUI_FINISHPAGE_RUN"))
{
std::string installerRunCode = "!define MUI_FINISHPAGE_RUN \"$INSTDIR\\";
diff --git a/Source/CPack/cmCPackOSXX11Generator.cxx b/Source/CPack/cmCPackOSXX11Generator.cxx
index d533af8..8940f54 100644
--- a/Source/CPack/cmCPackOSXX11Generator.cxx
+++ b/Source/CPack/cmCPackOSXX11Generator.cxx
@@ -13,7 +13,6 @@
#include "cmake.h"
#include "cmGlobalGenerator.h"
-#include "cmLocalGenerator.h"
#include "cmSystemTools.h"
#include "cmMakefile.h"
#include "cmGeneratedFileStream.h"
diff --git a/Source/CPack/cmCPackPackageMakerGenerator.cxx b/Source/CPack/cmCPackPackageMakerGenerator.cxx
index 880663f..8fdc036 100644
--- a/Source/CPack/cmCPackPackageMakerGenerator.cxx
+++ b/Source/CPack/cmCPackPackageMakerGenerator.cxx
@@ -13,7 +13,6 @@
#include "cmake.h"
#include "cmGlobalGenerator.h"
-#include "cmLocalGenerator.h"
#include "cmSystemTools.h"
#include "cmMakefile.h"
#include "cmGeneratedFileStream.h"
diff --git a/Source/CPack/cmCPackSTGZGenerator.cxx b/Source/CPack/cmCPackSTGZGenerator.cxx
index 109dcb7..68b893f 100644
--- a/Source/CPack/cmCPackSTGZGenerator.cxx
+++ b/Source/CPack/cmCPackSTGZGenerator.cxx
@@ -14,7 +14,6 @@
#include "cmake.h"
#include "cmGlobalGenerator.h"
-#include "cmLocalGenerator.h"
#include "cmSystemTools.h"
#include "cmMakefile.h"
#include "cmCPackLog.h"
diff --git a/Source/CPack/cpack.cxx b/Source/CPack/cpack.cxx
index cb9cbc4..c08897f 100644
--- a/Source/CPack/cpack.cxx
+++ b/Source/CPack/cpack.cxx
@@ -18,7 +18,6 @@
#include "cmCPackGenerator.h"
#include "cmake.h"
#include "cmGlobalGenerator.h"
-#include "cmLocalGenerator.h"
#include "cmMakefile.h"
#include "cmCPackLog.h"
@@ -200,12 +199,11 @@ int main (int argc, char const* const* argv)
cmake cminst;
cminst.SetHomeDirectory("");
cminst.SetHomeOutputDirectory("");
+ cminst.GetCurrentSnapshot().SetDefaultDefinitions();
cminst.GetState()->RemoveUnscriptableCommands();
cmGlobalGenerator cmgg(&cminst);
cmsys::auto_ptr<cmMakefile> globalMF(
new cmMakefile(&cmgg, cminst.GetCurrentSnapshot()));
- cmsys::auto_ptr<cmLocalGenerator> cmlg(
- cmgg.CreateLocalGenerator(globalMF.get()));
#if defined(__CYGWIN__)
globalMF->AddDefinition("CMAKE_LEGACY_CYGWIN_WIN32", "0");
#endif
diff --git a/Source/CTest/cmCTestBuildHandler.cxx b/Source/CTest/cmCTestBuildHandler.cxx
index 6dbb245..0d74f48 100644
--- a/Source/CTest/cmCTestBuildHandler.cxx
+++ b/Source/CTest/cmCTestBuildHandler.cxx
@@ -15,7 +15,6 @@
#include "cmCTest.h"
#include "cmake.h"
#include "cmMakefile.h"
-#include "cmLocalGenerator.h"
#include "cmGlobalGenerator.h"
#include "cmGeneratedFileStream.h"
#include "cmXMLWriter.h"
diff --git a/Source/CTest/cmCTestCoverageHandler.cxx b/Source/CTest/cmCTestCoverageHandler.cxx
index 20807c8..2c2cd48 100644
--- a/Source/CTest/cmCTestCoverageHandler.cxx
+++ b/Source/CTest/cmCTestCoverageHandler.cxx
@@ -820,11 +820,26 @@ int cmCTestCoverageHandler::HandleCoberturaCoverage(
{
cmParseCoberturaCoverage cov(*cont, this->CTest);
- // Assume the coverage.xml is in the source directory
- std::string coverageXMLFile = this->CTest->GetBinaryDir() + "/coverage.xml";
+ // Assume the coverage.xml is in the binary directory
+ // check for the COBERTURADIR environment variable,
+ // if it doesn't exist or is empty, assume the
+ // binary directory is used.
+ std::string coverageXMLFile;
+ const char* covDir = cmSystemTools::GetEnv("COBERTURADIR");
+ if(covDir && strlen(covDir) != 0)
+ {
+ coverageXMLFile = std::string(covDir);
+ }
+ else
+ {
+ coverageXMLFile = this->CTest->GetBinaryDir();
+ }
+ // build the find file string with the directory from above
+ coverageXMLFile += "/coverage.xml";
if(cmSystemTools::FileExists(coverageXMLFile.c_str()))
{
+ // If file exists, parse it
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
"Parsing Cobertura XML file: " << coverageXMLFile
<< std::endl, this->Quiet);
@@ -833,7 +848,7 @@ int cmCTestCoverageHandler::HandleCoberturaCoverage(
else
{
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
- "Cannot find Cobertura XML file: " << coverageXMLFile
+ " Cannot find Cobertura XML file: " << coverageXMLFile
<< std::endl, this->Quiet);
}
return static_cast<int>(cont->TotalCoverage.size());
@@ -913,16 +928,33 @@ int cmCTestCoverageHandler::HandleJacocoCoverage(
{
cmParseJacocoCoverage cov =
cmParseJacocoCoverage(*cont, this->CTest);
- cmsys::Glob g;
+
+ // Search in the source directory.
+ cmsys::Glob g1;
std::vector<std::string> files;
- g.SetRecurse(true);
+ g1.SetRecurse(true);
std::string SourceDir
= this->CTest->GetCTestConfiguration("SourceDirectory");
std::string coverageFile = SourceDir+ "/*jacoco.xml";
- g.FindFiles(coverageFile);
- files=g.GetFiles();
+ g1.FindFiles(coverageFile);
+ files = g1.GetFiles();
+
+ // ...and in the binary directory.
+ cmsys::Glob g2;
+ std::vector<std::string> binFiles;
+ g2.SetRecurse(true);
+ std::string binaryDir
+ = this->CTest->GetCTestConfiguration("BuildDirectory");
+ std::string binCoverageFile = binaryDir+ "/*jacoco.xml";
+ g2.FindFiles(binCoverageFile);
+ binFiles = g2.GetFiles();
+ if (!binFiles.empty())
+ {
+ files.insert(files.end(), binFiles.begin(), binFiles.end());
+ }
+
if (!files.empty())
{
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
@@ -2287,7 +2319,7 @@ int cmCTestCoverageHandler::RunBullseyeSourceSummary(
{
cper /= 2.0f;
}
- percent_coverage += cper;
+ percent_coverage += static_cast<double>(cper);
float cmet = static_cast<float>(percentFunction + percentBranch);
if(totalBranches > 0)
{
diff --git a/Source/CTest/cmCTestLaunch.cxx b/Source/CTest/cmCTestLaunch.cxx
index fb0cce6..749a5be 100644
--- a/Source/CTest/cmCTestLaunch.cxx
+++ b/Source/CTest/cmCTestLaunch.cxx
@@ -728,7 +728,6 @@ int cmCTestLaunch::Main(int argc, const char* const argv[])
//----------------------------------------------------------------------------
#include "cmGlobalGenerator.h"
-#include "cmLocalGenerator.h"
#include "cmMakefile.h"
#include "cmake.h"
#include <cmsys/auto_ptr.hxx>
@@ -737,10 +736,9 @@ void cmCTestLaunch::LoadConfig()
cmake cm;
cm.SetHomeDirectory("");
cm.SetHomeOutputDirectory("");
+ cm.GetCurrentSnapshot().SetDefaultDefinitions();
cmGlobalGenerator gg(&cm);
cmsys::auto_ptr<cmMakefile> mf(new cmMakefile(&gg, cm.GetCurrentSnapshot()));
- cmsys::auto_ptr<cmLocalGenerator> lg(
- gg.CreateLocalGenerator(mf.get()));
std::string fname = this->LogDir;
fname += "CTestLaunchConfig.cmake";
if(cmSystemTools::FileExists(fname.c_str()) &&
diff --git a/Source/CTest/cmCTestScriptHandler.cxx b/Source/CTest/cmCTestScriptHandler.cxx
index c1ba279..ee15271 100644
--- a/Source/CTest/cmCTestScriptHandler.cxx
+++ b/Source/CTest/cmCTestScriptHandler.cxx
@@ -16,7 +16,6 @@
#include "cmake.h"
#include "cmFunctionBlocker.h"
#include "cmMakefile.h"
-#include "cmLocalGenerator.h"
#include "cmGlobalGenerator.h"
#include "cmGeneratedFileStream.h"
@@ -86,7 +85,6 @@ cmCTestScriptHandler::cmCTestScriptHandler()
this->EmptyBinDir = false;
this->EmptyBinDirOnce = false;
this->Makefile = 0;
- this->LocalGenerator = 0;
this->CMake = 0;
this->GlobalGenerator = 0;
@@ -128,9 +126,6 @@ void cmCTestScriptHandler::Initialize()
delete this->Makefile;
this->Makefile = 0;
- delete this->LocalGenerator;
- this->LocalGenerator = 0;
-
delete this->GlobalGenerator;
this->GlobalGenerator = 0;
@@ -141,7 +136,6 @@ void cmCTestScriptHandler::Initialize()
cmCTestScriptHandler::~cmCTestScriptHandler()
{
delete this->Makefile;
- delete this->LocalGenerator;
delete this->GlobalGenerator;
delete this->CMake;
}
@@ -179,15 +173,14 @@ int cmCTestScriptHandler::ProcessHandler()
void cmCTestScriptHandler::UpdateElapsedTime()
{
- if (this->LocalGenerator)
+ if (this->Makefile)
{
// set the current elapsed time
char timeString[20];
int itime = static_cast<unsigned int>(cmSystemTools::GetTime()
- this->ScriptStartTime);
sprintf(timeString,"%i",itime);
- this->LocalGenerator->GetMakefile()->AddDefinition("CTEST_ELAPSED_TIME",
- timeString);
+ this->Makefile->AddDefinition("CTEST_ELAPSED_TIME", timeString);
}
}
@@ -316,28 +309,23 @@ void cmCTestScriptHandler::CreateCMake()
{
delete this->CMake;
delete this->GlobalGenerator;
- delete this->LocalGenerator;
delete this->Makefile;
}
this->CMake = new cmake;
this->CMake->SetHomeDirectory("");
this->CMake->SetHomeOutputDirectory("");
+ this->CMake->GetCurrentSnapshot().SetDefaultDefinitions();
this->CMake->AddCMakePaths();
this->GlobalGenerator = new cmGlobalGenerator(this->CMake);
cmState::Snapshot snapshot = this->CMake->GetCurrentSnapshot();
+ std::string cwd = cmSystemTools::GetCurrentWorkingDirectory();
+ snapshot.GetDirectory().SetCurrentSource(cwd);
+ snapshot.GetDirectory().SetCurrentBinary(cwd);
this->Makefile = new cmMakefile(this->GlobalGenerator, snapshot);
- this->LocalGenerator =
- this->GlobalGenerator->CreateLocalGenerator(this->Makefile);
this->CMake->SetProgressCallback(ctestScriptProgressCallback, this->CTest);
- // Set CMAKE_CURRENT_SOURCE_DIR and CMAKE_CURRENT_BINARY_DIR.
- // Also, some commands need Makefile->GetCurrentSourceDirectory().
- std::string cwd = cmSystemTools::GetCurrentWorkingDirectory();
- this->Makefile->SetCurrentSourceDirectory(cwd);
- this->Makefile->SetCurrentBinaryDirectory(cwd);
-
// remove all cmake commands which are not scriptable, since they can't be
// used in ctest scripts
this->CMake->GetState()->RemoveUnscriptableCommands();
diff --git a/Source/CTest/cmCTestScriptHandler.h b/Source/CTest/cmCTestScriptHandler.h
index 42c2f20..c9d0b6a 100644
--- a/Source/CTest/cmCTestScriptHandler.h
+++ b/Source/CTest/cmCTestScriptHandler.h
@@ -18,7 +18,6 @@
#include "cmListFileCache.h"
class cmMakefile;
-class cmLocalGenerator;
class cmGlobalGenerator;
class cmake;
class cmCTestCommand;
@@ -166,7 +165,6 @@ private:
double ScriptStartTime;
cmMakefile *Makefile;
- cmLocalGenerator *LocalGenerator;
cmGlobalGenerator *GlobalGenerator;
cmake *CMake;
};
diff --git a/Source/CTest/cmCTestStartCommand.cxx b/Source/CTest/cmCTestStartCommand.cxx
index e19e4f4..36576c5 100644
--- a/Source/CTest/cmCTestStartCommand.cxx
+++ b/Source/CTest/cmCTestStartCommand.cxx
@@ -12,7 +12,6 @@
#include "cmCTestStartCommand.h"
#include "cmCTest.h"
-#include "cmLocalGenerator.h"
#include "cmGlobalGenerator.h"
#include "cmCTestVC.h"
#include "cmGeneratedFileStream.h"
diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx
index f9678e7..a8f983f 100644
--- a/Source/CTest/cmCTestTestHandler.cxx
+++ b/Source/CTest/cmCTestTestHandler.cxx
@@ -24,7 +24,6 @@
#include <cmsys/FStream.hxx>
#include "cmMakefile.h"
#include "cmGlobalGenerator.h"
-#include "cmLocalGenerator.h"
#include "cmCommand.h"
#include "cmSystemTools.h"
#include "cmXMLWriter.h"
@@ -580,7 +579,7 @@ int cmCTestTestHandler::ProcessHandler()
}
cmCTestLog(this->CTest, HANDLER_OUTPUT, std::endl
- << static_cast<int>(percent + .5) << "% tests passed, "
+ << static_cast<int>(percent + .5f) << "% tests passed, "
<< failed.size() << " tests failed out of "
<< total << std::endl);
if(this->CTest->GetLabelSummary())
@@ -1591,10 +1590,9 @@ void cmCTestTestHandler::GetListOfTests()
cmake cm;
cm.SetHomeDirectory("");
cm.SetHomeOutputDirectory("");
+ cm.GetCurrentSnapshot().SetDefaultDefinitions();
cmGlobalGenerator gg(&cm);
cmsys::auto_ptr<cmMakefile> mf(new cmMakefile(&gg, cm.GetCurrentSnapshot()));
- cmsys::auto_ptr<cmLocalGenerator> lg(
- gg.CreateLocalGenerator(mf.get()));
mf->AddDefinition("CTEST_CONFIGURATION_TYPE",
this->CTest->GetConfigType().c_str());
diff --git a/Source/CTest/cmCTestUpdateHandler.cxx b/Source/CTest/cmCTestUpdateHandler.cxx
index 963e501..bf2f34a 100644
--- a/Source/CTest/cmCTestUpdateHandler.cxx
+++ b/Source/CTest/cmCTestUpdateHandler.cxx
@@ -15,7 +15,6 @@
#include "cmCTest.h"
#include "cmake.h"
#include "cmMakefile.h"
-#include "cmLocalGenerator.h"
#include "cmGlobalGenerator.h"
#include "cmVersion.h"
#include "cmGeneratedFileStream.h"
diff --git a/Source/QtDialog/CMakeSetupDialog.cxx b/Source/QtDialog/CMakeSetupDialog.cxx
index 03417f3..748dd7d 100644
--- a/Source/QtDialog/CMakeSetupDialog.cxx
+++ b/Source/QtDialog/CMakeSetupDialog.cxx
@@ -734,6 +734,7 @@ bool CMakeSetupDialog::setupFirstConfigure()
{
dialog.saveToSettings();
this->CMakeThread->cmakeInstance()->setGenerator(dialog.getGenerator());
+ this->CMakeThread->cmakeInstance()->setToolset(dialog.getToolset());
QCMakeCacheModel* m = this->CacheValues->cacheModel();
diff --git a/Source/QtDialog/FirstConfigure.cxx b/Source/QtDialog/FirstConfigure.cxx
index 6de9f00..61aad72 100644
--- a/Source/QtDialog/FirstConfigure.cxx
+++ b/Source/QtDialog/FirstConfigure.cxx
@@ -15,6 +15,11 @@ StartCompilerSetup::StartCompilerSetup(QWidget* p)
l->addWidget(new QLabel(tr("Specify the generator for this project")));
this->GeneratorOptions = new QComboBox(this);
l->addWidget(this->GeneratorOptions);
+
+ // Add the ability to specify toolset (-T parameter)
+ ToolsetFrame = CreateToolsetWidgets();
+ l->addWidget(ToolsetFrame);
+
l->addSpacing(6);
this->CompilerSetupOptions[0] = new QRadioButton(tr("Use default native compilers"), this);
@@ -36,17 +41,51 @@ StartCompilerSetup::StartCompilerSetup(QWidget* p)
this, SLOT(onSelectionChanged(bool)));
QObject::connect(this->CompilerSetupOptions[3], SIGNAL(toggled(bool)),
this, SLOT(onSelectionChanged(bool)));
+ QObject::connect(GeneratorOptions,
+ SIGNAL(currentIndexChanged(QString const&)),
+ this, SLOT(onGeneratorChanged(QString const&)));
+}
+
+QFrame* StartCompilerSetup::CreateToolsetWidgets()
+{
+ QFrame* frame = new QFrame(this);
+ QVBoxLayout* l = new QVBoxLayout(frame);
+ l->setContentsMargins(0, 0, 0, 0);
+
+ ToolsetLabel = new QLabel(tr("Optional toolset to use (-T parameter)"));
+ l->addWidget(ToolsetLabel);
+
+ Toolset = new QLineEdit(frame);
+ l->addWidget(Toolset);
+
+ return frame;
}
StartCompilerSetup::~StartCompilerSetup()
{
}
-void StartCompilerSetup::setGenerators(const QStringList& gens)
+void StartCompilerSetup::setGenerators(
+ std::vector<cmake::GeneratorInfo> const& gens)
{
this->GeneratorOptions->clear();
- this->GeneratorOptions->addItems(gens);
-};
+
+ QStringList generator_list;
+
+ std::vector<cmake::GeneratorInfo>::const_iterator it;
+ for (it = gens.begin(); it != gens.end(); ++it)
+ {
+ generator_list.append(QString::fromLocal8Bit(it->name.c_str()));
+
+ if (it->supportsToolset)
+ {
+ this->GeneratorsSupportingToolset.append(
+ QString::fromLocal8Bit(it->name.c_str()));
+ }
+ }
+
+ this->GeneratorOptions->addItems(generator_list);
+}
void StartCompilerSetup::setCurrentGenerator(const QString& gen)
{
@@ -62,6 +101,11 @@ QString StartCompilerSetup::getGenerator() const
return this->GeneratorOptions->currentText();
};
+QString StartCompilerSetup::getToolset() const
+{
+ return this->Toolset->text();
+};
+
bool StartCompilerSetup::defaultSetup() const
{
return this->CompilerSetupOptions[0]->isChecked();
@@ -88,6 +132,18 @@ void StartCompilerSetup::onSelectionChanged(bool on)
selectionChanged();
}
+void StartCompilerSetup::onGeneratorChanged(QString const& name)
+{
+ if (GeneratorsSupportingToolset.contains(name))
+ {
+ ToolsetFrame->show();
+ }
+ else
+ {
+ ToolsetFrame->hide();
+ }
+}
+
int StartCompilerSetup::nextId() const
{
if(compilerSetup())
@@ -325,7 +381,8 @@ FirstConfigure::~FirstConfigure()
{
}
-void FirstConfigure::setGenerators(const QStringList& gens)
+void FirstConfigure::setGenerators(
+ std::vector<cmake::GeneratorInfo> const& gens)
{
this->mStartCompilerSetupPage->setGenerators(gens);
}
@@ -335,6 +392,11 @@ QString FirstConfigure::getGenerator() const
return this->mStartCompilerSetupPage->getGenerator();
}
+QString FirstConfigure::getToolset() const
+{
+ return this->mStartCompilerSetupPage->getToolset();
+}
+
void FirstConfigure::loadFromSettings()
{
QSettings settings;
diff --git a/Source/QtDialog/FirstConfigure.h b/Source/QtDialog/FirstConfigure.h
index be390b0..09952b6 100644
--- a/Source/QtDialog/FirstConfigure.h
+++ b/Source/QtDialog/FirstConfigure.h
@@ -4,6 +4,7 @@
#include <QWizard>
#include <QWizardPage>
+#include "cmake.h"
#include "ui_Compilers.h"
#include "ui_CrossCompiler.h"
@@ -27,9 +28,10 @@ class StartCompilerSetup : public QWizardPage
public:
StartCompilerSetup(QWidget* p);
~StartCompilerSetup();
- void setGenerators(const QStringList& gens);
+ void setGenerators(std::vector<cmake::GeneratorInfo> const& gens);
void setCurrentGenerator(const QString& gen);
QString getGenerator() const;
+ QString getToolset() const;
bool defaultSetup() const;
bool compilerSetup() const;
@@ -43,10 +45,18 @@ class StartCompilerSetup : public QWizardPage
protected slots:
void onSelectionChanged(bool);
+ void onGeneratorChanged(QString const& name);
protected:
QComboBox* GeneratorOptions;
QRadioButton* CompilerSetupOptions[4];
+ QFrame* ToolsetFrame;
+ QLineEdit* Toolset;
+ QLabel* ToolsetLabel;
+ QStringList GeneratorsSupportingToolset;
+
+ private:
+ QFrame* CreateToolsetWidgets();
};
//! the page that gives basic options for native compilers
@@ -140,8 +150,9 @@ public:
FirstConfigure();
~FirstConfigure();
- void setGenerators(const QStringList& gens);
+ void setGenerators(std::vector<cmake::GeneratorInfo> const& gens);
QString getGenerator() const;
+ QString getToolset() const;
bool defaultSetup() const;
bool compilerSetup() const;
diff --git a/Source/QtDialog/QCMake.cxx b/Source/QtDialog/QCMake.cxx
index 9edbb20..1fcb676 100644
--- a/Source/QtDialog/QCMake.cxx
+++ b/Source/QtDialog/QCMake.cxx
@@ -15,7 +15,6 @@
#include <QDir>
#include <QCoreApplication>
-#include "cmake.h"
#include "cmState.h"
#include "cmSystemTools.h"
#include "cmExternalMakefileProjectGenerator.h"
@@ -46,21 +45,23 @@ QCMake::QCMake(QObject* p)
cmSystemTools::SetInterruptCallback(QCMake::interruptCallback, this);
- std::vector<std::string> generators;
+ std::vector<cmake::GeneratorInfo> generators;
this->CMakeInstance->GetRegisteredGenerators(generators);
- std::vector<std::string>::iterator iter;
- for(iter = generators.begin(); iter != generators.end(); ++iter)
+
+ std::vector<cmake::GeneratorInfo>::const_iterator it;
+ for(it = generators.begin(); it != generators.end(); ++it)
{
// Skip the generator "KDevelop3", since there is also
// "KDevelop3 - Unix Makefiles", which is the full and official name.
// The short name is actually only still there since this was the name
// in CMake 2.4, to keep "command line argument compatibility", but
// this is not necessary in the GUI.
- if (*iter == "KDevelop3")
+ if (it->name == "KDevelop3")
{
continue;
}
- this->AvailableGenerators.append(QString::fromLocal8Bit(iter->c_str()));
+
+ this->AvailableGenerators.push_back(*it);
}
}
@@ -96,6 +97,7 @@ void QCMake::setBinaryDirectory(const QString& _dir)
emit this->binaryDirChanged(this->BinaryDirectory);
cmState* state = this->CMakeInstance->GetState();
this->setGenerator(QString());
+ this->setToolset(QString());
if(!this->CMakeInstance->LoadCache(
this->BinaryDirectory.toLocal8Bit().data()))
{
@@ -124,6 +126,12 @@ void QCMake::setBinaryDirectory(const QString& _dir)
CreateFullGeneratorName(gen, extraGen? extraGen : "");
this->setGenerator(QString::fromLocal8Bit(curGen.c_str()));
}
+
+ const char* toolset = state->GetCacheEntryValue("CMAKE_GENERATOR_TOOLSET");
+ if (toolset)
+ {
+ this->setToolset(QString::fromLocal8Bit(toolset));
+ }
}
}
@@ -137,6 +145,15 @@ void QCMake::setGenerator(const QString& gen)
}
}
+void QCMake::setToolset(const QString& toolset)
+{
+ if(this->Toolset != toolset)
+ {
+ this->Toolset = toolset;
+ emit this->toolsetChanged(this->Toolset);
+ }
+}
+
void QCMake::configure()
{
#ifdef Q_OS_WIN
@@ -148,7 +165,7 @@ void QCMake::configure()
this->CMakeInstance->SetGlobalGenerator(
this->CMakeInstance->CreateGlobalGenerator(this->Generator.toLocal8Bit().data()));
this->CMakeInstance->SetGeneratorPlatform("");
- this->CMakeInstance->SetGeneratorToolset("");
+ this->CMakeInstance->SetGeneratorToolset(this->Toolset.toLocal8Bit().data());
this->CMakeInstance->LoadCache();
this->CMakeInstance->SetSuppressDevWarnings(this->SuppressDevWarnings);
this->CMakeInstance->SetWarnUninitialized(this->WarnUninitializedMode);
@@ -396,9 +413,9 @@ QString QCMake::generator() const
return this->Generator;
}
-QStringList QCMake::availableGenerators() const
+std::vector<cmake::GeneratorInfo> const& QCMake::availableGenerators() const
{
- return this->AvailableGenerators;
+ return AvailableGenerators;
}
void QCMake::deleteCache()
@@ -409,6 +426,7 @@ void QCMake::deleteCache()
this->CMakeInstance->LoadCache(this->BinaryDirectory.toLocal8Bit().data());
// emit no generator and no properties
this->setGenerator(QString());
+ this->setToolset(QString());
QCMakePropertyList props = this->properties();
emit this->propertiesChanged(props);
}
diff --git a/Source/QtDialog/QCMake.h b/Source/QtDialog/QCMake.h
index d910eb7..2d45da9 100644
--- a/Source/QtDialog/QCMake.h
+++ b/Source/QtDialog/QCMake.h
@@ -17,6 +17,8 @@
#pragma warning ( disable : 4512 )
#endif
+#include <vector>
+
#include <QObject>
#include <QString>
#include <QVariant>
@@ -25,7 +27,7 @@
#include <QMetaType>
#include <QAtomicInt>
-class cmake;
+#include "cmake.h"
/// struct to represent cmake properties in Qt
/// Value is of type String or Bool
@@ -73,6 +75,8 @@ public slots:
void setBinaryDirectory(const QString& dir);
/// set the desired generator to use
void setGenerator(const QString& generator);
+ /// set the desired generator to use
+ void setToolset(const QString& toolset);
/// do the configure step
void configure();
/// generate the files
@@ -104,7 +108,7 @@ public:
/// get the current generator
QString generator() const;
/// get the available generators
- QStringList availableGenerators() const;
+ std::vector<cmake::GeneratorInfo> const& availableGenerators() const;
/// get whether to do debug output
bool getDebugOutput() const;
@@ -130,6 +134,8 @@ signals:
void errorMessage(const QString& msg);
/// signal when debug output changes
void debugOutputChanged(bool);
+ /// signal when the toolset changes
+ void toolsetChanged(const QString& toolset);
protected:
cmake* CMakeInstance;
@@ -147,7 +153,8 @@ protected:
QString SourceDirectory;
QString BinaryDirectory;
QString Generator;
- QStringList AvailableGenerators;
+ QString Toolset;
+ std::vector<cmake::GeneratorInfo> AvailableGenerators;
QString CMakeExecutable;
QAtomicInt InterruptFlag;
};
diff --git a/Source/bindexplib.cxx b/Source/bindexplib.cxx
index dc4db63..e7263ae 100644
--- a/Source/bindexplib.cxx
+++ b/Source/bindexplib.cxx
@@ -70,7 +70,7 @@
* Author: Valery Fine 16/09/96 (E-mail: fine@vxcern.cern.ch)
*----------------------------------------------------------------------
*/
-
+#include "bindexplib.h"
#include <cmsys/Encoding.hxx>
#include <windows.h>
#include <stdio.h>
@@ -173,15 +173,17 @@ public:
*/
DumpSymbols(ObjectHeaderType* ih,
- FILE* fout, bool is64) {
+ std::set<std::string>& symbols,
+ std::set<std::string>& dataSymbols,
+ bool is64)
+ :Symbols(symbols), DataSymbols(dataSymbols)
+ {
this->ObjectImageHeader = ih;
this->SymbolTable = (SymbolTableType*)
((DWORD_PTR)this->ObjectImageHeader
+ this->ObjectImageHeader->PointerToSymbolTable);
- this->FileOut = fout;
this->SectionHeaders =
GetSectionHeaderOffset(this->ObjectImageHeader);
- this->ImportFlag = true;
this->SymbolCount = this->ObjectImageHeader->NumberOfSymbols;
this->Is64Bit = is64;
}
@@ -296,10 +298,6 @@ public:
symbol.erase(0,1);
}
}
- if (this->ImportFlag) {
- this->ImportFlag = false;
- fprintf(this->FileOut,"EXPORTS \n");
- }
/*
Check whether it is "Scalar deleting destructor" and
"Vector deleting destructor"
@@ -319,11 +317,11 @@ public:
SectionHeaders[pSymbolTable->SectionNumber-1].Characteristics;
if (!pSymbolTable->Type && (SectChar & IMAGE_SCN_MEM_WRITE)) {
// Read only (i.e. constants) must be excluded
- fprintf(this->FileOut, "\t%s \t DATA\n", symbol.c_str());
+ this->DataSymbols.insert(symbol);
} else {
if ( pSymbolTable->Type ||
!(SectChar & IMAGE_SCN_MEM_READ)) {
- fprintf(this->FileOut, "\t%s\n", symbol.c_str());
+ this->Symbols.insert(symbol);
} else {
// printf(" strange symbol: %s \n",symbol.c_str());
}
@@ -340,11 +338,7 @@ public:
symbol = stringTable + pSymbolTable->N.Name.Long;
while (isspace(symbol[0])) symbol.erase(0,1);
if (symbol[0] == '_') symbol.erase(0,1);
- if (!this->ImportFlag) {
- this->ImportFlag = true;
- fprintf(this->FileOut,"IMPORTS \n");
- }
- fprintf(this->FileOut, "\t%s DATA \n", symbol.c_str()+1);
+ this->DataSymbols.insert(symbol);
}
}
@@ -357,8 +351,8 @@ public:
}
}
private:
- bool ImportFlag;
- FILE* FileOut;
+ std::set<std::string>& Symbols;
+ std::set<std::string>& DataSymbols;
DWORD_PTR SymbolCount;
PIMAGE_SECTION_HEADER SectionHeaders;
ObjectHeaderType* ObjectImageHeader;
@@ -367,7 +361,9 @@ private:
};
bool
-DumpFile(const char* filename, FILE *fout)
+DumpFile(const char* filename,
+ std::set<std::string>& symbols,
+ std::set<std::string>& dataSymbols)
{
HANDLE hFile;
HANDLE hFileMapping;
@@ -415,7 +411,7 @@ DumpFile(const char* filename, FILE *fout)
* and IMAGE_FILE_HEADER.SizeOfOptionalHeader == 0;
*/
DumpSymbols<IMAGE_FILE_HEADER, IMAGE_SYMBOL>
- symbolDumper((PIMAGE_FILE_HEADER) lpFileBase, fout,
+ symbolDumper((PIMAGE_FILE_HEADER) lpFileBase, symbols, dataSymbols,
(dosHeader->e_magic == IMAGE_FILE_MACHINE_AMD64));
symbolDumper.DumpObjFile();
} else {
@@ -424,8 +420,9 @@ DumpFile(const char* filename, FILE *fout)
(cmANON_OBJECT_HEADER_BIGOBJ*) lpFileBase;
if(h->Sig1 == 0x0 && h->Sig2 == 0xffff) {
DumpSymbols<cmANON_OBJECT_HEADER_BIGOBJ, cmIMAGE_SYMBOL_EX>
- symbolDumper((cmANON_OBJECT_HEADER_BIGOBJ*) lpFileBase, fout,
- (dosHeader->e_magic == IMAGE_FILE_MACHINE_AMD64));
+ symbolDumper((cmANON_OBJECT_HEADER_BIGOBJ*) lpFileBase, symbols,
+ dataSymbols,
+ (h->Machine == IMAGE_FILE_MACHINE_AMD64));
symbolDumper.DumpObjFile();
} else {
printf("unrecognized file format in '%s'\n", filename);
@@ -437,3 +434,27 @@ DumpFile(const char* filename, FILE *fout)
CloseHandle(hFile);
return true;
}
+
+bool bindexplib::AddObjectFile(const char* filename)
+{
+ if(!DumpFile(filename, this->Symbols, this->DataSymbols))
+ {
+ return false;
+ }
+ return true;
+}
+
+void bindexplib::WriteFile(FILE* file)
+{
+ fprintf(file,"EXPORTS \n");
+ for(std::set<std::string>::const_iterator i = this->DataSymbols.begin();
+ i!= this->DataSymbols.end(); ++i)
+ {
+ fprintf(file, "\t%s \t DATA\n", i->c_str());
+ }
+ for(std::set<std::string>::const_iterator i = this->Symbols.begin();
+ i!= this->Symbols.end(); ++i)
+ {
+ fprintf(file, "\t%s\n", i->c_str());
+ }
+}
diff --git a/Source/bindexplib.h b/Source/bindexplib.h
new file mode 100644
index 0000000..8661a4a
--- /dev/null
+++ b/Source/bindexplib.h
@@ -0,0 +1,29 @@
+/*============================================================================
+ CMake - Cross Platform Makefile Generator
+ Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
+
+ Distributed under the OSI-approved BSD License (the "License");
+ see accompanying file Copyright.txt for details.
+
+ This software is distributed WITHOUT ANY WARRANTY; without even the
+ implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ See the License for more information.
+============================================================================*/
+
+#ifndef bindexplib_h
+#define bindexplib_h
+
+#include "cmStandardIncludes.h"
+
+
+class bindexplib
+{
+public:
+ bindexplib() {}
+ bool AddObjectFile(const char* filename);
+ void WriteFile(FILE* file);
+private:
+ std::set<std::string> Symbols;
+ std::set<std::string> DataSymbols;
+};
+#endif
diff --git a/Source/cmAddDependenciesCommand.cxx b/Source/cmAddDependenciesCommand.cxx
index 3a74946..01e5253 100644
--- a/Source/cmAddDependenciesCommand.cxx
+++ b/Source/cmAddDependenciesCommand.cxx
@@ -10,7 +10,6 @@
See the License for more information.
============================================================================*/
#include "cmAddDependenciesCommand.h"
-#include "cmLocalGenerator.h"
#include "cmGlobalGenerator.h"
// cmDependenciesCommand
diff --git a/Source/cmAddExecutableCommand.cxx b/Source/cmAddExecutableCommand.cxx
index d15fc1e..a84bb9d 100644
--- a/Source/cmAddExecutableCommand.cxx
+++ b/Source/cmAddExecutableCommand.cxx
@@ -174,8 +174,8 @@ bool cmAddExecutableCommand
this->SetError(e.str());
return false;
}
- cmTarget::TargetType type = aliasedTarget->GetType();
- if(type != cmTarget::EXECUTABLE)
+ cmState::TargetType type = aliasedTarget->GetType();
+ if(type != cmState::EXECUTABLE)
{
std::ostringstream e;
e << "cannot create ALIAS target \"" << exename
@@ -192,7 +192,7 @@ bool cmAddExecutableCommand
this->SetError(e.str());
return false;
}
- this->Makefile->AddAlias(exename, aliasedTarget);
+ this->Makefile->AddAlias(exename, aliasedName);
return true;
}
@@ -210,7 +210,7 @@ bool cmAddExecutableCommand
}
// Create the imported target.
- this->Makefile->AddImportedTarget(exename, cmTarget::EXECUTABLE,
+ this->Makefile->AddImportedTarget(exename, cmState::EXECUTABLE,
importGlobal);
return true;
}
diff --git a/Source/cmAddLibraryCommand.cxx b/Source/cmAddLibraryCommand.cxx
index a844cf1..5296cbb 100644
--- a/Source/cmAddLibraryCommand.cxx
+++ b/Source/cmAddLibraryCommand.cxx
@@ -25,10 +25,10 @@ bool cmAddLibraryCommand
}
// Library type defaults to value of BUILD_SHARED_LIBS, if it exists,
// otherwise it defaults to static library.
- cmTarget::TargetType type = cmTarget::SHARED_LIBRARY;
+ cmState::TargetType type = cmState::SHARED_LIBRARY;
if (cmSystemTools::IsOff(this->Makefile->GetDefinition("BUILD_SHARED_LIBS")))
{
- type = cmTarget::STATIC_LIBRARY;
+ type = cmState::STATIC_LIBRARY;
}
bool excludeFromAll = false;
bool importTarget = false;
@@ -50,7 +50,7 @@ bool cmAddLibraryCommand
std::string libType = *s;
if(libType == "STATIC")
{
- if (type == cmTarget::INTERFACE_LIBRARY)
+ if (type == cmState::INTERFACE_LIBRARY)
{
std::ostringstream e;
e << "INTERFACE library specified with conflicting STATIC type.";
@@ -58,12 +58,12 @@ bool cmAddLibraryCommand
return false;
}
++s;
- type = cmTarget::STATIC_LIBRARY;
+ type = cmState::STATIC_LIBRARY;
haveSpecifiedType = true;
}
else if(libType == "SHARED")
{
- if (type == cmTarget::INTERFACE_LIBRARY)
+ if (type == cmState::INTERFACE_LIBRARY)
{
std::ostringstream e;
e << "INTERFACE library specified with conflicting SHARED type.";
@@ -71,12 +71,12 @@ bool cmAddLibraryCommand
return false;
}
++s;
- type = cmTarget::SHARED_LIBRARY;
+ type = cmState::SHARED_LIBRARY;
haveSpecifiedType = true;
}
else if(libType == "MODULE")
{
- if (type == cmTarget::INTERFACE_LIBRARY)
+ if (type == cmState::INTERFACE_LIBRARY)
{
std::ostringstream e;
e << "INTERFACE library specified with conflicting MODULE type.";
@@ -84,12 +84,12 @@ bool cmAddLibraryCommand
return false;
}
++s;
- type = cmTarget::MODULE_LIBRARY;
+ type = cmState::MODULE_LIBRARY;
haveSpecifiedType = true;
}
else if(libType == "OBJECT")
{
- if (type == cmTarget::INTERFACE_LIBRARY)
+ if (type == cmState::INTERFACE_LIBRARY)
{
std::ostringstream e;
e << "INTERFACE library specified with conflicting OBJECT type.";
@@ -97,12 +97,12 @@ bool cmAddLibraryCommand
return false;
}
++s;
- type = cmTarget::OBJECT_LIBRARY;
+ type = cmState::OBJECT_LIBRARY;
haveSpecifiedType = true;
}
else if(libType == "UNKNOWN")
{
- if (type == cmTarget::INTERFACE_LIBRARY)
+ if (type == cmState::INTERFACE_LIBRARY)
{
std::ostringstream e;
e << "INTERFACE library specified with conflicting UNKNOWN type.";
@@ -110,12 +110,12 @@ bool cmAddLibraryCommand
return false;
}
++s;
- type = cmTarget::UNKNOWN_LIBRARY;
+ type = cmState::UNKNOWN_LIBRARY;
haveSpecifiedType = true;
}
else if(libType == "ALIAS")
{
- if (type == cmTarget::INTERFACE_LIBRARY)
+ if (type == cmState::INTERFACE_LIBRARY)
{
std::ostringstream e;
e << "INTERFACE library specified with conflicting ALIAS type.";
@@ -149,12 +149,12 @@ bool cmAddLibraryCommand
return false;
}
++s;
- type = cmTarget::INTERFACE_LIBRARY;
+ type = cmState::INTERFACE_LIBRARY;
haveSpecifiedType = true;
}
else if(*s == "EXCLUDE_FROM_ALL")
{
- if (type == cmTarget::INTERFACE_LIBRARY)
+ if (type == cmState::INTERFACE_LIBRARY)
{
std::ostringstream e;
e << "INTERFACE library may not be used with EXCLUDE_FROM_ALL.";
@@ -174,7 +174,7 @@ bool cmAddLibraryCommand
++s;
importGlobal = true;
}
- else if(type == cmTarget::INTERFACE_LIBRARY && *s == "GLOBAL")
+ else if(type == cmState::INTERFACE_LIBRARY && *s == "GLOBAL")
{
std::ostringstream e;
e << "GLOBAL option may only be used with IMPORTED libraries.";
@@ -187,7 +187,7 @@ bool cmAddLibraryCommand
}
}
- if (type == cmTarget::INTERFACE_LIBRARY)
+ if (type == cmState::INTERFACE_LIBRARY)
{
if (s != args.end())
{
@@ -220,7 +220,7 @@ bool cmAddLibraryCommand
switch(this->Makefile->GetPolicyStatus(cmPolicies::CMP0037))
{
case cmPolicies::WARN:
- if(type != cmTarget::INTERFACE_LIBRARY)
+ if(type != cmState::INTERFACE_LIBRARY)
{
e << cmPolicies::GetPolicyWarning(cmPolicies::CMP0037) << "\n";
issueMessage = true;
@@ -293,12 +293,12 @@ bool cmAddLibraryCommand
this->SetError(e.str());
return false;
}
- cmTarget::TargetType aliasedType = aliasedTarget->GetType();
- if(aliasedType != cmTarget::SHARED_LIBRARY
- && aliasedType != cmTarget::STATIC_LIBRARY
- && aliasedType != cmTarget::MODULE_LIBRARY
- && aliasedType != cmTarget::OBJECT_LIBRARY
- && aliasedType != cmTarget::INTERFACE_LIBRARY)
+ cmState::TargetType aliasedType = aliasedTarget->GetType();
+ if(aliasedType != cmState::SHARED_LIBRARY
+ && aliasedType != cmState::STATIC_LIBRARY
+ && aliasedType != cmState::MODULE_LIBRARY
+ && aliasedType != cmState::OBJECT_LIBRARY
+ && aliasedType != cmState::INTERFACE_LIBRARY)
{
std::ostringstream e;
e << "cannot create ALIAS target \"" << libName
@@ -314,7 +314,7 @@ bool cmAddLibraryCommand
this->SetError(e.str());
return false;
}
- this->Makefile->AddAlias(libName, aliasedTarget);
+ this->Makefile->AddAlias(libName, aliasedName);
return true;
}
@@ -328,19 +328,19 @@ bool cmAddLibraryCommand
CMAKE_${LANG}_CREATE_SHARED_LIBRARY is defined and if not default to
STATIC. But at this point we know only the name of the target, but not
yet its linker language. */
- if ((type == cmTarget::SHARED_LIBRARY ||
- type == cmTarget::MODULE_LIBRARY) &&
+ if ((type == cmState::SHARED_LIBRARY ||
+ type == cmState::MODULE_LIBRARY) &&
(this->Makefile->GetState()->GetGlobalPropertyAsBool(
"TARGET_SUPPORTS_SHARED_LIBS") == false))
{
std::ostringstream w;
w <<
"ADD_LIBRARY called with " <<
- (type==cmTarget::SHARED_LIBRARY ? "SHARED" : "MODULE") <<
+ (type==cmState::SHARED_LIBRARY ? "SHARED" : "MODULE") <<
" option but the target platform does not support dynamic linking. "
"Building a STATIC library instead. This may lead to problems.";
this->Makefile->IssueMessage(cmake::AUTHOR_WARNING, w.str());
- type = cmTarget::STATIC_LIBRARY;
+ type = cmState::STATIC_LIBRARY;
}
// Handle imported target creation.
@@ -352,7 +352,7 @@ bool cmAddLibraryCommand
this->SetError("called with IMPORTED argument but no library type.");
return false;
}
- if(type == cmTarget::OBJECT_LIBRARY)
+ if(type == cmState::OBJECT_LIBRARY)
{
this->Makefile->IssueMessage(
cmake::FATAL_ERROR,
@@ -360,7 +360,7 @@ bool cmAddLibraryCommand
);
return true;
}
- if(type == cmTarget::INTERFACE_LIBRARY)
+ if(type == cmState::INTERFACE_LIBRARY)
{
if (!cmGeneratorExpression::IsValidTargetName(libName))
{
@@ -387,7 +387,7 @@ bool cmAddLibraryCommand
}
// A non-imported target may not have UNKNOWN type.
- if(type == cmTarget::UNKNOWN_LIBRARY)
+ if(type == cmState::UNKNOWN_LIBRARY)
{
this->Makefile->IssueMessage(
cmake::FATAL_ERROR,
@@ -408,7 +408,7 @@ bool cmAddLibraryCommand
std::vector<std::string> srclists;
- if(type == cmTarget::INTERFACE_LIBRARY)
+ if(type == cmState::INTERFACE_LIBRARY)
{
if (!cmGeneratorExpression::IsValidTargetName(libName)
|| libName.find("::") != std::string::npos)
diff --git a/Source/cmArchiveWrite.cxx b/Source/cmArchiveWrite.cxx
index 7946950..e62a2ed 100644
--- a/Source/cmArchiveWrite.cxx
+++ b/Source/cmArchiveWrite.cxx
@@ -18,6 +18,10 @@
#include <cm_libarchive.h>
#include "cm_get_date.h"
+#ifndef __LA_SSIZE_T
+# define __LA_SSIZE_T la_ssize_t
+#endif
+
//----------------------------------------------------------------------------
static std::string cm_archive_error_string(struct archive* a)
{
diff --git a/Source/cmAuxSourceDirectoryCommand.cxx b/Source/cmAuxSourceDirectoryCommand.cxx
index 5f5017d..92ac07d 100644
--- a/Source/cmAuxSourceDirectoryCommand.cxx
+++ b/Source/cmAuxSourceDirectoryCommand.cxx
@@ -60,10 +60,10 @@ bool cmAuxSourceDirectoryCommand::InitialPass
std::string ext = file.substr(dotpos+1);
std::string base = file.substr(0, dotpos);
// Process only source files
- if(!base.empty()
- && std::find( this->Makefile->GetSourceExtensions().begin(),
- this->Makefile->GetSourceExtensions().end(), ext )
- != this->Makefile->GetSourceExtensions().end() )
+ std::vector<std::string> srcExts =
+ this->Makefile->GetCMakeInstance()->GetSourceExtensions();
+ if(!base.empty() &&
+ std::find(srcExts.begin(), srcExts.end(), ext) != srcExts.end())
{
std::string fullname = templateDirectory;
fullname += "/";
diff --git a/Source/cmBuildCommand.cxx b/Source/cmBuildCommand.cxx
index 62fafa5..64d4fca 100644
--- a/Source/cmBuildCommand.cxx
+++ b/Source/cmBuildCommand.cxx
@@ -11,7 +11,6 @@
============================================================================*/
#include "cmBuildCommand.h"
-#include "cmLocalGenerator.h"
#include "cmGlobalGenerator.h"
//----------------------------------------------------------------------
diff --git a/Source/cmCPackPropertiesGenerator.cxx b/Source/cmCPackPropertiesGenerator.cxx
index cbcdd81..35b3d59 100644
--- a/Source/cmCPackPropertiesGenerator.cxx
+++ b/Source/cmCPackPropertiesGenerator.cxx
@@ -18,7 +18,7 @@ void cmCPackPropertiesGenerator::GenerateScriptForConfig(std::ostream& os,
const std::string& config, Indent const& indent)
{
std::string const& expandedFileName =
- this->InstalledFile.GetNameExpression().Evaluate(this->LG->GetMakefile(),
+ this->InstalledFile.GetNameExpression().Evaluate(this->LG,
config);
cmInstalledFile::PropertyMapType const& properties =
@@ -38,7 +38,7 @@ void cmCPackPropertiesGenerator::GenerateScriptForConfig(std::ostream& os,
j = property.ValueExpressions.begin();
j != property.ValueExpressions.end(); ++j)
{
- std::string value = (*j)->Evaluate(LG->GetMakefile(), config);
+ std::string value = (*j)->Evaluate(this->LG, config);
os << " " << cmOutputConverter::EscapeForCMake(value);
}
diff --git a/Source/cmCPluginAPI.cxx b/Source/cmCPluginAPI.cxx