summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnas Nashif <anas.nashif@intel.com>2013-08-13 11:48:01 (GMT)
committerAnas Nashif <anas.nashif@intel.com>2013-08-13 11:48:01 (GMT)
commit297c63fa65327491a2b50e521b661c5835a19fe4 (patch)
treecf30d58014e240eb5e4417727d8f137cdbe75828
parentef8aa19c33e83ff019595fd7f8fdc29c35c336a3 (diff)
downloadcmake-297c63fa65327491a2b50e521b661c5835a19fe4.zip
cmake-297c63fa65327491a2b50e521b661c5835a19fe4.tar.gz
cmake-297c63fa65327491a2b50e521b661c5835a19fe4.tar.bz2
Imported Upstream version 2.8.11.2upstream/2.8.11.2sandbox/pcoval/previous/upstream
-rw-r--r--CMakeCPackOptions.cmake.in24
-rw-r--r--CMakeLists.txt27
-rw-r--r--CTestCustom.cmake.in1
-rw-r--r--ChangeLog.manual687
-rw-r--r--CompileFlags.cmake6
-rw-r--r--Modules/BundleUtilities.cmake2
-rw-r--r--Modules/CMakeAddNewLanguage.txt16
-rw-r--r--Modules/CMakeCCompiler.cmake.in1
-rw-r--r--Modules/CMakeCCompilerId.c.in2
-rw-r--r--Modules/CMakeCXXCompiler.cmake.in1
-rw-r--r--Modules/CMakeCXXCompilerId.cpp.in2
-rw-r--r--Modules/CMakeDetermineASM-ATTCompiler.cmake2
-rw-r--r--Modules/CMakeDetermineASMCompiler.cmake10
-rw-r--r--Modules/CMakeDetermineASM_NASMCompiler.cmake2
-rw-r--r--Modules/CMakeDetermineCCompiler.cmake34
-rw-r--r--Modules/CMakeDetermineCXXCompiler.cmake37
-rw-r--r--Modules/CMakeDetermineCompilerABI.cmake25
-rw-r--r--Modules/CMakeDetermineCompilerId.cmake27
-rw-r--r--Modules/CMakeDetermineFortranCompiler.cmake28
-rw-r--r--Modules/CMakeDetermineJavaCompiler.cmake2
-rw-r--r--Modules/CMakeDetermineSystem.cmake12
-rw-r--r--Modules/CMakeExpandImportedTargets.cmake2
-rw-r--r--Modules/CMakeExtraGeneratorDetermineCompilerMacrosAndIncludeDirs.cmake4
-rw-r--r--Modules/CMakeFindBinUtils.cmake4
-rw-r--r--Modules/CMakeFindEclipseCDT4.cmake2
-rw-r--r--Modules/CMakeFortranCompiler.cmake.in1
-rw-r--r--Modules/CMakeFortranCompilerId.F.in6
-rw-r--r--Modules/CMakePackageConfigHelpers.cmake21
-rw-r--r--Modules/CMakeParseImplicitLinkInfo.cmake57
-rw-r--r--Modules/CMakePlatformId.h.in5
-rw-r--r--Modules/CMakeVS12FindMake.cmake27
-rw-r--r--Modules/CPack.cmake7
-rw-r--r--Modules/CPackDeb.cmake6
-rw-r--r--Modules/CPackRPM.cmake34
-rw-r--r--Modules/CPackWIX.cmake109
-rw-r--r--Modules/CTestTargets.cmake4
-rw-r--r--Modules/CTestUseLaunchers.cmake2
-rw-r--r--Modules/CheckCSourceCompiles.cmake7
-rw-r--r--Modules/CheckCSourceRuns.cmake7
-rw-r--r--Modules/CheckCXXSourceCompiles.cmake7
-rw-r--r--Modules/CheckCXXSourceRuns.cmake7
-rw-r--r--Modules/CheckForPthreads.c2
-rw-r--r--Modules/CheckFortranFunctionExists.cmake7
-rw-r--r--Modules/CheckFunctionExists.cmake7
-rw-r--r--Modules/CheckLibraryExists.cmake7
-rw-r--r--Modules/CheckPrototypeDefinition.cmake7
-rw-r--r--Modules/CheckSymbolExists.cmake7
-rw-r--r--Modules/CheckTypeSize.cmake5
-rw-r--r--Modules/CheckVariableExists.cmake7
-rw-r--r--Modules/Compiler/Clang.cmake1
-rw-r--r--Modules/Compiler/NAG-Fortran.cmake1
-rw-r--r--Modules/Compiler/TI-ASM.cmake8
-rw-r--r--Modules/Compiler/TI-C.cmake10
-rw-r--r--Modules/Compiler/TI-CXX.cmake10
-rw-r--r--Modules/Compiler/XL.cmake1
-rw-r--r--Modules/CompilerId/VS-7.vcproj.in6
-rw-r--r--Modules/CompilerId/Xcode-3.pbxproj.in1
-rw-r--r--Modules/DeployQt4.cmake2
-rw-r--r--Modules/ExternalData.cmake771
-rw-r--r--Modules/ExternalData_config.cmake.in4
-rw-r--r--Modules/ExternalProject.cmake130
-rw-r--r--Modules/FeatureSummary.cmake2
-rw-r--r--Modules/FindBISON.cmake2
-rw-r--r--Modules/FindBLAS.cmake4
-rw-r--r--Modules/FindBZip2.cmake2
-rw-r--r--Modules/FindBoost.cmake1567
-rw-r--r--Modules/FindBullet.cmake2
-rw-r--r--Modules/FindCUDA.cmake204
-rw-r--r--Modules/FindCups.cmake2
-rw-r--r--Modules/FindCurses.cmake2
-rw-r--r--Modules/FindFLEX.cmake10
-rw-r--r--Modules/FindFLTK.cmake2
-rw-r--r--Modules/FindFreetype.cmake3
-rw-r--r--Modules/FindGIF.cmake4
-rw-r--r--Modules/FindGLU.cmake2
-rw-r--r--Modules/FindGLUT.cmake28
-rw-r--r--Modules/FindGTK2.cmake76
-rw-r--r--Modules/FindGnuplot.cmake2
-rw-r--r--Modules/FindHDF5.cmake2
-rw-r--r--Modules/FindIcotool.cmake56
-rw-r--r--Modules/FindImageMagick.cmake6
-rw-r--r--Modules/FindJNI.cmake9
-rw-r--r--Modules/FindJava.cmake7
-rw-r--r--Modules/FindKDE3.cmake2
-rw-r--r--Modules/FindLAPACK.cmake4
-rw-r--r--Modules/FindLua51.cmake4
-rw-r--r--Modules/FindMPEG2.cmake2
-rw-r--r--Modules/FindMPI.cmake2
-rw-r--r--Modules/FindOpenGL.cmake32
-rw-r--r--Modules/FindOpenMP.cmake8
-rw-r--r--Modules/FindOpenSceneGraph.cmake2
-rw-r--r--Modules/FindPackageHandleStandardArgs.cmake70
-rw-r--r--Modules/FindPerl.cmake2
-rw-r--r--Modules/FindPerlLibs.cmake2
-rw-r--r--Modules/FindPythonLibs.cmake2
-rw-r--r--Modules/FindQt.cmake30
-rw-r--r--Modules/FindQt3.cmake6
-rw-r--r--Modules/FindQt4.cmake287
-rw-r--r--Modules/FindRuby.cmake17
-rw-r--r--Modules/FindSDL.cmake2
-rw-r--r--Modules/FindSDL_image.cmake3
-rw-r--r--Modules/FindSDL_mixer.cmake3
-rw-r--r--Modules/FindSDL_net.cmake3
-rw-r--r--Modules/FindSDL_sound.cmake3
-rw-r--r--Modules/FindSDL_ttf.cmake3
-rw-r--r--Modules/FindSelfPackers.cmake2
-rw-r--r--Modules/FindSquish.cmake159
-rw-r--r--Modules/FindTCL.cmake14
-rw-r--r--Modules/FindTclStub.cmake2
-rw-r--r--Modules/FindUnixCommands.cmake2
-rw-r--r--Modules/FindVTK.cmake4
-rw-r--r--Modules/FindWget.cmake2
-rw-r--r--Modules/FindX11.cmake6
-rw-r--r--Modules/Findosg.cmake2
-rw-r--r--Modules/FindosgAnimation.cmake2
-rw-r--r--Modules/FindosgDB.cmake2
-rw-r--r--Modules/FindosgFX.cmake2
-rw-r--r--Modules/FindosgGA.cmake2
-rw-r--r--Modules/FindosgIntrospection.cmake2
-rw-r--r--Modules/FindosgManipulator.cmake2
-rw-r--r--Modules/FindosgParticle.cmake2
-rw-r--r--Modules/FindosgPresentation.cmake2
-rw-r--r--Modules/FindosgProducer.cmake2
-rw-r--r--Modules/FindosgQt.cmake2
-rw-r--r--Modules/FindosgShadow.cmake2
-rw-r--r--Modules/FindosgSim.cmake2
-rw-r--r--Modules/FindosgTerrain.cmake2
-rw-r--r--Modules/FindosgText.cmake2
-rw-r--r--Modules/FindosgUtil.cmake2
-rw-r--r--Modules/FindosgViewer.cmake2
-rw-r--r--Modules/FindosgVolume.cmake2
-rw-r--r--Modules/FindosgWidget.cmake2
-rw-r--r--Modules/FindwxWindows.cmake2
-rw-r--r--Modules/GenerateExportHeader.cmake6
-rw-r--r--Modules/GetPrerequisites.cmake56
-rw-r--r--Modules/InstallRequiredSystemLibraries.cmake8
-rw-r--r--Modules/NSIS.template.in7
-rw-r--r--Modules/Platform/AIX-GNU.cmake3
-rw-r--r--Modules/Platform/AIX-XL.cmake2
-rw-r--r--Modules/Platform/Darwin-Clang.cmake1
-rw-r--r--Modules/Platform/Darwin-GNU.cmake1
-rw-r--r--Modules/Platform/Darwin.cmake35
-rw-r--r--Modules/Platform/FreeBSD.cmake24
-rw-r--r--Modules/Platform/NetBSD.cmake24
-rw-r--r--Modules/Platform/OpenBSD.cmake4
-rw-r--r--Modules/Platform/Windows-Embarcadero.cmake2
-rw-r--r--Modules/Platform/Windows-Intel.cmake2
-rw-r--r--Modules/Platform/Windows-MSVC.cmake23
-rw-r--r--Modules/Qt4ConfigDependentSettings.cmake2
-rw-r--r--Modules/Qt4Macros.cmake24
-rw-r--r--Modules/SelectLibraryConfigurations.cmake2
-rwxr-xr-xModules/Squish4RunTestCase.bat24
-rwxr-xr-xModules/Squish4RunTestCase.sh28
-rw-r--r--Modules/SquishTestScript.cmake52
-rw-r--r--Modules/TestForANSIStreamHeaders.cmake2
-rw-r--r--Modules/UseJava.cmake71
-rw-r--r--Modules/UseQt4.cmake12
-rw-r--r--Modules/WIX.template.in44
-rw-r--r--Modules/readme.txt115
-rw-r--r--Source/CMakeLists.txt31
-rw-r--r--Source/CMakeVersion.cmake4
-rw-r--r--Source/CPack/WiX/cmCPackWIXGenerator.cxx571
-rw-r--r--Source/CPack/WiX/cmCPackWIXGenerator.h101
-rw-r--r--Source/CPack/WiX/cmWIXRichTextFormatWriter.cxx137
-rw-r--r--Source/CPack/WiX/cmWIXRichTextFormatWriter.h46
-rw-r--r--Source/CPack/WiX/cmWIXSourceWriter.cxx189
-rw-r--r--Source/CPack/WiX/cmWIXSourceWriter.h67
-rw-r--r--Source/CPack/cmCPackComponentGroup.h4
-rw-r--r--Source/CPack/cmCPackDebGenerator.cxx20
-rw-r--r--Source/CPack/cmCPackDragNDropGenerator.cxx17
-rw-r--r--Source/CPack/cmCPackGenerator.cxx6
-rw-r--r--Source/CPack/cmCPackGeneratorFactory.cxx17
-rw-r--r--Source/CPack/cmCPackNSISGenerator.cxx80
-rw-r--r--Source/CPack/cmCPackNSISGenerator.h7
-rw-r--r--Source/CPack/cmCPackPackageMakerGenerator.cxx126
-rw-r--r--Source/CPack/cmCPackPackageMakerGenerator.h3
-rw-r--r--Source/CPack/cmCPackRPMGenerator.cxx12
-rw-r--r--Source/CPack/cpack.cxx8
-rw-r--r--Source/CTest/cmCTestBuildAndTestHandler.cxx24
-rw-r--r--Source/CTest/cmCTestBuildAndTestHandler.h1
-rw-r--r--Source/CTest/cmCTestConfigureCommand.cxx9
-rw-r--r--Source/CTest/cmCTestCoverageHandler.cxx15
-rw-r--r--Source/CTest/cmCTestGIT.cxx4
-rw-r--r--Source/CTest/cmCTestHandlerCommand.cxx2
-rw-r--r--Source/CTest/cmCTestMultiProcessHandler.cxx7
-rw-r--r--Source/CTest/cmCTestTestHandler.cxx3
-rw-r--r--Source/CursesDialog/cmCursesStringWidget.cxx2
-rw-r--r--Source/QtDialog/CMakeLists.txt2
-rw-r--r--Source/QtDialog/QCMakeCacheView.cxx6
-rw-r--r--Source/cmAddCustomCommandCommand.h5
-rw-r--r--Source/cmAddDependenciesCommand.cxx12
-rw-r--r--Source/cmAddLibraryCommand.h4
-rw-r--r--Source/cmAddSubDirectoryCommand.cxx15
-rw-r--r--Source/cmBootstrapCommands.cxx1
-rw-r--r--Source/cmBuildCommand.cxx8
-rw-r--r--Source/cmCTest.cxx5
-rw-r--r--Source/cmCTest.h2
-rw-r--r--Source/cmCacheManager.cxx24
-rw-r--r--Source/cmCommandArgumentParser.cxx4
-rw-r--r--Source/cmCommands.cxx5
-rw-r--r--Source/cmComputeLinkDepends.cxx11
-rw-r--r--Source/cmComputeLinkDepends.h3
-rw-r--r--Source/cmComputeLinkInformation.cxx105
-rw-r--r--Source/cmComputeLinkInformation.h5
-rw-r--r--Source/cmComputeTargetDepends.cxx98
-rw-r--r--Source/cmComputeTargetDepends.h6
-rw-r--r--Source/cmConfigureFileCommand.h22
-rw-r--r--Source/cmCoreTryCompile.cxx109
-rw-r--r--Source/cmCryptoHash.cxx6
-rw-r--r--Source/cmCustomCommandGenerator.cxx4
-rw-r--r--Source/cmDepends.cxx19
-rw-r--r--Source/cmDepends.h6
-rw-r--r--Source/cmDependsC.cxx243
-rw-r--r--Source/cmDependsC.h7
-rw-r--r--Source/cmDependsFortran.cxx52
-rw-r--r--Source/cmDependsFortran.h2
-rw-r--r--Source/cmDependsJava.cxx6
-rw-r--r--Source/cmDependsJava.h3
-rw-r--r--Source/cmDocumentGeneratorExpressions.h27
-rw-r--r--Source/cmDocumentVariables.cxx81
-rw-r--r--Source/cmEnableLanguageCommand.h7
-rw-r--r--Source/cmExportBuildFileGenerator.cxx52
-rw-r--r--Source/cmExportBuildFileGenerator.h3
-rw-r--r--Source/cmExportFileGenerator.cxx663
-rw-r--r--Source/cmExportFileGenerator.h56
-rw-r--r--Source/cmExportInstallFileGenerator.cxx171
-rw-r--r--Source/cmExportInstallFileGenerator.h11
-rw-r--r--Source/cmExportTryCompileFileGenerator.cxx114
-rw-r--r--Source/cmExportTryCompileFileGenerator.h55
-rw-r--r--Source/cmExtraCodeBlocksGenerator.cxx11
-rw-r--r--Source/cmExtraEclipseCDT4Generator.cxx25
-rw-r--r--Source/cmExtraEclipseCDT4Generator.h1
-rw-r--r--Source/cmExtraSublimeTextGenerator.cxx503
-rw-r--r--Source/cmExtraSublimeTextGenerator.h89
-rw-r--r--Source/cmFLTKWrapUICommand.cxx6
-rw-r--r--Source/cmFileCommand.cxx75
-rw-r--r--Source/cmFileCommand.h12
-rw-r--r--Source/cmFindBase.cxx19
-rw-r--r--Source/cmFindBase.h2
-rw-r--r--Source/cmFindLibraryCommand.cxx197
-rw-r--r--Source/cmFindLibraryCommand.h4
-rw-r--r--Source/cmFindPackageCommand.cxx3
-rw-r--r--Source/cmFindPathCommand.cxx6
-rw-r--r--Source/cmFunctionCommand.h4
-rw-r--r--Source/cmGeneratorExpression.cxx315
-rw-r--r--Source/cmGeneratorExpression.h66
-rw-r--r--Source/cmGeneratorExpressionDAGChecker.cxx80
-rw-r--r--Source/cmGeneratorExpressionDAGChecker.h19
-rw-r--r--Source/cmGeneratorExpressionEvaluator.cxx517
-rw-r--r--Source/cmGeneratorExpressionEvaluator.h18
-rw-r--r--Source/cmGeneratorExpressionParser.cxx10
-rw-r--r--Source/cmGeneratorTarget.cxx107
-rw-r--r--Source/cmGeneratorTarget.h8
-rw-r--r--Source/cmGetFilenameComponentCommand.h19
-rw-r--r--Source/cmGlobalBorlandMakefileGenerator.cxx4
-rw-r--r--Source/cmGlobalBorlandMakefileGenerator.h7
-rw-r--r--Source/cmGlobalGenerator.cxx77
-rw-r--r--Source/cmGlobalGenerator.h6
-rw-r--r--Source/cmGlobalGeneratorFactory.h59
-rw-r--r--Source/cmGlobalJOMMakefileGenerator.cxx4
-rw-r--r--Source/cmGlobalJOMMakefileGenerator.h7
-rw-r--r--Source/cmGlobalMSYSMakefileGenerator.cxx4
-rw-r--r--Source/cmGlobalMSYSMakefileGenerator.h7
-rw-r--r--Source/cmGlobalMinGWMakefileGenerator.cxx32
-rw-r--r--Source/cmGlobalMinGWMakefileGenerator.h7
-rw-r--r--Source/cmGlobalNMakeMakefileGenerator.cxx4
-rw-r--r--Source/cmGlobalNMakeMakefileGenerator.h7
-rw-r--r--Source/cmGlobalNinjaGenerator.cxx76
-rw-r--r--Source/cmGlobalNinjaGenerator.h7
-rw-r--r--Source/cmGlobalUnixMakefileGenerator3.cxx4
-rw-r--r--Source/cmGlobalUnixMakefileGenerator3.h8
-rw-r--r--Source/cmGlobalVisualStudio10Generator.cxx88
-rw-r--r--Source/cmGlobalVisualStudio10Generator.h16
-rw-r--r--Source/cmGlobalVisualStudio10IA64Generator.cxx50
-rw-r--r--Source/cmGlobalVisualStudio10IA64Generator.h40
-rw-r--r--Source/cmGlobalVisualStudio10Win64Generator.cxx50
-rw-r--r--Source/cmGlobalVisualStudio10Win64Generator.h40
-rw-r--r--Source/cmGlobalVisualStudio11ARMGenerator.cxx29
-rw-r--r--Source/cmGlobalVisualStudio11ARMGenerator.h35
-rw-r--r--Source/cmGlobalVisualStudio11Generator.cxx74
-rw-r--r--Source/cmGlobalVisualStudio11Generator.h17
-rw-r--r--Source/cmGlobalVisualStudio11Win64Generator.cxx37
-rw-r--r--Source/cmGlobalVisualStudio11Win64Generator.h37
-rw-r--r--Source/cmGlobalVisualStudio12Generator.cxx111
-rw-r--r--Source/cmGlobalVisualStudio12Generator.h40
-rw-r--r--Source/cmGlobalVisualStudio6Generator.cxx8
-rw-r--r--Source/cmGlobalVisualStudio6Generator.h8
-rw-r--r--Source/cmGlobalVisualStudio71Generator.cxx29
-rw-r--r--Source/cmGlobalVisualStudio71Generator.h16
-rw-r--r--Source/cmGlobalVisualStudio7Generator.cxx137
-rw-r--r--Source/cmGlobalVisualStudio7Generator.h22
-rw-r--r--Source/cmGlobalVisualStudio8Generator.cxx143
-rw-r--r--Source/cmGlobalVisualStudio8Generator.h36
-rw-r--r--Source/cmGlobalVisualStudio8Win64Generator.cxx40
-rw-r--r--Source/cmGlobalVisualStudio8Win64Generator.h47
-rw-r--r--Source/cmGlobalVisualStudio9Generator.cxx99
-rw-r--r--Source/cmGlobalVisualStudio9Generator.h17
-rw-r--r--Source/cmGlobalVisualStudio9IA64Generator.cxx37
-rw-r--r--Source/cmGlobalVisualStudio9IA64Generator.h47
-rw-r--r--Source/cmGlobalVisualStudio9Win64Generator.cxx37
-rw-r--r--Source/cmGlobalVisualStudio9Win64Generator.h47
-rw-r--r--Source/cmGlobalVisualStudioGenerator.cxx22
-rw-r--r--Source/cmGlobalVisualStudioGenerator.h9
-rw-r--r--Source/cmGlobalWatcomWMakeGenerator.cxx4
-rw-r--r--Source/cmGlobalWatcomWMakeGenerator.h6
-rw-r--r--Source/cmGlobalXCodeGenerator.cxx204
-rw-r--r--Source/cmGlobalXCodeGenerator.h8
-rw-r--r--Source/cmGraphVizWriter.cxx4
-rw-r--r--Source/cmIDEOptions.cxx11
-rw-r--r--Source/cmIDEOptions.h1
-rw-r--r--Source/cmIncludeDirectoryCommand.cxx97
-rw-r--r--Source/cmIncludeDirectoryCommand.h13
-rw-r--r--Source/cmInstallExportGenerator.h2
-rw-r--r--Source/cmInstallTargetGenerator.cxx30
-rw-r--r--Source/cmInstallTargetGenerator.h5
-rw-r--r--Source/cmLinkDirectoriesCommand.h6
-rw-r--r--Source/cmListCommand.cxx36
-rw-r--r--Source/cmListFileCache.h9
-rw-r--r--Source/cmLocalGenerator.cxx52
-rw-r--r--Source/cmLocalGenerator.h18
-rw-r--r--Source/cmLocalUnixMakefileGenerator3.cxx37
-rw-r--r--Source/cmLocalUnixMakefileGenerator3.h3
-rw-r--r--Source/cmLocalVisualStudio6Generator.cxx35
-rw-r--r--Source/cmLocalVisualStudio7Generator.cxx85
-rw-r--r--Source/cmLocalVisualStudio7Generator.h3
-rw-r--r--Source/cmLocalVisualStudioGenerator.cxx1
-rw-r--r--Source/cmLocalVisualStudioGenerator.h3
-rw-r--r--Source/cmMacroCommand.h8
-rw-r--r--Source/cmMakefile.cxx252
-rw-r--r--Source/cmMakefile.h22
-rw-r--r--Source/cmMakefileLibraryTargetGenerator.cxx2
-rw-r--r--Source/cmMakefileTargetGenerator.cxx48
-rw-r--r--Source/cmMathCommand.h4
-rw-r--r--Source/cmMessageCommand.h5
-rw-r--r--Source/cmNinjaNormalTargetGenerator.cxx6
-rw-r--r--Source/cmNinjaTargetGenerator.cxx28
-rw-r--r--Source/cmPolicies.cxx40
-rw-r--r--Source/cmPolicies.h2
-rw-r--r--Source/cmQtAutomoc.cxx216
-rw-r--r--Source/cmQtAutomoc.h13
-rw-r--r--Source/cmSetTargetPropertiesCommand.h4
-rw-r--r--Source/cmSourceFile.cxx2
-rw-r--r--Source/cmSourceGroup.cxx9
-rw-r--r--Source/cmSourceGroupCommand.h2
-rw-r--r--Source/cmStringCommand.cxx54
-rw-r--r--Source/cmStringCommand.h41
-rw-r--r--Source/cmSystemTools.cxx56
-rw-r--r--Source/cmTarget.cxx1426
-rw-r--r--Source/cmTarget.h92
-rw-r--r--Source/cmTargetCompileDefinitionsCommand.cxx66
-rw-r--r--Source/cmTargetCompileDefinitionsCommand.h88
-rw-r--r--Source/cmTargetIncludeDirectoriesCommand.cxx74
-rw-r--r--Source/cmTargetIncludeDirectoriesCommand.h93
-rw-r--r--Source/cmTargetLinkLibrariesCommand.cxx2
-rw-r--r--Source/cmTargetLinkLibrariesCommand.h27
-rw-r--r--Source/cmTargetPropCommandBase.cxx144
-rw-r--r--Source/cmTargetPropCommandBase.h55
-rw-r--r--Source/cmTestGenerator.cxx4
-rw-r--r--Source/cmTimestamp.cxx134
-rw-r--r--Source/cmTimestamp.h40
-rw-r--r--Source/cmTryCompileCommand.h8
-rw-r--r--Source/cmTryRunCommand.h2
-rw-r--r--Source/cmVS10LinkFlagTable.h6
-rw-r--r--Source/cmVS12CLFlagTable.h297
-rw-r--r--Source/cmVS12LibFlagTable.h102
-rw-r--r--Source/cmVS12LinkFlagTable.h343
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx224
-rw-r--r--Source/cmVisualStudio10TargetGenerator.h3
-rw-r--r--Source/cmVisualStudioGeneratorOptions.cxx1
-rw-r--r--Source/cmVisualStudioWCEPlatformParser.cxx175
-rw-r--r--Source/cmVisualStudioWCEPlatformParser.h68
-rw-r--r--Source/cmWin32ProcessExecution.cxx56
-rw-r--r--Source/cmXCodeObject.cxx1
-rw-r--r--Source/cmXCodeObject.h9
-rw-r--r--Source/cmake.cxx299
-rw-r--r--Source/cmake.h28
-rw-r--r--Source/cmakemain.cxx8
-rw-r--r--Source/cmcldeps.cxx4
-rwxr-xr-xSource/cmparseMSBuildXML.py3
-rw-r--r--Source/cmw9xcom.cxx10
-rw-r--r--Source/ctest.cxx6
-rw-r--r--Source/kwsys/CMakeLists.txt186
-rw-r--r--Source/kwsys/CPU.h.in8
-rw-r--r--Source/kwsys/CTestConfig.cmake11
-rw-r--r--Source/kwsys/Configure.h.in14
-rw-r--r--Source/kwsys/DynamicLoader.cxx52
-rw-r--r--Source/kwsys/EncodeExecutable.c114
-rw-r--r--Source/kwsys/Glob.cxx2
-rw-r--r--Source/kwsys/IOStream.cxx1
-rw-r--r--Source/kwsys/IOStream.hxx.in6
-rw-r--r--Source/kwsys/ProcessFwd9x.c211
-rw-r--r--Source/kwsys/ProcessUNIX.c18
-rw-r--r--Source/kwsys/ProcessWin32.c287
-rw-r--r--Source/kwsys/Registry.cxx818
-rw-r--r--Source/kwsys/Registry.hxx.in107
-rw-r--r--Source/kwsys/SystemInformation.cxx3095
-rw-r--r--Source/kwsys/SystemInformation.hxx.in87
-rw-r--r--Source/kwsys/SystemTools.cxx78
-rw-r--r--Source/kwsys/SystemTools.hxx.in9
-rw-r--r--Source/kwsys/kwsysPlatformTestsCXX.cxx93
-rw-r--r--Source/kwsys/testCommandLineArguments.cxx16
-rw-r--r--Source/kwsys/testDynamicLoader.cxx4
-rw-r--r--Source/kwsys/testProcess.c39
-rw-r--r--Source/kwsys/testRegistry.cxx109
-rw-r--r--Source/kwsys/testSystemInformation.cxx44
-rw-r--r--Source/kwsys/testSystemTools.cxx26
-rw-r--r--Tests/BuildDepends/CMakeLists.txt34
-rw-r--r--Tests/BuildDepends/Project/CMakeLists.txt18
-rw-r--r--Tests/BuildDepends/Project/dep_custom2.cxx2
-rw-r--r--Tests/BuildDepends/Project/link_depends_no_shared_check.cmake7
-rw-r--r--Tests/BuildDepends/Project/link_depends_no_shared_exe.c9
-rw-r--r--Tests/BuildDepends/Project/link_depends_no_shared_lib.c8
-rw-r--r--Tests/CMakeBuildTest.cmake.in1
-rw-r--r--Tests/CMakeCommands/target_compile_definitions/CMakeLists.txt22
-rw-r--r--Tests/CMakeCommands/target_compile_definitions/consumer.cpp18
-rw-r--r--Tests/CMakeCommands/target_compile_definitions/main.cpp14
-rw-r--r--Tests/CMakeCommands/target_include_directories/CMakeLists.txt49
-rw-r--r--Tests/CMakeCommands/target_include_directories/consumer.cpp27
-rw-r--r--Tests/CMakeCommands/target_include_directories/main.cpp22
-rw-r--r--Tests/CMakeCommands/target_include_directories/relative_dir/relative_dir.h2
-rw-r--r--Tests/CMakeCommands/target_link_libraries/CMakeLists.txt58
-rw-r--r--Tests/CMakeCommands/target_link_libraries/depB.cpp6
-rw-r--r--Tests/CMakeCommands/target_link_libraries/depD.cpp13
-rw-r--r--Tests/CMakeCommands/target_link_libraries/depD.h11
-rw-r--r--Tests/CMakeCommands/target_link_libraries/depG.cpp7
-rw-r--r--Tests/CMakeCommands/target_link_libraries/depG.h7
-rw-r--r--Tests/CMakeCommands/target_link_libraries/depIfaceOnly.cpp7
-rw-r--r--Tests/CMakeCommands/target_link_libraries/depIfaceOnly.h7
-rw-r--r--Tests/CMakeCommands/target_link_libraries/empty.cpp1
-rw-r--r--Tests/CMakeCommands/target_link_libraries/libgenex.cpp7
-rw-r--r--Tests/CMakeCommands/target_link_libraries/libgenex.h12
-rw-r--r--Tests/CMakeCommands/target_link_libraries/subdir/CMakeLists.txt5
-rw-r--r--Tests/CMakeCommands/target_link_libraries/subdir/subdirlib.cpp7
-rw-r--r--Tests/CMakeCommands/target_link_libraries/subdir/subdirlib.h12
-rw-r--r--Tests/CMakeCommands/target_link_libraries/targetA.cpp11
-rw-r--r--Tests/CMakeCommands/target_link_libraries/targetB.cpp10
-rw-r--r--Tests/CMakeCommands/target_link_libraries/targetC.cpp16
-rw-r--r--Tests/CMakeLists.txt399
-rw-r--r--Tests/CMakeOnly/AllFindModules/CMakeLists.txt5
-rw-r--r--Tests/CMakeOnly/CMakeLists.txt20
-rw-r--r--Tests/CMakeOnly/MajorVersionSelection/CMakeLists.txt46
-rw-r--r--Tests/CMakeOnly/Test.cmake.in7
-rw-r--r--Tests/CMakeOnly/find_library/A/libtestA.a0
-rw-r--r--Tests/CMakeOnly/find_library/B/libtestB.a0
-rw-r--r--Tests/CMakeOnly/find_library/CMakeLists.txt49
-rw-r--r--Tests/CMakeOnly/find_path/CMakeLists.txt31
-rw-r--r--Tests/CMakeOnly/find_path/include/arch/test1arch.h0
-rw-r--r--Tests/CMakeOnly/find_path/include/test1.h0
-rw-r--r--Tests/CMakeTests/CMakeLists.txt5
-rw-r--r--Tests/CMakeTests/CheckCMakeTest.cmake53
-rw-r--r--Tests/CMakeTests/File-Glob-NoArg.cmake2
-rw-r--r--Tests/CMakeTests/File-TIMESTAMP-BadArg1.cmake1
-rw-r--r--Tests/CMakeTests/File-TIMESTAMP-NoFile.cmake2
-rw-r--r--Tests/CMakeTests/File-TIMESTAMP-NotBogus.cmake24
-rw-r--r--Tests/CMakeTests/File-TIMESTAMP-Works.cmake2
-rw-r--r--Tests/CMakeTests/FileTest.cmake.in23
-rw-r--r--Tests/CMakeTests/GetProperty-Doc-Properties.cmake10
-rw-r--r--Tests/CMakeTests/GetPropertyTest.cmake.in63
-rw-r--r--Tests/CMakeTests/IfTest.cmake.in5
-rw-r--r--Tests/CMakeTests/ImplicitLinkInfoTest.cmake.in114
-rw-r--r--Tests/CMakeTests/List-Get-CMP0007-Warn.cmake6
-rw-r--r--Tests/CMakeTests/List-Get-Invalid-Index.cmake2
-rw-r--r--Tests/CMakeTests/List-Insert-Invalid-Index.cmake2
-rw-r--r--Tests/CMakeTests/List-Invalid-Subcommand.cmake1
-rw-r--r--Tests/CMakeTests/List-Length-Too-Many-Arguments.cmake1
-rw-r--r--Tests/CMakeTests/List-No-Arguments.cmake1
-rw-r--r--Tests/CMakeTests/List-Remove_At-Invalid-Index.cmake2
-rw-r--r--Tests/CMakeTests/List-Remove_At-Nonexistent-List.cmake2
-rw-r--r--Tests/CMakeTests/List-Remove_Duplicates-Nonexistent-List.cmake2
-rw-r--r--Tests/CMakeTests/List-Remove_Duplicates-Too-Many-Arguments.cmake1
-rw-r--r--Tests/CMakeTests/List-Remove_Item-Nonexistent-List.cmake2
-rw-r--r--Tests/CMakeTests/List-Reverse-Nonexistent-List.cmake2
-rw-r--r--Tests/CMakeTests/List-Reverse-Too-Many-Arguments.cmake1
-rw-r--r--Tests/CMakeTests/List-Sort-Nonexistent-List.cmake2
-rw-r--r--Tests/CMakeTests/List-Sort-Too-Many-Arguments.cmake1
-rw-r--r--Tests/CMakeTests/ListTest.cmake.in91
-rw-r--r--Tests/CMakeTests/Make_Directory-NoArg.cmake1
-rw-r--r--Tests/CMakeTests/ProcessorCountTest.cmake.in11
-rw-r--r--Tests/CMakeTests/String-TIMESTAMP-AllSpecifiers.cmake11
-rw-r--r--Tests/CMakeTests/String-TIMESTAMP-BadArg1.cmake1
-rw-r--r--Tests/CMakeTests/String-TIMESTAMP-BadArg2.cmake1
-rw-r--r--Tests/CMakeTests/String-TIMESTAMP-BadArg3.cmake1
-rw-r--r--Tests/CMakeTests/String-TIMESTAMP-CustomFormatLocal.cmake2
-rw-r--r--Tests/CMakeTests/String-TIMESTAMP-CustomFormatUTC.cmake2
-rw-r--r--Tests/CMakeTests/String-TIMESTAMP-DefaultFormatLocal.cmake2
-rw-r--r--Tests/CMakeTests/String-TIMESTAMP-DefaultFormatUTC.cmake2
-rw-r--r--Tests/CMakeTests/String-TIMESTAMP-IncompleteSpecifier.cmake2
-rw-r--r--Tests/CMakeTests/String-TIMESTAMP-UnknownSpecifier.cmake2
-rw-r--r--Tests/CMakeTests/StringTest.cmake.in30
-rw-r--r--Tests/CMakeTests/WhileTest.cmake.in14
-rw-r--r--Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake11
-rw-r--r--Tests/CPackTestAllGenerators/RunCPack.cmake8
-rw-r--r--Tests/CPackWiXGenerator/CMakeLists.txt73
-rw-r--r--Tests/CPackWiXGenerator/RunCPackVerifyResult.cmake72
-rw-r--r--Tests/CPackWiXGenerator/file with spaces.h0
-rw-r--r--Tests/CPackWiXGenerator/mylib.cpp7
-rw-r--r--Tests/CPackWiXGenerator/mylib.h1
-rw-r--r--Tests/CPackWiXGenerator/mylibapp.cpp6
-rw-r--r--Tests/CTestConfig/dashboard.cmake.in5
-rw-r--r--Tests/CTestConfig/script.cmake.in1
-rw-r--r--Tests/CTestLimitDashJ/CMakeLists.txt50
-rw-r--r--Tests/CTestLimitDashJ/CreateSleepDelete.cmake48
-rw-r--r--Tests/CTestTest/test.cmake.in1
-rw-r--r--Tests/CTestTest2/test.cmake.in1
-rw-r--r--Tests/CTestTestBadExe/test.cmake.in1
-rw-r--r--Tests/CTestTestChecksum/test.cmake.in1
-rw-r--r--Tests/CTestTestConfigFileInBuildDir/test1.cmake.in1
-rw-r--r--Tests/CTestTestConfigFileInBuildDir/test2.cmake.in1
-rw-r--r--Tests/CTestTestCostSerial/test.cmake.in1
-rw-r--r--Tests/CTestTestCrash/test.cmake.in1
-rw-r--r--Tests/CTestTestCycle/test.cmake.in1
-rw-r--r--Tests/CTestTestDepends/test.cmake.in1
-rw-r--r--Tests/CTestTestFailedSubmits/test.cmake.in1
-rw-r--r--Tests/CTestTestFailure/testNoBuild.cmake.in1
-rw-r--r--Tests/CTestTestFailure/testNoExe.cmake.in1
-rw-r--r--Tests/CTestTestMemcheck/CMakeLists.txt10
-rw-r--r--Tests/CTestTestMemcheck/DummyBC/test.cmake.in1
-rw-r--r--Tests/CTestTestMemcheck/DummyPurify/test.cmake.in1
-rw-r--r--Tests/CTestTestMemcheck/DummyValgrind/test.cmake.in1
-rw-r--r--Tests/CTestTestMemcheck/DummyValgrindFailPost/test.cmake.in1
-rw-r--r--Tests/CTestTestMemcheck/DummyValgrindFailPre/test.cmake.in1
-rw-r--r--Tests/CTestTestMemcheck/DummyValgrindIgnoreMemcheck/test.cmake.in1
-rw-r--r--Tests/CTestTestMemcheck/DummyValgrindPrePost/test.cmake.in1
-rw-r--r--Tests/CTestTestMemcheck/NotExist/test.cmake.in1
-rw-r--r--Tests/CTestTestMemcheck/Unknown/test.cmake.in1
-rw-r--r--Tests/CTestTestMemcheck/UnknownQuoted/test.cmake.in1
-rw-r--r--Tests/CTestTestParallel/test.cmake.in1
-rw-r--r--Tests/CTestTestResourceLock/test.cmake.in1
-rw-r--r--Tests/CTestTestScheduler/test.cmake.in1
-rw-r--r--Tests/CTestTestStopTime/test.cmake.in1
-rw-r--r--Tests/CTestTestSubdir/test.cmake.in1
-rw-r--r--Tests/CTestTestTimeout/test.cmake.in1
-rw-r--r--Tests/CTestTestUpload/test.cmake.in1
-rw-r--r--Tests/CTestTestZeroTimeout/test.cmake.in1
-rw-r--r--Tests/CTestUpdateGIT.cmake.in10
-rw-r--r--Tests/CheckCompilerRelatedVariables/CMakeLists.txt4
-rw-r--r--Tests/CompatibleInterface/CMakeLists.txt84
-rw-r--r--Tests/CompatibleInterface/empty.cpp1
-rw-r--r--Tests/CompatibleInterface/iface2.cpp7
-rw-r--r--Tests/CompatibleInterface/iface2.h13
-rw-r--r--Tests/CompatibleInterface/main.cpp32
-rw-r--r--Tests/CompileDefinitions/CMakeLists.txt15
-rw-r--r--Tests/CompileDefinitions/add_definitions_command/CMakeLists.txt1
-rw-r--r--Tests/CompileDefinitions/add_definitions_command_with_target_prop/CMakeLists.txt3
-rw-r--r--Tests/CompileDefinitions/compiletest.cpp24
-rw-r--r--Tests/CompileDefinitions/runtest.c47
-rw-r--r--Tests/CompileDefinitions/target_prop/CMakeLists.txt5
-rw-r--r--Tests/Complex/Executable/CMakeLists.txt2
-rw-r--r--Tests/EmptyDepends/CMakeLists.txt15
-rw-r--r--Tests/ExportImport/CMakeLists.txt8
-rw-r--r--Tests/ExportImport/Export/CMakeLists.txt177
-rw-r--r--Tests/ExportImport/Export/sublib/CMakeLists.txt6
-rw-r--r--Tests/ExportImport/Export/sublib/subdir.cpp7
-rw-r--r--Tests/ExportImport/Export/sublib/subdir.h12
-rw-r--r--Tests/ExportImport/Export/testLibDepends.c16
-rw-r--r--Tests/ExportImport/Export/testSharedLibDepends.cpp8
-rw-r--r--Tests/ExportImport/Export/testSharedLibDepends.h14
-rw-r--r--Tests/ExportImport/Export/testSharedLibRequired.cpp7
-rw-r--r--Tests/ExportImport/Export/testSharedLibRequired.h12
-rw-r--r--Tests/ExportImport/Import/A/CMakeLists.txt51
-rw-r--r--Tests/ExportImport/Import/A/deps_iface.c24
-rw-r--r--Tests/ExportImport/Import/A/deps_shared_iface.cpp41
-rw-r--r--Tests/ExportImport/Import/CMakeLists.txt2
-rw-r--r--Tests/ExportImport/Import/try_compile/CMakeLists.txt21
-rw-r--r--Tests/ExternalProject/CMakeLists.txt15
-rw-r--r--Tests/ExternalProjectUpdate/CMakeLists.txt94
-rw-r--r--Tests/ExternalProjectUpdate/ExternalProjectUpdateTest.cmake94
-rw-r--r--Tests/ExternalProjectUpdate/gitrepo.tgzbin0 -> 3057 bytes
-rw-r--r--Tests/FindPackageTest/CMakeLists.txt10
-rw-r--r--Tests/FindPackageTest/FindSomePackage.cmake6
-rw-r--r--Tests/FindPackageTest/FindUpperCasePackage.cmake6
-rw-r--r--Tests/Fortran/CMakeLists.txt4
-rw-r--r--Tests/FortranC/Flags.cmake.in1
-rw-r--r--Tests/GeneratorExpression/CMakeLists.txt54
-rw-r--r--Tests/GeneratorExpression/check-common.cmake5
-rw-r--r--Tests/GeneratorExpression/check-part1.cmake (renamed from Tests/GeneratorExpression/check.cmake)32
-rw-r--r--Tests/GeneratorExpression/check-part2.cmake36
-rw-r--r--Tests/GeneratorExpression/empty.cpp2
-rw-r--r--Tests/IncludeDirectories/CMakeLists.txt22
-rw-r--r--Tests/IncludeDirectories/TargetIncludeDirectories/CMakeLists.txt102
-rw-r--r--Tests/IncludeDirectories/TargetIncludeDirectories/copy_includes.cpp7
-rw-r--r--Tests/IncludeDirectories/TargetIncludeDirectories/empty.cpp7
-rw-r--r--Tests/IncludeDirectories/TargetIncludeDirectories/other.cpp6
-rw-r--r--Tests/IncludeDirectories/empty.cpp4
-rw-r--r--Tests/Module/ExternalData/CMakeLists.txt44
-rw-r--r--Tests/Module/ExternalData/Data Space.dat.md51
-rw-r--r--Tests/Module/ExternalData/Data.dat.md51
-rw-r--r--Tests/Module/ExternalData/Data1Check.cmake68
-rw-r--r--Tests/Module/ExternalData/Data2.dat.md51
-rw-r--r--Tests/Module/ExternalData/Data2/CMakeLists.txt11
-rw-r--r--Tests/Module/ExternalData/Data2/Data2Check.cmake12
-rw-r--r--Tests/Module/ExternalData/Data2/SeriesC_1_.my.dat.md51
-rw-r--r--Tests/Module/ExternalData/Data2/SeriesC_2_.my.dat.md51
-rw-r--r--Tests/Module/ExternalData/Data2/SeriesC_3_.my.dat.md51
-rw-r--r--Tests/Module/ExternalData/Data2b.dat.md51
-rw-r--r--Tests/Module/ExternalData/Data3/CMakeLists.txt14
-rw-r--r--Tests/Module/ExternalData/Data3/Data.dat.md51
-rw-r--r--Tests/Module/ExternalData/Data3/Data3Check.cmake25
-rw-r--r--Tests/Module/ExternalData/Data3/Other.dat.md51
-rw-r--r--Tests/Module/ExternalData/Directory/A.dat.md51
-rw-r--r--Tests/Module/ExternalData/Directory/B.dat.md51
-rw-r--r--Tests/Module/ExternalData/Directory/C.dat.md51
-rw-r--r--Tests/Module/ExternalData/MD5/.gitattributes1
-rw-r--r--Tests/Module/ExternalData/MD5/08cfcf221f76ace7b906b312284e73d71
-rw-r--r--Tests/Module/ExternalData/MD5/30ba0acdee9096b3b9fc6c69362c6b421
-rw-r--r--Tests/Module/ExternalData/MD5/31eff09e84fca01415f8cd9d82ec432b1
-rw-r--r--Tests/Module/ExternalData/MD5/401767f22a456b3522953722090a2c361
-rw-r--r--Tests/Module/ExternalData/MD5/8c018830e3efa5caf3c7415028335a571
-rw-r--r--Tests/Module/ExternalData/MD5/8f4add4581551facf27237e6577fd6621
-rw-r--r--Tests/Module/ExternalData/MD5/9d980b06c2f0fec3d4872d68175b98221
-rw-r--r--Tests/Module/ExternalData/MD5/aaad162b85f60d1eb57ca71a23e8efd71
-rw-r--r--Tests/Module/ExternalData/MD5/c1030719c95f3435d8abc39c0d4429461
-rw-r--r--Tests/Module/ExternalData/MD5/ce38ea6c3c1e00fa6405dd64b8bf6da01
-rw-r--r--Tests/Module/ExternalData/MD5/ecfa1ecd417d4253af81ae04d1bd65811
-rw-r--r--Tests/Module/ExternalData/MD5/f41c94425d01ecbbee70440b951cb0581
-rw-r--r--Tests/Module/ExternalData/MD5/f7ab5a04aae9cb9a520e70b20b9c8ed71
-rw-r--r--Tests/Module/ExternalData/MetaA.dat.md51
-rw-r--r--Tests/Module/ExternalData/MetaB.dat.md51
-rw-r--r--Tests/Module/ExternalData/MetaC.dat.md51
-rw-r--r--Tests/Module/ExternalData/MetaTop.dat.md51
-rw-r--r--Tests/Module/ExternalData/PairedA.dat.md51
-rw-r--r--Tests/Module/ExternalData/PairedB.dat.md51
-rw-r--r--Tests/Module/ExternalData/SHA1/.gitattributes1
-rw-r--r--Tests/Module/ExternalData/SHA1/2af59a7022024974f3b8521b7ed8137c996a79f11
-rw-r--r--Tests/Module/ExternalData/SHA224/.gitattributes1
-rw-r--r--Tests/Module/ExternalData/SHA224/3b679da7908562fe1cc28db47ffb89bae025f4551dceb343a58691741
-rw-r--r--Tests/Module/ExternalData/SHA256/.gitattributes1
-rw-r--r--Tests/Module/ExternalData/SHA256/969171a0dd70d49ce096bd3e8178c7e26c711c9b20dbcaa3853d869d3871f1331
-rw-r--r--Tests/Module/ExternalData/SeriesA.dat.md51
-rw-r--r--Tests/Module/ExternalData/SeriesA1.dat.md51
-rw-r--r--Tests/Module/ExternalData/SeriesA2.dat.md51
-rw-r--r--Tests/Module/ExternalData/SeriesA3.dat.md51
-rw-r--r--Tests/Module/ExternalData/SeriesAn1.dat.md51
-rw-r--r--Tests/Module/ExternalData/SeriesAn2.dat.md51
-rw-r--r--Tests/Module/ExternalData/SeriesAn3.dat.md51
-rw-r--r--Tests/Module/ExternalData/SeriesB.dat.md51
-rw-r--r--Tests/Module/ExternalData/SeriesB_1.dat.md51
-rw-r--r--Tests/Module/ExternalData/SeriesB_2.dat.md51
-rw-r--r--Tests/Module/ExternalData/SeriesB_3.dat.md51
-rw-r--r--Tests/Module/ExternalData/SeriesBn_1.dat.md51
-rw-r--r--Tests/Module/ExternalData/SeriesBn_2.dat.md51
-rw-r--r--Tests/Module/ExternalData/SeriesBn_3.dat.md51
-rw-r--r--Tests/Module/ExternalData/SeriesC.1.dat.md51
-rw-r--r--Tests/Module/ExternalData/SeriesC.2.dat.md51
-rw-r--r--Tests/Module/ExternalData/SeriesC.3.dat.md51
-rw-r--r--Tests/Module/ExternalData/SeriesC.dat.md51
-rw-r--r--Tests/Module/ExternalData/SeriesCn.1.dat.md51
-rw-r--r--Tests/Module/ExternalData/SeriesCn.2.dat.md51
-rw-r--r--Tests/Module/ExternalData/SeriesCn.3.dat.md51
-rw-r--r--Tests/Module/ExternalData/SeriesD-1.dat.md51
-rw-r--r--Tests/Module/ExternalData/SeriesD-2.dat.md51
-rw-r--r--Tests/Module/ExternalData/SeriesD-3.dat.md51
-rw-r--r--Tests/Module/ExternalData/SeriesD.dat.md51
-rw-r--r--Tests/Module/ExternalData/SeriesDn-1.dat.md51
-rw-r--r--Tests/Module/ExternalData/SeriesDn-2.dat.md51
-rw-r--r--Tests/Module/ExternalData/SeriesDn-3.dat.md51
-rw-r--r--Tests/Module/ExternalData/SeriesMixed.1.dat.md51
-rw-r--r--Tests/Module/ExternalData/SeriesMixed.2.dat.sha11
-rw-r--r--Tests/Module/ExternalData/SeriesMixed.3.dat.sha2241
-rw-r--r--Tests/Module/ExternalData/SeriesMixed.4.dat.sha2561
-rw-r--r--Tests/ObjectLibrary/A/CMakeLists.txt2
-rw-r--r--Tests/ObjectLibrary/B/CMakeLists.txt6
-rw-r--r--Tests/ObjectLibrary/B/b.h7
-rw-r--r--Tests/ObjectLibrary/CMakeLists.txt8
-rw-r--r--Tests/ObjectLibrary/mainAB.c8
-rw-r--r--Tests/Preprocess/CMakeLists.txt6
-rw-r--r--Tests/Qt4Targets/CMakeLists.txt21
-rw-r--r--Tests/Qt4Targets/activeqtexe.cpp36
-rw-r--r--Tests/Qt4Targets/main.cpp24
-rw-r--r--Tests/QtAutomoc/Adir/CMakeLists.txt8
-rw-r--r--Tests/QtAutomoc/Adir/libA.cpp13
-rw-r--r--Tests/QtAutomoc/Adir/libA.h18
-rw-r--r--Tests/QtAutomoc/Bdir/CMakeLists.txt10
-rw-r--r--Tests/QtAutomoc/Bdir/libB.cpp13
-rw-r--r--Tests/QtAutomoc/Bdir/libB.h21
-rw-r--r--Tests/QtAutomoc/CMakeLists.txt35
-rw-r--r--Tests/QtAutomoc/empty.cpp1
-rw-r--r--Tests/QtAutomoc/empty.h9
-rw-r--r--Tests/QtAutomoc/libC.cpp13
-rw-r--r--Tests/QtAutomoc/libC.h22
-rw-r--r--Tests/QtAutomoc/main.cpp4
-rw-r--r--Tests/QtAutomocNoQt/CMakeLists.txt7
-rw-r--r--Tests/QtAutomocNoQt/main.c4
-rw-r--r--Tests/RegexEscapeString.cmake4
-rw-r--r--Tests/RunCMake/CMP0004/CMP0004-NEW-result.txt1
-rw-r--r--Tests/RunCMake/CMP0004/CMP0004-NEW-stderr.txt2
-rw-r--r--Tests/RunCMake/CMP0004/CMP0004-NEW.cmake9
-rw-r--r--Tests/RunCMake/CMP0004/CMP0004-OLD-result.txt1
-rw-r--r--Tests/RunCMake/CMP0004/CMP0004-OLD-stderr.txt2
-rw-r--r--Tests/RunCMake/CMP0004/CMP0004-OLD.cmake21
-rw-r--r--Tests/RunCMake/CMP0004/CMP0004-WARN-stderr.txt0
-rw-r--r--Tests/RunCMake/CMP0004/CMP0004-policy-genex-result.txt1
-rw-r--r--Tests/RunCMake/CMP0004/CMP0004-policy-genex-stderr.txt2
-rw-r--r--Tests/RunCMake/CMP0004/CMP0004-policy-genex.cmake14
-rw-r--r--Tests/RunCMake/CMP0004/CMakeLists.txt3
-rw-r--r--Tests/RunCMake/CMP0004/RunCMakeTest.cmake5
-rw-r--r--Tests/RunCMake/CMP0004/empty.cpp0
-rw-r--r--Tests/RunCMake/CMP0019/CMP0019-NEW.cmake2
-rw-r--r--Tests/RunCMake/CMP0019/CMP0019-OLD.cmake2
-rw-r--r--Tests/RunCMake/CMP0019/CMP0019-WARN-stderr.txt40
-rw-r--r--Tests/RunCMake/CMP0019/CMP0019-WARN.cmake1
-rw-r--r--Tests/RunCMake/CMP0019/CMP0019-code.cmake9
-rw-r--r--Tests/RunCMake/CMP0019/CMakeLists.txt3
-rw-r--r--Tests/RunCMake/CMP0019/RunCMakeTest.cmake5
-rw-r--r--Tests/RunCMake/CMakeLists.txt27
-rw-r--r--Tests/RunCMake/CTest/BeforeProject-result.txt1
-rw-r--r--Tests/RunCMake/CTest/BeforeProject-stderr.txt6
-rw-r--r--Tests/RunCMake/CTest/BeforeProject.cmake2
-rw-r--r--Tests/RunCMake/CTest/CMakeLists.txt5
-rw-r--r--Tests/RunCMake/CTest/RunCMakeTest.cmake5
-rw-r--r--Tests/RunCMake/CompatibleInterface/CMakeLists.txt3
-rw-r--r--Tests/RunCMake/CompatibleInterface/InterfaceBool-builtin-prop-result.txt1
-rw-r--r--Tests/RunCMake/CompatibleInterface/InterfaceBool-builtin-prop-stderr.txt5
-rw-r--r--Tests/RunCMake/CompatibleInterface/InterfaceBool-builtin-prop.cmake11
-rw-r--r--Tests/RunCMake/CompatibleInterface/InterfaceBool-mismatch-depend-self-result.txt1
-rw-r--r--Tests/RunCMake/CompatibleInterface/InterfaceBool-mismatch-depend-self-stderr.txt3
-rw-r--r--Tests/RunCMake/CompatibleInterface/InterfaceBool-mismatch-depend-self.cmake11
-rw-r--r--Tests/RunCMake/CompatibleInterface/InterfaceBool-mismatch-depends-result.txt1
-rw-r--r--Tests/RunCMake/CompatibleInterface/InterfaceBool-mismatch-depends-stderr.txt3
-rw-r--r--Tests/RunCMake/CompatibleInterface/InterfaceBool-mismatch-depends.cmake10
-rw-r--r--Tests/RunCMake/CompatibleInterface/InterfaceBool-mismatched-use-result.txt1
-rw-r--r--Tests/RunCMake/CompatibleInterface/InterfaceBool-mismatched-use-stderr.txt4
-rw-r--r--Tests/RunCMake/CompatibleInterface/InterfaceBool-mismatched-use.cmake9
-rw-r--r--Tests/RunCMake/CompatibleInterface/InterfaceString-Bool-Conflict-result.txt1
-rw-r--r--Tests/RunCMake/CompatibleInterface/InterfaceString-Bool-Conflict-stderr.txt5
-rw-r--r--Tests/RunCMake/CompatibleInterface/InterfaceString-Bool-Conflict.cmake9
-rw-r--r--Tests/RunCMake/CompatibleInterface/InterfaceString-builtin-prop-result.txt1
-rw-r--r--Tests/RunCMake/CompatibleInterface/InterfaceString-builtin-prop-stderr.txt5
-rw-r--r--Tests/RunCMake/CompatibleInterface/InterfaceString-builtin-prop.cmake9
-rw-r--r--Tests/RunCMake/CompatibleInterface/InterfaceString-mismatch-depend-self-result.txt1
-rw-r--r--Tests/RunCMake/CompatibleInterface/InterfaceString-mismatch-depend-self-stderr.txt3
-rw-r--r--Tests/RunCMake/CompatibleInterface/InterfaceString-mismatch-depend-self.cmake11
-rw-r--r--Tests/RunCMake/CompatibleInterface/InterfaceString-mismatch-depends-result.txt1
-rw-r--r--Tests/RunCMake/CompatibleInterface/InterfaceString-mismatch-depends-stderr.txt3
-rw-r--r--Tests/RunCMake/CompatibleInterface/InterfaceString-mismatch-depends.cmake10
-rw-r--r--Tests/RunCMake/CompatibleInterface/InterfaceString-mismatched-use-result.txt1
-rw-r--r--Tests/RunCMake/CompatibleInterface/InterfaceString-mismatched-use-stderr.txt4
-rw-r--r--Tests/RunCMake/CompatibleInterface/InterfaceString-mismatched-use.cmake9
-rw-r--r--Tests/RunCMake/CompatibleInterface/RunCMakeTest.cmake11
-rw-r--r--Tests/RunCMake/CompatibleInterface/main.cpp5
-rw-r--r--Tests/RunCMake/CompilerChange/CMakeLists.txt6
-rw-r--r--Tests/RunCMake/CompilerChange/EmptyCompiler-result.txt1
-rw-r--r--Tests/RunCMake/CompilerChange/EmptyCompiler-stderr.txt5
-rw-r--r--Tests/RunCMake/CompilerChange/EmptyCompiler.cmake3
-rw-r--r--Tests/RunCMake/CompilerChange/FindCompiler.cmake2
-rw-r--r--Tests/RunCMake/CompilerChange/FirstCompiler-stdout.txt1
-rw-r--r--Tests/RunCMake/CompilerChange/FirstCompiler.cmake3
-rw-r--r--Tests/RunCMake/CompilerChange/RunCMakeTest.cmake58
-rw-r--r--Tests/RunCMake/CompilerChange/SecondCompiler-stderr.txt4
-rw-r--r--Tests/RunCMake/CompilerChange/SecondCompiler-stdout.txt1
-rw-r--r--Tests/RunCMake/CompilerChange/SecondCompiler.cmake3
-rwxr-xr-xTests/RunCMake/CompilerChange/cc.sh.in2
-rw-r--r--Tests/RunCMake/ExternalData/BadHashAlgo1-result.txt1
-rw-r--r--Tests/RunCMake/ExternalData/BadHashAlgo1-stderr.txt8
-rw-r--r--Tests/RunCMake/ExternalData/BadHashAlgo1.cmake3
-rw-r--r--Tests/RunCMake/ExternalData/BadHashAlgo1.txt1
-rw-r--r--Tests/RunCMake/ExternalData/BadOption1-result.txt1
-rw-r--r--Tests/RunCMake/ExternalData/BadOption1-stderr.txt9
-rw-r--r--Tests/RunCMake/ExternalData/BadOption1.cmake5
-rw-r--r--Tests/RunCMake/ExternalData/BadOption2-result.txt1
-rw-r--r--Tests/RunCMake/ExternalData/BadOption2-stderr.txt9
-rw-r--r--Tests/RunCMake/ExternalData/BadOption2.cmake5
-rw-r--r--Tests/RunCMake/ExternalData/BadSeries1-result.txt1
-rw-r--r--Tests/RunCMake/ExternalData/BadSeries1-stderr.txt19
-rw-r--r--Tests/RunCMake/ExternalData/BadSeries1.cmake3
-rw-r--r--Tests/RunCMake/ExternalData/BadSeries2-result.txt1
-rw-r--r--Tests/RunCMake/ExternalData/BadSeries2-stderr.txt16
-rw-r--r--Tests/RunCMake/ExternalData/BadSeries2.cmake3
-rw-r--r--Tests/RunCMake/ExternalData/BadSeries3-result.txt1
-rw-r--r--Tests/RunCMake/ExternalData/BadSeries3-stderr.txt6
-rw-r--r--Tests/RunCMake/ExternalData/BadSeries3.cmake2
-rw-r--r--Tests/RunCMake/ExternalData/CMakeLists.txt3
-rw-r--r--Tests/RunCMake/ExternalData/Data.txt.md51
-rw-r--r--Tests/RunCMake/ExternalData/Directory1-result.txt1
-rw-r--r--Tests/RunCMake/ExternalData/Directory1-stderr.txt14
-rw-r--r--Tests/RunCMake/ExternalData/Directory1.cmake6
-rw-r--r--Tests/RunCMake/ExternalData/Directory1/DirData1.txt0
-rw-r--r--Tests/RunCMake/ExternalData/Directory2-result.txt1
-rw-r--r--Tests/RunCMake/ExternalData/Directory2-stderr.txt10
-rw-r--r--Tests/RunCMake/ExternalData/Directory2.cmake6
-rw-r--r--Tests/RunCMake/ExternalData/Directory2.md51
-rw-r--r--Tests/RunCMake/ExternalData/Directory2/DirData2.txt0
-rw-r--r--Tests/RunCMake/ExternalData/Directory3-result.txt1
-rw-r--r--Tests/RunCMake/ExternalData/Directory3-stderr.txt14
-rw-r--r--Tests/RunCMake/ExternalData/Directory3.cmake6
-rw-r--r--Tests/RunCMake/ExternalData/Directory3/DirData3.txt0
-rw-r--r--Tests/RunCMake/ExternalData/Directory4-result.txt1
-rw-r--r--Tests/RunCMake/ExternalData/Directory4-stderr.txt6
-rw-r--r--Tests/RunCMake/ExternalData/Directory4.cmake6
-rw-r--r--Tests/RunCMake/ExternalData/Directory4/DirData4.txt0
-rw-r--r--Tests/RunCMake/ExternalData/Directory5-result.txt1
-rw-r--r--Tests/RunCMake/ExternalData/Directory5-stderr.txt14
-rw-r--r--Tests/RunCMake/ExternalData/Directory5.cmake6
-rw-r--r--Tests/RunCMake/ExternalData/LinkContentMD5-stdout.txt3
-rw-r--r--Tests/RunCMake/ExternalData/LinkContentMD5.cmake22
-rw-r--r--Tests/RunCMake/ExternalData/LinkContentSHA1-stdout.txt3
-rw-r--r--Tests/RunCMake/ExternalData/LinkContentSHA1.cmake22
-rw-r--r--Tests/RunCMake/ExternalData/LinkDirectory1-stdout.txt5
-rw-r--r--Tests/RunCMake/ExternalData/LinkDirectory1.cmake37
-rw-r--r--Tests/RunCMake/ExternalData/MissingData-result.txt1
-rw-r--r--Tests/RunCMake/ExternalData/MissingData-stderr.txt14
-rw-r--r--Tests/RunCMake/ExternalData/MissingData.cmake5
-rw-r--r--Tests/RunCMake/ExternalData/NoLinkInSource-stderr.txt6
-rw-r--r--Tests/RunCMake/ExternalData/NoLinkInSource-stdout.txt1
-rw-r--r--Tests/RunCMake/ExternalData/NoLinkInSource.cmake14
-rw-r--r--Tests/RunCMake/ExternalData/NoURLTemplates-result.txt1
-rw-r--r--Tests/RunCMake/ExternalData/NoURLTemplates-stderr.txt5
-rw-r--r--Tests/RunCMake/ExternalData/NoURLTemplates.cmake2
-rw-r--r--Tests/RunCMake/ExternalData/NormalData1-stdout.txt1
-rw-r--r--Tests/RunCMake/ExternalData/NormalData1.cmake13
-rw-r--r--Tests/RunCMake/ExternalData/NormalData2-stdout.txt1
-rw-r--r--Tests/RunCMake/ExternalData/NormalData2.cmake14
-rw-r--r--Tests/RunCMake/ExternalData/NormalData3-stdout.txt1
-rw-r--r--Tests/RunCMake/ExternalData/NormalData3.cmake14
-rw-r--r--Tests/RunCMake/ExternalData/NormalDataSub1-stdout.txt1
-rw-r--r--Tests/RunCMake/ExternalData/NormalDataSub1.cmake13
-rw-r--r--Tests/RunCMake/ExternalData/NotUnderRoot-result.txt1
-rw-r--r--Tests/RunCMake/ExternalData/NotUnderRoot-stderr.txt12
-rw-r--r--Tests/RunCMake/ExternalData/NotUnderRoot.cmake5
-rw-r--r--Tests/RunCMake/ExternalData/RunCMakeTest.cmake28
-rw-r--r--Tests/RunCMake/ExternalData/Semicolon1-stdout.txt1
-rw-r--r--Tests/RunCMake/ExternalData/Semicolon1.cmake14
-rw-r--r--Tests/RunCMake/ExternalData/Semicolon2-stdout.txt1
-rw-r--r--Tests/RunCMake/ExternalData/Semicolon2.cmake14
-rw-r--r--Tests/RunCMake/ExternalData/Semicolon3-stdout.txt1
-rw-r--r--Tests/RunCMake/ExternalData/Semicolon3.cmake12
-rw-r--r--Tests/RunCMake/ExternalData/SubDirectory1-stdout.txt3
-rw-r--r--Tests/RunCMake/ExternalData/SubDirectory1.cmake5
-rw-r--r--Tests/RunCMake/ExternalData/SubDirectory1/CMakeLists.txt29
-rw-r--r--Tests/RunCMake/ExternalData/SubDirectory1/Data.txt.md51
-rw-r--r--Tests/RunCMake/FPHSA/BadFoundVar-result.txt1
-rw-r--r--Tests/RunCMake/FPHSA/BadFoundVar-stderr.txt7
-rw-r--r--Tests/RunCMake/FPHSA/BadFoundVar.cmake3
-rw-r--r--Tests/RunCMake/FPHSA/CMakeLists.txt3
-rw-r--r--Tests/RunCMake/FPHSA/FindBadFoundVar.cmake6
-rw-r--r--Tests/RunCMake/FPHSA/RunCMakeTest.cmake3
-rw-r--r--Tests/RunCMake/GeneratorExpression/BadAND-stderr.txt9
-rw-r--r--Tests/RunCMake/GeneratorExpression/BadAND.cmake1
-rw-r--r--Tests/RunCMake/GeneratorExpression/BadInstallPrefix-result.txt1
-rw-r--r--Tests/RunCMake/GeneratorExpression/BadInstallPrefix-stderr.txt9
-rw-r--r--Tests/RunCMake/GeneratorExpression/BadInstallPrefix.cmake3
-rw-r--r--Tests/RunCMake/GeneratorExpression/BadOR-stderr.txt9
-rw-r--r--Tests/RunCMake/GeneratorExpression/BadOR.cmake1
-rw-r--r--Tests/RunCMake/GeneratorExpression/BadTargetName-result.txt1
-rw-r--r--Tests/RunCMake/GeneratorExpression/BadTargetName-stderr.txt8
-rw-r--r--Tests/RunCMake/GeneratorExpression/BadTargetName.cmake3
-rw-r--r--Tests/RunCMake/GeneratorExpression/BadZero-result.txt1
-rw-r--r--Tests/RunCMake/GeneratorExpression/BadZero-stderr.txt17
-rw-r--r--Tests/RunCMake/GeneratorExpression/BadZero.cmake5
-rw-r--r--Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake3
-rw-r--r--Tests/RunCMake/GeneratorToolset/BadToolset-result.txt1
-rw-r--r--Tests/RunCMake/GeneratorToolset/BadToolset-stderr.txt10
-rw-r--r--Tests/RunCMake/GeneratorToolset/BadToolset.cmake1
-rw-r--r--Tests/RunCMake/GeneratorToolset/CMakeLists.txt3
-rw-r--r--Tests/RunCMake/GeneratorToolset/NoToolset-result.txt1
-rw-r--r--Tests/RunCMake/GeneratorToolset/NoToolset-stderr.txt4
-rw-r--r--Tests/RunCMake/GeneratorToolset/NoToolset.cmake7
-rw-r--r--Tests/RunCMake/GeneratorToolset/RunCMakeTest.cmake17
-rw-r--r--Tests/RunCMake/GeneratorToolset/TestToolset-result.txt1
-rw-r--r--Tests/RunCMake/GeneratorToolset/TestToolset-stderr.txt4
-rw-r--r--Tests/RunCMake/GeneratorToolset/TestToolset.cmake7
-rw-r--r--Tests/RunCMake/GeneratorToolset/TwoToolsets-result.txt1
-rw-r--r--Tests/RunCMake/GeneratorToolset/TwoToolsets-stderr.txt1
-rw-r--r--Tests/RunCMake/GeneratorToolset/TwoToolsets.cmake1
-rw-r--r--Tests/RunCMake/IncompatibleQt/CMakeLists.txt3
-rw-r--r--Tests/RunCMake/IncompatibleQt/IncompatibleQt-result.txt1
-rw-r--r--Tests/RunCMake/IncompatibleQt/IncompatibleQt-stderr.txt3
-rw-r--r--Tests/RunCMake/IncompatibleQt/IncompatibleQt.cmake6
-rw-r--r--Tests/RunCMake/IncompatibleQt/RunCMakeTest.cmake3
-rw-r--r--Tests/RunCMake/IncompatibleQt/main.cpp8
-rw-r--r--Tests/RunCMake/PositionIndependentCode/CMakeLists.txt8
-rw-r--r--Tests/RunCMake/PositionIndependentCode/Conflict1-result.txt1
-rw-r--r--Tests/RunCMake/PositionIndependentCode/Conflict1-stderr.txt3
-rw-r--r--Tests/RunCMake/PositionIndependentCode/Conflict1.cmake7
-rw-r--r--Tests/RunCMake/PositionIndependentCode/Conflict2-result.txt1
-rw-r--r--Tests/RunCMake/PositionIndependentCode/Conflict2-stderr.txt3
-rw-r--r--Tests/RunCMake/PositionIndependentCode/Conflict2.cmake9
-rw-r--r--Tests/RunCMake/PositionIndependentCode/Conflict3-result.txt1
-rw-r--r--Tests/RunCMake/PositionIndependentCode/Conflict3-stderr.txt4
-rw-r--r--Tests/RunCMake/PositionIndependentCode/Conflict3.cmake12
-rw-r--r--Tests/RunCMake/PositionIndependentCode/RunCMakeTest.cmake5
-rw-r--r--Tests/RunCMake/PositionIndependentCode/main.cpp5
-rw-r--r--Tests/RunCMake/RunCMake.cmake16
-rw-r--r--Tests/RunCMake/SolutionGlobalSections/CMakeLists.txt3
-rw-r--r--Tests/RunCMake/SolutionGlobalSections/MorePost-check.cmake5
-rw-r--r--Tests/RunCMake/SolutionGlobalSections/MorePost.cmake2
-rw-r--r--Tests/RunCMake/SolutionGlobalSections/MorePre-check.cmake5
-rw-r--r--Tests/RunCMake/SolutionGlobalSections/MorePre.cmake2
-rw-r--r--Tests/RunCMake/SolutionGlobalSections/OnePost-check.cmake4
-rw-r--r--Tests/RunCMake/SolutionGlobalSections/OnePost.cmake1
-rw-r--r--Tests/RunCMake/SolutionGlobalSections/OnePre-check.cmake4
-rw-r--r--Tests/RunCMake/SolutionGlobalSections/OnePre.cmake1
-rw-r--r--Tests/RunCMake/SolutionGlobalSections/Override1-check.cmake4
-rw-r--r--Tests/RunCMake/SolutionGlobalSections/Override1.cmake2
-rw-r--r--Tests/RunCMake/SolutionGlobalSections/Override2-check.cmake4
-rw-r--r--Tests/RunCMake/SolutionGlobalSections/Override2.cmake2
-rw-r--r--Tests/RunCMake/SolutionGlobalSections/PrePost-check.cmake6
-rw-r--r--Tests/RunCMake/SolutionGlobalSections/PrePost.cmake4
-rw-r--r--Tests/RunCMake/SolutionGlobalSections/RunCMakeTest.cmake10
-rw-r--r--Tests/RunCMake/SolutionGlobalSections/solution_parsing.cmake60
-rw-r--r--Tests/RunCMake/TargetPropertyGeneratorExpressions/BadInvalidName1-stderr.txt4
-rw-r--r--Tests/RunCMake/TargetPropertyGeneratorExpressions/BadInvalidName2-stderr.txt6
-rw-r--r--Tests/RunCMake/TargetPropertyGeneratorExpressions/BadInvalidName3-stderr.txt6
-rw-r--r--Tests/RunCMake/TargetPropertyGeneratorExpressions/BadInvalidName4-stderr.txt6
-rw-r--r--Tests/RunCMake/TargetPropertyGeneratorExpressions/BadInvalidName5-stderr.txt4
-rw-r--r--Tests/RunCMake/TargetPropertyGeneratorExpressions/BadInvalidName6-stderr.txt4
-rw-r--r--Tests/RunCMake/TargetPropertyGeneratorExpressions/BadInvalidName7-stderr.txt4
-rw-r--r--Tests/RunCMake/TargetPropertyGeneratorExpressions/BadInvalidName8-stderr.txt4
-rw-r--r--Tests/RunCMake/TargetPropertyGeneratorExpressions/BadNonTarget-stderr.txt6
-rw-r--r--Tests/RunCMake/add_dependencies/CMakeLists.txt3
-rw-r--r--Tests/RunCMake/add_dependencies/NoTarget-result.txt1
-rw-r--r--Tests/RunCMake/add_dependencies/NoTarget-stderr.txt9
-rw-r--r--Tests/RunCMake/add_dependencies/NoTarget.cmake1
-rw-r--r--Tests/RunCMake/add_dependencies/RunCMakeTest.cmake3
-rw-r--r--Tests/RunCMake/build_command/BeforeProject-result.txt1
-rw-r--r--Tests/RunCMake/build_command/BeforeProject-stderr.txt5
-rw-r--r--Tests/RunCMake/build_command/BeforeProject.cmake2
-rw-r--r--Tests/RunCMake/build_command/CMakeLists.txt60
-rw-r--r--Tests/RunCMake/build_command/ErrorsCommon.cmake55
-rw-r--r--Tests/RunCMake/build_command/ErrorsOFF.cmake1
-rw-r--r--Tests/RunCMake/build_command/ErrorsON-stderr.txt15
-rw-r--r--Tests/RunCMake/build_command/ErrorsON.cmake1
-rw-r--r--Tests/RunCMake/build_command/RunCMakeTest.cmake4
-rw-r--r--Tests/RunCMake/include_directories/BinaryDirectoryInInterface-result.txt1
-rw-r--r--Tests/RunCMake/include_directories/BinaryDirectoryInInterface-stderr.txt6
-rw-r--r--Tests/RunCMake/include_directories/BinaryDirectoryInInterface.cmake11
-rw-r--r--Tests/RunCMake/include_directories/DebugIncludes-result.txt1
-rw-r--r--Tests/RunCMake/include_directories/DebugIncludes-stderr.txt44
-rw-r--r--Tests/RunCMake/include_directories/DebugIncludes.cmake47
-rw-r--r--Tests/RunCMake/include_directories/ImportedTarget-result.txt1
-rw-r--r--Tests/RunCMake/include_directories/ImportedTarget-stderr.txt13
-rw-r--r--Tests/RunCMake/include_directories/ImportedTarget.cmake9
-rw-r--r--Tests/RunCMake/include_directories/RelativePathInGenex-result.txt1
-rw-r--r--Tests/RunCMake/include_directories/RelativePathInGenex-stderr.txt5
-rw-r--r--Tests/RunCMake/include_directories/RelativePathInGenex.cmake8
-rw-r--r--Tests/RunCMake/include_directories/RelativePathInInterface-result.txt1
-rw-r--r--Tests/RunCMake/include_directories/RelativePathInInterface-stderr.txt5
-rw-r--r--Tests/RunCMake/include_directories/RelativePathInInterface.cmake11
-rw-r--r--Tests/RunCMake/include_directories/RunCMakeTest.cmake7
-rw-r--r--Tests/RunCMake/include_directories/SourceDirectoryInInterface-result.txt1
-rw-r--r--Tests/RunCMake/include_directories/SourceDirectoryInInterface-stderr.txt6
-rw-r--r--Tests/RunCMake/include_directories/SourceDirectoryInInterface.cmake11
-rw-r--r--Tests/RunCMake/include_directories/TID-bad-target-result.txt1
-rw-r--r--Tests/RunCMake/include_directories/TID-bad-target-stderr.txt4
-rw-r--r--Tests/RunCMake/include_directories/TID-bad-target.cmake6
-rw-r--r--Tests/RunCMake/include_directories/empty.cpp0
-rw-r--r--Tests/SystemInformation/SystemInformation.in2
-rw-r--r--Tests/VSExcludeFromDefaultBuild/CMakeLists.txt32
-rw-r--r--Tests/VSExcludeFromDefaultBuild/ClearExes.cmake4
-rw-r--r--Tests/VSExcludeFromDefaultBuild/ResultTest.cmake23
-rw-r--r--Tests/VSExcludeFromDefaultBuild/main.c4
-rw-r--r--Tests/VSExternalInclude/CMakeLists.txt20
-rw-r--r--Tests/VSExternalInclude/Lib1/CMakeLists.txt1
-rw-r--r--Tests/VSExternalInclude/Lib2/CMakeLists.txt1
-rwxr-xr-xUtilities/Git/pre-commit14
-rw-r--r--Utilities/KWIML/ABI.h.in16
-rw-r--r--Utilities/cmcurl/CMakeLists.txt2
-rw-r--r--Utilities/cmcurl/Platforms/WindowsCache.cmake1
-rw-r--r--Utilities/cmcurl/Platforms/config-aix.h3
-rw-r--r--Utilities/cmcurl/config.h.in3
-rw-r--r--Utilities/cmcurl/socks.c11
-rw-r--r--Utilities/cmcurl/strequal.c42
-rw-r--r--Utilities/cmcurl/strequal.h5
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_endian.h36
-rwxr-xr-xbootstrap53
965 files changed, 22091 insertions, 7245 deletions
diff --git a/CMakeCPackOptions.cmake.in b/CMakeCPackOptions.cmake.in
index 3a72eaa..47dad49 100644
--- a/CMakeCPackOptions.cmake.in
+++ b/CMakeCPackOptions.cmake.in
@@ -51,3 +51,27 @@ if("${CPACK_GENERATOR}" STREQUAL "PackageMaker")
set(CPACK_PACKAGE_DEFAULT_LOCATION "/usr")
endif()
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:
+ set(CPACK_PACKAGE_FILE_NAME
+ "${CPACK_PACKAGE_NAME}-@CMake_VERSION@-${CPACK_SYSTEM_NAME}")
+ set(CPACK_SOURCE_PACKAGE_FILE_NAME
+ "${CPACK_PACKAGE_NAME}-@CMake_VERSION@-Source")
+
+ if(NOT CPACK_WIX_SIZEOF_VOID_P)
+ set(CPACK_WIX_SIZEOF_VOID_P "@CMAKE_SIZEOF_VOID_P@")
+ endif()
+
+ set(CPACK_PACKAGE_VERSION
+ "@CMake_VERSION_MAJOR@.@CMake_VERSION_MINOR@.@CMake_VERSION_PATCH@")
+ # WIX installers require at most a 4 component version number, where
+ # each component is an integer between 0 and 65534 inclusive
+ set(tweak "@CMake_VERSION_TWEAK@")
+ if(tweak MATCHES "^[0-9]+$")
+ if(tweak GREATER 0 AND tweak LESS 65535)
+ set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION}.${tweak}")
+ endif()
+ endif()
+endif()
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ea1c033..75d372d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -122,9 +122,11 @@ macro(CMAKE_SETUP_TESTING)
"Generator used when running tests")
if(NOT CMAKE_TEST_GENERATOR)
set(CMAKE_TEST_GENERATOR "${CMAKE_GENERATOR}")
+ set(CMAKE_TEST_GENERATOR_TOOLSET "${CMAKE_GENERATOR_TOOLSET}")
set(CMAKE_TEST_MAKEPROGRAM "${MAKEPROGRAM}")
else()
set(CMAKE_TEST_DIFFERENT_GENERATOR TRUE)
+ set(CMAKE_TEST_GENERATOR_TOOLSET "")
endif()
# Are we testing with the MSVC compiler?
@@ -234,8 +236,6 @@ macro (CMAKE_BUILD_UTILITIES)
set(kwsys_folder "Utilities/KWSys")
CMAKE_SET_TARGET_FOLDER(${KWSYS_NAMESPACE} "${kwsys_folder}")
CMAKE_SET_TARGET_FOLDER(${KWSYS_NAMESPACE}_c "${kwsys_folder}")
- CMAKE_SET_TARGET_FOLDER(${KWSYS_NAMESPACE}EncodeExecutable "${kwsys_folder}")
- CMAKE_SET_TARGET_FOLDER(${KWSYS_NAMESPACE}ProcessFwd9x "${kwsys_folder}")
if(BUILD_TESTING)
CMAKE_SET_TARGET_FOLDER(${KWSYS_NAMESPACE}TestDynload "${kwsys_folder}")
CMAKE_SET_TARGET_FOLDER(${KWSYS_NAMESPACE}TestProcess "${kwsys_folder}")
@@ -585,6 +585,29 @@ option(CMAKE_STRICT
"Perform strict testing to record property and variable access. Can be used to report any undefined properties or variables" OFF)
mark_as_advanced(CMAKE_STRICT)
+if(NOT CMake_VERSION_IS_RELEASE)
+ if("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" AND
+ NOT "${CMAKE_C_COMPILER_VERSION}" VERSION_LESS 4.2)
+ set(C_FLAGS_LIST -Wcast-align -Werror-implicit-function-declaration -Wchar-subscripts
+ -Wall -W -Wpointer-arith -Wwrite-strings -Wformat-security
+ -Wmissing-format-attribute -fno-common -Wundef
+ )
+ set(CXX_FLAGS_LIST -Wnon-virtual-dtor -Wcast-align -Wchar-subscripts -Wall -W
+ -Wshadow -Wpointer-arith -Wformat-security -Wundef
+ )
+
+ foreach(FLAG_LANG C CXX)
+ foreach(FLAG ${${FLAG_LANG}_FLAGS_LIST})
+ if(NOT " ${CMAKE_${FLAG_LANG}_FLAGS} " MATCHES " ${FLAG} ")
+ set(CMAKE_${FLAG_LANG}_FLAGS "${CMAKE_${FLAG_LANG}_FLAGS} ${FLAG}")
+ endif()
+ endforeach()
+ endforeach()
+
+ unset(C_FLAGS_LIST)
+ unset(CXX_FLAGS_LIST)
+ endif()
+endif()
# build the remaining subdirectories
add_subdirectory(Source)
diff --git a/CTestCustom.cmake.in b/CTestCustom.cmake.in
index 1e6224b..495d156 100644
--- a/CTestCustom.cmake.in
+++ b/CTestCustom.cmake.in
@@ -31,6 +31,7 @@ set(CTEST_CUSTOM_WARNING_EXCEPTION
"remark: .*LOOP WAS VECTORIZED"
"warning .980: wrong number of actual arguments to intrinsic function .std::basic_"
"LINK : warning LNK4089: all references to.*ADVAPI32.dll.*discarded by /OPT:REF"
+ "LINK : warning LNK4089: all references to.*PSAPI.DLL.*discarded by /OPT:REF"
"LINK : warning LNK4089: all references to.*USER32.dll.*discarded by /OPT:REF"
"Warning: library was too large for page size.*"
"Warning: public.*_archive_.*in module.*archive_*clashes with prior module.*archive_.*"
diff --git a/ChangeLog.manual b/ChangeLog.manual
index 90c9162..134b4aa 100644
--- a/ChangeLog.manual
+++ b/ChangeLog.manual
@@ -1,3 +1,690 @@
+Changes in CMake 2.8.11.2 (since 2.8.11.1)
+------------------------------------------
+Alex Neundorf (1):
+ asm support: adapt to changes in CMakeDetectCompiler in 2.8.10
+
+Bjoern Thiel (1):
+ SelectLibraryConfigurations: Fix for cached <base>_LIBRARY
+
+Brad King (5):
+ cmCryptoHash: Increase alignment of HashFile buffer
+ cmcurl: Backport curl bug 1192 fix (#14250)
+ VS12: Add Visual Studio 12 generator (#14251)
+ VS12: Generate flag tables from MSBuild v120 tool files
+ FindBoost: Add -vc120 mangling for VS 12
+
+Robert Maynard (1):
+ VS: Clarify Visual Studio product year for each version
+
+Changes in CMake 2.8.11.1 (since 2.8.11)
+----------------------------------------
+Brad King (5):
+ ExternalData: Do not re-stage staged object files
+ try_compile: Fix quoting of libraries in generated CMakeLists.txt
+ KWSys: Fix SystemTools::FileIsDirectory with long paths (#14176)
+ FindBoost: Fix handling of \ in input paths (#14179)
+ Xcode: Fix framework search paths in STATIC library targets (#14191)
+
+Modestas Vainius (1):
+ Fix test failures caused by regexp-sensitive characters in the build paths
+
+Stephen Kelly (9):
+ include_directories: Fix handling of empty or space-only entries
+ try_compile: Trim whitespace from LINK_LIBRARIES entries
+ cmTarget: Remove some hardcoding of transitive property names.
+ GenexEval: Extract a getLinkedTargetsContent from TargetPropertyNode.
+ GenexEval: Fix evaluation of INCLUDE_DIRECTORIES target property.
+ GenexEval: Test evaluation of INCLUDE_DIRECTORIES target property.
+ FindQt4: Don't fail if certain Qt modules are unavailable.
+ Qt4Macros: Handle Qt ActiveX libraries in qt4_use_modules.
+ Genex: Fix the HEAD target used for evaluated expressions
+
+Changes in CMake 2.8.11 (since 2.8.11-rc4)
+----------------------------------------
+None
+
+Changes in CMake 2.8.11-rc4 (since 2.8.11-rc3)
+----------------------------------------------
+Brad King (1):
+ target_link_libraries: Update usage requirements documentation
+
+Stephen Kelly (3):
+ Centralize maintenance of usage requirement include directories
+ Fix include dir propagation from conditionally linked targets
+ Memoize usage requirement include directories in a config-specific map
+
+Changes in CMake 2.8.11-rc3 (since 2.8.11-rc2)
+----------------------------------------------
+Brad King (1):
+ get_filename_component: Document path components more clearly (#14091)
+
+Rolf Eike Beer (1):
+ try_compile: add missing fclose() to recently added error case
+
+Stephen Kelly (1):
+ Fix clearing of the INCLUDE_DIRECTORIES DIRECTORY property.
+
+Changes in CMake 2.8.11-rc2 (since 2.8.11-rc1)
+----------------------------------------------
+Alex Neundorf (6):
+ Determine C/CXX/Fortran compiler: minor restructuring
+ Determine C/CXX/Fortran compiler: fix indentation
+ rename TI_DSP toolchain to TI, since it works also for the ARM compiler
+ TI compiler: add automatic detection of prefix and suffixes
+ Modules/readme.txt: switch from "XXX" to "Xxx"
+ Modules/readme.txt: make lines a bit shorter for easier readability
+
+Ben Boeckel (1):
+ Clang: Add -isystem flag support everywhere
+
+Bill Hoffman (1):
+ ExternalProject: Retry on a failed git clone
+
+Brad King (8):
+ string: Fix regex documentation of '^' and '$' (#14028)
+ Rename variable for including current directory in interfaces
+ Replace <TARGET> in CMAKE_<LANG>_COMPILE_OBJECT rule variables
+ Test evaluation of per-config COMPILE_DEFINITIONS (#14037)
+ VS: Fix VS 10/11 .sln headers (#14038)
+ add_dependencies: Distinguish target v. file dependencies in error (#14050)
+ automoc: Use a pre-build event in VS >= 7
+ Handle usr-move without forcing absolute paths (#14041)
+
+Clinton Stimpson (2):
+ FindQt4: If Qt5 is in CMAKE_PREFIX_PATH, be sure to find Qt4 includes.
+ Qt4: Fix typo setting a variable for FindThreads.
+
+James Bigler (1):
+ FindCUDA: Use the PRE_LINK mode only for MSVC >= 10
+
+Matthew Woehlke (4):
+ UseJava.cmake: simplify path logic
+ UseJava.cmake: fix passing jars to add_jar
+ UseJava.cmake: accept jar targets in add_jar
+ UseJava.cmake: require explicit request to include jars
+
+Paul Kunysch (1):
+ CPack: Avoid "format expects 'unsigned int'" warnings
+
+Petr Kmoch (1):
+ cmSystemTools: Generalize TrimWhitespace to all whitespace
+
+Rex Dieter (1):
+ FindImageMagick: Search versioned suffixes (#14012)
+
+Rolf Eike Beer (1):
+ FindRuby: improve version selection
+
+Stephen Kelly (13):
+ FindQt4: Set the Qt4_FOUND variable if Qt4 is found
+ FindQt4: Set the INTERFACE_QT_MAJOR_VERSION for Qt4::QtCore
+ Document that CMAKE_AUTOMOC works with Qt 5.
+ FPHSA: Fix FOUND_VAR check to work with if() auto-dereference
+ Fix cmGeneratorExpression::Preprocess for interleaved inputs.
+ cmake-gui: Use the QStandardItemModel workaround until 5.1.0.
+ Automoc: append implicit includes after user-specified dirs
+ Fix the evaluation of per-config COMPILE_DEFINITIONS (#14037)
+ Fix new target commands documentation.
+ install(EXPORT): Ensure clean INTERFACE_INCLUDE_DIRECTORIES
+ Report an error on IMPORTED targets with a faulty INTERFACE
+ Error if linked target has relative paths in INTERFACE_INCLUDE_DIRECTORIES
+ Fix the Qt 5 version required to run the IncompatibleQt test.
+
+Changes in CMake 2.8.11-rc1 (since 2.8.10.2)
+----------------------------------------------
+Alan Witkowski (1):
+ FindBullet: Search in per-config dirs on Windows (#13738)
+
+Aleksey Avdeev (1):
+ Add module FindIcotool
+
+Alex Neundorf (30):
+ Eclipse: add switch to disable linked resources (#13189)
+ Eclipse: set source path once to fix Eclipse indexer (#13596)
+ cmDependsC: remove unused member variable
+ cmDependsC: remove code duplication
+ cmDependsC: fix indentation
+ cmDepends: allow multiple dependees per depender
+ AddCustomCommand: Handle multiple IMPLICIT_DEPENDS files (#10048)
+ Add support for Texas Instruments DSP compiler (#12405)
+ Squish: detect version
+ Squish: use FPHSA
+ Squish: find executables also under Windows
+ Squish: rename squish_add_test() to squish_v3_add_test() and fix docs a bit
+ Squish: use ${CMAKE_CURRENT_LIST_DIR}
+ Squish: add support for squish 4 (#9734)
+ Squish: fix new squish_v4_add_test() macro
+ Automoc: "inherit" FOLDER target property from target (#13688)
+ FPHSA: don't succeed if only checking for XX_FOUND (#13755)
+ CONFIGURE_PACKAGE_CONFIG_FILE(): improve generated comments
+ Automoc: get include dirs without stripping implicit include dirs off
+ configure_package_config_file: force absolute paths for usr-move
+ configure_package_config_file(): fix indentation
+ configure_package_config_file(): extend documentation
+ documentation: handling of relative paths by include- and link_directories()
+ automoc: use a std::vector<> instead a std::list
+ automoc: use the header extensions from cmMakefile
+ Eclipse: also detect include dirs and macro for clang (#13823)
+ cmLocalGenerator: remove "virtual" where not used
+ export files: rewrite the code for checking required targets
+ FPHSA: Add FOUND_VAR option to specify _FOUND variable name
+ FPHSA: improve documentation
+
+Alexander Chehovsky (2):
+ Xcode: Fix nested source group handling (#12943)
+ Xcode: Sort source files
+
+Amine Chadly (2):
+ file: remove dead code
+ Add test to secure the file(GLOB empty) behavior.
+
+Amit Kulkarni (6):
+ OpenBSD: Install shared libraries without executable permission
+ OpenBSD: Add paths for Java 1.6.0/1.7.0 JRE/JDK
+ OpenBSD: Add path for Freetype under X.org
+ OpenBSD: Add paths for Tcl/Tk 8.4/8.5
+ OpenBSD: Add path for Lua 5.1
+ OpenBSD: Add paths for Qt3/Qt4
+
+Andreas Mohr (4):
+ Documentation: Correct typos and grammar
+ Documentation: Clarify some command descriptions
+ Correct string literal typo (have "(NULL)" like all other cases).
+ Remove seemingly bogus duplicate CPACK_PACKAGE_FILE_NAME call.
+
+Anton Helwart (1):
+ VS: Avoid empty source groups in some cases (#3474)
+
+Benjamin Eikel (2):
+ Swap linking order of SDLmain and SDL (#0013769)
+ FindSDL_...: Restore dropped search paths (#13819)
+
+Brad King (109):
+ find_library: Refactor internal name iteration
+ find_library: Simplify framework search logic
+ find_library: Generalize helper macro in test case
+ find_library: Optionally consider all names in each directory
+ FindBoost: Remove extra indentation level
+ FindBoost: Mark Boost_DIR cache entry as advanced
+ FindBoost: Use PATH_SUFFIXES to look in "Program Files"
+ FindBoost: Overhaul caching and search repeat behavior
+ FindBoost: Construct a clean Boost_LIBRARIES value
+ FindBoost: Refactor Boost_FOUND computation and version check
+ FindBoost: Rewrite documentation
+ BSD: Do not require dlfcn.h to build shared libs (#13573)
+ Xcode: Fix ReRunCMake.make path to cmake.check_cache (#13603)
+ VS10: Refactor link options collection
+ VS10: Honor /DELAYSIGN and /KEYFILE flags (#13601)
+ Document external language support policy
+ CTest: Allow SUBMIT_INDEX with CDash
+ KWSys: Submit dashboard builds to PublicDashboard
+ pre-commit: Update KWSys rejection message for new workflow
+ CTestCustom: Suppress LNK4089 warning about PSAPI
+ load_command: Deprecate and document pending removal
+ Documentation: Clarify configure_file behavior
+ OS X: Warn about known SDK breakage by Xcode 3.2.6
+ Optionally skip link dependencies on shared library files
+ Teach BuildDepends test to cover LINK_DEPENDS_NO_SHARED
+ Serialize tests for EXCLUDE_FROM_DEFAULT_BUILD
+ MSVC: Drop default use of /Zm1000 for VS >= 7.1
+ Teach find_(path|file) about Linux multiarch (#13742)
+ Test find_path multiarch support (#13742)
+ Add policy CMP0019 to skip include/link variable re-expansion
+ Xcode: Add frameworks search paths from link dependeny closure (#13397)
+ Makefile: Use modern link information for framework search paths
+ Documentation: Clarify handling of implicit link directories
+ Remove references to KWSys Process Win9x support
+ add_library: Document object library portability suggestion
+ OS X: Link with all framework search paths, not just the last
+ OS X: Detect implicit link directories on modern toolchains
+ OS X: Detect implicit linker framework search paths
+ Revert "load_command: Deprecate and document pending removal"
+ VS11: Simplify external object file handling (#13831)
+ KWIML: Teach ABI about 'long long' on older GNU
+ CMake: Skip empty link.txt lines (#13845)
+ ExternalProject: Allow DEPENDS on normal targets (#13849)
+ VS11: Fix VSExternalInclude test
+ target_link_libraries: Document that new sigs privatize old (#13876)
+ Tests: Avoid CTestLimitDashJ crash on Borland 5.8 builds
+ Fix use of cmTypeMacro in new command classes
+ Fix cmSystemTools::RenameFile race on Windows
+ VS 6: Create .rule file directory before file
+ Add ExternalData module
+ ExternalData: Remove compatibility with CMake < 2.8.5
+ ExternalData: Do not match directory names when resolving DATA{}
+ ExternalData: Cleanup stray TODO and typo in comments
+ ExternalData: Remove unused private interface
+ ExternalData: Improve series matching using an explicit syntax
+ ExternalData: Add tests covering interfaces and errors
+ ExternalData: Allow ()-groups in series match regex
+ ExternalData: Allow DATA{} syntax to reference directories
+ ExternalData: Generalize hash algo/ext handling
+ ExternalData: Add support for SHA 1 and 2 hash algorithms
+ ExternalData: Collapse ../ components in DATA{} paths
+ Fix Module.ExternalData test on Cygwin
+ Fix Module.ExternalData test on VS 6
+ ExternalData: Attach download rules to content links in IDEs
+ find_package: Reword <package>_NO_INTERFACES documentation
+ Normalize full paths in implicit link library list
+ Fail early if no current working directory exists
+ MSVC: Fix CMAKE_CL_64 in CXX-only projects (#13896)
+ ExternalProject: Simplify CMake command line generation
+ Tests: Run ctest custom commands with VERBATIM
+ CMake: Add -T option to choose a generator toolset
+ VS: Implement generator toolset selection (#10722, #13774)
+ Xcode: Implement generator toolset selection (#9831, #13802)
+ CTest: Add options to set generator toolset
+ ExternalProject: Propagate the generator toolset
+ Tests: Consolidate ctest --build-and-test generator options
+ Tests: Add generator toolset support
+ Fix crash on empty CMAKE_<lang>_COMPILER value (#13901)
+ file: Do not remove symlinked directories recursively (#10538)
+ Embarcadero: Fix default link stack/heap flags (#13912)
+ Avoid duplicate RPATH entries
+ AIX-GNU: Put implicit link directories in runtime libpath (#13909)
+ VS: Replace generation timestamp file atomically
+ VS,Xcode: Remove unused CMAKE_GENERATOR_* variables
+ Delete entire CMakeFiles directory when deleting CMakeCache.txt (#13756)
+ Tests/RunCMake: Allow tests to control build tree behavior
+ Test Unix Makefiles generator support for changing compilers
+ Xcode: Drop check for circular target dependencies
+ Xcode: Each target dependency edge needs a unique object (#13935)
+ Tests: Replace exec_program with execute_process
+ Tests: Generalize decision for 'make' tool supporting spaces
+ ExternalData: Test content link with a space in its name
+ FPHSA: Convert FOUND_VAR failure test to RunCMake
+ VS: Restore CMAKE_GENERATOR_FC variable
+ Xcode: Generate recommended artwork setting (#13954)
+ CTest: Fix ctest_update with 'HEAD' file in source tree
+ VS 10: Fix CMAKE_<LANG>_STACK_SIZE implementation (#13968)
+ install(EXPORT): Force absolute paths for usr-move
+ AIX: Do not use -brtl to create shared libraries (#13997)
+ add_subdirectory: Compute output dir with consistent slashes (#10072)
+ ExternalData: Preserve escaped semicolons during argument expansion
+ Avoid crash when checking property link dependencies without link info
+ Avoid crash when checking property compatibility without link info
+ Refactor RunCMake.build_command test to allow more cases
+ build_command: Fail early without CMAKE_MAKE_PROGRAM (#14005)
+ CTest: Fail early without PROJECT_BINARY_DIR (#14005)
+ FindQt4: Fix QT_QMAKE{_QMAKE => }_EXECUTABLE typo
+ XL: Use -qpic for position independent code (#14010)
+ Configure Tests/CMakeTests only with BUILD_TESTING ON
+
+Casey Goodlett (1):
+ CTest: Prevent creation of unbounded number of tests in ctest (#12904)
+
+Clemens Heppner (1):
+ CMake: source_group needs to check its own regex after its children (#13611)
+
+Clinton Stimpson (5):
+ Fix for possible Rez errors when creating dmg.
+ PackageMaker: Enable postflight script in component mode (#12375)
+ CPack: Fix RPM/Deb package names to not include "ALL_COMPONENTS_IN_ONE"
+ Qt4: Add SYSTEM option to include_directories.
+ FindQt4: set QT_VERSION_* variables sooner.
+
+David Cole (19):
+ Begin post-2.8.10 development
+ CPack: Add automatic detection of the Unicode makensis (#9629)
+ BundleUtilities: Use a more inclusive REGEX for frameworks (#13600)
+ VS: Avoid empty, unreferenced solution folders... (#13571)
+ NMake: Add a test to demonstrate EmptyDepends issue (#13392)
+ NMake: Fix problem with empty DEPENDS args (#13392)
+ CMake: Remove "/STACK:10000000" from default linker flags (#12437)
+ Watcom: Avoid prompt from wmake about dll with no exports...
+ Tests: Use the right path to CPack value for running CPack tests
+ VS11: Allow using folders with the VS11 Express Edition (#13770)
+ CPack: Fix dashboard errors (#11575)
+ CPack: Fix dashboard warnings (#11575)
+ CPack: Fix dashboard errors and warnings (#11575)
+ CMake: Stylistic changes and documentation tweaks
+ CMake: Fix dashboard warnings
+ CMake: Fix dashboard test failure
+ CMake: Fix dashboard build errors and warnings
+ CTest: Coverage handler: expect certain output lines from gcov 4.7 (#13657)
+ Add CTestLimitDashJ test (#12904)
+
+David Golub (2):
+ CPack/NSIS: Fix compatibility issues with prerelease NSIS (#13202)
+ CPack/NSIS: Add support for 64-bit NSIS (#13203)
+
+Eric LaFranchi (1):
+ CPack: WIX Product Icon, UI Banner, UI Dialog support (#13789)
+
+Eric NOULARD (1):
+ CPackRPM fix #13898 uses IF(DEFINED var) to avoid wrong var value logic
+
+Gerald Hofmann (1):
+ CPack: Fix NSIS version check without release version (#9721)
+
+James Bigler (4):
+ Use PRE_LINK instead of PRE_BUILD when testing PRE_LINK.
+ FindCUDA: Remove linkage against CUDA driver library (#13084)
+ FindCUDA: Add support for separable compilation
+ FindCUDA: Added cupti library.
+
+Janne Rönkkö (1):
+ FindQt4: Do not use qmake from Qt5
+
+Jean-Christophe Fillion-Robin (1):
+ Add $<SEMICOLON> generator expression.
+
+Marcus D. Hanwell (1):
+ Removed GenerateExportHeader warnings about old compilers
+
+Mark Salisbury (2):
+ VS: Specify WinCE subsystem also for DLLs
+ VS: Specify WinCE subsystems correctly in VS 9 2008
+
+Mathias Gaunard (2):
+ enable CTEST_USE_LAUNCHERS with Ninja too
+ Ninja: fix usage of cldeps with ctest launchers
+
+Matt McCormick (7):
+ ExternalProject: Only run 'git fetch' when required.
+ ExternalProject: Do smoke tests for Git Tutorial builds.
+ ExternalProject: Add tests for UPDATE_COMMAND.
+ ExternalProject: Always do a git fetch for a remote ref.
+ ExternalProject: Make sure the ExternalProjectUpdate setup is available.
+ ExternalProject: Verify when a fetch occurs during update test.
+ ExternalProjectUpdateTest: Only support Git 1.6.5 and greater.
+
+Matthew Woehlke (1):
+ ccmake: Allow DEL key in first column
+
+Michael Tänzer (4):
+ GetPrerequisites: Move tool search paths up
+ GetPrerequisites: Add support for objdump
+ GetPrerequisites: Enable test for BundleUtilities on MinGW
+ GetPrerequisites: Add documentation for objdump
+
+Michael Wild (1):
+ cmDepends: No dependency-vector erasure in CheckDependencies
+
+Morné Chamberlain (15):
+ Added a generator for Sublime Text 2 project files.
+ Added some support for sublimeclang_options in the generated project file.
+ Changed SublimeClang include path generation to expand to absolute paths.
+ Cleaned up the Sublime Text 2 Generator code a bit.
+ Fixed support for the Ninja build system.
+ Added and cleaned up some comments.
+ The generator no longer generates an explicit list of source files.
+ The generator no longer generates absolute paths to the ninja.build/Makefiles.
+ Added a CMAKE_SUBLIMECLANG_DISABLED variable that disables SublimeClang.
+ Fixed Sublime Text project generation for in-source builds
+ Define flags in CMAKE_C(XX)_FLAGS are now included in SublimeClang settings.
+ SublimeText2 Gen: Improved use of define, include flags from CMAKE_C(XX)_FLAGS
+ SublimeText2 Gen: Fixed the issue where include directory flags used -D
+ Sublime Text 2 Gen: Per-source Compile flags are now saved in a separate file.
+ SublimeText 2 Gen: Set the sublimeclang_options_script property.
+
+Neil Carlson (1):
+ NAG: Use -PIC for Fortran position-independent code (#13932)
+
+Nils Gladitz (2):
+ CPack: Add a WiX Generator (#11575)
+ CMake: Add TIMESTAMP subcommand to string and file commands
+
+Patrick Gansterer (28):
+ Introduce the abstract class cmGlobalGeneratorFactory
+ Add cmGlobalGeneratorFactory::GetGenerators()
+ Search generator in cmake::ExtraGenerators before in cmake::Generators
+ Allow a GeneratorFactory handling of more than one generator
+ Make cmGlobalGenerator::GetDocumentation() a static function
+ VS: Remove AddPlatformDefinitions from platform-specific generators
+ VS: Fix ArchitectureId of Visual Studio 10 IA64 generator
+ VS: Remove GetPlatformName from platform-specific generators
+ VS: Remove EnableLanguage from platform-specific generators
+ VS: Remove platform specific generator files
+ FindBISON: Add support for the Win flex-bison distribution
+ FindFLEX: Add support for the Win flex-bison distribution
+ VS: Remove TargetMachine for linker when checking compiler id
+ VS: Add CMAKE_VS_PLATFORM_NAME definition to cmMakefile
+ VS: Add static method to get the base of the registry
+ VS: Change variable type of ArchitectureId from const char* to string
+ VS: Change variable type of Name from const char* to string
+ VS: Support setting correct subsystem and entry point for WinCE
+ VS: Add parser for WCE.VCPlatform.config to read WinCE platforms
+ VS: Allow setting the name of the target platform
+ VS: Make DetermineCompilerId working with WinCE too
+ VS: Added "Deploy" at project configuration for WindowsCE targets
+ Add command to generate environment for a Windows CE SDK
+ VS: Set the correct SubSystem when determinating the CompilerId
+ VS: Add the entry point when compiling for WindowsCE
+ VS: Ignore LIBC.lib when linking the CompilerId executables
+ Set WINCE to 1 when building for WindowsCE
+ Ninja: Avoid LNK1170 linker error
+
+Peter Kümmel (6):
+ Ninja: encode LINK_FLAGS to handle bash variables
+ Ninja: fix building from Codeblocks GUI
+ Ninja: remove implicit dependency on custom command outputs
+ Ninja: use MinGW generator code in EnableLanguage()
+ Ninja: the Ninja generator does not support Fortran yet.
+ Ninja: escape line breaks in literals
+
+Petr Kmoch (11):
+ Add tests for list() argument count
+ Add tests for list() invalid arguments
+ Consolidate list() argument count testing
+ Add several get_property() tests
+ Add tests for EXCLUDE_FROM_DEFAULT_BUILD
+ Add property EXCLUDE_FROM_DEFAULT_BUILD_<CONFIG>
+ Define property EXCLUDE_FROM_DEFAULT_BUILD
+ Add tests for VS_SOLUTION_GLOBAL_SECTIONS
+ Implement properties VS_GLOBAL_SECTION_*
+ Define properties VS_GLOBAL_SECTION_*
+ Documentation: Clarify a few subtleties
+
+Riku Voipio (1):
+ KWIML: Teach ABI.h about Aarch64
+
+Robert Maynard (4):
+ XCode generator won't infinitely parse compiler flags (bug #13354).
+ Correct missing parameter to CMP0018Flags call.
+ Remove ability to generate sublime clang files.
+ Update generator to use new cmGeneratorTarget api.
+
+Rodolfo Schulz de Lima (1):
+ FindGTK2: Fix GTK2_LIBRARIES order for static gtk libraries
+
+Rolf Eike Beer (21):
+ FindQt: improve version selection
+ FindQt: add some more places to look for Qt3
+ Tests: add MajorVersionSelection tests
+ Linux/PA-RISC: Link with --unique=.text.* to help binutils
+ FindQt: add to MajorVersionSelection test
+ CMakeTests: allow to call the check_cmake_test macro with a given file
+ list: add tests for CMP0007 behavior
+ GetProperty test: move doc property tests into main process
+ Find* (and some other): use ${CMAKE_CURRENT_LIST_DIR} in include()
+ bootstrap: use better defaults for Haiku
+ Haiku no longer defines __BEOS__
+ check for Haiku only with __HAIKU__
+ FindLua51: do not try to link libm on BeOS
+ FindGLUT: BeOS does not have libXi and libXmu
+ FindOpenGL: add Haiku paths
+ doc: fix linebreaks in generator expression documentation
+ ProcessorCount test: fix path to cmsysTestsCxx executable
+ ProcessorCount test: require SystemInformation process to work
+ FindOpenMP: improve documentation (#13895)
+ properly detect processor architecture on Windows
+ fix Windows processor detection
+
+Sean McBride (1):
+ libarchive: fixed undefined left shift with signed ints
+
+Slava Sysoltsev (1):
+ FindImageMagick: Search quantum depth suffixes (#13859)
+
+Stephen Kelly (158):
+ GenEx: Test early determination of AND and OR
+ Enable some compiler warnings when building CMake.
+ Resolve warnings about unused variables.
+ Resolve warnings about used enum values in switch blocks.
+ Resolve warnings about shadowing parameters and local variables.
+ Resolve ambiguity warning regarding use of && and ||.
+ Remove references to ancient and removed parts of the code.
+ Always use the auto_ptr from cmsys.
+ Port cmGeneratorExpression to cmTarget from cmGeneratorTarget.
+ Split link information processing into two steps.
+ Revert "Move GetLinkInformation to cmGeneratorTarget"
+ Genex: Extract a method to parse parameters.
+ Genex: Ensure that $<0:...> has a parameter.
+ Genex: Don't segfault on $<FOO,>
+ Generate an early-return guard in target Export files.
+ Fix some warnings from -Wundef
+ Make targets depend on the link interface of their dependees.
+ Use cmsys::auto_ptr to manage cmCompiledGeneratorExpressions
+ Keep track of INCLUDE_DIRECTORIES as a vector of structs.
+ Add a way to print the origins of used include directories.
+ Tests: Fix warning about unused variable
+ Qt4: Add module dependencies to the IMPORTED targets
+ Don't crash when a target is expected but is not available.
+ Add test for custom command with a genex referring to a target.
+ GenEx: Add expressions to specify build- or install-only values
+ Allow generator expressions to require literals.
+ Add the TARGET_NAME generator expression.
+ Add API to extract target names from a genex string.
+ Add API to populate INTERFACE properties in exported targets.
+ Make all relevant targets available in the genex context.
+ Use mapped config properties to evaluate $<CONFIG>
+ Make cycles in target properties ignored, not an error.
+ Populate the ExportedTargets member early in GenerateMainFile
+ Handle INTERFACE properties transitively for includes and defines.
+ Add CMAKE_BUILD_INTERFACE_INCLUDES build-variable.
+ Make linking APIs aware of 'head' target
+ Add LINK_LIBRARIES property for direct target link dependencies
+ Allow target_link_libraries with IMPORTED targets.
+ Add the -Wundef flag when compiling CMake.
+ FindQt4: Add INTERFACE includes and defines to Qt4 targets
+ Add the target_include_directories command.
+ Add the target_compile_definitions command.
+ Keep track of properties used to determine linker libraries.
+ Add API to calculate link-interface-dependent bool properties or error.
+ Process the INTERFACE_PIC property from linked dependencies
+ Fix linking to imported libraries test.
+ Add cmGeneratorExpression::Split() API.
+ Don't pass a position when determining if a target name is a literal.
+ Extract the AddTargetNamespace method.
+ Split the generator expression before extracting targets.
+ Split LINK_INTERFACE_LIBRARIES export handling into dedicated method.
+ Allow generator expressions in LINK_INTERFACE_LIBRARIES.
+ Add a way to check INTERFACE user property compatibility.
+ Don't include generator expressions in old-style link handling.
+ Document the use of generator expressions in new commands.
+ Add the TARGET_DEFINED generator expression
+ Strip consecutive semicolons when preprocessing genex strings.
+ Don't write a comment in the export file without the code.
+ Only generate one check per missing target.
+ Move the exported check for dependencies of targets
+ Move the exported check for file existence.
+ Add a test for the interfaces in targets exported from the build tree.
+ Make the BUILD_INTERFACE of export()ed targets work.
+ Export the INTERFACE_PIC property.
+ Test evaluation target via export for generator expressions
+ Make sure generator expressions can be used with target_include_directories.
+ Populate the link information cache before checking dependent properties.
+ Exit early if we find an inconsistent property.
+ Make INTERFACE determined properties readable in generator expressions.
+ Clear the link information in ClearLinkMaps.
+ Export the COMPATIBLE_INTERFACE_BOOL content properties
+ Add the $<TARGET_POLICY> expression
+ Automatically link to the qtmain library when linking to QtCore.
+ Don't wrap all targets in LINK_LIBRARIES in a TARGET_NAME genex.
+ Generate new-style cmake code during export.
+ Store includes from the same include_directories call together.
+ Only output includes once after the start of 'generate-time' when debugging.
+ Specify the target whose includes are being listed.
+ Output include directories as LOG messages, not warnings.
+ Revert "Allow target_link_libraries with IMPORTED targets."
+ Disallow porcelain to populate includes and defines of IMPORTED targets.
+ Exclude the LINK_LIBRARIES related properties from INTERFACE evaluation.
+ Make calculation of link-interface-dependent properties type-sensitive.
+ Add the COMPATIBLE_INTERFACE_STRING property.
+ Move GetCompileDefinitions to cmTarget.
+ Process COMPILE_DEFINITIONS as generator expressions in QtAutomoc.
+ Generate the _IMPORT_PREFIX in the non-config export file.
+ Add the INSTALL_PREFIX genex.
+ Fix TARGET_PROPERTY target extractions.
+ Make the Property name protected so that subclasses can use it.
+ Don't allow targets args in the new target commands.
+ Make subclasses responsible for joining content.
+ Use the result of converting to a unix path.
+ Handle reading empty properties defined by the link interface.
+ Advance more when preprocessing exported strings.
+ Make it an error for INSTALL_PREFIX to be evaluated.
+ Export targets to a targets file, not a Config file.
+ Add a way to exclude INTERFACE properties from exported targets.
+ Add API to check if we're reading a includes or defines property.
+ Add the $<LINKED:...> generator expression.
+ Add includes and compile definitions with target_link_libraries.
+ Test workaround of bad interface include directories from depends.
+ Optimize genex evaluation for includes and defines.
+ Cache context-independent includes on evaluation.
+ Style: Use this-> when invoking member functions.
+ Process generator expressions for 'system' include directories.
+ Deduplicate the isGeneratorExpression method.
+ De-duplicate validation of genex target names.
+ Test printing origin of include dirs from tll().
+ The COMPATIBLE_INTERFACE does not affect the target it is set on.
+ Ensure type specific compatible interface properties do not intersect.
+ Fix generation of COMPILE_DEFINITIONS in DependInfo.cmake.
+ Fix determination of evaluating link libraries.
+ Only use early evaluation termination for transitive properties.
+ Move a special case for PIC from the genex to the cmTarget code.
+ Don't keep track of content determined by target property values.
+ Only append build interface include dirs to particular targets.
+ Ensure that the build interface includes have been added.
+ Whitelist target types in target_{include_directories,compile_definitions}
+ Make sure INTERFACE properties work with OBJECT libraries.
+ Don't allow utility or global targets in the LINKED expression.
+ Generate config-specific interface link libraries propeties.
+ Fix determination of when we're evaluating compile definitions.
+ Rename the IncludeDirectoriesEntry to be more generic.
+ Don't use LINKED where not needed.
+ Use the link information as a source of compile definitions and includes.
+ Revert "Don't allow utility or global targets in the LINKED expression."
+ Don't populate INTERFACE includes and defines properties in tll.
+ Revert "Add the $<LINKED:...> generator expression."
+ Revert "find_package: Reword <package>_NO_INTERFACES documentation"
+ Revert "Add a way to exclude INTERFACE properties from exported targets."
+ Don't add target-specific interface includes and defines to Qt 4 targets.
+ Fix GenerateExportHeader documentation #13936
+ automoc: Add source file to target early to set the linker language
+ Keep track of all targets seen while evaluating a genex.
+ Add a new Export generator for IMPORTED targets.
+ Handle targets in the LINK_LIBRARIES of try_compile.
+ Strip stray semicolons when evaluating generator expressions.
+ Workaround broken code where a target has itself in its link iface.
+ Fix DAG checker finding cycling dependencies.
+ Expand includes and defines transitively in 'external' genexes.
+ Fix constness of accessors.
+ Fix the tests for evaluating includes and defines.
+ Memoize includes and defines from interface libraries.
+ Remove use of TARGET_DEFINED from target_include_directories test.
+ Remove use of TARGET_DEFINED from the ExportImport test.
+ Remove use of TARGET_DEFINED from the target_link_libraries test.
+ Revert "Add the TARGET_DEFINED generator expression"
+ Only add existing targets to the Qt4 target depends properties.
+ Fix the cmGeneratorExpression::Split when leading chars are present.
+ Fix RPATH information when only a genex is used as a link library.
+ Mention that IMPORTED targets may be created by a find_package call.
+ Remove unused parameters from target_link_libraries tests.
+ Only process transitive interface properties for valid target names.
+ Restore support for target names with '+' (#13986)
+ Automoc: Don't create automoc targets if Qt is not used (#13999)
+ cmake-gui: Use -fPIE if required by Qt.
+ cmake-gui: Workaround bug in Qt 5.0.0 to 5.0.3 QStandardItemModel
+
+Thomas Klausner (1):
+ KWIML: Teach ABI.h that VAX is big endian
+
+Yury G. Kudryashov (3):
+ Automoc: Fix automoc for OBJECT libraries.
+ Automoc: add OBJECT library to QtAutomoc test
+ spell: fix a few typos in comments
+
Changes in CMake 2.8.10.2 (since 2.8.10.1)
----------------------------------------------
Alex Neundorf (1):
diff --git a/CompileFlags.cmake b/CompileFlags.cmake
index b2044e4..20f5dec 100644
--- a/CompileFlags.cmake
+++ b/CompileFlags.cmake
@@ -62,3 +62,9 @@ endif ()
if (CMAKE_ANSI_CFLAGS)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_ANSI_CFLAGS}")
endif ()
+
+# avoid binutils problem with large binaries, e.g. when building CMake in debug mode
+# See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50230
+if (CMAKE_SYSTEM_NAME STREQUAL Linux AND CMAKE_SYSTEM_PROCESSOR STREQUAL parisc)
+ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--unique=.text.*")
+endif ()
diff --git a/Modules/BundleUtilities.cmake b/Modules/BundleUtilities.cmake
index 4557be6..0f6cd05 100644
--- a/Modules/BundleUtilities.cmake
+++ b/Modules/BundleUtilities.cmake
@@ -369,7 +369,7 @@ function(set_bundle_key_values keys_var context item exepath dirs copyflag)
# For frameworks, construct the name under the embedded path from the
# opening "${item_name}.framework/" to the closing "/${item_name}":
#
- string(REGEX REPLACE "^.*(${item_name}.framework/.*/${item_name}).*$" "${default_embedded_path}/\\1" embedded_item "${item}")
+ string(REGEX REPLACE "^.*(${item_name}.framework/.*/?${item_name}).*$" "${default_embedded_path}/\\1" embedded_item "${item}")
else()
# For other items, just use the same name as the original, but in the
# embedded path:
diff --git a/Modules/CMakeAddNewLanguage.txt b/Modules/CMakeAddNewLanguage.txt
index 6a30dd8..612e1a3 100644
--- a/Modules/CMakeAddNewLanguage.txt
+++ b/Modules/CMakeAddNewLanguage.txt
@@ -1,3 +1,19 @@
+This file provides a few notes to CMake developers about how to add
+support for a new language to CMake. It is also possible to place
+these files in CMAKE_MODULE_PATH within an outside project to add
+languages not supported by upstream CMake. However, this is not
+a fully supported use case.
+
+The implementation behind the scenes of project/enable_language,
+including the compiler/platform modules, is an *internal* API that
+does not make any compatibility guarantees. It is not covered in the
+official reference documentation that is versioned with the source code.
+Maintainers of external language support are responsible for porting
+it to each version of CMake as upstream changes are made. Since
+the API is internal we will not necessarily include notice of any
+changes in release notes.
+
+
CMakeDetermine(LANG)Compiler.cmake -> this should find the compiler for LANG and configure CMake(LANG)Compiler.cmake.in
CMake(LANG)Compiler.cmake.in -> used by CMakeDetermine(LANG)Compiler.cmake
diff --git a/Modules/CMakeCCompiler.cmake.in b/Modules/CMakeCCompiler.cmake.in
index d74dcdc..c41adc9 100644
--- a/Modules/CMakeCCompiler.cmake.in
+++ b/Modules/CMakeCCompiler.cmake.in
@@ -50,6 +50,7 @@ endif()
set(CMAKE_C_IMPLICIT_LINK_LIBRARIES "@CMAKE_C_IMPLICIT_LINK_LIBRARIES@")
set(CMAKE_C_IMPLICIT_LINK_DIRECTORIES "@CMAKE_C_IMPLICIT_LINK_DIRECTORIES@")
+set(CMAKE_C_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "@CMAKE_C_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES@")
@SET_CMAKE_CMCLDEPS_EXECUTABLE@
@SET_CMAKE_CL_SHOWINCLUDE_PREFIX@
diff --git a/Modules/CMakeCCompilerId.c.in b/Modules/CMakeCCompilerId.c.in
index 2d76c7a..c25df0c 100644
--- a/Modules/CMakeCCompilerId.c.in
+++ b/Modules/CMakeCCompilerId.c.in
@@ -109,7 +109,7 @@
# define COMPILER_VERSION_MINOR DEC(_RELEASE_MINOR)
#elif defined(__TI_COMPILER_VERSION__)
-# define COMPILER_ID "TI_DSP"
+# define COMPILER_ID "TI"
/* __TI_COMPILER_VERSION__ = VVVRRRPPP */
# define COMPILER_VERSION_MAJOR DEC(__TI_COMPILER_VERSION__/1000000)
# define COMPILER_VERSION_MINOR DEC(__TI_COMPILER_VERSION__/1000 % 1000)
diff --git a/Modules/CMakeCXXCompiler.cmake.in b/Modules/CMakeCXXCompiler.cmake.in
index 8c5d84e..9287b81 100644
--- a/Modules/CMakeCXXCompiler.cmake.in
+++ b/Modules/CMakeCXXCompiler.cmake.in
@@ -51,6 +51,7 @@ endif()
set(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "@CMAKE_CXX_IMPLICIT_LINK_LIBRARIES@")
set(CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES "@CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES@")
+set(CMAKE_CXX_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "@CMAKE_CXX_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES@")
@SET_CMAKE_CMCLDEPS_EXECUTABLE@
@SET_CMAKE_CL_SHOWINCLUDE_PREFIX@
diff --git a/Modules/CMakeCXXCompilerId.cpp.in b/Modules/CMakeCXXCompilerId.cpp.in
index 5e70a41..e2119c2 100644
--- a/Modules/CMakeCXXCompilerId.cpp.in
+++ b/Modules/CMakeCXXCompilerId.cpp.in
@@ -114,7 +114,7 @@
# define COMPILER_VERSION_MINOR DEC(_RELEASE_MINOR)
#elif defined(__TI_COMPILER_VERSION__)
-# define COMPILER_ID "TI_DSP"
+# define COMPILER_ID "TI"
/* __TI_COMPILER_VERSION__ = VVVRRRPPP */
# define COMPILER_VERSION_MAJOR DEC(__TI_COMPILER_VERSION__/1000000)
# define COMPILER_VERSION_MINOR DEC(__TI_COMPILER_VERSION__/1000 % 1000)
diff --git a/Modules/CMakeDetermineASM-ATTCompiler.cmake b/Modules/CMakeDetermineASM-ATTCompiler.cmake
index cec09e9..03c5668 100644
--- a/Modules/CMakeDetermineASM-ATTCompiler.cmake
+++ b/Modules/CMakeDetermineASM-ATTCompiler.cmake
@@ -15,6 +15,6 @@
# determine the compiler to use for ASM using AT&T syntax, e.g. GNU as
set(ASM_DIALECT "-ATT")
-set(CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT ${_CMAKE_TOOLCHAIN_PREFIX}gas ${_CMAKE_TOOLCHAIN_PREFIX}as)
+set(CMAKE_ASM${ASM_DIALECT}_COMPILER_LIST ${_CMAKE_TOOLCHAIN_PREFIX}gas ${_CMAKE_TOOLCHAIN_PREFIX}as)
include(CMakeDetermineASMCompiler)
set(ASM_DIALECT)
diff --git a/Modules/CMakeDetermineASMCompiler.cmake b/Modules/CMakeDetermineASMCompiler.cmake
index 9f0b30a..99b04e3 100644
--- a/Modules/CMakeDetermineASMCompiler.cmake
+++ b/Modules/CMakeDetermineASMCompiler.cmake
@@ -39,8 +39,8 @@ if(NOT CMAKE_ASM${ASM_DIALECT}_COMPILER)
endif()
endif()
else() # some specific assembler "dialect"
- if(NOT CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT)
- message(FATAL_ERROR "CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT must be preset !")
+ if(NOT CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT AND NOT CMAKE_ASM${ASM_DIALECT}_COMPILER_LIST)
+ message(FATAL_ERROR "CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT or CMAKE_ASM${ASM_DIALECT}_COMPILER_LIST must be preset !")
endif()
endif()
@@ -99,9 +99,9 @@ if(NOT CMAKE_ASM${ASM_DIALECT}_COMPILER_ID)
set(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_FLAGS_MSVC "/?")
set(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_REGEX_MSVC "Microsoft")
- list(APPEND CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDORS TI_DSP )
- set(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_FLAGS_TI_DSP "-h")
- set(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_REGEX_TI_DSP "Texas Instruments")
+ list(APPEND CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDORS TI )
+ set(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_FLAGS_TI "-h")
+ set(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_REGEX_TI "Texas Instruments")
include(CMakeDetermineCompilerId)
CMAKE_DETERMINE_COMPILER_ID_VENDOR(ASM${ASM_DIALECT})
diff --git a/Modules/CMakeDetermineASM_NASMCompiler.cmake b/Modules/CMakeDetermineASM_NASMCompiler.cmake
index 50f71dd..5d783b1 100644
--- a/Modules/CMakeDetermineASM_NASMCompiler.cmake
+++ b/Modules/CMakeDetermineASM_NASMCompiler.cmake
@@ -14,7 +14,7 @@
# Find the nasm assembler. yasm (http://www.tortall.net/projects/yasm/) is nasm compatible
-set(CMAKE_ASM_NASM_COMPILER_INIT nasm yasm)
+set(CMAKE_ASM_NASM_COMPILER_LIST nasm yasm)
if(NOT CMAKE_ASM_NASM_COMPILER)
find_program(CMAKE_ASM_NASM_COMPILER nasm
diff --git a/Modules/CMakeDetermineCCompiler.cmake b/Modules/CMakeDetermineCCompiler.cmake
index 275fc47..d2220e0 100644
--- a/Modules/CMakeDetermineCCompiler.cmake
+++ b/Modules/CMakeDetermineCCompiler.cmake
@@ -145,19 +145,27 @@ endif ()
# NAME_WE cannot be used since then this test will fail for names lile
# "arm-unknown-nto-qnx6.3.0-gcc.exe", where BASENAME would be
# "arm-unknown-nto-qnx6" instead of the correct "arm-unknown-nto-qnx6.3.0-"
-if (CMAKE_CROSSCOMPILING
- AND "${CMAKE_C_COMPILER_ID}" MATCHES "GNU"
- AND NOT _CMAKE_TOOLCHAIN_PREFIX)
- get_filename_component(COMPILER_BASENAME "${CMAKE_C_COMPILER}" NAME)
- if (COMPILER_BASENAME MATCHES "^(.+-)g?cc(-[0-9]+\\.[0-9]+\\.[0-9]+)?(\\.exe)?$")
- set(_CMAKE_TOOLCHAIN_PREFIX ${CMAKE_MATCH_1})
- endif ()
-
- # if "llvm-" is part of the prefix, remove it, since llvm doesn't have its own binutils
- # but uses the regular ar, objcopy, etc. (instead of llvm-objcopy etc.)
- if ("${_CMAKE_TOOLCHAIN_PREFIX}" MATCHES "(.+-)?llvm-$")
- set(_CMAKE_TOOLCHAIN_PREFIX ${CMAKE_MATCH_1})
- endif ()
+if (CMAKE_CROSSCOMPILING AND NOT _CMAKE_TOOLCHAIN_PREFIX)
+
+ if("${CMAKE_C_COMPILER_ID}" MATCHES "GNU")
+ get_filename_component(COMPILER_BASENAME "${CMAKE_C_COMPILER}" NAME)
+ if (COMPILER_BASENAME MATCHES "^(.+-)g?cc(-[0-9]+\\.[0-9]+\\.[0-9]+)?(\\.exe)?$")
+ set(_CMAKE_TOOLCHAIN_PREFIX ${CMAKE_MATCH_1})
+ endif ()
+
+ # if "llvm-" is part of the prefix, remove it, since llvm doesn't have its own binutils
+ # but uses the regular ar, objcopy, etc. (instead of llvm-objcopy etc.)
+ if ("${_CMAKE_TOOLCHAIN_PREFIX}" MATCHES "(.+-)?llvm-$")
+ set(_CMAKE_TOOLCHAIN_PREFIX ${CMAKE_MATCH_1})
+ endif ()
+ elseif("${CMAKE_C_COMPILER_ID}" MATCHES "TI")
+ # TI compilers are named e.g. cl6x, cl470 or armcl.exe
+ get_filename_component(COMPILER_BASENAME "${CMAKE_C_COMPILER}" NAME)
+ if (COMPILER_BASENAME MATCHES "^(.+)?cl([^.]+)?(\\.exe)?$")
+ set(_CMAKE_TOOLCHAIN_PREFIX "${CMAKE_MATCH_1}")
+ set(_CMAKE_TOOLCHAIN_SUFFIX "${CMAKE_MATCH_2}")
+ endif ()
+ endif()
endif ()
diff --git a/Modules/CMakeDetermineCXXCompiler.cmake b/Modules/CMakeDetermineCXXCompiler.cmake
index 59da3e6..6f7e8f6 100644
--- a/Modules/CMakeDetermineCXXCompiler.cmake
+++ b/Modules/CMakeDetermineCXXCompiler.cmake
@@ -141,19 +141,30 @@ endif ()
# NAME_WE cannot be used since then this test will fail for names lile
# "arm-unknown-nto-qnx6.3.0-gcc.exe", where BASENAME would be
# "arm-unknown-nto-qnx6" instead of the correct "arm-unknown-nto-qnx6.3.0-"
-if (CMAKE_CROSSCOMPILING
- AND "${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU"
- AND NOT _CMAKE_TOOLCHAIN_PREFIX)
- get_filename_component(COMPILER_BASENAME "${CMAKE_CXX_COMPILER}" NAME)
- if (COMPILER_BASENAME MATCHES "^(.+-)[gc]\\+\\+(-[0-9]+\\.[0-9]+\\.[0-9]+)?(\\.exe)?$")
- set(_CMAKE_TOOLCHAIN_PREFIX ${CMAKE_MATCH_1})
- endif ()
-
- # if "llvm-" is part of the prefix, remove it, since llvm doesn't have its own binutils
- # but uses the regular ar, objcopy, etc. (instead of llvm-objcopy etc.)
- if ("${_CMAKE_TOOLCHAIN_PREFIX}" MATCHES "(.+-)?llvm-$")
- set(_CMAKE_TOOLCHAIN_PREFIX ${CMAKE_MATCH_1})
- endif ()
+
+
+if (CMAKE_CROSSCOMPILING AND NOT _CMAKE_TOOLCHAIN_PREFIX)
+
+ if("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU")
+ get_filename_component(COMPILER_BASENAME "${CMAKE_CXX_COMPILER}" NAME)
+ if (COMPILER_BASENAME MATCHES "^(.+-)[gc]\\+\\+(-[0-9]+\\.[0-9]+\\.[0-9]+)?(\\.exe)?$")
+ set(_CMAKE_TOOLCHAIN_PREFIX ${CMAKE_MATCH_1})
+ endif ()
+
+ # if "llvm-" is part of the prefix, remove it, since llvm doesn't have its own binutils
+ # but uses the regular ar, objcopy, etc. (instead of llvm-objcopy etc.)
+ if ("${_CMAKE_TOOLCHAIN_PREFIX}" MATCHES "(.+-)?llvm-$")
+ set(_CMAKE_TOOLCHAIN_PREFIX ${CMAKE_MATCH_1})
+ endif ()
+ elseif("${CMAKE_CXX_COMPILER_ID}" MATCHES "TI")
+ # TI compilers are named e.g. cl6x, cl470 or armcl.exe
+ get_filename_component(COMPILER_BASENAME "${CMAKE_CXX_COMPILER}" NAME)
+ if (COMPILER_BASENAME MATCHES "^(.+)?cl([^.]+)?(\\.exe)?$")
+ set(_CMAKE_TOOLCHAIN_PREFIX "${CMAKE_MATCH_1}")
+ set(_CMAKE_TOOLCHAIN_SUFFIX "${CMAKE_MATCH_2}")
+ endif ()
+
+ endif()
endif ()
diff --git a/Modules/CMakeDetermineCompilerABI.cmake b/Modules/CMakeDetermineCompilerABI.cmake
index 75247d9..25d6bbe 100644
--- a/Modules/CMakeDetermineCompilerABI.cmake
+++ b/Modules/CMakeDetermineCompilerABI.cmake
@@ -72,19 +72,9 @@ function(CMAKE_DETERMINE_COMPILER_ABI lang src)
# Parse implicit linker information for this language, if available.
set(implicit_dirs "")
set(implicit_libs "")
- set(MULTI_ARCH FALSE)
- if(DEFINED CMAKE_OSX_ARCHITECTURES)
- if( "${CMAKE_OSX_ARCHITECTURES}" MATCHES ";" )
- set(MULTI_ARCH TRUE)
- endif()
- endif()
- if(CMAKE_${lang}_VERBOSE_FLAG
- # Implicit link information cannot be used explicitly for
- # multiple OS X architectures, so we skip it.
- AND NOT MULTI_ARCH
- # Skip this with Xcode for now.
- AND NOT "${CMAKE_GENERATOR}" MATCHES Xcode)
- CMAKE_PARSE_IMPLICIT_LINK_INFO("${OUTPUT}" implicit_libs implicit_dirs log
+ set(implicit_fwks "")
+ if(CMAKE_${lang}_VERBOSE_FLAG)
+ CMAKE_PARSE_IMPLICIT_LINK_INFO("${OUTPUT}" implicit_libs implicit_dirs implicit_fwks log
"${CMAKE_${lang}_IMPLICIT_OBJECT_REGEX}")
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Parsed ${lang} implicit link information from above output:\n${log}\n\n")
@@ -112,8 +102,17 @@ function(CMAKE_DETERMINE_COMPILER_ABI lang src)
message(STATUS "${_desc}")
endif()
+ # Implicit link libraries cannot be used explicitly for multiple
+ # OS X architectures, so we skip it.
+ if(DEFINED CMAKE_OSX_ARCHITECTURES)
+ if("${CMAKE_OSX_ARCHITECTURES}" MATCHES ";")
+ set(implicit_libs "")
+ endif()
+ endif()
+
set(CMAKE_${lang}_IMPLICIT_LINK_LIBRARIES "${implicit_libs}" PARENT_SCOPE)
set(CMAKE_${lang}_IMPLICIT_LINK_DIRECTORIES "${implicit_dirs}" PARENT_SCOPE)
+ set(CMAKE_${lang}_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "${implicit_fwks}" PARENT_SCOPE)
# Detect library architecture directory name.
if(CMAKE_LIBRARY_ARCHITECTURE_REGEX)
diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake
index 906a5e7..b918092 100644
--- a/Modules/CMakeDetermineCompilerId.cmake
+++ b/Modules/CMakeDetermineCompilerId.cmake
@@ -107,11 +107,14 @@ Id flags: ${testflags}
")
# Compile the compiler identification source.
- if("${CMAKE_GENERATOR}" MATCHES "Visual Studio ([0-9]+)( .NET)?( 200[358])? *((Win64|IA64|ARM))?")
+ if("${CMAKE_GENERATOR}" MATCHES "Visual Studio ([0-9]+)")
set(vs_version ${CMAKE_MATCH_1})
- set(vs_arch ${CMAKE_MATCH_4})
+ set(id_arch ${CMAKE_VS_PLATFORM_NAME})
set(id_lang "${lang}")
set(id_cl cl.exe)
+ if(NOT id_arch)
+ set(id_arch Win32)
+ endif()
if(NOT "${vs_version}" VERSION_LESS 10)
set(v 10)
set(ext vcxproj)
@@ -123,25 +126,26 @@ Id flags: ${testflags}
set(v 6)
set(ext dsp)
endif()
- if("${vs_arch}" STREQUAL "Win64")
- set(id_machine_7 17)
+ if("${id_arch}" STREQUAL "x64")
set(id_machine_10 MachineX64)
- set(id_arch x64)
- elseif("${vs_arch}" STREQUAL "IA64")
- set(id_machine_7 5)
+ elseif("${id_arch}" STREQUAL "Itanium")
set(id_machine_10 MachineIA64)
set(id_arch ia64)
else()
set(id_machine_6 x86)
- set(id_machine_7 1)
set(id_machine_10 MachineX86)
- set(id_arch Win32)
endif()
if(CMAKE_VS_PLATFORM_TOOLSET)
set(id_toolset "<PlatformToolset>${CMAKE_VS_PLATFORM_TOOLSET}</PlatformToolset>")
else()
set(id_toolset "")
endif()
+ if(CMAKE_VS_WINCE_VERSION)
+ set(id_entrypoint "mainACRTStartup")
+ set(id_subsystem 9)
+ else()
+ set(id_subsystem 1)
+ endif()
if("${CMAKE_MAKE_PROGRAM}" MATCHES "[Mm][Ss][Bb][Uu][Ii][Ll][Dd]")
set(build /p:Configuration=Debug /p:Platform=@id_arch@ /p:VisualStudioVersion=${vs_version}.0)
elseif("${CMAKE_MAKE_PROGRAM}" MATCHES "[Mm][Ss][Dd][Ee][Vv]")
@@ -173,6 +177,11 @@ Id flags: ${testflags}
set(id_type ${CMAKE_${lang}_COMPILER_XCODE_TYPE})
set(id_dir ${CMAKE_${lang}_COMPILER_ID_DIR})
get_filename_component(id_src "${src}" NAME)
+ if(CMAKE_XCODE_PLATFORM_TOOLSET)
+ set(id_toolset "GCC_VERSION = ${CMAKE_XCODE_PLATFORM_TOOLSET};")
+ else()
+ set(id_toolset "")
+ endif()
if(NOT ${XCODE_VERSION} VERSION_LESS 3)
set(v 3)
set(ext xcodeproj)
diff --git a/Modules/CMakeDetermineFortranCompiler.cmake b/Modules/CMakeDetermineFortranCompiler.cmake
index f861e39..4d3fb90 100644
--- a/Modules/CMakeDetermineFortranCompiler.cmake
+++ b/Modules/CMakeDetermineFortranCompiler.cmake
@@ -200,19 +200,21 @@ endif ()
# NAME_WE cannot be used since then this test will fail for names lile
# "arm-unknown-nto-qnx6.3.0-gcc.exe", where BASENAME would be
# "arm-unknown-nto-qnx6" instead of the correct "arm-unknown-nto-qnx6.3.0-"
-if (CMAKE_CROSSCOMPILING
- AND "${CMAKE_Fortran_COMPILER_ID}" MATCHES "GNU"
- AND NOT _CMAKE_TOOLCHAIN_PREFIX)
- get_filename_component(COMPILER_BASENAME "${CMAKE_Fortran_COMPILER}" NAME)
- if (COMPILER_BASENAME MATCHES "^(.+-)g?fortran(-[0-9]+\\.[0-9]+\\.[0-9]+)?(\\.exe)?$")
- set(_CMAKE_TOOLCHAIN_PREFIX ${CMAKE_MATCH_1})
- endif ()
-
- # if "llvm-" is part of the prefix, remove it, since llvm doesn't have its own binutils
- # but uses the regular ar, objcopy, etc. (instead of llvm-objcopy etc.)
- if ("${_CMAKE_TOOLCHAIN_PREFIX}" MATCHES "(.+-)?llvm-$")
- set(_CMAKE_TOOLCHAIN_PREFIX ${CMAKE_MATCH_1})
- endif ()
+if (CMAKE_CROSSCOMPILING AND NOT _CMAKE_TOOLCHAIN_PREFIX)
+
+ if("${CMAKE_Fortran_COMPILER_ID}" MATCHES "GNU")
+ get_filename_component(COMPILER_BASENAME "${CMAKE_Fortran_COMPILER}" NAME)
+ if (COMPILER_BASENAME MATCHES "^(.+-)g?fortran(-[0-9]+\\.[0-9]+\\.[0-9]+)?(\\.exe)?$")
+ set(_CMAKE_TOOLCHAIN_PREFIX ${CMAKE_MATCH_1})
+ endif ()
+
+ # if "llvm-" is part of the prefix, remove it, since llvm doesn't have its own binutils
+ # but uses the regular ar, objcopy, etc. (instead of llvm-objcopy etc.)
+ if ("${_CMAKE_TOOLCHAIN_PREFIX}" MATCHES "(.+-)?llvm-$")
+ set(_CMAKE_TOOLCHAIN_PREFIX ${CMAKE_MATCH_1})
+ endif ()
+ endif()
+
endif ()
include(CMakeFindBinUtils)
diff --git a/Modules/CMakeDetermineJavaCompiler.cmake b/Modules/CMakeDetermineJavaCompiler.cmake
index c4217f5..ae9f5fc 100644
--- a/Modules/CMakeDetermineJavaCompiler.cmake
+++ b/Modules/CMakeDetermineJavaCompiler.cmake
@@ -63,6 +63,8 @@ if(NOT CMAKE_Java_COMPILER)
/usr/java/j2sdk1.4.2_09/bin
/usr/lib/j2sdk1.5-sun/bin
/opt/sun-jdk-1.5.0.04/bin
+ /usr/local/jdk-1.7.0/bin
+ /usr/local/jdk-1.6.0/bin
)
# if no compiler has been specified yet, then look for one
if(CMAKE_Java_COMPILER_INIT)
diff --git a/Modules/CMakeDetermineSystem.cmake b/Modules/CMakeDetermineSystem.cmake
index cd33447..3a95d2a 100644
--- a/Modules/CMakeDetermineSystem.cmake
+++ b/Modules/CMakeDetermineSystem.cmake
@@ -73,7 +73,11 @@ if(CMAKE_HOST_UNIX)
else()
if(CMAKE_HOST_WIN32)
set (CMAKE_HOST_SYSTEM_NAME "Windows")
- set (CMAKE_HOST_SYSTEM_PROCESSOR "$ENV{PROCESSOR_ARCHITECTURE}")
+ if (DEFINED ENV{PROCESSOR_ARCHITEW6432})
+ set (CMAKE_HOST_SYSTEM_PROCESSOR "$ENV{PROCESSOR_ARCHITEW6432}")
+ else()
+ set (CMAKE_HOST_SYSTEM_PROCESSOR "$ENV{PROCESSOR_ARCHITECTURE}")
+ endif()
endif()
endif()
@@ -106,6 +110,12 @@ if(CMAKE_SYSTEM_NAME)
set(CMAKE_CROSSCOMPILING TRUE)
endif()
set(PRESET_CMAKE_SYSTEM_NAME TRUE)
+elseif(CMAKE_VS_WINCE_VERSION)
+ set(CMAKE_SYSTEM_NAME "WindowsCE")
+ set(CMAKE_SYSTEM_VERSION "${CMAKE_VS_WINCE_VERSION}")
+ set(CMAKE_SYSTEM_PROCESSOR "${MSVC_C_ARCHITECTURE_ID}")
+ set(CMAKE_CROSSCOMPILING TRUE)
+ set(PRESET_CMAKE_SYSTEM_NAME TRUE)
else()
set(CMAKE_SYSTEM_NAME "${CMAKE_HOST_SYSTEM_NAME}")
set(CMAKE_SYSTEM_VERSION "${CMAKE_HOST_SYSTEM_VERSION}")
diff --git a/Modules/CMakeExpandImportedTargets.cmake b/Modules/CMakeExpandImportedTargets.cmake
index 14551d1..f5c009c 100644
--- a/Modules/CMakeExpandImportedTargets.cmake
+++ b/Modules/CMakeExpandImportedTargets.cmake
@@ -30,7 +30,7 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-include(CMakeParseArguments)
+include(${CMAKE_CURRENT_LIST_DIR}/CMakeParseArguments.cmake)
function(CMAKE_EXPAND_IMPORTED_TARGETS _RESULT )
diff --git a/Modules/CMakeExtraGeneratorDetermineCompilerMacrosAndIncludeDirs.cmake b/Modules/CMakeExtraGeneratorDetermineCompilerMacrosAndIncludeDirs.cmake
index 1fa0157..365d381 100644
--- a/Modules/CMakeExtraGeneratorDetermineCompilerMacrosAndIncludeDirs.cmake
+++ b/Modules/CMakeExtraGeneratorDetermineCompilerMacrosAndIncludeDirs.cmake
@@ -90,7 +90,7 @@ set(ENV{LANG} C)
# Now check for C, works for gcc and Intel compiler at least
if (NOT CMAKE_EXTRA_GENERATOR_C_SYSTEM_INCLUDE_DIRS)
- if ("${CMAKE_C_COMPILER_ID}" MATCHES GNU OR "${CMAKE_C_COMPILER_ID}" MATCHES Intel)
+ if ("${CMAKE_C_COMPILER_ID}" MATCHES GNU OR "${CMAKE_C_COMPILER_ID}" MATCHES Intel OR "${CMAKE_C_COMPILER_ID}" MATCHES Clang)
_DETERMINE_GCC_SYSTEM_INCLUDE_DIRS(c _dirs _defines)
set(CMAKE_EXTRA_GENERATOR_C_SYSTEM_INCLUDE_DIRS "${_dirs}" CACHE INTERNAL "C compiler system include directories")
set(CMAKE_EXTRA_GENERATOR_C_SYSTEM_DEFINED_MACROS "${_defines}" CACHE INTERNAL "C compiler system defined macros")
@@ -99,7 +99,7 @@ endif ()
# And now the same for C++
if (NOT CMAKE_EXTRA_GENERATOR_CXX_SYSTEM_INCLUDE_DIRS)
- if ("${CMAKE_CXX_COMPILER_ID}" MATCHES GNU OR "${CMAKE_CXX_COMPILER_ID}" MATCHES Intel)
+ if ("${CMAKE_CXX_COMPILER_ID}" MATCHES GNU OR "${CMAKE_CXX_COMPILER_ID}" MATCHES Intel OR "${CMAKE_CXX_COMPILER_ID}" MATCHES Clang)
_DETERMINE_GCC_SYSTEM_INCLUDE_DIRS(c++ _dirs _defines)
set(CMAKE_EXTRA_GENERATOR_CXX_SYSTEM_INCLUDE_DIRS "${_dirs}" CACHE INTERNAL "CXX compiler system include directories")
set(CMAKE_EXTRA_GENERATOR_CXX_SYSTEM_DEFINED_MACROS "${_defines}" CACHE INTERNAL "CXX compiler system defined macros")
diff --git a/Modules/CMakeFindBinUtils.cmake b/Modules/CMakeFindBinUtils.cmake
index e08c1c6..e70c013 100644
--- a/Modules/CMakeFindBinUtils.cmake
+++ b/Modules/CMakeFindBinUtils.cmake
@@ -41,14 +41,14 @@ if("${CMAKE_CXX_COMPILER_ID}" MATCHES "MSVC"
# in all other cases search for ar, ranlib, etc.
else()
- find_program(CMAKE_AR NAMES ${_CMAKE_TOOLCHAIN_PREFIX}ar HINTS ${_CMAKE_TOOLCHAIN_LOCATION})
+ find_program(CMAKE_AR NAMES ${_CMAKE_TOOLCHAIN_PREFIX}ar${_CMAKE_TOOLCHAIN_SUFFIX} HINTS ${_CMAKE_TOOLCHAIN_LOCATION})
find_program(CMAKE_RANLIB NAMES ${_CMAKE_TOOLCHAIN_PREFIX}ranlib HINTS ${_CMAKE_TOOLCHAIN_LOCATION})
if(NOT CMAKE_RANLIB)
set(CMAKE_RANLIB : CACHE INTERNAL "noop for ranlib")
endif()
- find_program(CMAKE_STRIP NAMES ${_CMAKE_TOOLCHAIN_PREFIX}strip HINTS ${_CMAKE_TOOLCHAIN_LOCATION})
+ find_program(CMAKE_STRIP NAMES ${_CMAKE_TOOLCHAIN_PREFIX}strip${_CMAKE_TOOLCHAIN_SUFFIX} HINTS ${_CMAKE_TOOLCHAIN_LOCATION})
find_program(CMAKE_LINKER NAMES ${_CMAKE_TOOLCHAIN_PREFIX}ld HINTS ${_CMAKE_TOOLCHAIN_LOCATION})
find_program(CMAKE_NM NAMES ${_CMAKE_TOOLCHAIN_PREFIX}nm HINTS ${_CMAKE_TOOLCHAIN_LOCATION})
find_program(CMAKE_OBJDUMP NAMES ${_CMAKE_TOOLCHAIN_PREFIX}objdump HINTS ${_CMAKE_TOOLCHAIN_LOCATION})
diff --git a/Modules/CMakeFindEclipseCDT4.cmake b/Modules/CMakeFindEclipseCDT4.cmake
index 37b72fa..ae17454 100644
--- a/Modules/CMakeFindEclipseCDT4.cmake
+++ b/Modules/CMakeFindEclipseCDT4.cmake
@@ -77,6 +77,8 @@ endif()
# This variable is used by the Eclipse generator and appended to the make invocation commands.
set(CMAKE_ECLIPSE_MAKE_ARGUMENTS "${_CMAKE_ECLIPSE_INITIAL_MAKE_ARGS}" CACHE STRING "Additional command line arguments when Eclipse invokes make. Enter e.g. -j<some_number> to get parallel builds")
+set(CMAKE_ECLIPSE_GENERATE_LINKED_RESOURCES TRUE CACHE BOOL "If disabled, CMake will not generate linked resource to the subprojects and to the source files within targets")
+
# This variable is used by the Eclipse generator in out-of-source builds only.
set(CMAKE_ECLIPSE_GENERATE_SOURCE_PROJECT FALSE CACHE BOOL "If enabled, CMake will generate a source project for Eclipse in CMAKE_SOURCE_DIR")
mark_as_advanced(CMAKE_ECLIPSE_GENERATE_SOURCE_PROJECT)
diff --git a/Modules/CMakeFortranCompiler.cmake.in b/Modules/CMakeFortranCompiler.cmake.in
index 55f8277..d193881 100644
--- a/Modules/CMakeFortranCompiler.cmake.in
+++ b/Modules/CMakeFortranCompiler.cmake.in
@@ -52,3 +52,4 @@ endif()
set(CMAKE_Fortran_IMPLICIT_LINK_LIBRARIES "@CMAKE_Fortran_IMPLICIT_LINK_LIBRARIES@")
set(CMAKE_Fortran_IMPLICIT_LINK_DIRECTORIES "@CMAKE_Fortran_IMPLICIT_LINK_DIRECTORIES@")
+set(CMAKE_Fortran_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "@CMAKE_Fortran_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES@")
diff --git a/Modules/CMakeFortranCompilerId.F.in b/Modules/CMakeFortranCompilerId.F.in
index 4d25de0..f84852a 100644
--- a/Modules/CMakeFortranCompilerId.F.in
+++ b/Modules/CMakeFortranCompilerId.F.in
@@ -74,12 +74,8 @@
PRINT *, 'INFO:platform[IRIX]'
#elif defined(__hpux) || defined(__hpux__)
PRINT *, 'INFO:platform[HP-UX]'
-#elif defined(__HAIKU) || defined(__HAIKU__) || defined(_HAIKU)
+#elif defined(__HAIKU__)
PRINT *, 'INFO:platform[Haiku]'
-# if 0
-! Haiku also defines __BEOS__ so we must
-! put it prior to the check for __BEOS__
-# endif
#elif defined(__BeOS) || defined(__BEOS__) || defined(_BEOS)
PRINT *, 'INFO:platform[BeOS]'
#elif defined(__QNX__) || defined(__QNXNTO__)
diff --git a/Modules/CMakePackageConfigHelpers.cmake b/Modules/CMakePackageConfigHelpers.cmake
index 96ecb42..d042d5e 100644
--- a/Modules/CMakePackageConfigHelpers.cmake
+++ b/Modules/CMakePackageConfigHelpers.cmake
@@ -173,6 +173,7 @@ function(CONFIGURE_PACKAGE_CONFIG_FILE _inputFile _outputFile)
else()
set(absInstallDir "${CMAKE_INSTALL_PREFIX}/${CCF_INSTALL_DESTINATION}")
endif()
+
file(RELATIVE_PATH PACKAGE_RELATIVE_PATH "${absInstallDir}" "${CMAKE_INSTALL_PREFIX}" )
foreach(var ${CCF_PATH_VARS})
@@ -188,11 +189,31 @@ function(CONFIGURE_PACKAGE_CONFIG_FILE _inputFile _outputFile)
endif()
endforeach()
+ get_filename_component(inputFileName "${_inputFile}" NAME)
+
set(PACKAGE_INIT "
####### Expanded from @PACKAGE_INIT@ by configure_package_config_file() #######
+####### Any changes to this file will be overwritten by the next CMake run ####
+####### The input file was ${inputFileName} ########
+
get_filename_component(PACKAGE_PREFIX_DIR \"\${CMAKE_CURRENT_LIST_DIR}/${PACKAGE_RELATIVE_PATH}\" ABSOLUTE)
")
+ if("${absInstallDir}" MATCHES "^(/usr)?/lib(64)?/.+")
+ # Handle "/usr move" symlinks created by some Linux distros.
+ set(PACKAGE_INIT "${PACKAGE_INIT}
+# Use original install prefix when loaded through a \"/usr move\"
+# cross-prefix symbolic link such as /lib -> /usr/lib.
+get_filename_component(_realCurr \"\${CMAKE_CURRENT_LIST_DIR}\" REALPATH)
+get_filename_component(_realOrig \"${absInstallDir}\" REALPATH)
+if(_realCurr STREQUAL _realOrig)
+ set(PACKAGE_PREFIX_DIR \"${CMAKE_INSTALL_PREFIX}\")
+endif()
+unset(_realOrig)
+unset(_realCurr)
+")
+ endif()
+
if(NOT CCF_NO_SET_AND_CHECK_MACRO)
set(PACKAGE_INIT "${PACKAGE_INIT}
macro(set_and_check _var _file)
diff --git a/Modules/CMakeParseImplicitLinkInfo.cmake b/Modules/CMakeParseImplicitLinkInfo.cmake
index ecb20dc..80e0218 100644
--- a/Modules/CMakeParseImplicitLinkInfo.cmake
+++ b/Modules/CMakeParseImplicitLinkInfo.cmake
@@ -16,9 +16,10 @@
# This is used internally by CMake and should not be included by user
# code.
-function(CMAKE_PARSE_IMPLICIT_LINK_INFO text lib_var dir_var log_var obj_regex)
+function(CMAKE_PARSE_IMPLICIT_LINK_INFO text lib_var dir_var fwk_var log_var obj_regex)
set(implicit_libs_tmp "")
set(implicit_dirs_tmp)
+ set(implicit_fwks_tmp)
set(log "")
# Parse implicit linker arguments.
@@ -36,6 +37,16 @@ function(CMAKE_PARSE_IMPLICIT_LINK_INFO text lib_var dir_var log_var obj_regex)
set(cmd)
if("${line}" MATCHES "${linker_regex}" AND
NOT "${line}" MATCHES "${linker_exclude_regex}")
+ if(XCODE)
+ # Xcode unconditionally adds a path under the project build tree and
+ # on older versions it is not reported with proper quotes. Remove it.
+ string(REGEX REPLACE "([][+.*()^])" "\\\\\\1" _dir_regex "${CMAKE_BINARY_DIR}")
+ string(REGEX REPLACE " -[FL]${_dir_regex}/([^ ]| [^-])+( |$)" " " xline "${line}")
+ if(NOT "x${xline}" STREQUAL "x${line}")
+ set(log "${log} reduced line: [${line}]\n to: [${xline}]\n")
+ set(line "${xline}")
+ endif()
+ endif()
if(UNIX)
separate_arguments(args UNIX_COMMAND "${line}")
else()
@@ -97,32 +108,62 @@ function(CMAKE_PARSE_IMPLICIT_LINK_INFO text lib_var dir_var log_var obj_regex)
endif()
endforeach()
+ # Look for library search paths reported by linker.
+ if("${output_lines}" MATCHES ";Library search paths:((;\t[^;]+)+)")
+ string(REPLACE ";\t" ";" implicit_dirs_match "${CMAKE_MATCH_1}")
+ set(log "${log} Library search paths: [${implicit_dirs_match}]\n")
+ list(APPEND implicit_dirs_tmp ${implicit_dirs_match})
+ endif()
+ if("${output_lines}" MATCHES ";Framework search paths:((;\t[^;]+)+)")
+ string(REPLACE ";\t" ";" implicit_fwks_match "${CMAKE_MATCH_1}")
+ set(log "${log} Framework search paths: [${implicit_fwks_match}]\n")
+ list(APPEND implicit_fwks_tmp ${implicit_fwks_match})
+ endif()
+
# Cleanup list of libraries and flags.
# We remove items that are not language-specific.
set(implicit_libs "")
foreach(lib IN LISTS implicit_libs_tmp)
if("${lib}" MATCHES "^(crt.*\\.o|gcc.*|System.*)$")
set(log "${log} remove lib [${lib}]\n")
+ elseif(IS_ABSOLUTE "${lib}")
+ get_filename_component(abs "${lib}" ABSOLUTE)
+ if(NOT "x${lib}" STREQUAL "x${abs}")
+ set(log "${log} collapse lib [${lib}] ==> [${abs}]\n")
+ endif()
+ list(APPEND implicit_libs "${abs}")
else()
list(APPEND implicit_libs "${lib}")
endif()
endforeach()
- # Cleanup list of directories.
- set(implicit_dirs "")
- foreach(d IN LISTS implicit_dirs_tmp)
- get_filename_component(dir "${d}" ABSOLUTE)
- list(APPEND implicit_dirs "${dir}")
- set(log "${log} collapse dir [${d}] ==> [${dir}]\n")
+ # Cleanup list of library and framework directories.
+ set(desc_dirs "library")
+ set(desc_fwks "framework")
+ foreach(t dirs fwks)
+ set(implicit_${t} "")
+ foreach(d IN LISTS implicit_${t}_tmp)
+ get_filename_component(dir "${d}" ABSOLUTE)
+ string(FIND "${dir}" "${CMAKE_FILES_DIRECTORY}/" pos)
+ if(NOT pos LESS 0)
+ set(msg ", skipping non-system directory")
+ else()
+ set(msg "")
+ list(APPEND implicit_${t} "${dir}")
+ endif()
+ set(log "${log} collapse ${desc_${t}} dir [${d}] ==> [${dir}]${msg}\n")
+ endforeach()
+ list(REMOVE_DUPLICATES implicit_${t})
endforeach()
- list(REMOVE_DUPLICATES implicit_dirs)
# Log results.
set(log "${log} implicit libs: [${implicit_libs}]\n")
set(log "${log} implicit dirs: [${implicit_dirs}]\n")
+ set(log "${log} implicit fwks: [${implicit_fwks}]\n")
# Return results.
set(${lib_var} "${implicit_libs}" PARENT_SCOPE)
set(${dir_var} "${implicit_dirs}" PARENT_SCOPE)
+ set(${fwk_var} "${implicit_fwks}" PARENT_SCOPE)
set(${log_var} "${log}" PARENT_SCOPE)
endfunction()
diff --git a/Modules/CMakePlatformId.h.in b/Modules/CMakePlatformId.h.in
index c373414..69171c2 100644
--- a/Modules/CMakePlatformId.h.in
+++ b/Modules/CMakePlatformId.h.in
@@ -35,11 +35,8 @@
#elif defined(__hpux) || defined(__hpux__)
# define PLATFORM_ID "HP-UX"
-#elif defined(__HAIKU) || defined(__HAIKU__) || defined(_HAIKU)
+#elif defined(__HAIKU__)
# define PLATFORM_ID "Haiku"
-/* Haiku also defines __BEOS__ so we must
- put it prior to the check for __BEOS__
-*/
#elif defined(__BeOS) || defined(__BEOS__) || defined(_BEOS)
# define PLATFORM_ID "BeOS"
diff --git a/Modules/CMakeVS12FindMake.cmake b/Modules/CMakeVS12FindMake.cmake
new file mode 100644
index 0000000..338d9a2
--- /dev/null
+++ b/Modules/CMakeVS12FindMake.cmake
@@ -0,0 +1,27 @@
+
+#=============================================================================
+# Copyright 2007-2013 Kitware, Inc.
+#
+# 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.
+#=============================================================================
+# (To distribute this file outside of CMake, substitute the full
+# License text for the above reference.)
+
+# Always use MSBuild because:
+# - devenv treats command-line builds as recently-loaded projects in the IDE
+# - devenv does not appear to support non-standard platform toolsets
+# If we need devenv for Intel Fortran in the future we should add
+# a special case when Fortran is enabled.
+find_program(CMAKE_MAKE_PROGRAM
+ NAMES MSBuild
+ HINTS "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\MSBuild\\ToolsVersions\\12.0;MSBuildToolsPath]"
+ )
+
+mark_as_advanced(CMAKE_MAKE_PROGRAM)
+set(MSVC12 1)
+set(MSVC_VERSION 1800)
diff --git a/Modules/CPack.cmake b/Modules/CPack.cmake
index 6886ed9..42d3c0c 100644
--- a/Modules/CPack.cmake
+++ b/Modules/CPack.cmake
@@ -438,6 +438,7 @@ if(NOT CPACK_GENERATOR)
endif()
else()
option(CPACK_BINARY_NSIS "Enable to build NSIS packages" ON)
+ option(CPACK_BINARY_WIX "Enable to build WiX packages" OFF)
option(CPACK_BINARY_ZIP "Enable to build ZIP packages" OFF)
endif()
@@ -453,6 +454,7 @@ if(NOT CPACK_GENERATOR)
cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_TGZ TGZ)
cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_TBZ2 TBZ2)
cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_TZ TZ)
+ cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_WIX WIX)
cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_ZIP ZIP)
endif()
@@ -483,7 +485,7 @@ endif()
mark_as_advanced(CPACK_BINARY_CYGWIN CPACK_BINARY_PACKAGEMAKER CPACK_BINARY_OSXX11
CPACK_BINARY_STGZ CPACK_BINARY_TGZ CPACK_BINARY_TBZ2
CPACK_BINARY_DEB CPACK_BINARY_RPM CPACK_BINARY_TZ
- CPACK_BINARY_NSIS CPACK_BINARY_ZIP CPACK_BINARY_BUNDLE
+ CPACK_BINARY_NSIS CPACK_BINARY_WIX CPACK_BINARY_ZIP CPACK_BINARY_BUNDLE
CPACK_SOURCE_CYGWIN CPACK_SOURCE_TBZ2 CPACK_SOURCE_TGZ
CPACK_SOURCE_TZ CPACK_SOURCE_ZIP CPACK_BINARY_DRAGNDROP)
@@ -522,6 +524,9 @@ cpack_set_if_not_set(CPACK_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
cpack_set_if_not_set(CPACK_NSIS_INSTALLER_ICON_CODE "")
cpack_set_if_not_set(CPACK_NSIS_INSTALLER_MUI_ICON_CODE "")
+# WiX specific variables
+cpack_set_if_not_set(CPACK_WIX_SIZEOF_VOID_P "${CMAKE_SIZEOF_VOID_P}")
+
if(DEFINED CPACK_COMPONENTS_ALL)
if(CPACK_MONOLITHIC_INSTALL)
message("CPack warning: both CPACK_COMPONENTS_ALL and CPACK_MONOLITHIC_INSTALL have been set.\nDefaulting to a monolithic installation.")
diff --git a/Modules/CPackDeb.cmake b/Modules/CPackDeb.cmake
index 106b44c..75ff3be 100644
--- a/Modules/CPackDeb.cmake
+++ b/Modules/CPackDeb.cmake
@@ -385,15 +385,13 @@ endif()
# Are we packaging components ?
if(CPACK_DEB_PACKAGE_COMPONENT)
set(CPACK_DEB_PACKAGE_COMPONENT_PART_NAME "-${CPACK_DEB_PACKAGE_COMPONENT}")
- set(CPACK_DEB_PACKAGE_COMPONENT_PART_PATH "/${CPACK_DEB_PACKAGE_COMPONENT}")
- set(WDIR "${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_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 "")
- set(CPACK_DEB_PACKAGE_COMPONENT_PART_PATH "")
- set(WDIR "${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}")
endif()
+set(WDIR "${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}${CPACK_DEB_PACKAGE_COMPONENT_PART_PATH}")
+
# 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}")
diff --git a/Modules/CPackRPM.cmake b/Modules/CPackRPM.cmake
index 0cec897..fa79e1b 100644
--- a/Modules/CPackRPM.cmake
+++ b/Modules/CPackRPM.cmake
@@ -311,14 +311,12 @@ endif()
# Are we packaging components ?
if(CPACK_RPM_PACKAGE_COMPONENT)
set(CPACK_RPM_PACKAGE_COMPONENT_PART_NAME "-${CPACK_RPM_PACKAGE_COMPONENT}")
- set(CPACK_RPM_PACKAGE_COMPONENT_PART_PATH "/${CPACK_RPM_PACKAGE_COMPONENT}")
- set(WDIR "${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}/${CPACK_RPM_PACKAGE_COMPONENT}")
else()
set(CPACK_RPM_PACKAGE_COMPONENT_PART_NAME "")
- set(CPACK_RPM_PACKAGE_COMPONENT_PART_PATH "")
- set(WDIR "${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}")
endif()
+set(WDIR "${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}${CPACK_RPM_PACKAGE_COMPONENT_PART_PATH}")
+
#
# Use user-defined RPM specific variables value
# or generate reasonable default value from
@@ -453,31 +451,41 @@ endif()
# Check if additional fields for RPM spec header are given
# There may be some COMPONENT specific variables as well
+# If component specific var is not provided we use the global one
+# for each component
foreach(_RPM_SPEC_HEADER URL REQUIRES SUGGESTS PROVIDES OBSOLETES PREFIX CONFLICTS AUTOPROV AUTOREQ AUTOREQPROV)
if(CPACK_RPM_PACKAGE_DEBUG)
message("CPackRPM:Debug: processing ${_RPM_SPEC_HEADER}")
endif()
if(CPACK_RPM_PACKAGE_COMPONENT)
- if(CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_PACKAGE_${_RPM_SPEC_HEADER})
+ if(DEFINED CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_PACKAGE_${_RPM_SPEC_HEADER})
if(CPACK_RPM_PACKAGE_DEBUG)
message("CPackRPM:Debug: using CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_PACKAGE_${_RPM_SPEC_HEADER}")
endif()
set(CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}_TMP ${CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_PACKAGE_${_RPM_SPEC_HEADER}})
else()
- if(CPACK_RPM_PACKAGE_DEBUG)
- message("CPackRPM:Debug: CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_PACKAGE_${_RPM_SPEC_HEADER} not defined")
- message("CPackRPM:Debug: using CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}")
+ if(DEFINED CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER})
+ if(CPACK_RPM_PACKAGE_DEBUG)
+ message("CPackRPM:Debug: CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_PACKAGE_${_RPM_SPEC_HEADER} not defined")
+ message("CPackRPM:Debug: using CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}")
+ endif()
+ set(CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}_TMP ${CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}})
endif()
- set(CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}_TMP ${CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}})
endif()
else()
- if(CPACK_RPM_PACKAGE_DEBUG)
- message("CPackRPM:Debug: using CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}")
+ if(DEFINED CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER})
+ if(CPACK_RPM_PACKAGE_DEBUG)
+ message("CPackRPM:Debug: using CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}")
+ endif()
+ set(CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}_TMP ${CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}})
endif()
- set(CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}_TMP ${CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}})
endif()
- if(CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}_TMP)
+ # Treat the RPM Spec keyword iff it has been properly defined
+ if(DEFINED CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}_TMP)
+ # Transform NAME --> Name e.g. PROVIDES --> Provides
+ # The Upper-case first letter and lowercase tail is the
+ # appropriate value required in the final RPM spec file.
string(LENGTH ${_RPM_SPEC_HEADER} _PACKAGE_HEADER_STRLENGTH)
math(EXPR _PACKAGE_HEADER_STRLENGTH "${_PACKAGE_HEADER_STRLENGTH} - 1")
string(SUBSTRING ${_RPM_SPEC_HEADER} 1 ${_PACKAGE_HEADER_STRLENGTH} _PACKAGE_HEADER_TAIL)
diff --git a/Modules/CPackWIX.cmake b/Modules/CPackWIX.cmake
new file mode 100644
index 0000000..0c0a8f1
--- /dev/null
+++ b/Modules/CPackWIX.cmake
@@ -0,0 +1,109 @@
+##section Variables specific to CPack WiX generator
+##end
+##module
+# - CPack WiX generator specific options
+#
+# The following variables are specific to the installers built
+# on Windows using WiX.
+##end
+##variable
+# CPACK_WIX_UPGRADE_GUID - Upgrade GUID (Product/@UpgradeCode)
+#
+# Will be automatically generated unless explicitly provided.
+#
+# It should be explicitly set to a constant generated
+# gloabally unique identifier (GUID) to allow your installers
+# to replace existing installations that use the same GUID.
+#
+# You may for example explicitly set this variable in
+# your CMakeLists.txt to the value that has been generated per default.
+# You should not use GUIDs that you did not generate yourself or which may
+# belong to other projects.
+#
+# A GUID shall have the following fixed length syntax:
+# XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
+# (each X represents an uppercase hexadecimal digit)
+##end
+##variable
+# CPACK_WIX_PRODUCT_GUID - Product GUID (Product/@Id)
+#
+# Will be automatically generated unless explicitly provided.
+#
+# If explicitly provided this will set the Product Id of your installer.
+#
+# The installer will abort if it detects a pre-existing installation that uses
+# the same GUID.
+#
+# The GUID shall use the syntax described for CPACK_WIX_UPGRADE_GUID.
+##end
+##variable
+# CPACK_WIX_LICENSE_RTF - RTF License File
+#
+# If CPACK_RESOURCE_FILE_LICENSE has an .rtf extension
+# it is used as-is.
+#
+# If CPACK_RESOURCE_FILE_LICENSE has an .txt extension
+# it is implicitly converted to RTF by the WiX Generator.
+#
+# With CPACK_WIX_LICENSE_RTF you can override the license file used
+# by the WiX Generator in case CPACK_RESOURCE_FILE_LICENSE
+# is in an unsupported format or the .txt -> .rtf
+# conversion does not work as expected.
+#
+##end
+#
+##variable
+# CPACK_WIX_PRODUCT_ICON - The Icon shown next to the program name in Add/Remove programs.
+#
+# If set, this icon is used in place of the default icon.
+#
+##end
+#
+##variable
+# CPACK_WIX_UI_BANNER - The bitmap will appear at the top of all installer pages other than the welcome and completion dialogs.
+#
+# If set, this image will replace the default banner image.
+#
+# This image must be 493 by 58 pixels.
+#
+##end
+#
+##variable
+# CPACK_WIX_UI_DIALOG - Background bitmap used on the welcome and completion dialogs.
+#
+# If this variable is set, the installer will replace the default dialog image.
+#
+# This image must be 493 by 312 pixels.
+#
+##end
+
+#=============================================================================
+# Copyright 2012 Kitware, Inc.
+#
+# 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.
+#=============================================================================
+# (To distribute this file outside of CMake, substitute the full
+# License text for the above reference.)
+
+if(NOT CPACK_WIX_ROOT)
+ file(TO_CMAKE_PATH "$ENV{WIX}" CPACK_WIX_ROOT)
+endif()
+
+find_program(CPACK_WIX_CANDLE_EXECUTABLE candle
+ PATHS "${CPACK_WIX_ROOT}/bin")
+
+if(NOT CPACK_WIX_CANDLE_EXECUTABLE)
+ message(FATAL_ERROR "Could not find the WiX candle executable.")
+endif()
+
+find_program(CPACK_WIX_LIGHT_EXECUTABLE light
+ PATHS "${CPACK_WIX_ROOT}/bin")
+
+if(NOT CPACK_WIX_LIGHT_EXECUTABLE)
+ message(FATAL_ERROR "Could not find the WiX light executable.")
+endif()
diff --git a/Modules/CTestTargets.cmake b/Modules/CTestTargets.cmake
index fd4bd80..5b6e062 100644
--- a/Modules/CTestTargets.cmake
+++ b/Modules/CTestTargets.cmake
@@ -16,6 +16,10 @@ if(NOT RUN_FROM_CTEST_OR_DART)
message(FATAL_ERROR "Do not incldue CTestTargets.cmake directly")
endif()
+if(NOT PROJECT_BINARY_DIR)
+ message(FATAL_ERROR "Do not include(CTest) before calling project().")
+endif()
+
# make directories in the binary tree
file(MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/Testing/Temporary)
get_filename_component(CMAKE_HOST_PATH ${CMAKE_COMMAND} PATH)
diff --git a/Modules/CTestUseLaunchers.cmake b/Modules/CTestUseLaunchers.cmake
index 6731d37..24f5f2e 100644
--- a/Modules/CTestUseLaunchers.cmake
+++ b/Modules/CTestUseLaunchers.cmake
@@ -35,7 +35,7 @@ if(NOT DEFINED CTEST_USE_LAUNCHERS AND DEFINED ENV{CTEST_USE_LAUNCHERS_DEFAULT})
CACHE INTERNAL "CTEST_USE_LAUNCHERS initial value from ENV")
endif()
-if(NOT "${CMAKE_GENERATOR}" MATCHES "Make")
+if(NOT "${CMAKE_GENERATOR}" MATCHES "Make|Ninja")
set(CTEST_USE_LAUNCHERS 0)
endif()
diff --git a/Modules/CheckCSourceCompiles.cmake b/Modules/CheckCSourceCompiles.cmake
index b457754..86a4565 100644
--- a/Modules/CheckCSourceCompiles.cmake
+++ b/Modules/CheckCSourceCompiles.cmake
@@ -24,7 +24,6 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-include("${CMAKE_CURRENT_LIST_DIR}/CMakeExpandImportedTargets.cmake")
macro(CHECK_C_SOURCE_COMPILES SOURCE VAR)
@@ -43,10 +42,8 @@ macro(CHECK_C_SOURCE_COMPILES SOURCE VAR)
set(MACRO_CHECK_FUNCTION_DEFINITIONS
"-D${VAR} ${CMAKE_REQUIRED_FLAGS}")
if(CMAKE_REQUIRED_LIBRARIES)
- # this one translates potentially used imported library targets to their files on disk
- CMAKE_EXPAND_IMPORTED_TARGETS(_ADJUSTED_CMAKE_REQUIRED_LIBRARIES LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} CONFIGURATION "${CMAKE_TRY_COMPILE_CONFIGURATION}")
set(CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES
- "-DLINK_LIBRARIES:STRING=${_ADJUSTED_CMAKE_REQUIRED_LIBRARIES}")
+ LINK_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES})
else()
set(CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES)
endif()
@@ -64,8 +61,8 @@ macro(CHECK_C_SOURCE_COMPILES SOURCE VAR)
${CMAKE_BINARY_DIR}
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.c
COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS}
+ ${CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES}
CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_FUNCTION_DEFINITIONS}
- "${CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES}"
"${CHECK_C_SOURCE_COMPILES_ADD_INCLUDES}"
OUTPUT_VARIABLE OUTPUT)
diff --git a/Modules/CheckCSourceRuns.cmake b/Modules/CheckCSourceRuns.cmake
index bc64acd..e3a091f 100644
--- a/Modules/CheckCSourceRuns.cmake
+++ b/Modules/CheckCSourceRuns.cmake
@@ -24,7 +24,6 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-include("${CMAKE_CURRENT_LIST_DIR}/CMakeExpandImportedTargets.cmake")
macro(CHECK_C_SOURCE_RUNS SOURCE VAR)
@@ -32,10 +31,8 @@ macro(CHECK_C_SOURCE_RUNS SOURCE VAR)
set(MACRO_CHECK_FUNCTION_DEFINITIONS
"-D${VAR} ${CMAKE_REQUIRED_FLAGS}")
if(CMAKE_REQUIRED_LIBRARIES)
- # this one translates potentially used imported library targets to their files on disk
- CMAKE_EXPAND_IMPORTED_TARGETS(_ADJUSTED_CMAKE_REQUIRED_LIBRARIES LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} CONFIGURATION "${CMAKE_TRY_COMPILE_CONFIGURATION}")
set(CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES
- "-DLINK_LIBRARIES:STRING=${_ADJUSTED_CMAKE_REQUIRED_LIBRARIES}")
+ LINK_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES})
else()
set(CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES)
endif()
@@ -53,9 +50,9 @@ macro(CHECK_C_SOURCE_RUNS SOURCE VAR)
${CMAKE_BINARY_DIR}
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.c
COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS}
+ ${CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES}
CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_FUNCTION_DEFINITIONS}
-DCMAKE_SKIP_RPATH:BOOL=${CMAKE_SKIP_RPATH}
- "${CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES}"
"${CHECK_C_SOURCE_COMPILES_ADD_INCLUDES}"
COMPILE_OUTPUT_VARIABLE OUTPUT)
# if it did not compile make the return value fail code of 1
diff --git a/Modules/CheckCXXSourceCompiles.cmake b/Modules/CheckCXXSourceCompiles.cmake
index c0be1f7..734c083 100644
--- a/Modules/CheckCXXSourceCompiles.cmake
+++ b/Modules/CheckCXXSourceCompiles.cmake
@@ -24,7 +24,6 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-include("${CMAKE_CURRENT_LIST_DIR}/CMakeExpandImportedTargets.cmake")
macro(CHECK_CXX_SOURCE_COMPILES SOURCE VAR)
@@ -44,10 +43,8 @@ macro(CHECK_CXX_SOURCE_COMPILES SOURCE VAR)
set(MACRO_CHECK_FUNCTION_DEFINITIONS
"-D${VAR} ${CMAKE_REQUIRED_FLAGS}")
if(CMAKE_REQUIRED_LIBRARIES)
- # this one translates potentially used imported library targets to their files on disk
- CMAKE_EXPAND_IMPORTED_TARGETS(_ADJUSTED_CMAKE_REQUIRED_LIBRARIES LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} CONFIGURATION "${CMAKE_TRY_COMPILE_CONFIGURATION}")
set(CHECK_CXX_SOURCE_COMPILES_ADD_LIBRARIES
- "-DLINK_LIBRARIES:STRING=${_ADJUSTED_CMAKE_REQUIRED_LIBRARIES}")
+ LINK_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES})
else()
set(CHECK_CXX_SOURCE_COMPILES_ADD_LIBRARIES)
endif()
@@ -65,8 +62,8 @@ macro(CHECK_CXX_SOURCE_COMPILES SOURCE VAR)
${CMAKE_BINARY_DIR}
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.cxx
COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS}
+ ${CHECK_CXX_SOURCE_COMPILES_ADD_LIBRARIES}
CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_FUNCTION_DEFINITIONS}
- "${CHECK_CXX_SOURCE_COMPILES_ADD_LIBRARIES}"
"${CHECK_CXX_SOURCE_COMPILES_ADD_INCLUDES}"
OUTPUT_VARIABLE OUTPUT)
diff --git a/Modules/CheckCXXSourceRuns.cmake b/Modules/CheckCXXSourceRuns.cmake
index 47ab161..9e401f1 100644
--- a/Modules/CheckCXXSourceRuns.cmake
+++ b/Modules/CheckCXXSourceRuns.cmake
@@ -24,7 +24,6 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-include("${CMAKE_CURRENT_LIST_DIR}/CMakeExpandImportedTargets.cmake")
macro(CHECK_CXX_SOURCE_RUNS SOURCE VAR)
@@ -32,10 +31,8 @@ macro(CHECK_CXX_SOURCE_RUNS SOURCE VAR)
set(MACRO_CHECK_FUNCTION_DEFINITIONS
"-D${VAR} ${CMAKE_REQUIRED_FLAGS}")
if(CMAKE_REQUIRED_LIBRARIES)
- # this one translates potentially used imported library targets to their files on disk
- CMAKE_EXPAND_IMPORTED_TARGETS(_ADJUSTED_CMAKE_REQUIRED_LIBRARIES LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} CONFIGURATION "${CMAKE_TRY_COMPILE_CONFIGURATION}")
set(CHECK_CXX_SOURCE_COMPILES_ADD_LIBRARIES
- "-DLINK_LIBRARIES:STRING=${_ADJUSTED_CMAKE_REQUIRED_LIBRARIES}")
+ LINK_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES})
else()
set(CHECK_CXX_SOURCE_COMPILES_ADD_LIBRARIES)
endif()
@@ -53,9 +50,9 @@ macro(CHECK_CXX_SOURCE_RUNS SOURCE VAR)
${CMAKE_BINARY_DIR}
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.cxx
COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS}
+ ${CHECK_CXX_SOURCE_COMPILES_ADD_LIBRARIES}
CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_FUNCTION_DEFINITIONS}
-DCMAKE_SKIP_RPATH:BOOL=${CMAKE_SKIP_RPATH}
- "${CHECK_CXX_SOURCE_COMPILES_ADD_LIBRARIES}"
"${CHECK_CXX_SOURCE_COMPILES_ADD_INCLUDES}"
COMPILE_OUTPUT_VARIABLE OUTPUT)
diff --git a/Modules/CheckForPthreads.c b/Modules/CheckForPthreads.c
index 882dc21..7250fbf 100644
--- a/Modules/CheckForPthreads.c
+++ b/Modules/CheckForPthreads.c
@@ -16,7 +16,7 @@ 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__) && !defined(__HAIKU__) // (no usleep on BeOS 5.)
+#if defined(__BEOS__) && !defined(__ZETA__) // (no usleep on BeOS 5.)
usleep(1); // for strange behavior on single-processor sun
#endif
diff --git a/Modules/CheckFortranFunctionExists.cmake b/Modules/CheckFortranFunctionExists.cmake
index 4b9f9b7..45dd7be 100644
--- a/Modules/CheckFortranFunctionExists.cmake
+++ b/Modules/CheckFortranFunctionExists.cmake
@@ -22,17 +22,14 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-include("${CMAKE_CURRENT_LIST_DIR}/CMakeExpandImportedTargets.cmake")
macro(CHECK_FORTRAN_FUNCTION_EXISTS FUNCTION VARIABLE)
if(NOT DEFINED ${VARIABLE})
message(STATUS "Looking for Fortran ${FUNCTION}")
if(CMAKE_REQUIRED_LIBRARIES)
- # this one translates potentially used imported library targets to their files on disk
- cmake_expand_imported_targets(_ADJUSTED_CMAKE_REQUIRED_LIBRARIES LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} CONFIGURATION "${CMAKE_TRY_COMPILE_CONFIGURATION}")
set(CHECK_FUNCTION_EXISTS_ADD_LIBRARIES
- "-DLINK_LIBRARIES:STRING=${_ADJUSTED_CMAKE_REQUIRED_LIBRARIES}")
+ LINK_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES})
else()
set(CHECK_FUNCTION_EXISTS_ADD_LIBRARIES)
endif()
@@ -48,7 +45,7 @@ macro(CHECK_FORTRAN_FUNCTION_EXISTS FUNCTION VARIABLE)
try_compile(${VARIABLE}
${CMAKE_BINARY_DIR}
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testFortranCompiler.f
- CMAKE_FLAGS "${CHECK_FUNCTION_EXISTS_ADD_LIBRARIES}"
+ ${CHECK_FUNCTION_EXISTS_ADD_LIBRARIES}
OUTPUT_VARIABLE OUTPUT
)
# message(STATUS "${OUTPUT}")
diff --git a/Modules/CheckFunctionExists.cmake b/Modules/CheckFunctionExists.cmake
index 3f952e0..7aa1748 100644
--- a/Modules/CheckFunctionExists.cmake
+++ b/Modules/CheckFunctionExists.cmake
@@ -27,7 +27,6 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-include("${CMAKE_CURRENT_LIST_DIR}/CMakeExpandImportedTargets.cmake")
macro(CHECK_FUNCTION_EXISTS FUNCTION VARIABLE)
@@ -36,10 +35,8 @@ macro(CHECK_FUNCTION_EXISTS FUNCTION VARIABLE)
"-DCHECK_FUNCTION_EXISTS=${FUNCTION} ${CMAKE_REQUIRED_FLAGS}")
message(STATUS "Looking for ${FUNCTION}")
if(CMAKE_REQUIRED_LIBRARIES)
- # this one translates potentially used imported library targets to their files on disk
- CMAKE_EXPAND_IMPORTED_TARGETS(_ADJUSTED_CMAKE_REQUIRED_LIBRARIES LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} CONFIGURATION "${CMAKE_TRY_COMPILE_CONFIGURATION}")
set(CHECK_FUNCTION_EXISTS_ADD_LIBRARIES
- "-DLINK_LIBRARIES:STRING=${_ADJUSTED_CMAKE_REQUIRED_LIBRARIES}")
+ LINK_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES})
else()
set(CHECK_FUNCTION_EXISTS_ADD_LIBRARIES)
endif()
@@ -53,8 +50,8 @@ macro(CHECK_FUNCTION_EXISTS FUNCTION VARIABLE)
${CMAKE_BINARY_DIR}
${CMAKE_ROOT}/Modules/CheckFunctionExists.c
COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS}
+ ${CHECK_FUNCTION_EXISTS_ADD_LIBRARIES}
CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_FUNCTION_DEFINITIONS}
- "${CHECK_FUNCTION_EXISTS_ADD_LIBRARIES}"
"${CHECK_FUNCTION_EXISTS_ADD_INCLUDES}"
OUTPUT_VARIABLE OUTPUT)
if(${VARIABLE})
diff --git a/Modules/CheckLibraryExists.cmake b/Modules/CheckLibraryExists.cmake
index 697f8a4..fb7d0ec 100644
--- a/Modules/CheckLibraryExists.cmake
+++ b/Modules/CheckLibraryExists.cmake
@@ -26,7 +26,6 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-include("${CMAKE_CURRENT_LIST_DIR}/CMakeExpandImportedTargets.cmake")
macro(CHECK_LIBRARY_EXISTS LIBRARY FUNCTION LOCATION VARIABLE)
@@ -36,19 +35,17 @@ macro(CHECK_LIBRARY_EXISTS LIBRARY FUNCTION LOCATION VARIABLE)
message(STATUS "Looking for ${FUNCTION} in ${LIBRARY}")
set(CHECK_LIBRARY_EXISTS_LIBRARIES ${LIBRARY})
if(CMAKE_REQUIRED_LIBRARIES)
- # this one translates potentially used imported library targets to their files on disk
- CMAKE_EXPAND_IMPORTED_TARGETS(_ADJUSTED_CMAKE_REQUIRED_LIBRARIES LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} CONFIGURATION "${CMAKE_TRY_COMPILE_CONFIGURATION}")
set(CHECK_LIBRARY_EXISTS_LIBRARIES
- ${CHECK_LIBRARY_EXISTS_LIBRARIES} ${_ADJUSTED_CMAKE_REQUIRED_LIBRARIES})
+ ${CHECK_LIBRARY_EXISTS_LIBRARIES} ${CMAKE_REQUIRED_LIBRARIES})
endif()
try_compile(${VARIABLE}
${CMAKE_BINARY_DIR}
${CMAKE_ROOT}/Modules/CheckFunctionExists.c
COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS}
+ LINK_LIBRARIES ${CHECK_LIBRARY_EXISTS_LIBRARIES}
CMAKE_FLAGS
-DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_LIBRARY_EXISTS_DEFINITION}
-DLINK_DIRECTORIES:STRING=${LOCATION}
- "-DLINK_LIBRARIES:STRING=${CHECK_LIBRARY_EXISTS_LIBRARIES}"
OUTPUT_VARIABLE OUTPUT)
if(${VARIABLE})
diff --git a/Modules/CheckPrototypeDefinition.cmake b/Modules/CheckPrototypeDefinition.cmake
index 74b94b8..2342b3c 100644
--- a/Modules/CheckPrototypeDefinition.cmake
+++ b/Modules/CheckPrototypeDefinition.cmake
@@ -34,7 +34,6 @@
# License text for the above reference.)
#
-include("${CMAKE_CURRENT_LIST_DIR}/CMakeExpandImportedTargets.cmake")
get_filename_component(__check_proto_def_dir "${CMAKE_CURRENT_LIST_FILE}" PATH)
@@ -46,10 +45,8 @@ function(CHECK_PROTOTYPE_DEFINITION _FUNCTION _PROTOTYPE _RETURN _HEADER _VARIAB
set(CHECK_PROTOTYPE_DEFINITION_FLAGS ${CMAKE_REQUIRED_FLAGS})
if (CMAKE_REQUIRED_LIBRARIES)
- # this one translates potentially used imported library targets to their files on disk
- cmake_expand_imported_targets(_ADJUSTED_CMAKE_REQUIRED_LIBRARIES LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} CONFIGURATION "${CMAKE_TRY_COMPILE_CONFIGURATION}")
set(CHECK_PROTOTYPE_DEFINITION_LIBS
- "-DLINK_LIBRARIES:STRING=${_ADJUSTED_CMAKE_REQUIRED_LIBRARIES}")
+ LINK_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES})
else()
set(CHECK_PROTOTYPE_DEFINITION_LIBS)
endif()
@@ -78,8 +75,8 @@ function(CHECK_PROTOTYPE_DEFINITION _FUNCTION _PROTOTYPE _RETURN _HEADER _VARIAB
${CMAKE_BINARY_DIR}
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckPrototypeDefinition.c
COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS}
+ ${CHECK_PROTOTYPE_DEFINITION_LIBS}
CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${CHECK_PROTOTYPE_DEFINITION_FLAGS}
- "${CHECK_PROTOTYPE_DEFINITION_LIBS}"
"${CMAKE_SYMBOL_EXISTS_INCLUDES}"
OUTPUT_VARIABLE OUTPUT)
diff --git a/Modules/CheckSymbolExists.cmake b/Modules/CheckSymbolExists.cmake
index 5a8597f..0969bc5 100644
--- a/Modules/CheckSymbolExists.cmake
+++ b/Modules/CheckSymbolExists.cmake
@@ -35,7 +35,6 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-include("${CMAKE_CURRENT_LIST_DIR}/CMakeExpandImportedTargets.cmake")
macro(CHECK_SYMBOL_EXISTS SYMBOL FILES VARIABLE)
@@ -47,10 +46,8 @@ macro(_CHECK_SYMBOL_EXISTS SOURCEFILE SYMBOL FILES VARIABLE)
set(CMAKE_CONFIGURABLE_FILE_CONTENT "/* */\n")
set(MACRO_CHECK_SYMBOL_EXISTS_FLAGS ${CMAKE_REQUIRED_FLAGS})
if(CMAKE_REQUIRED_LIBRARIES)
- # this one translates potentially used imported library targets to their files on disk
- CMAKE_EXPAND_IMPORTED_TARGETS(_ADJUSTED_CMAKE_REQUIRED_LIBRARIES LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} CONFIGURATION "${CMAKE_TRY_COMPILE_CONFIGURATION}")
set(CHECK_SYMBOL_EXISTS_LIBS
- "-DLINK_LIBRARIES:STRING=${_ADJUSTED_CMAKE_REQUIRED_LIBRARIES}")
+ LINK_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES})
else()
set(CHECK_SYMBOL_EXISTS_LIBS)
endif()
@@ -75,9 +72,9 @@ macro(_CHECK_SYMBOL_EXISTS SOURCEFILE SYMBOL FILES VARIABLE)
${CMAKE_BINARY_DIR}
"${SOURCEFILE}"
COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS}
+ ${CHECK_SYMBOL_EXISTS_LIBS}
CMAKE_FLAGS
-DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_SYMBOL_EXISTS_FLAGS}
- "${CHECK_SYMBOL_EXISTS_LIBS}"
"${CMAKE_SYMBOL_EXISTS_INCLUDES}"
OUTPUT_VARIABLE OUTPUT)
if(${VARIABLE})
diff --git a/Modules/CheckTypeSize.cmake b/Modules/CheckTypeSize.cmake
index 7285b8a..2d0eab5 100644
--- a/Modules/CheckTypeSize.cmake
+++ b/Modules/CheckTypeSize.cmake
@@ -52,7 +52,6 @@
# License text for the above reference.)
include(CheckIncludeFile)
-include("${CMAKE_CURRENT_LIST_DIR}/CMakeExpandImportedTargets.cmake")
cmake_policy(PUSH)
cmake_minimum_required(VERSION 2.6 FATAL_ERROR)
@@ -83,18 +82,16 @@ function(__check_type_size_impl type var map builtin)
# Perform the check.
- # this one translates potentially used imported library targets to their files on disk
- cmake_expand_imported_targets(_ADJUSTED_CMAKE_REQUIRED_LIBRARIES LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} CONFIGURATION "${CMAKE_TRY_COMPILE_CONFIGURATION}")
set(src ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CheckTypeSize/${var}.c)
set(bin ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CheckTypeSize/${var}.bin)
configure_file(${__check_type_size_dir}/CheckTypeSize.c.in ${src} @ONLY)
try_compile(HAVE_${var} ${CMAKE_BINARY_DIR} ${src}
COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS}
+ LINK_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES}
CMAKE_FLAGS
"-DCOMPILE_DEFINITIONS:STRING=${CMAKE_REQUIRED_FLAGS}"
"-DINCLUDE_DIRECTORIES:STRING=${CMAKE_REQUIRED_INCLUDES}"
- "-DLINK_LIBRARIES:STRING=${_ADJUSTED_CMAKE_REQUIRED_LIBRARIES}"
OUTPUT_VARIABLE output
COPY_FILE ${bin}
)
diff --git a/Modules/CheckVariableExists.cmake b/Modules/CheckVariableExists.cmake
index f9155a0..a21e65f 100644
--- a/Modules/CheckVariableExists.cmake
+++ b/Modules/CheckVariableExists.cmake
@@ -26,7 +26,6 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-include("${CMAKE_CURRENT_LIST_DIR}/CMakeExpandImportedTargets.cmake")
macro(CHECK_VARIABLE_EXISTS VAR VARIABLE)
@@ -35,10 +34,8 @@ macro(CHECK_VARIABLE_EXISTS VAR VARIABLE)
"-DCHECK_VARIABLE_EXISTS=${VAR} ${CMAKE_REQUIRED_FLAGS}")
message(STATUS "Looking for ${VAR}")
if(CMAKE_REQUIRED_LIBRARIES)
- # this one translates potentially used imported library targets to their files on disk
- CMAKE_EXPAND_IMPORTED_TARGETS(_ADJUSTED_CMAKE_REQUIRED_LIBRARIES LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} CONFIGURATION "${CMAKE_TRY_COMPILE_CONFIGURATION}")
set(CHECK_VARIABLE_EXISTS_ADD_LIBRARIES
- "-DLINK_LIBRARIES:STRING=${_ADJUSTED_CMAKE_REQUIRED_LIBRARIES}")
+ LINK_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES})
else()
set(CHECK_VARIABLE_EXISTS_ADD_LIBRARIES)
endif()
@@ -46,8 +43,8 @@ macro(CHECK_VARIABLE_EXISTS VAR VARIABLE)
${CMAKE_BINARY_DIR}
${CMAKE_ROOT}/Modules/CheckVariableExists.c
COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS}
+ ${CHECK_VARIABLE_EXISTS_ADD_LIBRARIES}
CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_VARIABLE_DEFINITIONS}
- "${CHECK_VARIABLE_EXISTS_ADD_LIBRARIES}"
OUTPUT_VARIABLE OUTPUT)
if(${VARIABLE})
set(${VARIABLE} 1 CACHE INTERNAL "Have variable ${VAR}")
diff --git a/Modules/Compiler/Clang.cmake b/Modules/Compiler/Clang.cmake
index 75a971d..c6cd8f8 100644
--- a/Modules/Compiler/Clang.cmake
+++ b/Modules/Compiler/Clang.cmake
@@ -23,4 +23,5 @@ include(Compiler/GNU)
macro(__compiler_clang lang)
__compiler_gnu(${lang})
set(CMAKE_${lang}_COMPILE_OPTIONS_PIE "-fPIE")
+ set(CMAKE_INCLUDE_SYSTEM_FLAG_${lang} "-isystem ")
endmacro()
diff --git a/Modules/Compiler/NAG-Fortran.cmake b/Modules/Compiler/NAG-Fortran.cmake
index 9a89746..18f141e 100644
--- a/Modules/Compiler/NAG-Fortran.cmake
+++ b/Modules/Compiler/NAG-Fortran.cmake
@@ -32,3 +32,4 @@ set(CMAKE_Fortran_MODDIR_FLAG "-mdir ")
set(CMAKE_SHARED_LIBRARY_Fortran_FLAGS "-PIC")
set(CMAKE_Fortran_FORMAT_FIXED_FLAG "-fixed")
set(CMAKE_Fortran_FORMAT_FREE_FLAG "-free")
+set(CMAKE_Fortran_COMPILE_OPTIONS_PIC "-PIC")
diff --git a/Modules/Compiler/TI-ASM.cmake b/Modules/Compiler/TI-ASM.cmake
new file mode 100644
index 0000000..e097626
--- /dev/null
+++ b/Modules/Compiler/TI-ASM.cmake
@@ -0,0 +1,8 @@
+set(CMAKE_LIBRARY_PATH_FLAG "--search_path=")
+set(CMAKE_LINK_LIBRARY_FLAG "--library=")
+set(CMAKE_INCLUDE_FLAG_ASM "--include_path=")
+
+set(CMAKE_ASM_COMPILE_OBJECT "<CMAKE_ASM_COMPILER> --compile_only --asm_file=<SOURCE> <DEFINES> <FLAGS> --output_file=<OBJECT>")
+set(CMAKE_ASM_LINK_EXECUTABLE "<CMAKE_ASM_COMPILER> <OBJECTS> --run_linker --output_file=<TARGET> <CMAKE_ASM_LINK_FLAGS> <LINK_FLAGS> <LINK_LIBRARIES>")
+
+set(CMAKE_ASM_SOURCE_FILE_EXTENSIONS asm;s;abs)
diff --git a/Modules/Compiler/TI-C.cmake b/Modules/Compiler/TI-C.cmake
new file mode 100644
index 0000000..b580994
--- /dev/null
+++ b/Modules/Compiler/TI-C.cmake
@@ -0,0 +1,10 @@
+set(CMAKE_LIBRARY_PATH_FLAG "--search_path=")
+set(CMAKE_LINK_LIBRARY_FLAG "--library=")
+set(CMAKE_INCLUDE_FLAG_C "--include_path=")
+
+set(CMAKE_C_CREATE_ASSEMBLY_SOURCE "<CMAKE_C_COMPILER> --compile_only --skip_assembler --c_file=<SOURCE> <DEFINES> <FLAGS> --output_file=<ASSEMBLY_SOURCE>")
+set(CMAKE_C_CREATE_PREPROCESSED_SOURCE "<CMAKE_C_COMPILER> --preproc_only --c_file=<SOURCE> <DEFINES> <FLAGS> --output_file=<PREPROCESSED_SOURCE>")
+
+set(CMAKE_C_COMPILE_OBJECT "<CMAKE_C_COMPILER> --compile_only --c_file=<SOURCE> <DEFINES> <FLAGS> --output_file=<OBJECT>")
+set(CMAKE_C_ARCHIVE_CREATE "<CMAKE_AR> -r <TARGET> <OBJECTS>")
+set(CMAKE_C_LINK_EXECUTABLE "<CMAKE_C_COMPILER> --run_linker --output_file=<TARGET> --map_file=<TARGET>.map <CMAKE_C_LINK_FLAGS> <LINK_LIBRARIES> <LINK_FLAGS> <OBJECTS>")
diff --git a/Modules/Compiler/TI-CXX.cmake b/Modules/Compiler/TI-CXX.cmake
new file mode 100644
index 0000000..8cf5ac3
--- /dev/null
+++ b/Modules/Compiler/TI-CXX.cmake
@@ -0,0 +1,10 @@
+set(CMAKE_LIBRARY_PATH_FLAG "--search_path=")
+set(CMAKE_LINK_LIBRARY_FLAG "--library=")
+set(CMAKE_INCLUDE_FLAG_CXX "--include_path=")
+
+set(CMAKE_CXX_CREATE_ASSEMBLY_SOURCE "<CMAKE_CXX_COMPILER> --compile_only --skip_assembler --cpp_file=<SOURCE> <DEFINES> <FLAGS> --output_file=<ASSEMBLY_SOURCE>")
+set(CMAKE_CXX_CREATE_PREPROCESSED_SOURCE "<CMAKE_CXX_COMPILER> --preproc_only --cpp_file=<SOURCE> <DEFINES> <FLAGS> --output_file=<PREPROCESSED_SOURCE>")
+
+set(CMAKE_CXX_COMPILE_OBJECT "<CMAKE_CXX_COMPILER> --compile_only --cpp_file=<SOURCE> <DEFINES> <FLAGS> --output_file=<OBJECT>")
+set(CMAKE_CXX_ARCHIVE_CREATE "<CMAKE_AR> -r <TARGET> <OBJECTS>")
+set(CMAKE_CXX_LINK_EXECUTABLE "<CMAKE_CXX_COMPILER> --run_linker --output_file=<TARGET> --map_file=<TARGET>.map <CMAKE_CXX_LINK_FLAGS> <LINK_LIBRARIES> <LINK_FLAGS> <OBJECTS>")
diff --git a/Modules/Compiler/XL.cmake b/Modules/Compiler/XL.cmake
index d293610..7bf5020 100644
--- a/Modules/Compiler/XL.cmake
+++ b/Modules/Compiler/XL.cmake
@@ -27,6 +27,7 @@ find_program(CMAKE_XL_CreateExportList
macro(__compiler_xl lang)
# Feature flags.
set(CMAKE_${lang}_VERBOSE_FLAG "-V")
+ set(CMAKE_${lang}_COMPILE_OPTIONS_PIC "-qpic")
set(CMAKE_${lang}_FLAGS_DEBUG_INIT "-g")
set(CMAKE_${lang}_FLAGS_RELEASE_INIT "-O")
diff --git a/Modules/CompilerId/VS-7.vcproj.in b/Modules/CompilerId/VS-7.vcproj.in
index 71bf64d..fa48cad 100644
--- a/Modules/CompilerId/VS-7.vcproj.in
+++ b/Modules/CompilerId/VS-7.vcproj.in
@@ -24,7 +24,6 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
- PreprocessorDefinitions=""
MinimalRebuild="false"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
@@ -35,9 +34,10 @@
<Tool
Name="VCLinkerTool"
LinkIncremental="1"
+ IgnoreDefaultLibraryNames="libc"
GenerateDebugInformation="false"
- SubSystem="1"
- TargetMachine="@id_machine_7@"
+ SubSystem="@id_subsystem@"
+ EntryPointSymbol="@id_entrypoint@"
/>
<Tool
Name="VCPostBuildEventTool"
diff --git a/Modules/CompilerId/Xcode-3.pbxproj.in b/Modules/CompilerId/Xcode-3.pbxproj.in
index 41ca7db..d94a803 100644
--- a/Modules/CompilerId/Xcode-3.pbxproj.in
+++ b/Modules/CompilerId/Xcode-3.pbxproj.in
@@ -83,6 +83,7 @@
ONLY_ACTIVE_ARCH = YES;
CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)";
SYMROOT = .;
+ @id_toolset@
};
name = Debug;
};
diff --git a/Modules/DeployQt4.cmake b/Modules/DeployQt4.cmake
index 309fce3..5f8a9fb 100644
--- a/Modules/DeployQt4.cmake
+++ b/Modules/DeployQt4.cmake
@@ -80,7 +80,7 @@
# The functions defined in this file depend on the fixup_bundle function
# (and others) found in BundleUtilities.cmake
-include(BundleUtilities)
+include("${CMAKE_CURRENT_LIST_DIR}/BundleUtilities.cmake")
set(DeployQt4_cmake_dir "${CMAKE_CURRENT_LIST_DIR}")
set(DeployQt4_apple_plugins_dir "PlugIns")
diff --git a/Modules/ExternalData.cmake b/Modules/ExternalData.cmake
new file mode 100644
index 0000000..8332725
--- /dev/null
+++ b/Modules/ExternalData.cmake
@@ -0,0 +1,771 @@
+# - Manage data files stored outside source tree
+# Use this module to unambiguously reference data files stored outside the
+# source tree and fetch them at build time from arbitrary local and remote
+# content-addressed locations. Functions provided by this module recognize
+# arguments with the syntax "DATA{<name>}" as references to external data,
+# replace them with full paths to local copies of those data, and create build
+# rules to fetch and update the local copies.
+#
+# The DATA{} syntax is literal and the <name> is a full or relative path
+# within the source tree. The source tree must contain either a real data
+# file at <name> or a "content link" at <name><ext> containing a hash of the
+# real file using a hash algorithm corresponding to <ext>. For example, the
+# argument "DATA{img.png}" may be satisfied by either a real "img.png" file in
+# the current source directory or a "img.png.md5" file containing its MD5 sum.
+#
+# The 'ExternalData_Expand_Arguments' function evaluates DATA{} references
+# in its arguments and constructs a new list of arguments:
+# ExternalData_Expand_Arguments(
+# <target> # Name of data management target
+# <outVar> # Output variable
+# [args...] # Input arguments, DATA{} allowed
+# )
+# It replaces each DATA{} reference in an argument with the full path of a
+# real data file on disk that will exist after the <target> builds.
+#
+# The 'ExternalData_Add_Test' function wraps around the CMake add_test()
+# command but supports DATA{} references in its arguments:
+# ExternalData_Add_Test(
+# <target> # Name of data management target
+# ... # Arguments of add_test(), DATA{} allowed
+# )
+# It passes its arguments through ExternalData_Expand_Arguments and then
+# invokes add_test() using the results.
+#
+# The 'ExternalData_Add_Target' function creates a custom target to manage
+# local instances of data files stored externally:
+# ExternalData_Add_Target(
+# <target> # Name of data management target
+# )
+# It creates custom commands in the target as necessary to make data files
+# available for each DATA{} reference previously evaluated by other functions
+# provided by this module. A list of URL templates must be provided in the
+# variable ExternalData_URL_TEMPLATES using the placeholders "%(algo)" and
+# "%(hash)" in each template. Data fetch rules try each URL template in order
+# by substituting the hash algorithm name for "%(algo)" and the hash value for
+# "%(hash)".
+#
+# The following hash algorithms are supported:
+# %(algo) <ext> Description
+# ------- ----- -----------
+# MD5 .md5 Message-Digest Algorithm 5, RFC 1321
+# SHA1 .sha1 US Secure Hash Algorithm 1, RFC 3174
+# SHA224 .sha224 US Secure Hash Algorithms, RFC 4634
+# SHA256 .sha256 US Secure Hash Algorithms, RFC 4634
+# SHA384 .sha384 US Secure Hash Algorithms, RFC 4634
+# SHA512 .sha512 US Secure Hash Algorithms, RFC 4634
+# Note that the hashes are used only for unique data identification and
+# download verification. This is not security software.
+#
+# Example usage:
+# include(ExternalData)
+# set(ExternalData_URL_TEMPLATES "file:///local/%(algo)/%(hash)"
+# "http://data.org/%(algo)/%(hash)")
+# ExternalData_Add_Test(MyData
+# NAME MyTest
+# COMMAND MyExe DATA{MyInput.png}
+# )
+# ExternalData_Add_Target(MyData)
+# When test "MyTest" runs the "DATA{MyInput.png}" argument will be replaced by
+# the full path to a real instance of the data file "MyInput.png" on disk. If
+# the source tree contains a content link such as "MyInput.png.md5" then the
+# "MyData" target creates a real "MyInput.png" in the build tree.
+#
+# The DATA{} syntax can be told to fetch a file series using the form
+# "DATA{<name>,:}", where the ":" is literal. If the source tree contains a
+# group of files or content links named like a series then a reference to one
+# member adds rules to fetch all of them. Although all members of a series
+# are fetched, only the file originally named by the DATA{} argument is
+# substituted for it. The default configuration recognizes file series names
+# ending with "#.ext", "_#.ext", ".#.ext", or "-#.ext" where "#" is a sequence
+# of decimal digits and ".ext" is any single extension. Configure it with a
+# regex that parses <number> and <suffix> parts from the end of <name>:
+# ExternalData_SERIES_PARSE = regex of the form (<number>)(<suffix>)$
+# For more complicated cases set:
+# ExternalData_SERIES_PARSE = regex with at least two () groups
+# ExternalData_SERIES_PARSE_PREFIX = <prefix> regex group number, if any
+# ExternalData_SERIES_PARSE_NUMBER = <number> regex group number
+# ExternalData_SERIES_PARSE_SUFFIX = <suffix> regex group number
+# Configure series number matching with a regex that matches the
+# <number> part of series members named <prefix><number><suffix>:
+# ExternalData_SERIES_MATCH = regex matching <number> in all series members
+# Note that the <suffix> of a series does not include a hash-algorithm
+# extension.
+#
+# The DATA{} syntax can alternatively match files associated with the named
+# file and contained in the same directory. Associated files may be specified
+# by options using the syntax DATA{<name>,<opt1>,<opt2>,...}. Each option may
+# specify one file by name or specify a regular expression to match file names
+# using the syntax REGEX:<regex>. For example, the arguments
+# DATA{MyData/MyInput.mhd,MyInput.img} # File pair
+# DATA{MyData/MyFrames00.png,REGEX:MyFrames[0-9]+\\.png} # Series
+# will pass MyInput.mha and MyFrames00.png on the command line but ensure
+# that the associated files are present next to them.
+#
+# The DATA{} syntax may reference a directory using a trailing slash and a
+# list of associated files. The form DATA{<name>/,<opt1>,<opt2>,...} adds
+# rules to fetch any files in the directory that match one of the associated
+# file options. For example, the argument DATA{MyDataDir/,REGEX:.*} will pass
+# the full path to a MyDataDir directory on the command line and ensure that
+# the directory contains files corresponding to every file or content link in
+# the MyDataDir source directory.
+#
+# The variable ExternalData_LINK_CONTENT may be set to the name of a supported
+# hash algorithm to enable automatic conversion of real data files referenced
+# by the DATA{} syntax into content links. For each such <file> a content
+# link named "<file><ext>" is created. The original file is renamed to the
+# form ".ExternalData_<algo>_<hash>" to stage it for future transmission to
+# one of the locations in the list of URL templates (by means outside the
+# scope of this module). The data fetch rule created for the content link
+# will use the staged object if it cannot be found using any URL template.
+#
+# The variable ExternalData_OBJECT_STORES may be set to a list of local
+# directories that store objects using the layout <dir>/%(algo)/%(hash).
+# These directories will be searched first for a needed object. If the object
+# is not available in any store then it will be fetched remotely using the URL
+# templates and added to the first local store listed. If no stores are
+# specified the default is a location inside the build tree.
+#
+# The variable ExternalData_SOURCE_ROOT may be set to the highest source
+# directory containing any path named by a DATA{} reference. The default is
+# CMAKE_SOURCE_DIR. ExternalData_SOURCE_ROOT and CMAKE_SOURCE_DIR must refer
+# to directories within a single source distribution (e.g. they come together
+# in one tarball).
+#
+# The variable ExternalData_BINARY_ROOT may be set to the directory to hold
+# the real data files named by expanded DATA{} references. The default is
+# CMAKE_BINARY_DIR. The directory layout will mirror that of content links
+# under ExternalData_SOURCE_ROOT.
+#
+# Variables ExternalData_TIMEOUT_INACTIVITY and ExternalData_TIMEOUT_ABSOLUTE
+# set the download inactivity and absolute timeouts, in seconds. The defaults
+# are 60 seconds and 300 seconds, respectively. Set either timeout to 0
+# seconds to disable enforcement.
+
+#=============================================================================
+# Copyright 2010-2013 Kitware, Inc.
+#
+# 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.
+#=============================================================================
+# (To distribute this file outside of CMake, substitute the full
+# License text for the above reference.)
+
+function(ExternalData_add_test target)
+ # Expand all arguments as a single string to preserve escaped semicolons.
+ ExternalData_expand_arguments("${target}" testArgs "${ARGN}")
+ add_test(${testArgs})
+endfunction()
+
+function(ExternalData_add_target target)
+ if(NOT ExternalData_URL_TEMPLATES)
+ message(FATAL_ERROR "ExternalData_URL_TEMPLATES is not set!")
+ endif()
+ if(NOT ExternalData_OBJECT_STORES)
+ set(ExternalData_OBJECT_STORES ${CMAKE_BINARY_DIR}/ExternalData/Objects)
+ endif()
+ set(config ${CMAKE_CURRENT_BINARY_DIR}/${target}_config.cmake)
+ configure_file(${_ExternalData_SELF_DIR}/ExternalData_config.cmake.in ${config} @ONLY)
+
+ set(files "")
+
+ # Set "_ExternalData_FILE_${file}" for each output file to avoid duplicate
+ # rules. Use local data first to prefer real files over content links.
+
+ # Custom commands to copy or link local data.
+ get_property(data_local GLOBAL PROPERTY _ExternalData_${target}_LOCAL)
+ foreach(entry IN LISTS data_local)
+ string(REPLACE "|" ";" tuple "${entry}")
+ list(GET tuple 0 file)
+ list(GET tuple 1 name)
+ if(NOT DEFINED "_ExternalData_FILE_${file}")
+ set("_ExternalData_FILE_${file}" 1)
+ add_custom_command(
+ COMMENT "Generating ${file}"
+ OUTPUT "${file}"
+ COMMAND ${CMAKE_COMMAND} -Drelative_top=${CMAKE_BINARY_DIR}
+ -Dfile=${file} -Dname=${name}
+ -DExternalData_ACTION=local
+ -DExternalData_CONFIG=${config}
+ -P ${_ExternalData_SELF}
+ MAIN_DEPENDENCY "${name}"
+ )
+ list(APPEND files "${file}")
+ endif()
+ endforeach()
+
+ # Custom commands to fetch remote data.
+ get_property(data_fetch GLOBAL PROPERTY _ExternalData_${target}_FETCH)
+ foreach(entry IN LISTS data_fetch)
+ string(REPLACE "|" ";" tuple "${entry}")
+ list(GET tuple 0 file)
+ list(GET tuple 1 name)
+ list(GET tuple 2 ext)
+ set(stamp "${ext}-stamp")
+ if(NOT DEFINED "_ExternalData_FILE_${file}")
+ set("_ExternalData_FILE_${file}" 1)
+ add_custom_command(
+ # Users care about the data file, so hide the hash/timestamp file.
+ COMMENT "Generating ${file}"
+ # The hash/timestamp file is the output from the build perspective.
+ # List the real file as a second output in case it is a broken link.
+ # The files must be listed in this order so CMake can hide from the
+ # make tool that a symlink target may not be newer than the input.
+ OUTPUT "${file}${stamp}" "${file}"
+ # Run the data fetch/update script.
+ COMMAND ${CMAKE_COMMAND} -Drelative_top=${CMAKE_BINARY_DIR}
+ -Dfile=${file} -Dname=${name} -Dext=${ext}
+ -DExternalData_ACTION=fetch
+ -DExternalData_CONFIG=${config}
+ -P ${_ExternalData_SELF}
+ # Update whenever the object hash changes.
+ MAIN_DEPENDENCY "${name}${ext}"
+ )
+ list(APPEND files "${file}${stamp}")
+ endif()
+ endforeach()
+
+ # Custom target to drive all update commands.
+ add_custom_target(${target} ALL DEPENDS ${files})
+endfunction()
+
+function(ExternalData_expand_arguments target outArgsVar)
+ # Replace DATA{} references with real arguments.
+ set(data_regex "DATA{([^;{}\r\n]*)}")
+ set(other_regex "([^D]|D[^A]|DA[^T]|DAT[^A]|DATA[^{])+|.")
+ set(outArgs "")
+ # This list expansion un-escapes semicolons in list element values so we
+ # must re-escape them below anywhere a new list expansion will occur.
+ foreach(arg IN LISTS ARGN)
+ if("x${arg}" MATCHES "${data_regex}")
+ # Re-escape in-value semicolons before expansion in foreach below.
+ string(REPLACE ";" "\\;" tmp "${arg}")
+ # Split argument into DATA{}-pieces and other pieces.
+ string(REGEX MATCHALL "${data_regex}|${other_regex}" pieces "${tmp}")
+ # Compose output argument with DATA{}-pieces replaced.
+ set(outArg "")
+ foreach(piece IN LISTS pieces)
+ if("x${piece}" MATCHES "^x${data_regex}$")
+ # Replace this DATA{}-piece with a file path.
+ string(REGEX REPLACE "${data_regex}" "\\1" data "${piece}")
+ _ExternalData_arg("${target}" "${piece}" "${data}" file)
+ set(outArg "${outArg}${file}")
+ else()
+ # No replacement needed for this piece.
+ set(outArg "${outArg}${piece}")
+ endif()
+ endforeach()
+ else()
+ # No replacements needed in this argument.
+ set(outArg "${arg}")
+ endif()
+ # Re-escape in-value semicolons in resulting list.
+ string(REPLACE ";" "\\;" outArg "${outArg}")
+ list(APPEND outArgs "${outArg}")
+ endforeach()
+ set("${outArgsVar}" "${outArgs}" PARENT_SCOPE)
+endfunction()
+
+#-----------------------------------------------------------------------------
+# Private helper interface
+
+set(_ExternalData_REGEX_ALGO "MD5|SHA1|SHA224|SHA256|SHA384|SHA512")
+set(_ExternalData_REGEX_EXT "md5|sha1|sha224|sha256|sha384|sha512")
+set(_ExternalData_SELF "${CMAKE_CURRENT_LIST_FILE}")
+get_filename_component(_ExternalData_SELF_DIR "${_ExternalData_SELF}" PATH)
+
+function(_ExternalData_compute_hash var_hash algo file)
+ if("${algo}" MATCHES "^${_ExternalData_REGEX_ALGO}$")
+ file("${algo}" "${file}" hash)
+ set("${var_hash}" "${hash}" PARENT_SCOPE)
+ else()
+ message(FATAL_ERROR "Hash algorithm ${algo} unimplemented.")
+ endif()
+endfunction()
+
+function(_ExternalData_random var)
+ string(RANDOM LENGTH 6 random)
+ set("${var}" "${random}" PARENT_SCOPE)
+endfunction()
+
+function(_ExternalData_exact_regex regex_var string)
+ string(REGEX REPLACE "([][+.*()^])" "\\\\\\1" regex "${string}")
+ set("${regex_var}" "${regex}" PARENT_SCOPE)
+endfunction()
+
+function(_ExternalData_atomic_write file content)
+ _ExternalData_random(random)
+ set(tmp "${file}.tmp${random}")
+ file(WRITE "${tmp}" "${content}")
+ file(RENAME "${tmp}" "${file}")
+endfunction()
+
+function(_ExternalData_link_content name var_ext)
+ if("${ExternalData_LINK_CONTENT}" MATCHES "^(${_ExternalData_REGEX_ALGO})$")
+ set(algo "${ExternalData_LINK_CONTENT}")
+ else()
+ message(FATAL_ERROR
+ "Unknown hash algorithm specified by ExternalData_LINK_CONTENT:\n"
+ " ${ExternalData_LINK_CONTENT}")
+ endif()
+ _ExternalData_compute_hash(hash "${algo}" "${name}")
+ get_filename_component(dir "${name}" PATH)
+ set(staged "${dir}/.ExternalData_${algo}_${hash}")
+ string(TOLOWER ".${algo}" ext)
+ _ExternalData_atomic_write("${name}${ext}" "${hash}\n")
+ file(RENAME "${name}" "${staged}")
+ set("${var_ext}" "${ext}" PARENT_SCOPE)
+
+ file(RELATIVE_PATH relname "${ExternalData_SOURCE_ROOT}" "${name}${ext}")
+ message(STATUS "Linked ${relname} to ExternalData ${algo}/${hash}")
+endfunction()
+
+function(_ExternalData_arg target arg options var_file)
+ # Separate data path from the options.
+ string(REPLACE "," ";" options "${options}")
+ list(GET options 0 data)
+ list(REMOVE_AT options 0)
+
+ # Interpret trailing slashes as directories.
+ set(data_is_directory 0)
+ if("x${data}" MATCHES "^x(.*)([/\\])$")
+ set(data_is_directory 1)
+ set(data "${CMAKE_MATCH_1}")
+ endif()
+
+ # Convert to full path.
+ if(IS_ABSOLUTE "${data}")
+ set(absdata "${data}")
+ else()
+ set(absdata "${CMAKE_CURRENT_SOURCE_DIR}/${data}")
+ endif()
+ get_filename_component(absdata "${absdata}" ABSOLUTE)
+
+ # Convert to relative path under the source tree.
+ if(NOT ExternalData_SOURCE_ROOT)
+ set(ExternalData_SOURCE_ROOT "${CMAKE_SOURCE_DIR}")
+ endif()
+ set(top_src "${ExternalData_SOURCE_ROOT}")
+ file(RELATIVE_PATH reldata "${top_src}" "${absdata}")
+ if(IS_ABSOLUTE "${reldata}" OR "${reldata}" MATCHES "^\\.\\./")
+ message(FATAL_ERROR "Data file referenced by argument\n"
+ " ${arg}\n"
+ "does not lie under the top-level source directory\n"
+ " ${top_src}\n")
+ endif()
+ if(data_is_directory AND NOT IS_DIRECTORY "${top_src}/${reldata}")
+ message(FATAL_ERROR "Data directory referenced by argument\n"
+ " ${arg}\n"
+ "corresponds to source tree path\n"
+ " ${reldata}\n"
+ "that does not exist as a directory!")
+ endif()
+ if(NOT ExternalData_BINARY_ROOT)
+ set(ExternalData_BINARY_ROOT "${CMAKE_BINARY_DIR}")
+ endif()
+ set(top_bin "${ExternalData_BINARY_ROOT}")
+
+ # Handle in-source builds gracefully.
+ if("${top_src}" STREQUAL "${top_bin}")
+ if(ExternalData_LINK_CONTENT)
+ message(WARNING "ExternalData_LINK_CONTENT cannot be used in-source")
+ set(ExternalData_LINK_CONTENT 0)
+ endif()
+ set(top_same 1)
+ endif()
+
+ set(external "") # Entries external to the source tree.
+ set(internal "") # Entries internal to the source tree.
+ set(have_original ${data_is_directory})
+
+ # Process options.
+ set(series_option "")
+ set(associated_files "")
+ set(associated_regex "")
+ foreach(opt ${options})
+ if("x${opt}" MATCHES "^xREGEX:[^:/]+$")
+ # Regular expression to match associated files.
+ string(REGEX REPLACE "^REGEX:" "" regex "${opt}")
+ list(APPEND associated_regex "${regex}")
+ elseif("x${opt}" MATCHES "^x:$")
+ # Activate series matching.
+ set(series_option "${opt}")
+ elseif("x${opt}" MATCHES "^[^][:/*?]+$")
+ # Specific associated file.
+ list(APPEND associated_files "${opt}")
+ else()
+ message(FATAL_ERROR "Unknown option \"${opt}\" in argument\n"
+ " ${arg}\n")
+ endif()
+ endforeach()
+
+ if(series_option)
+ if(data_is_directory)
+ message(FATAL_ERROR "Series option \"${series_option}\" not allowed with directories.")
+ endif()
+ if(associated_files OR associated_regex)
+ message(FATAL_ERROR "Series option \"${series_option}\" not allowed with associated files.")
+ endif()
+ # Load a whole file series.
+ _ExternalData_arg_series()
+ elseif(data_is_directory)
+ if(associated_files OR associated_regex)
+ # Load listed/matching associated files in the directory.
+ _ExternalData_arg_associated()
+ else()
+ message(FATAL_ERROR "Data directory referenced by argument\n"
+ " ${arg}\n"
+ "must list associated files.")
+ endif()
+ else()
+ # Load the named data file.
+ _ExternalData_arg_single()
+ if(associated_files OR associated_regex)
+ # Load listed/matching associated files.
+ _ExternalData_arg_associated()
+ endif()
+ endif()
+
+ if(NOT have_original)
+ message(FATAL_ERROR "Data file referenced by argument\n"
+ " ${arg}\n"
+ "corresponds to source tree path\n"
+ " ${reldata}\n"
+ "that does not exist as a file (with or without an extension)!")
+ endif()
+
+ if(external)
+ # Make the series available in the build tree.
+ set_property(GLOBAL APPEND PROPERTY
+ _ExternalData_${target}_FETCH "${external}")
+ set_property(GLOBAL APPEND PROPERTY
+ _ExternalData_${target}_LOCAL "${internal}")
+ set("${var_file}" "${top_bin}/${reldata}" PARENT_SCOPE)
+ else()
+ # The whole series is in the source tree.
+ set("${var_file}" "${top_src}/${reldata}" PARENT_SCOPE)
+ endif()
+endfunction()
+
+macro(_ExternalData_arg_associated)
+ # Associated files lie in the same directory.
+ if(data_is_directory)
+ set(reldir "${reldata}")
+ else()
+ get_filename_component(reldir "${reldata}" PATH)
+ endif()
+ if(reldir)
+ set(reldir "${reldir}/")
+ endif()
+ _ExternalData_exact_regex(reldir_regex "${reldir}")
+
+ # Find files named explicitly.
+ foreach(file ${associated_files})
+ _ExternalData_exact_regex(file_regex "${file}")
+ _ExternalData_arg_find_files("${reldir}${file}" "${reldir_regex}${file_regex}")
+ endforeach()
+
+ # Find files matching the given regular expressions.
+ set(all "")
+ set(sep "")
+ foreach(regex ${associated_regex})
+ set(all "${all}${sep}${reldir_regex}${regex}")
+ set(sep "|")
+ endforeach()
+ _ExternalData_arg_find_files("${reldir}" "${all}")
+endmacro()
+
+macro(_ExternalData_arg_single)
+ # Match only the named data by itself.
+ _ExternalData_exact_regex(data_regex "${reldata}")
+ _ExternalData_arg_find_files("${reldata}" "${data_regex}")
+endmacro()
+
+macro(_ExternalData_arg_series)
+ # Configure series parsing and matching.
+ set(series_parse_prefix "")
+ set(series_parse_number "\\1")
+ set(series_parse_suffix "\\2")
+ if(ExternalData_SERIES_PARSE)
+ if(ExternalData_SERIES_PARSE_NUMBER AND ExternalData_SERIES_PARSE_SUFFIX)
+ if(ExternalData_SERIES_PARSE_PREFIX)
+ set(series_parse_prefix "\\${ExternalData_SERIES_PARSE_PREFIX}")
+ endif()
+ set(series_parse_number "\\${ExternalData_SERIES_PARSE_NUMBER}")
+ set(series_parse_suffix "\\${ExternalData_SERIES_PARSE_SUFFIX}")
+ elseif(NOT "x${ExternalData_SERIES_PARSE}" MATCHES "^x\\([^()]*\\)\\([^()]*\\)\\$$")
+ message(FATAL_ERROR
+ "ExternalData_SERIES_PARSE is set to\n"
+ " ${ExternalData_SERIES_PARSE}\n"
+ "which is not of the form\n"
+ " (<number>)(<suffix>)$\n"
+ "Fix the regular expression or set variables\n"
+ " ExternalData_SERIES_PARSE_PREFIX = <prefix> regex group number, if any\n"
+ " ExternalData_SERIES_PARSE_NUMBER = <number> regex group number\n"
+ " ExternalData_SERIES_PARSE_SUFFIX = <suffix> regex group number\n"
+ )
+ endif()
+ set(series_parse "${ExternalData_SERIES_PARSE}")
+ else()
+ set(series_parse "([0-9]*)(\\.[^./]*)$")
+ endif()
+ if(ExternalData_SERIES_MATCH)
+ set(series_match "${ExternalData_SERIES_MATCH}")
+ else()
+ set(series_match "[_.-]?[0-9]*")
+ endif()
+
+ # Parse the base, number, and extension components of the series.
+ string(REGEX REPLACE "${series_parse}" "${series_parse_prefix};${series_parse_number};${series_parse_suffix}" tuple "${reldata}")
+ list(LENGTH tuple len)
+ if(NOT "${len}" EQUAL 3)
+ message(FATAL_ERROR "Data file referenced by argument\n"
+ " ${arg}\n"
+ "corresponds to path\n"
+ " ${reldata}\n"
+ "that does not match regular expression\n"
+ " ${series_parse}")
+ endif()
+ list(GET tuple 0 relbase)
+ list(GET tuple 2 ext)
+
+ # Glob files that might match the series.
+ # Then match base, number, and extension.
+ _ExternalData_exact_regex(series_base "${relbase}")
+ _ExternalData_exact_regex(series_ext "${ext}")
+ _ExternalData_arg_find_files("${relbase}*${ext}"
+ "${series_base}${series_match}${series_ext}")
+endmacro()
+
+function(_ExternalData_arg_find_files pattern regex)
+ file(GLOB globbed RELATIVE "${top_src}" "${top_src}/${pattern}*")
+ foreach(entry IN LISTS globbed)
+ if("x${entry}" MATCHES "^x(.*)(\\.(${_ExternalData_REGEX_EXT}))$")
+ set(relname "${CMAKE_MATCH_1}")
+ set(alg "${CMAKE_MATCH_2}")
+ else()
+ set(relname "${entry}")
+ set(alg "")
+ endif()
+ if("x${relname}" MATCHES "^x${regex}$" # matches
+ AND NOT IS_DIRECTORY "${top_src}/${entry}" # not a directory
+ AND NOT "x${relname}" MATCHES "(^x|/)\\.ExternalData_" # not staged obj
+ )
+ set(name "${top_src}/${relname}")
+ set(file "${top_bin}/${relname}")
+ if(alg)
+ list(APPEND external "${file}|${name}|${alg}")
+ elseif(ExternalData_LINK_CONTENT)
+ _ExternalData_link_content("${name}" alg)
+ list(APPEND external "${file}|${name}|${alg}")
+ elseif(NOT top_same)
+ list(APPEND internal "${file}|${name}")
+ endif()
+ if("${relname}" STREQUAL "${reldata}")
+ set(have_original 1)
+ endif()
+ endif()
+ endforeach()
+ set(external "${external}" PARENT_SCOPE)
+ set(internal "${internal}" PARENT_SCOPE)
+ set(have_original "${have_original}" PARENT_SCOPE)
+endfunction()
+
+#-----------------------------------------------------------------------------
+# Private script mode interface
+
+if(CMAKE_GENERATOR OR NOT ExternalData_ACTION)
+ return()
+endif()
+
+if(ExternalData_CONFIG)
+ include(${ExternalData_CONFIG})
+endif()
+if(NOT ExternalData_URL_TEMPLATES)
+ message(FATAL_ERROR "No ExternalData_URL_TEMPLATES set!")
+endif()
+
+function(_ExternalData_link_or_copy src dst)
+ # Create a temporary file first.
+ get_filename_component(dst_dir "${dst}" PATH)
+ file(MAKE_DIRECTORY "${dst_dir}")
+ _ExternalData_random(random)
+ set(tmp "${dst}.tmp${random}")
+ if(UNIX)
+ # Create a symbolic link.
+ set(tgt "${src}")
+ if(relative_top)
+ # Use relative path if files are close enough.
+ file(RELATIVE_PATH relsrc "${relative_top}" "${src}")
+ file(RELATIVE_PATH relfile "${relative_top}" "${dst}")
+ if(NOT IS_ABSOLUTE "${relsrc}" AND NOT "${relsrc}" MATCHES "^\\.\\./" AND
+ NOT IS_ABSOLUTE "${reldst}" AND NOT "${reldst}" MATCHES "^\\.\\./")
+ file(RELATIVE_PATH tgt "${dst_dir}" "${src}")
+ endif()
+ endif()
+ execute_process(COMMAND "${CMAKE_COMMAND}" -E create_symlink "${tgt}" "${tmp}" RESULT_VARIABLE result)
+ else()
+ # Create a copy.
+ execute_process(COMMAND "${CMAKE_COMMAND}" -E copy "${src}" "${tmp}" RESULT_VARIABLE result)
+ endif()
+ if(result)
+ file(REMOVE "${tmp}")
+ message(FATAL_ERROR "Failed to create\n ${tmp}\nfrom\n ${obj}")
+ endif()
+
+ # Atomically create/replace the real destination.
+ file(RENAME "${tmp}" "${dst}")
+endfunction()
+
+function(_ExternalData_download_file url file err_var msg_var)
+ set(retry 3)
+ while(retry)
+ math(EXPR retry "${retry} - 1")
+ if(ExternalData_TIMEOUT_INACTIVITY)
+ set(inactivity_timeout INACTIVITY_TIMEOUT ${ExternalData_TIMEOUT_INACTIVITY})
+ elseif(NOT "${ExternalData_TIMEOUT_INACTIVITY}" EQUAL 0)
+ set(inactivity_timeout INACTIVITY_TIMEOUT 60)
+ else()
+ set(inactivity_timeout "")
+ endif()
+ if(ExternalData_TIMEOUT_ABSOLUTE)
+ set(absolute_timeout TIMEOUT ${ExternalData_TIMEOUT_ABSOLUTE})
+ elseif(NOT "${ExternalData_TIMEOUT_ABSOLUTE}" EQUAL 0)
+ set(absolute_timeout TIMEOUT 300)
+ else()
+ set(absolute_timeout "")
+ endif()
+ file(DOWNLOAD "${url}" "${file}" STATUS status LOG log ${inactivity_timeout} ${absolute_timeout} SHOW_PROGRESS)
+ list(GET status 0 err)
+ list(GET status 1 msg)
+ if(err)
+ if("${msg}" MATCHES "HTTP response code said error" AND
+ "${log}" MATCHES "error: 503")
+ set(msg "temporarily unavailable")
+ endif()
+ elseif("${log}" MATCHES "\nHTTP[^\n]* 503")
+ set(err TRUE)
+ set(msg "temporarily unavailable")
+ endif()
+ if(NOT err OR NOT "${msg}" MATCHES "partial|timeout|temporarily")
+ break()
+ elseif(retry)
+ message(STATUS "[download terminated: ${msg}, retries left: ${retry}]")
+ endif()
+ endwhile()
+ set("${err_var}" "${err}" PARENT_SCOPE)
+ set("${msg_var}" "${msg}" PARENT_SCOPE)
+endfunction()
+
+function(_ExternalData_download_object name hash algo var_obj)
+ # Search all object stores for an existing object.
+ foreach(dir ${ExternalData_OBJECT_STORES})
+ set(obj "${dir}/${algo}/${hash}")
+ if(EXISTS "${obj}")
+ message(STATUS "Found object: \"${obj}\"")
+ set("${var_obj}" "${obj}" PARENT_SCOPE)
+ return()
+ endif()
+ endforeach()
+
+ # Download object to the first store.
+ list(GET ExternalData_OBJECT_STORES 0 store)
+ set(obj "${store}/${algo}/${hash}")
+
+ _ExternalData_random(random)
+ set(tmp "${obj}.tmp${random}")
+ set(found 0)
+ set(tried "")
+ foreach(url_template IN LISTS ExternalData_URL_TEMPLATES)
+ string(REPLACE "%(hash)" "${hash}" url_tmp "${url_template}")
+ string(REPLACE "%(algo)" "${algo}" url "${url_tmp}")
+ message(STATUS "Fetching \"${url}\"")
+ _ExternalData_download_file("${url}" "${tmp}" err errMsg)
+ set(tried "${tried}\n ${url}")
+ if(err)
+ set(tried "${tried} (${errMsg})")
+ else()
+ # Verify downloaded object.
+ _ExternalData_compute_hash(dl_hash "${algo}" "${tmp}")
+ if("${dl_hash}" STREQUAL "${hash}")
+ set(found 1)
+ break()
+ else()
+ set(tried "${tried} (wrong hash ${algo}=${dl_hash})")
+ if("$ENV{ExternalData_DEBUG_DOWNLOAD}" MATCHES ".")
+ file(RENAME "${tmp}" "${store}/${algo}/${dl_hash}")
+ endif()
+ endif()
+ endif()
+ file(REMOVE "${tmp}")
+ endforeach()
+
+ get_filename_component(dir "${name}" PATH)
+ set(staged "${dir}/.ExternalData_${algo}_${hash}")
+
+ if(found)
+ file(RENAME "${tmp}" "${obj}")
+ message(STATUS "Downloaded object: \"${obj}\"")
+ elseif(EXISTS "${staged}")
+ set(obj "${staged}")
+ message(STATUS "Staged object: \"${obj}\"")
+ else()
+ message(FATAL_ERROR "Object ${algo}=${hash} not found at:${tried}")
+ endif()
+
+ set("${var_obj}" "${obj}" PARENT_SCOPE)
+endfunction()
+
+if("${ExternalData_ACTION}" STREQUAL "fetch")
+ foreach(v ExternalData_OBJECT_STORES file name ext)
+ if(NOT DEFINED "${v}")
+ message(FATAL_ERROR "No \"-D${v}=\" value provided!")
+ endif()
+ endforeach()
+
+ file(READ "${name}${ext}" hash)
+ string(STRIP "${hash}" hash)
+
+ if("${ext}" MATCHES "^\\.(${_ExternalData_REGEX_EXT})$")
+ string(TOUPPER "${CMAKE_MATCH_1}" algo)
+ else()
+ message(FATAL_ERROR "Unknown hash algorithm extension \"${ext}\"")
+ endif()
+
+ _ExternalData_download_object("${name}" "${hash}" "${algo}" obj)
+
+ # Check if file already corresponds to the object.
+ set(stamp "${ext}-stamp")
+ set(file_up_to_date 0)
+ if(EXISTS "${file}" AND EXISTS "${file}${stamp}")
+ file(READ "${file}${stamp}" f_hash)
+ string(STRIP "${f_hash}" f_hash)
+ if("${f_hash}" STREQUAL "${hash}")
+ #message(STATUS "File already corresponds to object")
+ set(file_up_to_date 1)
+ endif()
+ endif()
+
+ if(file_up_to_date)
+ # Touch the file to convince the build system it is up to date.
+ execute_process(COMMAND "${CMAKE_COMMAND}" -E touch "${file}")
+ else()
+ _ExternalData_link_or_copy("${obj}" "${file}")
+ endif()
+
+ # Atomically update the hash/timestamp file to record the object referenced.
+ _ExternalData_atomic_write("${file}${stamp}" "${hash}\n")
+elseif("${ExternalData_ACTION}" STREQUAL "local")
+ foreach(v file name)
+ if(NOT DEFINED "${v}")
+ message(FATAL_ERROR "No \"-D${v}=\" value provided!")
+ endif()
+ endforeach()
+ _ExternalData_link_or_copy("${name}" "${file}")
+else()
+ message(FATAL_ERROR "Unknown ExternalData_ACTION=[${ExternalData_ACTION}]")
+endif()
diff --git a/Modules/ExternalData_config.cmake.in b/Modules/ExternalData_config.cmake.in
new file mode 100644
index 0000000..0858f53
--- /dev/null
+++ b/Modules/ExternalData_config.cmake.in
@@ -0,0 +1,4 @@
+set(ExternalData_OBJECT_STORES "@ExternalData_OBJECT_STORES@")
+set(ExternalData_URL_TEMPLATES "@ExternalData_URL_TEMPLATES@")
+set(ExternalData_TIMEOUT_INACTIVITY "@ExternalData_TIMEOUT_INACTIVITY@")
+set(ExternalData_TIMEOUT_ABSOLUTE "@ExternalData_TIMEOUT_ABSOLUTE@")
diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake
index 8d57860..40e14d5 100644
--- a/Modules/ExternalProject.cmake
+++ b/Modules/ExternalProject.cmake
@@ -38,6 +38,7 @@
# [CONFIGURE_COMMAND cmd...] # Build tree configuration command
# [CMAKE_COMMAND /.../cmake] # Specify alternative cmake executable
# [CMAKE_GENERATOR gen] # Specify generator for native build
+# [CMAKE_GENERATOR_TOOLSET t] # Generator-specific toolset name
# [CMAKE_ARGS args...] # Arguments to CMake command line
# [CMAKE_CACHE_ARGS args...] # Initial cache arguments, of the form -Dvar:string=on
# #--Build step-----------------
@@ -286,11 +287,21 @@ if(error_code)
message(FATAL_ERROR \"Failed to remove directory: '${source_dir}'\")
endif()
-execute_process(
- COMMAND \"${git_EXECUTABLE}\" clone \"${git_repository}\" \"${src_name}\"
- WORKING_DIRECTORY \"${work_dir}\"
- RESULT_VARIABLE error_code
- )
+# try the clone 3 times incase there is an odd git clone issue
+set(error_code 1)
+set(number_of_tries 0)
+while(error_code AND number_of_tries LESS 3)
+ execute_process(
+ COMMAND \"${git_EXECUTABLE}\" clone \"${git_repository}\" \"${src_name}\"
+ WORKING_DIRECTORY \"${work_dir}\"
+ RESULT_VARIABLE error_code
+ )
+ math(EXPR number_of_tries \"\${number_of_tries} + 1\")
+endwhile()
+if(number_of_tries GREATER 1)
+ message(STATUS \"Had to git clone more than once:
+ \${number_of_tries} times.\")
+endif()
if(error_code)
message(FATAL_ERROR \"Failed to clone repository: '${git_repository}'\")
endif()
@@ -402,6 +413,79 @@ endif()
endfunction()
+function(_ep_write_gitupdate_script script_filename git_EXECUTABLE git_tag git_repository work_dir)
+ file(WRITE ${script_filename}
+"if(\"${git_tag}\" STREQUAL \"\")
+ message(FATAL_ERROR \"Tag for git checkout should not be empty.\")
+endif()
+
+execute_process(
+ COMMAND \"${git_EXECUTABLE}\" rev-list --max-count=1 HEAD
+ WORKING_DIRECTORY \"${work_dir}\"
+ RESULT_VARIABLE error_code
+ OUTPUT_VARIABLE head_sha
+ )
+if(error_code)
+ message(FATAL_ERROR \"Failed to get the hash for HEAD\")
+endif()
+
+execute_process(
+ COMMAND \"${git_EXECUTABLE}\" show-ref ${git_tag}
+ WORKING_DIRECTORY \"${work_dir}\"
+ OUTPUT_VARIABLE show_ref_output
+ )
+# If a remote ref is asked for, which can possibly move around,
+# we must always do a fetch and checkout.
+if(\"\${show_ref_output}\" MATCHES \"remotes\")
+ set(is_remote_ref 1)
+else()
+ set(is_remote_ref 0)
+endif()
+
+# This will fail if the tag does not exist (it probably has not been fetched
+# yet).
+execute_process(
+ COMMAND \"${git_EXECUTABLE}\" rev-list --max-count=1 ${git_tag}
+ WORKING_DIRECTORY \"${work_dir}\"
+ RESULT_VARIABLE error_code
+ OUTPUT_VARIABLE tag_sha
+ )
+
+# Is the hash checkout out that we want?
+if(error_code OR is_remote_ref OR NOT (\"\${tag_sha}\" STREQUAL \"\${head_sha}\"))
+ execute_process(
+ COMMAND \"${git_EXECUTABLE}\" fetch
+ WORKING_DIRECTORY \"${work_dir}\"
+ RESULT_VARIABLE error_code
+ )
+ if(error_code)
+ message(FATAL_ERROR \"Failed to fetch repository '${git_repository}'\")
+ endif()
+
+ execute_process(
+ COMMAND \"${git_EXECUTABLE}\" checkout ${git_tag}
+ WORKING_DIRECTORY \"${work_dir}\"
+ RESULT_VARIABLE error_code
+ )
+ if(error_code)
+ message(FATAL_ERROR \"Failed to checkout tag: '${git_tag}'\")
+ endif()
+
+ execute_process(
+ COMMAND \"${git_EXECUTABLE}\" submodule update --recursive
+ WORKING_DIRECTORY \"${work_dir}/${src_name}\"
+ RESULT_VARIABLE error_code
+ )
+ if(error_code)
+ message(FATAL_ERROR \"Failed to update submodules in: '${work_dir}/${src_name}'\")
+ endif()
+endif()
+
+"
+)
+
+endfunction(_ep_write_gitupdate_script)
+
function(_ep_write_downloadfile_script script_filename remote local timeout hash tls_verify tls_cainfo)
if(timeout)
set(timeout_args TIMEOUT ${timeout})
@@ -1354,7 +1438,7 @@ endfunction()
function(_ep_add_update_command name)
- ExternalProject_Get_Property(${name} source_dir)
+ ExternalProject_Get_Property(${name} source_dir tmp_dir)
get_property(cmd_set TARGET ${name} PROPERTY _EP_UPDATE_COMMAND SET)
get_property(cmd TARGET ${name} PROPERTY _EP_UPDATE_COMMAND)
@@ -1406,15 +1490,15 @@ function(_ep_add_update_command name)
message(FATAL_ERROR "error: could not find git for fetch of ${name}")
endif()
set(work_dir ${source_dir})
- set(comment "Performing update step (git fetch) for '${name}'")
+ set(comment "Performing update step for '${name}'")
get_property(git_tag TARGET ${name} PROPERTY _EP_GIT_TAG)
if(NOT git_tag)
set(git_tag "master")
endif()
- set(cmd ${GIT_EXECUTABLE} fetch
- COMMAND ${GIT_EXECUTABLE} checkout ${git_tag}
- COMMAND ${GIT_EXECUTABLE} submodule update --recursive
+ _ep_write_gitupdate_script(${tmp_dir}/${name}-gitupdate.cmake
+ ${GIT_EXECUTABLE} ${git_tag} ${git_repository} ${work_dir}
)
+ set(cmd ${CMAKE_COMMAND} -P ${tmp_dir}/${name}-gitupdate.cmake)
set(always 1)
elseif(hg_repository)
if(NOT HG_EXECUTABLE)
@@ -1485,8 +1569,11 @@ function(_ep_add_configure_command name)
set(file_deps)
get_property(deps TARGET ${name} PROPERTY _EP_DEPENDS)
foreach(dep IN LISTS deps)
- _ep_get_step_stampfile(${dep} "done" done_stamp_file)
- list(APPEND file_deps ${done_stamp_file})
+ get_property(is_ep TARGET ${dep} PROPERTY _EP_IS_EXTERNAL_PROJECT)
+ if(is_ep)
+ _ep_get_step_stampfile(${dep} "done" done_stamp_file)
+ list(APPEND file_deps ${done_stamp_file})
+ endif()
endforeach()
get_property(cmd_set TARGET ${name} PROPERTY _EP_CONFIGURE_COMMAND SET)
@@ -1512,16 +1599,27 @@ function(_ep_add_configure_command name)
endif()
get_target_property(cmake_generator ${name} _EP_CMAKE_GENERATOR)
+ get_target_property(cmake_generator_toolset ${name} _EP_CMAKE_GENERATOR_TOOLSET)
if(cmake_generator)
- list(APPEND cmd "-G${cmake_generator}" "${source_dir}")
+ list(APPEND cmd "-G${cmake_generator}")
+ if(cmake_generator_toolset)
+ list(APPEND cmd "-T${cmake_generator_toolset}")
+ endif()
else()
if(CMAKE_EXTRA_GENERATOR)
- list(APPEND cmd "-G${CMAKE_EXTRA_GENERATOR} - ${CMAKE_GENERATOR}"
- "${source_dir}")
+ list(APPEND cmd "-G${CMAKE_EXTRA_GENERATOR} - ${CMAKE_GENERATOR}")
else()
- list(APPEND cmd "-G${CMAKE_GENERATOR}" "${source_dir}")
+ list(APPEND cmd "-G${CMAKE_GENERATOR}")
+ endif()
+ if(cmake_generator_toolset)
+ message(FATAL_ERROR "Option CMAKE_GENERATOR_TOOLSET not allowed without CMAKE_GENERATOR.")
+ endif()
+ if(CMAKE_GENERATOR_TOOLSET)
+ list(APPEND cmd "-T${CMAKE_GENERATOR_TOOLSET}")
endif()
endif()
+
+ list(APPEND cmd "${source_dir}")
endif()
# If anything about the configure command changes, (command itself, cmake
diff --git a/Modules/FeatureSummary.cmake b/Modules/FeatureSummary.cmake
index 41bce1e..5d98ac3 100644
--- a/Modules/FeatureSummary.cmake
+++ b/Modules/FeatureSummary.cmake
@@ -177,7 +177,7 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-include(CMakeParseArguments)
+include("${CMAKE_CURRENT_LIST_DIR}/CMakeParseArguments.cmake")
function(ADD_FEATURE_INFO _name _enabled _desc)
diff --git a/Modules/FindBISON.cmake b/Modules/FindBISON.cmake
index a0afd34..4a3e68c 100644
--- a/Modules/FindBISON.cmake
+++ b/Modules/FindBISON.cmake
@@ -47,7 +47,7 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-find_program(BISON_EXECUTABLE bison DOC "path to the bison executable")
+find_program(BISON_EXECUTABLE NAMES bison win_bison DOC "path to the bison executable")
mark_as_advanced(BISON_EXECUTABLE)
if(BISON_EXECUTABLE)
diff --git a/Modules/FindBLAS.cmake b/Modules/FindBLAS.cmake
index d9b3c61..f8a284d 100644
--- a/Modules/FindBLAS.cmake
+++ b/Modules/FindBLAS.cmake
@@ -40,8 +40,8 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-include(CheckFunctionExists)
-include(CheckFortranFunctionExists)
+include(${CMAKE_CURRENT_LIST_DIR}/CheckFunctionExists.cmake)
+include(${CMAKE_CURRENT_LIST_DIR}/CheckFortranFunctionExists.cmake)
set(_blas_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
diff --git a/Modules/FindBZip2.cmake b/Modules/FindBZip2.cmake
index 8b9d235..9fb29d0 100644
--- a/Modules/FindBZip2.cmake
+++ b/Modules/FindBZip2.cmake
@@ -49,7 +49,7 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS(BZip2
VERSION_VAR BZIP2_VERSION_STRING)
if (BZIP2_FOUND)
- include(CheckLibraryExists)
+ include(${CMAKE_CURRENT_LIST_DIR}/CheckLibraryExists.cmake)
CHECK_LIBRARY_EXISTS("${BZIP2_LIBRARIES}" BZ2_bzCompressInit "" BZIP2_NEED_PREFIX)
endif ()
diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake
index 17aba1b..f2c2ce3 100644
--- a/Modules/FindBoost.cmake
+++ b/Modules/FindBoost.cmake
@@ -1,248 +1,141 @@
-# - Try to find Boost include dirs and libraries
-# Usage of this module as follows:
-#
-# NOTE: Take note of the Boost_ADDITIONAL_VERSIONS variable below.
-# Due to Boost naming conventions and limitations in CMake this find
-# module is NOT future safe with respect to Boost version numbers,
-# and may break.
-#
-# == Using Header-Only libraries from within Boost: ==
-#
-# find_package( Boost 1.36.0 )
-# if(Boost_FOUND)
-# include_directories(${Boost_INCLUDE_DIRS})
-# add_executable(foo foo.cc)
-# endif()
-#
-#
-# == Using actual libraries from within Boost: ==
-#
-# set(Boost_USE_STATIC_LIBS ON)
-# set(Boost_USE_MULTITHREADED ON)
-# set(Boost_USE_STATIC_RUNTIME OFF)
-# find_package( Boost 1.36.0 COMPONENTS date_time filesystem system ... )
-#
-# if(Boost_FOUND)
-# include_directories(${Boost_INCLUDE_DIRS})
-# add_executable(foo foo.cc)
-# target_link_libraries(foo ${Boost_LIBRARIES})
-# endif()
-#
-#
-# The components list needs to contain actual names of boost libraries only,
-# such as "date_time" for "libboost_date_time". If you're using parts of
-# Boost that contain header files only (e.g. foreach) you do not need to
-# specify COMPONENTS.
-#
-# You should provide a minimum version number that should be used. If you provide this
-# version number and specify the REQUIRED attribute, this module will fail if it
-# can't find the specified or a later version. If you specify a version number this is
-# automatically put into the considered list of version numbers and thus doesn't need
-# to be specified in the Boost_ADDITIONAL_VERSIONS variable (see below).
-#
-# NOTE for Visual Studio Users:
-# Automatic linking is used on MSVC & Borland compilers by default when
-# #including things in Boost. It's important to note that setting
-# Boost_USE_STATIC_LIBS to OFF is NOT enough to get you dynamic linking,
-# should you need this feature. Automatic linking typically uses static
-# libraries with a few exceptions (Boost.Python is one).
-#
-# Please see the section below near Boost_LIB_DIAGNOSTIC_DEFINITIONS for
-# more details. Adding a target_link_libraries() as shown in the example
-# above appears to cause VS to link dynamically if Boost_USE_STATIC_LIBS
-# gets set to OFF. It is suggested you avoid automatic linking since it
-# will make your application less portable.
-#
-# =========== The mess that is Boost_ADDITIONAL_VERSIONS (sorry?) ============
-#
-# OK, so the Boost_ADDITIONAL_VERSIONS variable can be used to specify a list of
-# boost version numbers that should be taken into account when searching
-# for Boost. Unfortunately boost puts the version number into the
-# actual filename for the libraries, so this variable will certainly be needed
-# in the future when new Boost versions are released.
-#
-# Currently this module searches for the following version numbers:
-# 1.33, 1.33.0, 1.33.1, 1.34, 1.34.0, 1.34.1, 1.35, 1.35.0, 1.35.1,
-# 1.36, 1.36.0, 1.36.1, 1.37, 1.37.0, 1.38, 1.38.0, 1.39, 1.39.0,
-# 1.40, 1.40.0, 1.41, 1.41.0, 1.42, 1.42.0, 1.43, 1.43.0, 1.44, 1.44.0,
-# 1.45, 1.45.0, 1.46, 1.46.0, 1.46.1, 1.47, 1.47.0, 1.48, 1.48.0,
-# 1.49, 1.49.0, 1.50, 1.50.0, 1.51, 1.51.0, 1.52, 1.52.0,
-# 1.53, 1.53.0, 1.54, 1.54.0, 1.55, 1.55.0, 1.56, 1.56.0
-#
-# NOTE: If you add a new major 1.x version in Boost_ADDITIONAL_VERSIONS you should
-# add both 1.x and 1.x.0 as shown above. Official Boost include directories
-# omit the 3rd version number from include paths if it is 0 although not all
-# binary Boost releases do so.
-#
-# set(Boost_ADDITIONAL_VERSIONS "1.78" "1.78.0" "1.79" "1.79.0")
-#
-# ===================================== ============= ========================
-#
-# Variables used by this module, they can change the default behaviour and
-# need to be set before calling find_package:
-#
-# Boost_USE_MULTITHREADED Can be set to OFF to use the non-multithreaded
-# boost libraries. If not specified, defaults
-# to ON.
-#
-# Boost_USE_STATIC_LIBS Can be set to ON to force the use of the static
-# boost libraries. Defaults to OFF.
-#
-# Boost_NO_SYSTEM_PATHS Set to TRUE to suppress searching in system
-# paths (or other locations outside of BOOST_ROOT
-# or BOOST_INCLUDEDIR). Useful when specifying
-# BOOST_ROOT. Defaults to OFF.
-# [Since CMake 2.8.3]
-#
-# Boost_NO_BOOST_CMAKE Do not do a find_package call in config mode
-# before searching for a regular boost install.
-# This will avoid finding boost-cmake installs.
-# Defaults to OFF.
-# [Since CMake 2.8.6]
-#
-# Boost_USE_STATIC_RUNTIME If enabled, searches for boost libraries
-# linked against a static C++ standard library
-# ('s' ABI tag). This option should be set to
-# ON or OFF because the default behavior
-# if not specified is platform dependent
-# for backwards compatibility.
-# [Since CMake 2.8.3]
-#
-# Boost_USE_DEBUG_PYTHON If enabled, searches for boost libraries
-# compiled against a special debug build of
-# Python ('y' ABI tag). Defaults to OFF.
-# [Since CMake 2.8.3]
-#
-# Boost_USE_STLPORT If enabled, searches for boost libraries
-# compiled against the STLPort standard
-# library ('p' ABI tag). Defaults to OFF.
-# [Since CMake 2.8.3]
-#
-# Boost_USE_STLPORT_DEPRECATED_NATIVE_IOSTREAMS
-# If enabled, searches for boost libraries
-# compiled against the deprecated STLPort
-# "native iostreams" feature ('n' ABI tag).
-# Defaults to OFF.
-# [Since CMake 2.8.3]
-#
-# Other Variables used by this module which you may want to set.
-#
-# Boost_ADDITIONAL_VERSIONS A list of version numbers to use for searching
-# the boost include directory. Please see
-# the documentation above regarding this
-# annoying, but necessary variable :(
-#
-# Boost_DEBUG Set this to TRUE to enable debugging output
-# of FindBoost.cmake if you are having problems.
-# Please enable this before filing any bug
-# reports.
-#
-# Boost_DETAILED_FAILURE_MSG FindBoost doesn't output detailed information
-# about why it failed or how to fix the problem
-# unless this is set to TRUE or the REQUIRED
-# keyword is specified in find_package().
-# [Since CMake 2.8.0]
-#
-# Boost_COMPILER Set this to the compiler suffix used by Boost
-# (e.g. "-gcc43") if FindBoost has problems finding
-# the proper Boost installation
-#
-# Boost_THREADAPI When building boost.thread, sometimes the name of the
-# library contains an additional "pthread" or "win32"
-# string known as the threadapi. This can happen when
-# compiling against pthreads on Windows or win32 threads
-# on Cygwin. You may specify this variable and if set
-# when FindBoost searches for the Boost threading library
-# it will first try to match the threadapi you specify.
-# For Example: libboost_thread_win32-mgw45-mt-1_43.a
-# might be found if you specified "win32" here before
-# falling back on libboost_thread-mgw45-mt-1_43.a.
-# [Since CMake 2.8.3]
-#
-# Boost_REALPATH Resolves symbolic links for discovered boost libraries
-# to assist with packaging. For example, instead of
-# Boost_SYSTEM_LIBRARY_RELEASE being resolved to
-# "/usr/lib/libboost_system.so" it would be
-# "/usr/lib/libboost_system.so.1.42.0" instead.
-# This does not affect linking and should not be
-# enabled unless the user needs this information.
-# [Since CMake 2.8.3]
-#
-
-
-#
-# These last three variables are available also as environment variables:
-# Also, note they are completely UPPERCASE, except Boost_DIR.
-#
-# Boost_DIR or The preferred installation prefix for searching for
-# BOOST_ROOT or BOOSTROOT Boost. Set this if the module has problems finding
-# the proper Boost installation.
-#
-# Note that Boost_DIR behaves exactly as <package>_DIR
-# variables are documented to behave in find_package's
-# Config mode. That is, if it is set as a -D argument
-# to CMake, it must point to the location of the
-# BoostConfig.cmake or Boost-config.cmake file. If it
-# is set as an environment variable, it must point to
-# the root of the boost installation. BOOST_ROOT and
-# BOOSTROOT, on the other hand, will point to the root
-# in either case.
-#
-# To prevent falling back on the system paths, set
-# Boost_NO_SYSTEM_PATHS to true.
-#
-# To avoid finding boost-cmake installations, set
-# Boost_NO_BOOST_CMAKE to true.
-#
-# BOOST_INCLUDEDIR Set this to the include directory of Boost, if the
-# module has problems finding the proper Boost installation
-#
-# BOOST_LIBRARYDIR Set this to the lib directory of Boost, if the
-# module has problems finding the proper Boost installation
-#
-# Variables defined by this module:
-#
-# Boost_FOUND System has Boost, this means the include dir was
-# found, as well as all the libraries specified in
-# the COMPONENTS list.
-#
-# Boost_INCLUDE_DIRS Boost include directories: not cached
-#
-# Boost_INCLUDE_DIR This is almost the same as above, but this one is
-# cached and may be modified by advanced users
-#
-# Boost_LIBRARIES Link to these to use the Boost libraries that you
-# specified: not cached
-#
-# Boost_LIBRARY_DIRS The path to where the Boost library files are.
-#
-# Boost_VERSION The version number of the boost libraries that
-# have been found, same as in version.hpp from Boost
-#
-# Boost_LIB_VERSION The version number in filename form as
-# it's appended to the library filenames
-#
-# Boost_MAJOR_VERSION major version number of boost
-# Boost_MINOR_VERSION minor version number of boost
-# Boost_SUBMINOR_VERSION subminor version number of boost
-#
-# Boost_LIB_DIAGNOSTIC_DEFINITIONS [WIN32 Only] You can call
-# add_definitions(${Boost_LIB_DIAGNOSTIC_DEFINITIONS})
-# to have diagnostic information about Boost's
-# automatic linking outputted during compilation time.
-#
-# For each component you specify in find_package(), the following (UPPER-CASE)
-# variables are set. You can use these variables if you would like to pick and
-# choose components for your targets instead of just using Boost_LIBRARIES.
-#
-# Boost_${COMPONENT}_FOUND True IF the Boost library "component" was found.
-#
-# Boost_${COMPONENT}_LIBRARY Contains the libraries for the specified Boost
-# "component" (includes debug and optimized keywords
-# when needed).
+# - Find Boost include dirs and libraries
+# Use this module by invoking find_package with the form:
+# find_package(Boost
+# [version] [EXACT] # Minimum or EXACT version e.g. 1.36.0
+# [REQUIRED] # Fail with error if Boost is not found
+# [COMPONENTS <libs>...] # Boost libraries by their canonical name
+# ) # e.g. "date_time" for "libboost_date_time"
+# This module finds headers and requested component libraries OR a CMake
+# package configuration file provided by a "Boost CMake" build. For the
+# latter case skip to the "Boost CMake" section below. For the former
+# case results are reported in variables:
+# Boost_FOUND - True if headers and requested libraries were found
+# Boost_INCLUDE_DIRS - Boost include directories
+# Boost_LIBRARY_DIRS - Link directories for Boost libraries
+# Boost_LIBRARIES - Boost component libraries to be linked
+# Boost_<C>_FOUND - True if component <C> was found (<C> is upper-case)
+# Boost_<C>_LIBRARY - Libraries to link for component <C> (may include
+# target_link_libraries debug/optimized keywords)
+# Boost_VERSION - BOOST_VERSION value from boost/version.hpp
+# Boost_LIB_VERSION - Version string appended to library filenames
+# Boost_MAJOR_VERSION - Boost major version number (X in X.y.z)
+# Boost_MINOR_VERSION - Boost minor version number (Y in x.Y.z)
+# Boost_SUBMINOR_VERSION - Boost subminor version number (Z in x.y.Z)
+# Boost_LIB_DIAGNOSTIC_DEFINITIONS (Windows)
+# - Pass to add_definitions() to have diagnostic
+# information about Boost's automatic linking
+# displayed during compilation
+#
+# This module reads hints about search locations from variables:
+# BOOST_ROOT - Preferred installation prefix
+# (or BOOSTROOT)
+# BOOST_INCLUDEDIR - Preferred include directory e.g. <prefix>/include
+# BOOST_LIBRARYDIR - Preferred library directory e.g. <prefix>/lib
+# Boost_NO_SYSTEM_PATHS - Set to ON to disable searching in locations not
+# specified by these hint variables. Default is OFF.
+# Boost_ADDITIONAL_VERSIONS
+# - List of Boost versions not known to this module
+# (Boost install locations may contain the version)
+# and saves search results persistently in CMake cache entries:
+# Boost_INCLUDE_DIR - Directory containing Boost headers
+# Boost_LIBRARY_DIR - Directory containing Boost libraries
+# Boost_<C>_LIBRARY_DEBUG - Component <C> library debug variant
+# Boost_<C>_LIBRARY_RELEASE - Component <C> library release variant
+# Users may set the these hints or results as cache entries. Projects should
+# not read these entries directly but instead use the above result variables.
+# Note that some hint names start in upper-case "BOOST". One may specify
+# these as environment variables if they are not specified as CMake variables
+# or cache entries.
+#
+# This module first searches for the Boost header files using the above hint
+# variables (excluding BOOST_LIBRARYDIR) and saves the result in
+# Boost_INCLUDE_DIR. Then it searches for requested component libraries using
+# the above hints (excluding BOOST_INCLUDEDIR and Boost_ADDITIONAL_VERSIONS),
+# "lib" directories near Boost_INCLUDE_DIR, and the library name configuration
+# settings below. It saves the library directory in Boost_LIBRARY_DIR and
+# individual library locations in Boost_<C>_LIBRARY_DEBUG and
+# Boost_<C>_LIBRARY_RELEASE. When one changes settings used by previous
+# searches in the same build tree (excluding environment variables) this
+# module discards previous search results affected by the changes and searches
+# again.
+#
+# Boost libraries come in many variants encoded in their file name. Users or
+# projects may tell this module which variant to find by setting variables:
+# Boost_USE_MULTITHREADED - Set to OFF to use the non-multithreaded
+# libraries ('mt' tag). Default is ON.
+# Boost_USE_STATIC_LIBS - Set to ON to force the use of the static
+# libraries. Default is OFF.
+# Boost_USE_STATIC_RUNTIME - Set to ON or OFF to specify whether to use
+# libraries linked statically to the C++ runtime
+# ('s' tag). Default is platform dependent.
+# Boost_USE_DEBUG_PYTHON - Set to ON to use libraries compiled with a
+# debug Python build ('y' tag). Default is OFF.
+# Boost_USE_STLPORT - Set to ON to use libraries compiled with
+# STLPort ('p' tag). Default is OFF.
+# Boost_USE_STLPORT_DEPRECATED_NATIVE_IOSTREAMS
+# - Set to ON to use libraries compiled with
+# STLPort deprecated "native iostreams"
+# ('n' tag). Default is OFF.
+# Boost_COMPILER - Set to the compiler-specific library suffix
+# (e.g. "-gcc43"). Default is auto-computed
+# for the C++ compiler in use.
+# Boost_THREADAPI - Suffix for "thread" component library name,
+# such as "pthread" or "win32". Names with
+# and without this suffix will both be tried.
+# Other variables one may set to control this module are:
+# Boost_DEBUG - Set to ON to enable debug output from FindBoost.
+# Please enable this before filing any bug report.
+# Boost_DETAILED_FAILURE_MSG
+# - Set to ON to add detailed information to the
+# failure message even when the REQUIRED option
+# is not given to the find_package call.
+# Boost_REALPATH - Set to ON to resolve symlinks for discovered
+# libraries to assist with packaging. For example,
+# the "system" component library may be resolved to
+# "/usr/lib/libboost_system.so.1.42.0" instead of
+# "/usr/lib/libboost_system.so". This does not
+# affect linking and should not be enabled unless
+# the user needs this information.
+# On Visual Studio and Borland compilers Boost headers request automatic
+# linking to corresponding libraries. This requires matching libraries to be
+# linked explicitly or available in the link library search path. In this
+# case setting Boost_USE_STATIC_LIBS to OFF may not achieve dynamic linking.
+# Boost automatic linking typically requests static libraries with a few
+# exceptions (such as Boost.Python). Use
+# add_definitions(${Boost_LIB_DIAGNOSTIC_DEFINITIONS})
+# to ask Boost to report information about automatic linking requests.
+#
+# Example to find Boost headers only:
+# find_package(Boost 1.36.0)
+# if(Boost_FOUND)
+# include_directories(${Boost_INCLUDE_DIRS})
+# add_executable(foo foo.cc)
+# endif()
+# Example to find Boost headers and some libraries:
+# set(Boost_USE_STATIC_LIBS ON)
+# set(Boost_USE_MULTITHREADED ON)
+# set(Boost_USE_STATIC_RUNTIME OFF)
+# find_package(Boost 1.36.0 COMPONENTS date_time filesystem system ...)
+# if(Boost_FOUND)
+# include_directories(${Boost_INCLUDE_DIRS})
+# add_executable(foo foo.cc)
+# target_link_libraries(foo ${Boost_LIBRARIES})
+# endif()
+#
+# Boost CMake ----------------------------------------------------------
+#
+# If Boost was built using the boost-cmake project it provides a package
+# configuration file for use with find_package's Config mode. This module
+# looks for the package configuration file called BoostConfig.cmake or
+# boost-config.cmake and stores the result in cache entry "Boost_DIR". If
+# found, the package configuration file is loaded and this module returns with
+# no further action. See documentation of the Boost CMake package
+# configuration for details on what it provides.
+#
+# Set Boost_NO_BOOST_CMAKE to ON to disable the search for boost-cmake.
#=============================================================================
-# Copyright 2006-2009 Kitware, Inc.
+# Copyright 2006-2012 Kitware, Inc.
# Copyright 2006-2008 Andreas Schneider <mail@cynapses.org>
# Copyright 2007 Wengo
# Copyright 2007 Mike Jackson
@@ -282,6 +175,7 @@ if (NOT Boost_NO_BOOST_CMAKE)
# Note that args are passed in the Boost_FIND_xxxxx variables, so there is no
# need to delegate them to this find_package call.
find_package(Boost QUIET NO_MODULE)
+ mark_as_advanced(Boost_DIR)
# If we found boost-cmake, then we're done. Print out what we found.
# Otherwise let the rest of the module try to find it.
@@ -349,29 +243,54 @@ macro(_Boost_ADJUST_LIB_VARS basename)
endif()
if(Boost_${basename}_LIBRARY)
- set(Boost_${basename}_LIBRARY ${Boost_${basename}_LIBRARY} CACHE FILEPATH "The Boost ${basename} library")
-
- # Remove superfluous "debug" / "optimized" keywords from
- # Boost_LIBRARY_DIRS
- foreach(_boost_my_lib ${Boost_${basename}_LIBRARY})
- get_filename_component(_boost_my_lib_path "${_boost_my_lib}" PATH)
- list(APPEND Boost_LIBRARY_DIRS ${_boost_my_lib_path})
- endforeach()
- list(REMOVE_DUPLICATES Boost_LIBRARY_DIRS)
-
- set(Boost_LIBRARY_DIRS ${Boost_LIBRARY_DIRS} CACHE FILEPATH "Boost library directory")
- set(Boost_${basename}_FOUND ON CACHE INTERNAL "Whether the Boost ${basename} library found")
+ set(Boost_${basename}_FOUND ON)
endif()
endif()
# Make variables changeble to the advanced user
mark_as_advanced(
- Boost_${basename}_LIBRARY
Boost_${basename}_LIBRARY_RELEASE
Boost_${basename}_LIBRARY_DEBUG
)
endmacro()
+macro(_Boost_CHANGE_DETECT changed_var)
+ set(${changed_var} 0)
+ foreach(v ${ARGN})
+ if(DEFINED _Boost_COMPONENTS_SEARCHED)
+ if(${v})
+ if(_${v}_LAST)
+ string(COMPARE NOTEQUAL "${${v}}" "${_${v}_LAST}" _${v}_CHANGED)
+ else()
+ set(_${v}_CHANGED 1)
+ endif()
+ elseif(_${v}_LAST)
+ set(_${v}_CHANGED 1)
+ endif()
+ if(_${v}_CHANGED)
+ set(${changed_var} 1)
+ endif()
+ else()
+ set(_${v}_CHANGED 0)
+ endif()
+ endforeach()
+endmacro()
+
+macro(_Boost_FIND_LIBRARY var)
+ find_library(${var} ${ARGN})
+
+ # If we found the first library save Boost_LIBRARY_DIR.
+ if(${var} AND NOT Boost_LIBRARY_DIR)
+ get_filename_component(_dir "${${var}}" PATH)
+ set(Boost_LIBRARY_DIR "${_dir}" CACHE PATH "Boost library directory" FORCE)
+ endif()
+
+ # If Boost_LIBRARY_DIR is known then search only there.
+ if(Boost_LIBRARY_DIR)
+ set(_boost_LIBRARY_SEARCH_DIRS ${Boost_LIBRARY_DIR} NO_DEFAULT_PATH)
+ endif()
+endmacro()
+
#-------------------------------------------------------------------------------
#
@@ -391,17 +310,6 @@ function(_Boost_COMPILER_DUMPVERSION _OUTPUT_VERSION)
endfunction()
#
-# A convenience function for marking desired components
-# as found or not
-#
-function(_Boost_MARK_COMPONENTS_FOUND _yes_or_no)
- foreach(COMPONENT ${Boost_FIND_COMPONENTS})
- string(TOUPPER ${COMPONENT} UPPERCOMPONENT)
- set(Boost_${UPPERCOMPONENT}_FOUND ${_yes_or_no} CACHE INTERNAL "Whether the Boost ${COMPONENT} library found" FORCE)
- endforeach()
-endfunction()
-
-#
# Take a list of libraries with "thread" in it
# and prepend duplicates with "thread_${Boost_THREADAPI}"
# at the front of the list
@@ -441,6 +349,8 @@ function(_Boost_GUESS_COMPILER_PREFIX _ret)
else()
set (_boost_COMPILER "-il")
endif()
+ elseif (MSVC12)
+ set(_boost_COMPILER "-vc120")
elseif (MSVC11)
set(_boost_COMPILER "-vc110")
elseif (MSVC10)
@@ -561,652 +471,687 @@ endif()
# Boost.
set(Boost_ERROR_REASON)
- if(Boost_DEBUG)
- # Output some of their choices
- message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
- "_boost_TEST_VERSIONS = ${_boost_TEST_VERSIONS}")
- message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
- "Boost_USE_MULTITHREADED = ${Boost_USE_MULTITHREADED}")
- message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
- "Boost_USE_STATIC_LIBS = ${Boost_USE_STATIC_LIBS}")
- message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
- "Boost_USE_STATIC_RUNTIME = ${Boost_USE_STATIC_RUNTIME}")
- message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
- "Boost_ADDITIONAL_VERSIONS = ${Boost_ADDITIONAL_VERSIONS}")
- message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
- "Boost_NO_SYSTEM_PATHS = ${Boost_NO_SYSTEM_PATHS}")
- endif()
-
- if(WIN32)
- # In windows, automatic linking is performed, so you do not have
- # to specify the libraries. If you are linking to a dynamic
- # runtime, then you can choose to link to either a static or a
- # dynamic Boost library, the default is to do a static link. You
- # can alter this for a specific library "whatever" by defining
- # BOOST_WHATEVER_DYN_LINK to force Boost library "whatever" to be
- # linked dynamically. Alternatively you can force all Boost
- # libraries to dynamic link by defining BOOST_ALL_DYN_LINK.
-
- # This feature can be disabled for Boost library "whatever" by
- # defining BOOST_WHATEVER_NO_LIB, or for all of Boost by defining
- # BOOST_ALL_NO_LIB.
-
- # If you want to observe which libraries are being linked against
- # then defining BOOST_LIB_DIAGNOSTIC will cause the auto-linking
- # code to emit a #pragma message each time a library is selected
- # for linking.
- set(Boost_LIB_DIAGNOSTIC_DEFINITIONS
- "-DBOOST_LIB_DIAGNOSTIC" CACHE STRING "Boost diagnostic define")
- endif()
+if(Boost_DEBUG)
+ # Output some of their choices
+ message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
+ "_boost_TEST_VERSIONS = ${_boost_TEST_VERSIONS}")
+ message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
+ "Boost_USE_MULTITHREADED = ${Boost_USE_MULTITHREADED}")
+ message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
+ "Boost_USE_STATIC_LIBS = ${Boost_USE_STATIC_LIBS}")
+ message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
+ "Boost_USE_STATIC_RUNTIME = ${Boost_USE_STATIC_RUNTIME}")
+ message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
+ "Boost_ADDITIONAL_VERSIONS = ${Boost_ADDITIONAL_VERSIONS}")
+ message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
+ "Boost_NO_SYSTEM_PATHS = ${Boost_NO_SYSTEM_PATHS}")
+endif()
- set(_boost_INCLUDE_SEARCH_DIRS_SYSTEM
- C:/boost/include
- C:/boost
- "$ENV{ProgramFiles}/boost/include"
- "$ENV{ProgramFiles}/boost"
- /sw/local/include
- )
+if(WIN32)
+ # In windows, automatic linking is performed, so you do not have
+ # to specify the libraries. If you are linking to a dynamic
+ # runtime, then you can choose to link to either a static or a
+ # dynamic Boost library, the default is to do a static link. You
+ # can alter this for a specific library "whatever" by defining
+ # BOOST_WHATEVER_DYN_LINK to force Boost library "whatever" to be
+ # linked dynamically. Alternatively you can force all Boost
+ # libraries to dynamic link by defining BOOST_ALL_DYN_LINK.
+
+ # This feature can be disabled for Boost library "whatever" by
+ # defining BOOST_WHATEVER_NO_LIB, or for all of Boost by defining
+ # BOOST_ALL_NO_LIB.
+
+ # If you want to observe which libraries are being linked against
+ # then defining BOOST_LIB_DIAGNOSTIC will cause the auto-linking
+ # code to emit a #pragma message each time a library is selected
+ # for linking.
+ set(Boost_LIB_DIAGNOSTIC_DEFINITIONS "-DBOOST_LIB_DIAGNOSTIC")
+endif()
- _Boost_CHECK_SPELLING(Boost_ROOT)
- _Boost_CHECK_SPELLING(Boost_LIBRARYDIR)
- _Boost_CHECK_SPELLING(Boost_INCLUDEDIR)
+_Boost_CHECK_SPELLING(Boost_ROOT)
+_Boost_CHECK_SPELLING(Boost_LIBRARYDIR)
+_Boost_CHECK_SPELLING(Boost_INCLUDEDIR)
- # If BOOST_ROOT was defined in the environment, use it.
- if (NOT BOOST_ROOT AND NOT $ENV{Boost_DIR} STREQUAL "")
- set(BOOST_ROOT $ENV{Boost_DIR})
+# Collect environment variable inputs as hints. Do not consider changes.
+foreach(v BOOSTROOT BOOST_ROOT BOOST_INCLUDEDIR BOOST_LIBRARYDIR)
+ set(_env $ENV{${v}})
+ if(_env)
+ file(TO_CMAKE_PATH "${_env}" _ENV_${v})
+ else()
+ set(_ENV_${v} "")
endif()
+endforeach()
+if(NOT _ENV_BOOST_ROOT AND _ENV_BOOSTROOT)
+ set(_ENV_BOOST_ROOT "${_ENV_BOOSTROOT}")
+endif()
- # If BOOST_ROOT was defined in the environment, use it.
- if (NOT BOOST_ROOT AND NOT $ENV{BOOST_ROOT} STREQUAL "")
- set(BOOST_ROOT $ENV{BOOST_ROOT})
- endif()
+# Collect inputs and cached results. Detect changes since the last run.
+if(NOT BOOST_ROOT AND BOOSTROOT)
+ set(BOOST_ROOT "${BOOSTROOT}")
+endif()
+set(_Boost_VARS_DIR
+ BOOST_ROOT
+ Boost_NO_SYSTEM_PATHS
+ )
- # If BOOSTROOT was defined in the environment, use it.
- if (NOT BOOST_ROOT AND NOT $ENV{BOOSTROOT} STREQUAL "")
- set(BOOST_ROOT $ENV{BOOSTROOT})
- endif()
+if(Boost_DEBUG)
+ message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
+ "Declared as CMake or Environmental Variables:")
+ message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
+ " BOOST_ROOT = ${BOOST_ROOT}")
+ message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
+ " BOOST_INCLUDEDIR = ${BOOST_INCLUDEDIR}")
+ message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
+ " BOOST_LIBRARYDIR = ${BOOST_LIBRARYDIR}")
+ message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
+ "_boost_TEST_VERSIONS = ${_boost_TEST_VERSIONS}")
+endif()
- # If BOOST_INCLUDEDIR was defined in the environment, use it.
- if( NOT $ENV{BOOST_INCLUDEDIR} STREQUAL "" )
- set(BOOST_INCLUDEDIR $ENV{BOOST_INCLUDEDIR})
- endif()
+# ------------------------------------------------------------------------
+# Search for Boost include DIR
+# ------------------------------------------------------------------------
- # If BOOST_LIBRARYDIR was defined in the environment, use it.
- if( NOT $ENV{BOOST_LIBRARYDIR} STREQUAL "" )
- set(BOOST_LIBRARYDIR $ENV{BOOST_LIBRARYDIR})
- endif()
+set(_Boost_VARS_INC BOOST_INCLUDEDIR Boost_INCLUDE_DIR Boost_ADDITIONAL_VERSIONS)
+_Boost_CHANGE_DETECT(_Boost_CHANGE_INCDIR ${_Boost_VARS_DIR} ${_Boost_VARS_INC})
+# Clear Boost_INCLUDE_DIR if it did not change but other input affecting the
+# location did. We will find a new one based on the new inputs.
+if(_Boost_CHANGE_INCDIR AND NOT _Boost_INCLUDE_DIR_CHANGED)
+ unset(Boost_INCLUDE_DIR CACHE)
+endif()
- if( BOOST_ROOT )
- file(TO_CMAKE_PATH ${BOOST_ROOT} BOOST_ROOT)
+if(NOT Boost_INCLUDE_DIR)
+ set(_boost_INCLUDE_SEARCH_DIRS "")
+ if(BOOST_INCLUDEDIR)
+ list(APPEND _boost_INCLUDE_SEARCH_DIRS ${BOOST_INCLUDEDIR})
+ elseif(_ENV_BOOST_INCLUDEDIR)
+ list(APPEND _boost_INCLUDE_SEARCH_DIRS ${_ENV_BOOST_INCLUDEDIR})
endif()
- if(Boost_DEBUG)
- message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
- "Declared as CMake or Environmental Variables:")
- message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
- " BOOST_ROOT = ${BOOST_ROOT}")
- message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
- " BOOST_INCLUDEDIR = ${BOOST_INCLUDEDIR}")
- message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
- " BOOST_LIBRARYDIR = ${BOOST_LIBRARYDIR}")
- message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
- "_boost_TEST_VERSIONS = ${_boost_TEST_VERSIONS}")
+ if( BOOST_ROOT )
+ list(APPEND _boost_INCLUDE_SEARCH_DIRS ${BOOST_ROOT}/include ${BOOST_ROOT})
+ elseif( _ENV_BOOST_ROOT )
+ list(APPEND _boost_INCLUDE_SEARCH_DIRS ${_ENV_BOOST_ROOT}/include ${_ENV_BOOST_ROOT})
endif()
if( Boost_NO_SYSTEM_PATHS)
- set(_boost_FIND_OPTIONS NO_CMAKE_SYSTEM_PATH)
+ list(APPEND _boost_INCLUDE_SEARCH_DIRS NO_CMAKE_SYSTEM_PATH)
else()
- set(_boost_INCLUDE_SEARCH_DIRS ${_boost_INCLUDE_SEARCH_DIRS_SYSTEM})
- endif()
-
- if( BOOST_ROOT )
- set(_boost_INCLUDE_SEARCH_DIRS
- ${BOOST_ROOT}/include
- ${BOOST_ROOT}
- ${_boost_INCLUDE_SEARCH_DIRS})
- endif()
-
- # prepend BOOST_INCLUDEDIR to search path if specified
- if( BOOST_INCLUDEDIR )
- file(TO_CMAKE_PATH ${BOOST_INCLUDEDIR} BOOST_INCLUDEDIR)
- set(_boost_INCLUDE_SEARCH_DIRS
- ${BOOST_INCLUDEDIR} ${_boost_INCLUDE_SEARCH_DIRS})
+ list(APPEND _boost_INCLUDE_SEARCH_DIRS PATHS
+ C:/boost/include
+ C:/boost
+ /sw/local/include
+ )
endif()
- # ------------------------------------------------------------------------
- # Search for Boost include DIR
- # ------------------------------------------------------------------------
# Try to find Boost by stepping backwards through the Boost versions
# we know about.
- if( NOT Boost_INCLUDE_DIR )
- # Build a list of path suffixes for each version.
- set(_boost_PATH_SUFFIXES)
- foreach(_boost_VER ${_boost_TEST_VERSIONS})
- # Add in a path suffix, based on the required version, ideally
- # we could read this from version.hpp, but for that to work we'd
- # need to know the include dir already
- set(_boost_BOOSTIFIED_VERSION)
-
- # Transform 1.35 => 1_35 and 1.36.0 => 1_36_0
- if(_boost_VER MATCHES "[0-9]+\\.[0-9]+\\.[0-9]+")
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\1_\\2_\\3"
- _boost_BOOSTIFIED_VERSION ${_boost_VER})
- elseif(_boost_VER MATCHES "[0-9]+\\.[0-9]+")
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)" "\\1_\\2"
- _boost_BOOSTIFIED_VERSION ${_boost_VER})
- endif()
-
- list(APPEND _boost_PATH_SUFFIXES "boost-${_boost_BOOSTIFIED_VERSION}")
- list(APPEND _boost_PATH_SUFFIXES "boost_${_boost_BOOSTIFIED_VERSION}")
-
- endforeach()
-
- if(Boost_DEBUG)
- message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
- "Include debugging info:")
- message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
- " _boost_INCLUDE_SEARCH_DIRS = ${_boost_INCLUDE_SEARCH_DIRS}")
- message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
- " _boost_PATH_SUFFIXES = ${_boost_PATH_SUFFIXES}")
+ # Build a list of path suffixes for each version.
+ set(_boost_PATH_SUFFIXES)
+ foreach(_boost_VER ${_boost_TEST_VERSIONS})
+ # Add in a path suffix, based on the required version, ideally
+ # we could read this from version.hpp, but for that to work we'd
+ # need to know the include dir already
+ set(_boost_BOOSTIFIED_VERSION)
+
+ # Transform 1.35 => 1_35 and 1.36.0 => 1_36_0
+ if(_boost_VER MATCHES "[0-9]+\\.[0-9]+\\.[0-9]+")
+ string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\1_\\2_\\3"
+ _boost_BOOSTIFIED_VERSION ${_boost_VER})
+ elseif(_boost_VER MATCHES "[0-9]+\\.[0-9]+")
+ string(REGEX REPLACE "([0-9]+)\\.([0-9]+)" "\\1_\\2"
+ _boost_BOOSTIFIED_VERSION ${_boost_VER})
endif()
- # Look for a standard boost header file.
- find_path(Boost_INCLUDE_DIR
- NAMES boost/config.hpp
- HINTS ${_boost_INCLUDE_SEARCH_DIRS}
- PATH_SUFFIXES ${_boost_PATH_SUFFIXES}
- ${_boost_FIND_OPTIONS}
+ list(APPEND _boost_PATH_SUFFIXES
+ "boost-${_boost_BOOSTIFIED_VERSION}"
+ "boost_${_boost_BOOSTIFIED_VERSION}"
+ "boost/boost-${_boost_BOOSTIFIED_VERSION}"
+ "boost/boost_${_boost_BOOSTIFIED_VERSION}"
)
- endif()
- # ------------------------------------------------------------------------
- # Extract version information from version.hpp
- # ------------------------------------------------------------------------
-
- if(Boost_INCLUDE_DIR)
- # Extract Boost_VERSION and Boost_LIB_VERSION from version.hpp
- # Read the whole file:
- #
- set(BOOST_VERSION 0)
- set(BOOST_LIB_VERSION "")
- file(STRINGS "${Boost_INCLUDE_DIR}/boost/version.hpp" _boost_VERSION_HPP_CONTENTS REGEX "#define BOOST_(LIB_)?VERSION ")
- if(Boost_DEBUG)
- message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
- "location of version.hpp: ${Boost_INCLUDE_DIR}/boost/version.hpp")
- endif()
+ endforeach()
- string(REGEX REPLACE ".*#define BOOST_VERSION ([0-9]+).*" "\\1" Boost_VERSION "${_boost_VERSION_HPP_CONTENTS}")
- string(REGEX REPLACE ".*#define BOOST_LIB_VERSION \"([0-9_]+)\".*" "\\1" Boost_LIB_VERSION "${_boost_VERSION_HPP_CONTENTS}")
- unset(_boost_VERSION_HPP_CONTENTS)
+ if(Boost_DEBUG)
+ message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
+ "Include debugging info:")
+ message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
+ " _boost_INCLUDE_SEARCH_DIRS = ${_boost_INCLUDE_SEARCH_DIRS}")
+ message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
+ " _boost_PATH_SUFFIXES = ${_boost_PATH_SUFFIXES}")
+ endif()
- set(Boost_LIB_VERSION ${Boost_LIB_VERSION} CACHE INTERNAL "The library version string for boost libraries")
- set(Boost_VERSION ${Boost_VERSION} CACHE INTERNAL "The version number for boost libraries")
+ # Look for a standard boost header file.
+ find_path(Boost_INCLUDE_DIR
+ NAMES boost/config.hpp
+ HINTS ${_boost_INCLUDE_SEARCH_DIRS}
+ PATH_SUFFIXES ${_boost_PATH_SUFFIXES}
+ )
+endif()
- if(NOT "${Boost_VERSION}" STREQUAL "0")
- math(EXPR Boost_MAJOR_VERSION "${Boost_VERSION} / 100000")
- math(EXPR Boost_MINOR_VERSION "${Boost_VERSION} / 100 % 1000")
- math(EXPR Boost_SUBMINOR_VERSION "${Boost_VERSION} % 100")
+# ------------------------------------------------------------------------
+# Extract version information from version.hpp
+# ------------------------------------------------------------------------
- set(Boost_ERROR_REASON
- "${Boost_ERROR_REASON}Boost version: ${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION}\nBoost include path: ${Boost_INCLUDE_DIR}")
- endif()
- if(Boost_DEBUG)
- message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
- "version.hpp reveals boost "
- "${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION}")
- endif()
- else()
- set(Boost_ERROR_REASON
- "${Boost_ERROR_REASON}Unable to find the Boost header files. Please set BOOST_ROOT to the root directory containing Boost or BOOST_INCLUDEDIR to the directory containing Boost's headers.")
+# Set Boost_FOUND based only on header location and version.
+# It will be updated below for component libraries.
+if(Boost_INCLUDE_DIR)
+ if(Boost_DEBUG)
+ message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
+ "location of version.hpp: ${Boost_INCLUDE_DIR}/boost/version.hpp")
endif()
- # ------------------------------------------------------------------------
- # Suffix initialization and compiler suffix detection.
- # ------------------------------------------------------------------------
+ # Extract Boost_VERSION and Boost_LIB_VERSION from version.hpp
+ set(Boost_VERSION 0)
+ set(Boost_LIB_VERSION "")
+ file(STRINGS "${Boost_INCLUDE_DIR}/boost/version.hpp" _boost_VERSION_HPP_CONTENTS REGEX "#define BOOST_(LIB_)?VERSION ")
+ set(_Boost_VERSION_REGEX "([0-9]+)")
+ set(_Boost_LIB_VERSION_REGEX "\"([0-9_]+)\"")
+ foreach(v VERSION LIB_VERSION)
+ if("${_boost_VERSION_HPP_CONTENTS}" MATCHES ".*#define BOOST_${v} ${_Boost_${v}_REGEX}.*")
+ set(Boost_${v} "${CMAKE_MATCH_1}")
+ endif()
+ endforeach()
+ unset(_boost_VERSION_HPP_CONTENTS)
+
+ math(EXPR Boost_MAJOR_VERSION "${Boost_VERSION} / 100000")
+ math(EXPR Boost_MINOR_VERSION "${Boost_VERSION} / 100 % 1000")
+ math(EXPR Boost_SUBMINOR_VERSION "${Boost_VERSION} % 100")
- # Setting some more suffixes for the library
- set(Boost_LIB_PREFIX "")
- if ( WIN32 AND Boost_USE_STATIC_LIBS AND NOT CYGWIN)
- set(Boost_LIB_PREFIX "lib")
+ set(Boost_ERROR_REASON
+ "${Boost_ERROR_REASON}Boost version: ${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION}\nBoost include path: ${Boost_INCLUDE_DIR}")
+ if(Boost_DEBUG)
+ message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
+ "version.hpp reveals boost "
+ "${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION}")
endif()
- if (Boost_COMPILER)
- set(_boost_COMPILER ${Boost_COMPILER})
- if(Boost_DEBUG)
- message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
- "using user-specified Boost_COMPILER = ${_boost_COMPILER}")
+ if(Boost_FIND_VERSION)
+ # Set Boost_FOUND based on requested version.
+ set(_Boost_VERSION "${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION}")
+ if("${_Boost_VERSION}" VERSION_LESS "${Boost_FIND_VERSION}")
+ set(Boost_FOUND 0)
+ set(_Boost_VERSION_AGE "old")
+ elseif(Boost_FIND_VERSION_EXACT AND
+ NOT "${_Boost_VERSION}" VERSION_EQUAL "${Boost_FIND_VERSION}")
+ set(Boost_FOUND 0)
+ set(_Boost_VERSION_AGE "new")
+ else()
+ set(Boost_FOUND 1)
endif()
+ if(NOT Boost_FOUND)
+ # State that we found a version of Boost that is too new or too old.
+ set(Boost_ERROR_REASON
+ "${Boost_ERROR_REASON}\nDetected version of Boost is too ${_Boost_VERSION_AGE}. Requested version was ${Boost_FIND_VERSION_MAJOR}.${Boost_FIND_VERSION_MINOR}")
+ if (Boost_FIND_VERSION_PATCH)
+ set(Boost_ERROR_REASON
+ "${Boost_ERROR_REASON}.${Boost_FIND_VERSION_PATCH}")
+ endif ()
+ if (NOT Boost_FIND_VERSION_EXACT)
+ set(Boost_ERROR_REASON "${Boost_ERROR_REASON} (or newer)")
+ endif ()
+ set(Boost_ERROR_REASON "${Boost_ERROR_REASON}.")
+ endif ()
else()
- # Attempt to guess the compiler suffix
- # NOTE: this is not perfect yet, if you experience any issues
- # please report them and use the Boost_COMPILER variable
- # to work around the problems.
- _Boost_GUESS_COMPILER_PREFIX(_boost_COMPILER)
- if(Boost_DEBUG)
- message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
- "guessed _boost_COMPILER = ${_boost_COMPILER}")
- endif()
+ # Caller will accept any Boost version.
+ set(Boost_FOUND 1)
endif()
+else()
+ set(Boost_FOUND 0)
+ set(Boost_ERROR_REASON
+ "${Boost_ERROR_REASON}Unable to find the Boost header files. Please set BOOST_ROOT to the root directory containing Boost or BOOST_INCLUDEDIR to the directory containing Boost's headers.")
+endif()
- set (_boost_MULTITHREADED "-mt")
- if( NOT Boost_USE_MULTITHREADED )
- set (_boost_MULTITHREADED "")
+# ------------------------------------------------------------------------
+# Suffix initialization and compiler suffix detection.
+# ------------------------------------------------------------------------
+
+set(_Boost_VARS_NAME
+ Boost_COMPILER
+ Boost_THREADAPI
+ Boost_USE_DEBUG_PYTHON
+ Boost_USE_MULTITHREADED
+ Boost_USE_STATIC_LIBS
+ Boost_USE_STATIC_RUNTIME
+ Boost_USE_STLPORT
+ Boost_USE_STLPORT_DEPRECATED_NATIVE_IOSTREAMS
+ )
+_Boost_CHANGE_DETECT(_Boost_CHANGE_LIBNAME ${_Boost_VARS_NAME})
+
+# Setting some more suffixes for the library
+set(Boost_LIB_PREFIX "")
+if ( WIN32 AND Boost_USE_STATIC_LIBS AND NOT CYGWIN)
+ set(Boost_LIB_PREFIX "lib")
+endif()
+
+if (Boost_COMPILER)
+ set(_boost_COMPILER ${Boost_COMPILER})
+ if(Boost_DEBUG)
+ message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
+ "using user-specified Boost_COMPILER = ${_boost_COMPILER}")
endif()
+else()
+ # Attempt to guess the compiler suffix
+ # NOTE: this is not perfect yet, if you experience any issues
+ # please report them and use the Boost_COMPILER variable
+ # to work around the problems.
+ _Boost_GUESS_COMPILER_PREFIX(_boost_COMPILER)
if(Boost_DEBUG)
message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
- "_boost_MULTITHREADED = ${_boost_MULTITHREADED}")
+ "guessed _boost_COMPILER = ${_boost_COMPILER}")
endif()
+endif()
- #======================
- # Systematically build up the Boost ABI tag
- # http://boost.org/doc/libs/1_41_0/more/getting_started/windows.html#library-naming
- set( _boost_RELEASE_ABI_TAG "-")
- set( _boost_DEBUG_ABI_TAG "-")
- # Key Use this library when:
- # s linking statically to the C++ standard library and
- # compiler runtime support libraries.
- if(Boost_USE_STATIC_RUNTIME)
- set( _boost_RELEASE_ABI_TAG "${_boost_RELEASE_ABI_TAG}s")
- set( _boost_DEBUG_ABI_TAG "${_boost_DEBUG_ABI_TAG}s")
- endif()
- # g using debug versions of the standard and runtime
- # support libraries
- if(WIN32)
- if(MSVC OR "${CMAKE_CXX_COMPILER}" MATCHES "icl"
- OR "${CMAKE_CXX_COMPILER}" MATCHES "icpc")
- set(_boost_DEBUG_ABI_TAG "${_boost_DEBUG_ABI_TAG}g")
- endif()
- endif()
- # y using special debug build of python
- if(Boost_USE_DEBUG_PYTHON)
- set(_boost_DEBUG_ABI_TAG "${_boost_DEBUG_ABI_TAG}y")
- endif()
- # d using a debug version of your code
- set(_boost_DEBUG_ABI_TAG "${_boost_DEBUG_ABI_TAG}d")
- # p using the STLport standard library rather than the
- # default one supplied with your compiler
- if(Boost_USE_STLPORT)
- set( _boost_RELEASE_ABI_TAG "${_boost_RELEASE_ABI_TAG}p")
- set( _boost_DEBUG_ABI_TAG "${_boost_DEBUG_ABI_TAG}p")
- endif()
- # n using the STLport deprecated "native iostreams" feature
- if(Boost_USE_STLPORT_DEPRECATED_NATIVE_IOSTREAMS)
- set( _boost_RELEASE_ABI_TAG "${_boost_RELEASE_ABI_TAG}n")
- set( _boost_DEBUG_ABI_TAG "${_boost_DEBUG_ABI_TAG}n")
- endif()
+set (_boost_MULTITHREADED "-mt")
+if( NOT Boost_USE_MULTITHREADED )
+ set (_boost_MULTITHREADED "")
+endif()
+if(Boost_DEBUG)
+ message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
+ "_boost_MULTITHREADED = ${_boost_MULTITHREADED}")
+endif()
- if(Boost_DEBUG)
- message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
- "_boost_RELEASE_ABI_TAG = ${_boost_RELEASE_ABI_TAG}")
- message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
- "_boost_DEBUG_ABI_TAG = ${_boost_DEBUG_ABI_TAG}")
+#======================
+# Systematically build up the Boost ABI tag
+# http://boost.org/doc/libs/1_41_0/more/getting_started/windows.html#library-naming
+set( _boost_RELEASE_ABI_TAG "-")
+set( _boost_DEBUG_ABI_TAG "-")
+# Key Use this library when:
+# s linking statically to the C++ standard library and
+# compiler runtime support libraries.
+if(Boost_USE_STATIC_RUNTIME)
+ set( _boost_RELEASE_ABI_TAG "${_boost_RELEASE_ABI_TAG}s")
+ set( _boost_DEBUG_ABI_TAG "${_boost_DEBUG_ABI_TAG}s")
+endif()
+# g using debug versions of the standard and runtime
+# support libraries
+if(WIN32)
+ if(MSVC OR "${CMAKE_CXX_COMPILER}" MATCHES "icl"
+ OR "${CMAKE_CXX_COMPILER}" MATCHES "icpc")
+ set(_boost_DEBUG_ABI_TAG "${_boost_DEBUG_ABI_TAG}g")
endif()
+endif()
+# y using special debug build of python
+if(Boost_USE_DEBUG_PYTHON)
+ set(_boost_DEBUG_ABI_TAG "${_boost_DEBUG_ABI_TAG}y")
+endif()
+# d using a debug version of your code
+set(_boost_DEBUG_ABI_TAG "${_boost_DEBUG_ABI_TAG}d")
+# p using the STLport standard library rather than the
+# default one supplied with your compiler
+if(Boost_USE_STLPORT)
+ set( _boost_RELEASE_ABI_TAG "${_boost_RELEASE_ABI_TAG}p")
+ set( _boost_DEBUG_ABI_TAG "${_boost_DEBUG_ABI_TAG}p")
+endif()
+# n using the STLport deprecated "native iostreams" feature
+if(Boost_USE_STLPORT_DEPRECATED_NATIVE_IOSTREAMS)
+ set( _boost_RELEASE_ABI_TAG "${_boost_RELEASE_ABI_TAG}n")
+ set( _boost_DEBUG_ABI_TAG "${_boost_DEBUG_ABI_TAG}n")
+endif()
+
+if(Boost_DEBUG)
+ message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
+ "_boost_RELEASE_ABI_TAG = ${_boost_RELEASE_ABI_TAG}")
+ message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
+ "_boost_DEBUG_ABI_TAG = ${_boost_DEBUG_ABI_TAG}")
+endif()
+
+# ------------------------------------------------------------------------
+# Begin finding boost libraries
+# ------------------------------------------------------------------------
+set(_Boost_VARS_LIB BOOST_LIBRARYDIR Boost_LIBRARY_DIR)
+_Boost_CHANGE_DETECT(_Boost_CHANGE_LIBDIR ${_Boost_VARS_DIR} ${_Boost_VARS_LIB} Boost_INCLUDE_DIR)
+# Clear Boost_LIBRARY_DIR if it did not change but other input affecting the
+# location did. We will find a new one based on the new inputs.
+if(_Boost_CHANGE_LIBDIR AND NOT _Boost_LIBRARY_DIR_CHANGED)
+ unset(Boost_LIBRARY_DIR CACHE)
+endif()
- # ------------------------------------------------------------------------
- # Begin finding boost libraries
- # ------------------------------------------------------------------------
+if(Boost_LIBRARY_DIR)
+ set(_boost_LIBRARY_SEARCH_DIRS ${Boost_LIBRARY_DIR} NO_DEFAULT_PATH)
+else()
+ set(_boost_LIBRARY_SEARCH_DIRS "")
+ if(BOOST_LIBRARYDIR)
+ list(APPEND _boost_LIBRARY_SEARCH_DIRS ${BOOST_LIBRARYDIR})
+ elseif(_ENV_BOOST_LIBRARYDIR)
+ list(APPEND _boost_LIBRARY_SEARCH_DIRS ${_ENV_BOOST_LIBRARYDIR})
+ endif()
if(BOOST_ROOT)
- set(_boost_LIBRARY_SEARCH_DIRS_ALWAYS
- ${BOOST_ROOT}/lib
- ${BOOST_ROOT}/stage/lib)
+ list(APPEND _boost_LIBRARY_SEARCH_DIRS ${BOOST_ROOT}/lib ${BOOST_ROOT}/stage/lib)
+ elseif(_ENV_BOOST_ROOT)
+ list(APPEND _boost_LIBRARY_SEARCH_DIRS ${_ENV_BOOST_ROOT}/lib ${_ENV_BOOST_ROOT}/stage/lib)
endif()
- set(_boost_LIBRARY_SEARCH_DIRS_ALWAYS
- ${_boost_LIBRARY_SEARCH_DIRS_ALWAYS}
+
+ list(APPEND _boost_LIBRARY_SEARCH_DIRS
${Boost_INCLUDE_DIR}/lib
${Boost_INCLUDE_DIR}/../lib
${Boost_INCLUDE_DIR}/stage/lib
- )
- set(_boost_LIBRARY_SEARCH_DIRS_SYSTEM
- C:/boost/lib
- C:/boost
- "$ENV{ProgramFiles}/boost/boost_${Boost_MAJOR_VERSION}_${Boost_MINOR_VERSION}_${Boost_SUBMINOR_VERSION}/lib"
- "$ENV{ProgramFiles}/boost/boost_${Boost_MAJOR_VERSION}_${Boost_MINOR_VERSION}/lib"
- "$ENV{ProgramFiles}/boost/lib"
- "$ENV{ProgramFiles}/boost"
- /sw/local/lib
- )
- set(_boost_LIBRARY_SEARCH_DIRS ${_boost_LIBRARY_SEARCH_DIRS_ALWAYS})
+ )
if( Boost_NO_SYSTEM_PATHS )
- set(_boost_FIND_OPTIONS NO_CMAKE_SYSTEM_PATH)
+ list(APPEND _boost_LIBRARY_SEARCH_DIRS NO_CMAKE_SYSTEM_PATH)
else()
- list(APPEND _boost_LIBRARY_SEARCH_DIRS ${_boost_LIBRARY_SEARCH_DIRS_SYSTEM})
- endif()
-
- # prepend BOOST_LIBRARYDIR to search path if specified
- if( BOOST_LIBRARYDIR )
- file(TO_CMAKE_PATH ${BOOST_LIBRARYDIR} BOOST_LIBRARYDIR)
- set(_boost_LIBRARY_SEARCH_DIRS
- ${BOOST_LIBRARYDIR} ${_boost_LIBRARY_SEARCH_DIRS})
+ list(APPEND _boost_LIBRARY_SEARCH_DIRS PATHS
+ C:/boost/lib
+ C:/boost
+ /sw/local/lib
+ )
endif()
+endif()
- if(Boost_DEBUG)
- message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
- "_boost_LIBRARY_SEARCH_DIRS = ${_boost_LIBRARY_SEARCH_DIRS}")
- endif()
+if(Boost_DEBUG)
+ message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
+ "_boost_LIBRARY_SEARCH_DIRS = ${_boost_LIBRARY_SEARCH_DIRS}")
+endif()
- # Support preference of static libs by adjusting CMAKE_FIND_LIBRARY_SUFFIXES
- if( Boost_USE_STATIC_LIBS )
- set( _boost_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
- if(WIN32)
- set(CMAKE_FIND_LIBRARY_SUFFIXES .lib .a ${CMAKE_FIND_LIBRARY_SUFFIXES})
- else()
- set(CMAKE_FIND_LIBRARY_SUFFIXES .a )
- endif()
+# Support preference of static libs by adjusting CMAKE_FIND_LIBRARY_SUFFIXES
+if( Boost_USE_STATIC_LIBS )
+ set( _boost_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
+ if(WIN32)
+ set(CMAKE_FIND_LIBRARY_SUFFIXES .lib .a ${CMAKE_FIND_LIBRARY_SUFFIXES})
+ else()
+ set(CMAKE_FIND_LIBRARY_SUFFIXES .a )
endif()
+endif()
- # We want to use the tag inline below without risking double dashes
- if(_boost_RELEASE_ABI_TAG)
- if(${_boost_RELEASE_ABI_TAG} STREQUAL "-")
- set(_boost_RELEASE_ABI_TAG "")
- endif()
+# We want to use the tag inline below without risking double dashes
+if(_boost_RELEASE_ABI_TAG)
+ if(${_boost_RELEASE_ABI_TAG} STREQUAL "-")
+ set(_boost_RELEASE_ABI_TAG "")
endif()
- if(_boost_DEBUG_ABI_TAG)
- if(${_boost_DEBUG_ABI_TAG} STREQUAL "-")
- set(_boost_DEBUG_ABI_TAG "")
- endif()
+endif()
+if(_boost_DEBUG_ABI_TAG)
+ if(${_boost_DEBUG_ABI_TAG} STREQUAL "-")
+ set(_boost_DEBUG_ABI_TAG "")
endif()
+endif()
- # The previous behavior of FindBoost when Boost_USE_STATIC_LIBS was enabled
- # on WIN32 was to:
- # 1. Search for static libs compiled against a SHARED C++ standard runtime library (use if found)
- # 2. Search for static libs compiled against a STATIC C++ standard runtime library (use if found)
- # We maintain this behavior since changing it could break people's builds.
- # To disable the ambiguous behavior, the user need only
- # set Boost_USE_STATIC_RUNTIME either ON or OFF.
- set(_boost_STATIC_RUNTIME_WORKAROUND false)
- if(WIN32 AND Boost_USE_STATIC_LIBS)
- if(NOT DEFINED Boost_USE_STATIC_RUNTIME)
- set(_boost_STATIC_RUNTIME_WORKAROUND true)
- endif()
+# The previous behavior of FindBoost when Boost_USE_STATIC_LIBS was enabled
+# on WIN32 was to:
+# 1. Search for static libs compiled against a SHARED C++ standard runtime library (use if found)
+# 2. Search for static libs compiled against a STATIC C++ standard runtime library (use if found)
+# We maintain this behavior since changing it could break people's builds.
+# To disable the ambiguous behavior, the user need only
+# set Boost_USE_STATIC_RUNTIME either ON or OFF.
+set(_boost_STATIC_RUNTIME_WORKAROUND false)
+if(WIN32 AND Boost_USE_STATIC_LIBS)
+ if(NOT DEFINED Boost_USE_STATIC_RUNTIME)
+ set(_boost_STATIC_RUNTIME_WORKAROUND true)
endif()
+endif()
- # On versions < 1.35, remove the System library from the considered list
- # since it wasn't added until 1.35.
- if(Boost_VERSION AND Boost_FIND_COMPONENTS)
- if(Boost_VERSION LESS 103500)
- list(REMOVE_ITEM Boost_FIND_COMPONENTS system)
- endif()
- endif()
+# On versions < 1.35, remove the System library from the considered list
+# since it wasn't added until 1.35.
+if(Boost_VERSION AND Boost_FIND_COMPONENTS)
+ if(Boost_VERSION LESS 103500)
+ list(REMOVE_ITEM Boost_FIND_COMPONENTS system)
+ endif()
+endif()
- foreach(COMPONENT ${Boost_FIND_COMPONENTS})
+# If the user changed any of our control inputs flush previous results.
+if(_Boost_CHANGE_LIBDIR OR _Boost_CHANGE_LIBNAME)
+ foreach(COMPONENT ${_Boost_COMPONENTS_SEARCHED})
string(TOUPPER ${COMPONENT} UPPERCOMPONENT)
- set( Boost_${UPPERCOMPONENT}_LIBRARY "Boost_${UPPERCOMPONENT}_LIBRARY-NOTFOUND" )
- set( Boost_${UPPERCOMPONENT}_LIBRARY_RELEASE "Boost_${UPPERCOMPONENT}_LIBRARY_RELEASE-NOTFOUND" )
- set( Boost_${UPPERCOMPONENT}_LIBRARY_DEBUG "Boost_${UPPERCOMPONENT}_LIBRARY_DEBUG-NOTFOUND")
-
- set( _boost_docstring_release "Boost ${COMPONENT} library (release)")
- set( _boost_docstring_debug "Boost ${COMPONENT} library (debug)")
-
- #
- # Find RELEASE libraries
- #
- set(_boost_RELEASE_NAMES
- ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_RELEASE_ABI_TAG}-${Boost_LIB_VERSION}
- ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_RELEASE_ABI_TAG}
- ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_RELEASE_ABI_TAG}-${Boost_LIB_VERSION}
- ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_RELEASE_ABI_TAG}
- ${Boost_LIB_PREFIX}boost_${COMPONENT} )
- if(_boost_STATIC_RUNTIME_WORKAROUND)
- set(_boost_RELEASE_STATIC_ABI_TAG "-s${_boost_RELEASE_ABI_TAG}")
- list(APPEND _boost_RELEASE_NAMES
- ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG}-${Boost_LIB_VERSION}
- ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG}
- ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG}-${Boost_LIB_VERSION}
- ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG} )
- endif()
- if(Boost_THREADAPI AND ${COMPONENT} STREQUAL "thread")
- _Boost_PREPEND_LIST_WITH_THREADAPI(_boost_RELEASE_NAMES ${_boost_RELEASE_NAMES})
- endif()
- if(Boost_DEBUG)
- message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
- "Searching for ${UPPERCOMPONENT}_LIBRARY_RELEASE: ${_boost_RELEASE_NAMES}")
- endif()
- find_library(Boost_${UPPERCOMPONENT}_LIBRARY_RELEASE
- NAMES ${_boost_RELEASE_NAMES}
- HINTS ${_boost_LIBRARY_SEARCH_DIRS}
- ${_boost_FIND_OPTIONS}
- DOC "${_boost_docstring_release}"
- )
+ foreach(c DEBUG RELEASE)
+ set(_var Boost_${UPPERCOMPONENT}_LIBRARY_${c})
+ unset(${_var} CACHE)
+ set(${_var} "${_var}-NOTFOUND")
+ endforeach()
+ endforeach()
+ set(_Boost_COMPONENTS_SEARCHED "")
+endif()
- #
- # Find DEBUG libraries
- #
- set(_boost_DEBUG_NAMES
- ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_DEBUG_ABI_TAG}-${Boost_LIB_VERSION}
- ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_DEBUG_ABI_TAG}
- ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_DEBUG_ABI_TAG}-${Boost_LIB_VERSION}
- ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_DEBUG_ABI_TAG}
- ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}
- ${Boost_LIB_PREFIX}boost_${COMPONENT} )
- if(_boost_STATIC_RUNTIME_WORKAROUND)
- set(_boost_DEBUG_STATIC_ABI_TAG "-s${_boost_DEBUG_ABI_TAG}")
- list(APPEND _boost_DEBUG_NAMES
- ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG}-${Boost_LIB_VERSION}
- ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG}
- ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG}-${Boost_LIB_VERSION}
- ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG} )
- endif()
- if(Boost_THREADAPI AND ${COMPONENT} STREQUAL "thread")
- _Boost_PREPEND_LIST_WITH_THREADAPI(_boost_DEBUG_NAMES ${_boost_DEBUG_NAMES})
- endif()
- if(Boost_DEBUG)
- message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
- "Searching for ${UPPERCOMPONENT}_LIBRARY_DEBUG: ${_boost_DEBUG_NAMES}")
- endif()
- find_library(Boost_${UPPERCOMPONENT}_LIBRARY_DEBUG
- NAMES ${_boost_DEBUG_NAMES}
- HINTS ${_boost_LIBRARY_SEARCH_DIRS}
- ${_boost_FIND_OPTIONS}
- DOC "${_boost_docstring_debug}"
+foreach(COMPONENT ${Boost_FIND_COMPONENTS})
+ string(TOUPPER ${COMPONENT} UPPERCOMPONENT)
+
+ set( _boost_docstring_release "Boost ${COMPONENT} library (release)")
+ set( _boost_docstring_debug "Boost ${COMPONENT} library (debug)")
+
+ #
+ # Find RELEASE libraries
+ #
+ set(_boost_RELEASE_NAMES
+ ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_RELEASE_ABI_TAG}-${Boost_LIB_VERSION}
+ ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_RELEASE_ABI_TAG}
+ ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_RELEASE_ABI_TAG}-${Boost_LIB_VERSION}
+ ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_RELEASE_ABI_TAG}
+ ${Boost_LIB_PREFIX}boost_${COMPONENT} )
+ if(_boost_STATIC_RUNTIME_WORKAROUND)
+ set(_boost_RELEASE_STATIC_ABI_TAG "-s${_boost_RELEASE_ABI_TAG}")
+ list(APPEND _boost_RELEASE_NAMES
+ ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG}-${Boost_LIB_VERSION}
+ ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG}
+ ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG}-${Boost_LIB_VERSION}
+ ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG} )
+ endif()
+ if(Boost_THREADAPI AND ${COMPONENT} STREQUAL "thread")
+ _Boost_PREPEND_LIST_WITH_THREADAPI(_boost_RELEASE_NAMES ${_boost_RELEASE_NAMES})
+ endif()
+ if(Boost_DEBUG)
+ message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
+ "Searching for ${UPPERCOMPONENT}_LIBRARY_RELEASE: ${_boost_RELEASE_NAMES}")
+ endif()
+
+ # Avoid passing backslashes to _Boost_FIND_LIBRARY due to macro re-parsing.
+ string(REPLACE "\\" "/" _boost_LIBRARY_SEARCH_DIRS_tmp "${_boost_LIBRARY_SEARCH_DIRS}")
+
+ _Boost_FIND_LIBRARY(Boost_${UPPERCOMPONENT}_LIBRARY_RELEASE
+ NAMES ${_boost_RELEASE_NAMES}
+ HINTS ${_boost_LIBRARY_SEARCH_DIRS_tmp}
+ NAMES_PER_DIR
+ DOC "${_boost_docstring_release}"
)
- if(Boost_REALPATH)
- _Boost_SWAP_WITH_REALPATH(Boost_${UPPERCOMPONENT}_LIBRARY_RELEASE "${_boost_docstring_release}")
- _Boost_SWAP_WITH_REALPATH(Boost_${UPPERCOMPONENT}_LIBRARY_DEBUG "${_boost_docstring_debug}" )
- endif()
+ #
+ # Find DEBUG libraries
+ #
+ set(_boost_DEBUG_NAMES
+ ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_DEBUG_ABI_TAG}-${Boost_LIB_VERSION}
+ ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_DEBUG_ABI_TAG}
+ ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_DEBUG_ABI_TAG}-${Boost_LIB_VERSION}
+ ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_DEBUG_ABI_TAG}
+ ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}
+ ${Boost_LIB_PREFIX}boost_${COMPONENT} )
+ if(_boost_STATIC_RUNTIME_WORKAROUND)
+ set(_boost_DEBUG_STATIC_ABI_TAG "-s${_boost_DEBUG_ABI_TAG}")
+ list(APPEND _boost_DEBUG_NAMES
+ ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG}-${Boost_LIB_VERSION}
+ ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG}
+ ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG}-${Boost_LIB_VERSION}
+ ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG} )
+ endif()
+ if(Boost_THREADAPI AND ${COMPONENT} STREQUAL "thread")
+ _Boost_PREPEND_LIST_WITH_THREADAPI(_boost_DEBUG_NAMES ${_boost_DEBUG_NAMES})
+ endif()
+ if(Boost_DEBUG)
+ message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
+ "Searching for ${UPPERCOMPONENT}_LIBRARY_DEBUG: ${_boost_DEBUG_NAMES}")
+ endif()
- _Boost_ADJUST_LIB_VARS(${UPPERCOMPONENT})
+ # Avoid passing backslashes to _Boost_FIND_LIBRARY due to macro re-parsing.
+ string(REPLACE "\\" "/" _boost_LIBRARY_SEARCH_DIRS_tmp "${_boost_LIBRARY_SEARCH_DIRS}")
- endforeach()
+ _Boost_FIND_LIBRARY(Boost_${UPPERCOMPONENT}_LIBRARY_DEBUG
+ NAMES ${_boost_DEBUG_NAMES}
+ HINTS ${_boost_LIBRARY_SEARCH_DIRS_tmp}
+ NAMES_PER_DIR
+ DOC "${_boost_docstring_debug}"
+ )
- # Restore the original find library ordering
- if( Boost_USE_STATIC_LIBS )
- set(CMAKE_FIND_LIBRARY_SUFFIXES ${_boost_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES})
+ if(Boost_REALPATH)
+ _Boost_SWAP_WITH_REALPATH(Boost_${UPPERCOMPONENT}_LIBRARY_RELEASE "${_boost_docstring_release}")
+ _Boost_SWAP_WITH_REALPATH(Boost_${UPPERCOMPONENT}_LIBRARY_DEBUG "${_boost_docstring_debug}" )
endif()
- # ------------------------------------------------------------------------
- # End finding boost libraries
- # ------------------------------------------------------------------------
+ _Boost_ADJUST_LIB_VARS(${UPPERCOMPONENT})
- # ------------------------------------------------------------------------
- # Begin long process of determining Boost_FOUND, starting with version
- # number checks, followed by
- # TODO: Ideally the version check logic should happen prior to searching
- # for libraries...
- # ------------------------------------------------------------------------
+endforeach()
- set(Boost_INCLUDE_DIRS
- ${Boost_INCLUDE_DIR}
- )
+# Restore the original find library ordering
+if( Boost_USE_STATIC_LIBS )
+ set(CMAKE_FIND_LIBRARY_SUFFIXES ${_boost_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES})
+endif()
- set(Boost_FOUND FALSE)
- if(Boost_INCLUDE_DIR)
- set( Boost_FOUND TRUE )
+# ------------------------------------------------------------------------
+# End finding boost libraries
+# ------------------------------------------------------------------------
- if(Boost_MAJOR_VERSION LESS "${Boost_FIND_VERSION_MAJOR}" )
- set( Boost_FOUND FALSE )
- set(_Boost_VERSION_AGE "old")
- elseif(Boost_MAJOR_VERSION EQUAL "${Boost_FIND_VERSION_MAJOR}" )
- if(Boost_MINOR_VERSION LESS "${Boost_FIND_VERSION_MINOR}" )
- set( Boost_FOUND FALSE )
- set(_Boost_VERSION_AGE "old")
- elseif(Boost_MINOR_VERSION EQUAL "${Boost_FIND_VERSION_MINOR}" )
- if( Boost_FIND_VERSION_PATCH AND Boost_SUBMINOR_VERSION LESS "${Boost_FIND_VERSION_PATCH}" )
- set( Boost_FOUND FALSE )
- set(_Boost_VERSION_AGE "old")
- endif()
- endif()
- endif()
+set(Boost_INCLUDE_DIRS ${Boost_INCLUDE_DIR})
+set(Boost_LIBRARY_DIRS ${Boost_LIBRARY_DIR})
- if (NOT Boost_FOUND)
- _Boost_MARK_COMPONENTS_FOUND(OFF)
+# The above setting of Boost_FOUND was based only on the header files.
+# Update it for the requested component libraries.
+if(Boost_FOUND)
+ # The headers were found. Check for requested component libs.
+ set(_boost_CHECKED_COMPONENT FALSE)
+ set(_Boost_MISSING_COMPONENTS "")
+ foreach(COMPONENT ${Boost_FIND_COMPONENTS})
+ string(TOUPPER ${COMPONENT} COMPONENT)
+ set(_boost_CHECKED_COMPONENT TRUE)
+ if(NOT Boost_${COMPONENT}_FOUND)
+ string(TOLOWER ${COMPONENT} COMPONENT)
+ list(APPEND _Boost_MISSING_COMPONENTS ${COMPONENT})
endif()
+ endforeach()
- if (Boost_FOUND AND Boost_FIND_VERSION_EXACT)
- # If the user requested an exact version of Boost, check
- # that. We already know that the Boost version we have is >= the
- # requested version.
- set(_Boost_VERSION_AGE "new")
-
- # If the user didn't specify a patchlevel, it's 0.
- if (NOT Boost_FIND_VERSION_PATCH)
- set(Boost_FIND_VERSION_PATCH 0)
- endif ()
-
- # We'll set Boost_FOUND true again if we have an exact version match.
- set(Boost_FOUND FALSE)
- _Boost_MARK_COMPONENTS_FOUND(OFF)
- if(Boost_MAJOR_VERSION EQUAL "${Boost_FIND_VERSION_MAJOR}" )
- if(Boost_MINOR_VERSION EQUAL "${Boost_FIND_VERSION_MINOR}" )
- if(Boost_SUBMINOR_VERSION EQUAL "${Boost_FIND_VERSION_PATCH}" )
- set( Boost_FOUND TRUE )
- _Boost_MARK_COMPONENTS_FOUND(ON)
- endif()
- endif()
- endif()
- endif ()
+ if(Boost_DEBUG)
+ message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] Boost_FOUND = ${Boost_FOUND}")
+ endif()
- if(NOT Boost_FOUND)
- # State that we found a version of Boost that is too new or too old.
+ if (_Boost_MISSING_COMPONENTS)
+ set(Boost_FOUND 0)
+ # We were unable to find some libraries, so generate a sensible
+ # error message that lists the libraries we were unable to find.
+ set(Boost_ERROR_REASON
+ "${Boost_ERROR_REASON}\nThe following Boost libraries could not be found:\n")
+ foreach(COMPONENT ${_Boost_MISSING_COMPONENTS})
set(Boost_ERROR_REASON
- "${Boost_ERROR_REASON}\nDetected version of Boost is too ${_Boost_VERSION_AGE}. Requested version was ${Boost_FIND_VERSION_MAJOR}.${Boost_FIND_VERSION_MINOR}")
- if (Boost_FIND_VERSION_PATCH)
- set(Boost_ERROR_REASON
- "${Boost_ERROR_REASON}.${Boost_FIND_VERSION_PATCH}")
- endif ()
- if (NOT Boost_FIND_VERSION_EXACT)
- set(Boost_ERROR_REASON "${Boost_ERROR_REASON} (or newer)")
- endif ()
- set(Boost_ERROR_REASON "${Boost_ERROR_REASON}.")
- endif ()
-
- # Always check for missing components
- set(_boost_CHECKED_COMPONENT FALSE)
- set(_Boost_MISSING_COMPONENTS "")
- foreach(COMPONENT ${Boost_FIND_COMPONENTS})
- string(TOUPPER ${COMPONENT} COMPONENT)
- set(_boost_CHECKED_COMPONENT TRUE)
- if(NOT Boost_${COMPONENT}_FOUND)
- string(TOLOWER ${COMPONENT} COMPONENT)
- list(APPEND _Boost_MISSING_COMPONENTS ${COMPONENT})
- set( Boost_FOUND FALSE)
- endif()
+ "${Boost_ERROR_REASON} boost_${COMPONENT}\n")
endforeach()
- if(Boost_DEBUG)
- message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] Boost_FOUND = ${Boost_FOUND}")
- endif()
-
- if (_Boost_MISSING_COMPONENTS)
- # We were unable to find some libraries, so generate a sensible
- # error message that lists the libraries we were unable to find.
+ list(LENGTH Boost_FIND_COMPONENTS Boost_NUM_COMPONENTS_WANTED)
+ list(LENGTH _Boost_MISSING_COMPONENTS Boost_NUM_MISSING_COMPONENTS)
+ if (${Boost_NUM_COMPONENTS_WANTED} EQUAL ${Boost_NUM_MISSING_COMPONENTS})
set(Boost_ERROR_REASON
- "${Boost_ERROR_REASON}\nThe following Boost libraries could not be found:\n")
- foreach(COMPONENT ${_Boost_MISSING_COMPONENTS})
- set(Boost_ERROR_REASON
- "${Boost_ERROR_REASON} boost_${COMPONENT}\n")
- endforeach()
-
- list(LENGTH Boost_FIND_COMPONENTS Boost_NUM_COMPONENTS_WANTED)
- list(LENGTH _Boost_MISSING_COMPONENTS Boost_NUM_MISSING_COMPONENTS)
- if (${Boost_NUM_COMPONENTS_WANTED} EQUAL ${Boost_NUM_MISSING_COMPONENTS})
- set(Boost_ERROR_REASON
- "${Boost_ERROR_REASON}No Boost libraries were found. You may need to set BOOST_LIBRARYDIR to the directory containing Boost libraries or BOOST_ROOT to the location of Boost.")
- else ()
- set(Boost_ERROR_REASON
- "${Boost_ERROR_REASON}Some (but not all) of the required Boost libraries were found. You may need to install these additional Boost libraries. Alternatively, set BOOST_LIBRARYDIR to the directory containing Boost libraries or BOOST_ROOT to the location of Boost.")
- endif ()
+ "${Boost_ERROR_REASON}No Boost libraries were found. You may need to set BOOST_LIBRARYDIR to the directory containing Boost libraries or BOOST_ROOT to the location of Boost.")
+ else ()
+ set(Boost_ERROR_REASON
+ "${Boost_ERROR_REASON}Some (but not all) of the required Boost libraries were found. You may need to install these additional Boost libraries. Alternatively, set BOOST_LIBRARYDIR to the directory containing Boost libraries or BOOST_ROOT to the location of Boost.")
endif ()
+ endif ()
- if( NOT Boost_LIBRARY_DIRS AND NOT _boost_CHECKED_COMPONENT )
- # Compatibility Code for backwards compatibility with CMake
- # 2.4's FindBoost module.
+ if( NOT Boost_LIBRARY_DIRS AND NOT _boost_CHECKED_COMPONENT )
+ # Compatibility Code for backwards compatibility with CMake
+ # 2.4's FindBoost module.
- # Look for the boost library path.
- # Note that the user may not have installed any libraries
- # so it is quite possible the Boost_LIBRARY_DIRS may not exist.
- set(_boost_LIB_DIR ${Boost_INCLUDE_DIR})
+ # Look for the boost library path.
+ # Note that the user may not have installed any libraries
+ # so it is quite possible the Boost_LIBRARY_DIRS may not exist.
+ set(_boost_LIB_DIR ${Boost_INCLUDE_DIR})
- if("${_boost_LIB_DIR}" MATCHES "boost-[0-9]+")
- get_filename_component(_boost_LIB_DIR ${_boost_LIB_DIR} PATH)
- endif()
+ if("${_boost_LIB_DIR}" MATCHES "boost-[0-9]+")
+ get_filename_component(_boost_LIB_DIR ${_boost_LIB_DIR} PATH)
+ endif()
- if("${_boost_LIB_DIR}" MATCHES "/include$")
- # Strip off the trailing "/include" in the path.
- get_filename_component(_boost_LIB_DIR ${_boost_LIB_DIR} PATH)
- endif()
+ if("${_boost_LIB_DIR}" MATCHES "/include$")
+ # Strip off the trailing "/include" in the path.
+ get_filename_component(_boost_LIB_DIR ${_boost_LIB_DIR} PATH)
+ endif()
- if(EXISTS "${_boost_LIB_DIR}/lib")
- set(_boost_LIB_DIR ${_boost_LIB_DIR}/lib)
+ if(EXISTS "${_boost_LIB_DIR}/lib")
+ set(_boost_LIB_DIR ${_boost_LIB_DIR}/lib)
+ else()
+ if(EXISTS "${_boost_LIB_DIR}/stage/lib")
+ set(_boost_LIB_DIR ${_boost_LIB_DIR}/stage/lib)
else()
- if(EXISTS "${_boost_LIB_DIR}/stage/lib")
- set(_boost_LIB_DIR ${_boost_LIB_DIR}/stage/lib)
- else()
- set(_boost_LIB_DIR "")
- endif()
- endif()
-
- if(_boost_LIB_DIR AND EXISTS "${_boost_LIB_DIR}")
- set(Boost_LIBRARY_DIRS ${_boost_LIB_DIR} CACHE FILEPATH "Boost library directory")
+ set(_boost_LIB_DIR "")
endif()
+ endif()
+ if(_boost_LIB_DIR AND EXISTS "${_boost_LIB_DIR}")
+ set(Boost_LIBRARY_DIRS ${_boost_LIB_DIR})
endif()
- else()
- set( Boost_FOUND FALSE)
endif()
+else()
+ # Boost headers were not found so no components were found.
+ foreach(COMPONENT ${Boost_FIND_COMPONENTS})
+ string(TOUPPER ${COMPONENT} UPPERCOMPONENT)
+ set(Boost_${UPPERCOMPONENT}_FOUND 0)
+ endforeach()
+endif()
- # ------------------------------------------------------------------------
- # Notification to end user about what was found
- # ------------------------------------------------------------------------
+# ------------------------------------------------------------------------
+# Notification to end user about what was found
+# ------------------------------------------------------------------------
- if(Boost_FOUND)
+set(Boost_LIBRARIES "")
+if(Boost_FOUND)
+ if(NOT Boost_FIND_QUIETLY)
+ message(STATUS "Boost version: ${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION}")
+ if(Boost_FIND_COMPONENTS)
+ message(STATUS "Found the following Boost libraries:")
+ endif()
+ endif()
+ foreach( COMPONENT ${Boost_FIND_COMPONENTS} )
+ string( TOUPPER ${COMPONENT} UPPERCOMPONENT )
+ if( Boost_${UPPERCOMPONENT}_FOUND )
if(NOT Boost_FIND_QUIETLY)
- message(STATUS "Boost version: ${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION}")
- if(Boost_FIND_COMPONENTS)
- message(STATUS "Found the following Boost libraries:")
- endif()
+ message (STATUS " ${COMPONENT}")
endif()
- foreach( COMPONENT ${Boost_FIND_COMPONENTS} )
- string( TOUPPER ${COMPONENT} UPPERCOMPONENT )
- if( Boost_${UPPERCOMPONENT}_FOUND )
- if(NOT Boost_FIND_QUIETLY)
- message (STATUS " ${COMPONENT}")
- endif()
- set(Boost_LIBRARIES ${Boost_LIBRARIES} ${Boost_${UPPERCOMPONENT}_LIBRARY})
- endif()
- endforeach()
+ list(APPEND Boost_LIBRARIES ${Boost_${UPPERCOMPONENT}_LIBRARY})
+ endif()
+ endforeach()
+else()
+ if(Boost_FIND_REQUIRED)
+ message(SEND_ERROR "Unable to find the requested Boost libraries.\n${Boost_ERROR_REASON}")
else()
- if(Boost_FIND_REQUIRED)
- message(SEND_ERROR "Unable to find the requested Boost libraries.\n${Boost_ERROR_REASON}")
- else()
- if(NOT Boost_FIND_QUIETLY)
- # we opt not to automatically output Boost_ERROR_REASON here as
- # it could be quite lengthy and somewhat imposing in its requests
- # Since Boost is not always a required dependency we'll leave this
- # up to the end-user.
- if(Boost_DEBUG OR Boost_DETAILED_FAILURE_MSG)
- message(STATUS "Could NOT find Boost\n${Boost_ERROR_REASON}")
- else()
- message(STATUS "Could NOT find Boost")
- endif()
+ if(NOT Boost_FIND_QUIETLY)
+ # we opt not to automatically output Boost_ERROR_REASON here as
+ # it could be quite lengthy and somewhat imposing in its requests
+ # Since Boost is not always a required dependency we'll leave this
+ # up to the end-user.
+ if(Boost_DEBUG OR Boost_DETAILED_FAILURE_MSG)
+ message(STATUS "Could NOT find Boost\n${Boost_ERROR_REASON}")
+ else()
+ message(STATUS "Could NOT find Boost")
endif()
endif()
endif()
+endif()
- # show the Boost_INCLUDE_DIRS AND Boost_LIBRARIES variables only in the advanced view
- mark_as_advanced(Boost_INCLUDE_DIR
- Boost_INCLUDE_DIRS
- Boost_LIBRARY_DIRS
- )
+# Configure display of cache entries in GUI.
+foreach(v BOOSTROOT BOOST_ROOT ${_Boost_VARS_INC} ${_Boost_VARS_LIB})
+ get_property(_type CACHE ${v} PROPERTY TYPE)
+ if(_type)
+ set_property(CACHE ${v} PROPERTY ADVANCED 1)
+ if("x${_type}" STREQUAL "xUNINITIALIZED")
+ if("x${v}" STREQUAL "xBoost_ADDITIONAL_VERSIONS")
+ set_property(CACHE ${v} PROPERTY TYPE STRING)
+ else()
+ set_property(CACHE ${v} PROPERTY TYPE PATH)
+ endif()
+ endif()
+ endif()
+endforeach()
+
+# Record last used values of input variables so we can
+# detect on the next run if the user changed them.
+foreach(v
+ ${_Boost_VARS_INC} ${_Boost_VARS_LIB}
+ ${_Boost_VARS_DIR} ${_Boost_VARS_NAME}
+ )
+ if(DEFINED ${v})
+ set(_${v}_LAST "${${v}}" CACHE INTERNAL "Last used ${v} value.")
+ else()
+ unset(_${v}_LAST CACHE)
+ endif()
+endforeach()
+
+# Maintain a persistent list of components requested anywhere since
+# the last flush.
+set(_Boost_COMPONENTS_SEARCHED "${_Boost_COMPONENTS_SEARCHED}")
+list(APPEND _Boost_COMPONENTS_SEARCHED ${Boost_FIND_COMPONENTS})
+list(REMOVE_DUPLICATES _Boost_COMPONENTS_SEARCHED)
+list(SORT _Boost_COMPONENTS_SEARCHED)
+set(_Boost_COMPONENTS_SEARCHED "${_Boost_COMPONENTS_SEARCHED}"
+ CACHE INTERNAL "Components requested for this build tree.")
diff --git a/Modules/FindBullet.cmake b/Modules/FindBullet.cmake
index 1c4a9de..1a27fc3 100644
--- a/Modules/FindBullet.cmake
+++ b/Modules/FindBullet.cmake
@@ -33,6 +33,8 @@ macro(_FIND_BULLET_LIBRARY _var)
${ARGN}
HINTS
${BULLET_ROOT}
+ ${BULLET_ROOT}/lib/Release
+ ${BULLET_ROOT}/lib/Debug
${BULLET_ROOT}/out/release8/libs
${BULLET_ROOT}/out/debug8/libs
PATH_SUFFIXES lib
diff --git a/Modules/FindCUDA.cmake b/Modules/FindCUDA.cmake
index 5a834b1..423ad3d 100644
--- a/Modules/FindCUDA.cmake
+++ b/Modules/FindCUDA.cmake
@@ -91,6 +91,13 @@
# CUDA_ADD_LIBRARY, CUDA_ADD_EXECUTABLE, or CUDA_WRAP_SRCS. Flags used for
# shared library compilation are not affected by this flag.
#
+# CUDA_SEPARABLE_COMPILATION (Default OFF)
+# -- If set this will enable separable compilation for all CUDA runtime object
+# files. If used outside of CUDA_ADD_EXECUTABLE and CUDA_ADD_LIBRARY
+# (e.g. calling CUDA_WRAP_SRCS directly),
+# CUDA_COMPUTE_SEPARABLE_COMPILATION_OBJECT_FILE_NAME and
+# CUDA_LINK_SEPARABLE_COMPILATION_OBJECTS should be called.
+#
# CUDA_VERBOSE_BUILD (Default OFF)
# -- Set to ON to see all the commands used when building the CUDA file. When
# using a Makefile generator the value defaults to VERBOSE (run make
@@ -137,11 +144,36 @@
# CUDA_COMPILE_PTX( generated_files file0 file1 ... [OPTIONS ...] )
# -- Returns a list of PTX files generated from the input source files.
#
+# CUDA_COMPUTE_SEPARABLE_COMPILATION_OBJECT_FILE_NAME( output_file_var
+# cuda_target
+# object_files )
+# -- Compute the name of the intermediate link file used for separable
+# compilation. This file name is typically passed into
+# CUDA_LINK_SEPARABLE_COMPILATION_OBJECTS. output_file_var is produced
+# based on cuda_target the list of objects files that need separable
+# compilation as specified by object_files. If the object_files list is
+# empty, then output_file_var will be empty. This function is called
+# automatically for CUDA_ADD_LIBRARY and CUDA_ADD_EXECUTABLE. Note that
+# this is a function and not a macro.
+#
# CUDA_INCLUDE_DIRECTORIES( path0 path1 ... )
# -- Sets the directories that should be passed to nvcc
# (e.g. nvcc -Ipath0 -Ipath1 ... ). These paths usually contain other .cu
# files.
#
+#
+# CUDA_LINK_SEPARABLE_COMPILATION_OBJECTS( output_file_var cuda_target
+# nvcc_flags object_files)
+#
+# -- Generates the link object required by separable compilation from the given
+# object files. This is called automatically for CUDA_ADD_EXECUTABLE and
+# CUDA_ADD_LIBRARY, but can be called manually when using CUDA_WRAP_SRCS
+# directly. When called from CUDA_ADD_LIBRARY or CUDA_ADD_EXECUTABLE the
+# nvcc_flags passed in are the same as the flags passed in via the OPTIONS
+# argument. The only nvcc flag added automatically is the bitness flag as
+# specified by CUDA_64_BIT_DEVICE_CODE. Note that this is a function
+# instead of a macro.
+#
# CUDA_WRAP_SRCS ( cuda_target format generated_files file0 file1 ...
# [STATIC | SHARED | MODULE] [OPTIONS ...] )
# -- This is where all the magic happens. CUDA_ADD_EXECUTABLE,
@@ -223,6 +255,8 @@
# CUDA_CUBLAS_LIBRARIES -- Device or emulation library for the Cuda BLAS
# implementation (alterative to:
# CUDA_ADD_CUBLAS_TO_TARGET macro).
+# CUDA_cupti_LIBRARY -- CUDA Profiling Tools Interface library.
+# Only available for CUDA version 4.0+.
# CUDA_curand_LIBRARY -- CUDA Random Number Generation library.
# Only available for CUDA version 3.2+.
# CUDA_cusparse_LIBRARY -- CUDA Sparse Matrix library.
@@ -406,6 +440,9 @@ endif()
# Propagate the host flags to the host compiler via -Xcompiler
option(CUDA_PROPAGATE_HOST_FLAGS "Propage C/CXX_FLAGS and friends to the host compiler via -Xcompile" ON)
+# Enable CUDA_SEPARABLE_COMPILATION
+option(CUDA_SEPARABLE_COMPILATION "Compile CUDA objects with separable compilation enabled. Requires CUDA 5.0+" OFF)
+
# Specifies whether the commands used when compiling the .cu file will be printed out.
option(CUDA_VERBOSE_BUILD "Print out the commands run while compiling the CUDA source file. With the Makefile generator this defaults to VERBOSE variable specified on the command line, but can be forced on with this option." OFF)
@@ -451,6 +488,7 @@ if(NOT "${CUDA_TOOLKIT_ROOT_DIR}" STREQUAL "${CUDA_TOOLKIT_ROOT_DIR_INTERNAL}")
endif()
unset(CUDA_VERSION CACHE)
unset(CUDA_CUDA_LIBRARY CACHE)
+ unset(CUDA_cupti_LIBRARY CACHE)
unset(CUDA_cublas_LIBRARY CACHE)
unset(CUDA_cublasemu_LIBRARY CACHE)
unset(CUDA_cufft_LIBRARY CACHE)
@@ -551,11 +589,11 @@ mark_as_advanced(CUDA_TOOLKIT_INCLUDE)
set (CUDA_NVCC_INCLUDE_ARGS_USER "")
set (CUDA_INCLUDE_DIRS ${CUDA_TOOLKIT_INCLUDE})
-macro(FIND_LIBRARY_LOCAL_FIRST _var _names _doc)
+macro(cuda_find_library_local_first_with_path_ext _var _names _doc _path_ext )
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
# CUDA 3.2+ on Windows moved the library directories, so we need the new
# and old paths.
- set(_cuda_64bit_lib_dir "lib/x64" "lib64" )
+ set(_cuda_64bit_lib_dir "${_path_ext}lib/x64" "${_path_ext}lib64" "${_path_ext}libx64" )
endif()
# CUDA 3.2+ on Windows moved the library directories, so we need to new
# (lib/Win32) and the old path (lib).
@@ -564,7 +602,7 @@ macro(FIND_LIBRARY_LOCAL_FIRST _var _names _doc)
PATHS "${CUDA_TOOLKIT_ROOT_DIR}"
ENV CUDA_PATH
ENV CUDA_LIB_PATH
- PATH_SUFFIXES ${_cuda_64bit_lib_dir} "lib/Win32" "lib"
+ PATH_SUFFIXES ${_cuda_64bit_lib_dir} "${_path_ext}lib/Win32" "${_path_ext}lib" "${_path_ext}libWin32"
DOC ${_doc}
NO_DEFAULT_PATH
)
@@ -572,15 +610,31 @@ macro(FIND_LIBRARY_LOCAL_FIRST _var _names _doc)
find_library(${_var} NAMES ${_names} DOC ${_doc})
endmacro()
+macro(cuda_find_library_local_first _var _names _doc)
+ cuda_find_library_local_first_with_path_ext( "${_var}" "${_names}" "${_doc}" "" )
+endmacro()
+
+macro(find_library_local_first _var _names _doc )
+ cuda_find_library_local_first( "${_var}" "${_names}" "${_doc}" "" )
+endmacro()
+
+
# CUDA_LIBRARIES
-find_library_local_first(CUDA_CUDART_LIBRARY cudart "\"cudart\" library")
+cuda_find_library_local_first(CUDA_CUDART_LIBRARY cudart "\"cudart\" library")
if(CUDA_VERSION VERSION_EQUAL "3.0")
# The cudartemu library only existed for the 3.0 version of CUDA.
- find_library_local_first(CUDA_CUDARTEMU_LIBRARY cudartemu "\"cudartemu\" library")
+ cuda_find_library_local_first(CUDA_CUDARTEMU_LIBRARY cudartemu "\"cudartemu\" library")
mark_as_advanced(
CUDA_CUDARTEMU_LIBRARY
)
endif()
+
+# CUPTI library showed up in cuda toolkit 4.0
+if(NOT CUDA_VERSION VERSION_LESS "4.0")
+ cuda_find_library_local_first_with_path_ext(CUDA_cupti_LIBRARY cupti "\"cupti\" library" "extras/CUPTI/")
+ mark_as_advanced(CUDA_cupti_LIBRARY)
+endif()
+
# If we are using emulation mode and we found the cudartemu library then use
# that one instead of cudart.
if(CUDA_BUILD_EMULATION AND CUDA_CUDARTEMU_LIBRARY)
@@ -603,12 +657,7 @@ endif()
# 1.1 toolkit on linux doesn't appear to have a separate library on
# some platforms.
-find_library_local_first(CUDA_CUDA_LIBRARY cuda "\"cuda\" library (older versions only).")
-
-# Add cuda library to the link line only if it is found.
-if (CUDA_CUDA_LIBRARY)
- set(CUDA_LIBRARIES ${CUDA_LIBRARIES} ${CUDA_CUDA_LIBRARY})
-endif()
+cuda_find_library_local_first(CUDA_CUDA_LIBRARY cuda "\"cuda\" library (older versions only).")
mark_as_advanced(
CUDA_CUDA_LIBRARY
@@ -618,7 +667,7 @@ mark_as_advanced(
#######################
# Look for some of the toolkit helper libraries
macro(FIND_CUDA_HELPER_LIBS _name)
- find_library_local_first(CUDA_${_name}_LIBRARY ${_name} "\"${_name}\" library")
+ cuda_find_library_local_first(CUDA_${_name}_LIBRARY ${_name} "\"${_name}\" library")
mark_as_advanced(CUDA_${_name}_LIBRARY)
endmacro()
@@ -913,6 +962,11 @@ endfunction()
macro(CUDA_WRAP_SRCS cuda_target format generated_files)
+ # If CMake doesn't support separable compilation, complain
+ if(CUDA_SEPARABLE_COMPILATION AND CMAKE_VERSION VERSION_LESS "2.8.10.1")
+ message(SEND_ERROR "CUDA_SEPARABLE_COMPILATION isn't supported for CMake versions less than 2.8.10.1")
+ endif()
+
# Set up all the command line flags here, so that they can be overridden on a per target basis.
set(nvcc_flags "")
@@ -950,6 +1004,8 @@ macro(CUDA_WRAP_SRCS cuda_target format generated_files)
# $(VCInstallDir)/bin.
if(CMAKE_GENERATOR MATCHES "Visual Studio")
set(ccbin_flags -D "\"CCBIN:PATH=$(VCInstallDir)bin\"" )
+ else()
+ set(ccbin_flags)
endif()
# Figure out which configure we will use and pass that in as an argument to
@@ -1117,7 +1173,11 @@ macro(CUDA_WRAP_SRCS cuda_target format generated_files)
else()
set(generated_file_path "${cuda_compile_output_dir}/${CMAKE_CFG_INTDIR}")
set(generated_file_basename "${cuda_target}_generated_${basename}${generated_extension}")
- set(format_flag "-c")
+ if(CUDA_SEPARABLE_COMPILATION)
+ set(format_flag "-dc")
+ else()
+ set(format_flag "-c")
+ endif()
endif()
# Set all of our file names. Make sure that whatever filenames that have
@@ -1146,6 +1206,10 @@ macro(CUDA_WRAP_SRCS cuda_target format generated_files)
set(source_file "${CMAKE_CURRENT_SOURCE_DIR}/${file}")
endif()
+ if( NOT compile_to_ptx AND CUDA_SEPARABLE_COMPILATION)
+ list(APPEND ${cuda_target}_SEPARABLE_COMPILATION_OBJECTS "${generated_file}")
+ endif()
+
# Bring in the dependencies. Creates a variable CUDA_NVCC_DEPEND #######
cuda_include_nvcc_dependencies(${cmake_dependency_file})
@@ -1244,6 +1308,100 @@ macro(CUDA_WRAP_SRCS cuda_target format generated_files)
set(${generated_files} ${_cuda_wrap_generated_files})
endmacro()
+function(_cuda_get_important_host_flags important_flags flag_string)
+ if(CMAKE_GENERATOR MATCHES "Visual Studio")
+ string(REGEX MATCHALL "/M[DT][d]?" flags ${flag_string})
+ list(APPEND ${important_flags} ${flags})
+ else()
+ string(REGEX MATCHALL "-fPIC" flags ${flag_string})
+ list(APPEND ${important_flags} ${flags})
+ endif()
+ set(${important_flags} ${${important_flags}} PARENT_SCOPE)
+endfunction()
+
+###############################################################################
+###############################################################################
+# Separable Compilation Link
+###############################################################################
+###############################################################################
+
+# Compute the filename to be used by CUDA_LINK_SEPARABLE_COMPILATION_OBJECTS
+function(CUDA_COMPUTE_SEPARABLE_COMPILATION_OBJECT_FILE_NAME output_file_var cuda_target object_files)
+ if (object_files)
+ set(generated_extension ${CMAKE_${CUDA_C_OR_CXX}_OUTPUT_EXTENSION})
+ set(output_file "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${cuda_target}.dir/${CMAKE_CFG_INTDIR}/${cuda_target}_intermediate_link${generated_extension}")
+ else()
+ set(output_file)
+ endif()
+
+ set(${output_file_var} "${output_file}" PARENT_SCOPE)
+endfunction()
+
+# Setup the build rule for the separable compilation intermediate link file.
+function(CUDA_LINK_SEPARABLE_COMPILATION_OBJECTS output_file cuda_target options object_files)
+ if (object_files)
+
+ set_source_files_properties("${output_file}"
+ PROPERTIES
+ EXTERNAL_OBJECT TRUE # This is an object file not to be compiled, but only
+ # be linked.
+ GENERATED TRUE # This file is generated during the build
+ )
+
+ # For now we are ignoring all the configuration specific flags.
+ set(nvcc_flags)
+ CUDA_PARSE_NVCC_OPTIONS(nvcc_flags ${options})
+ if(CUDA_64_BIT_DEVICE_CODE)
+ list(APPEND nvcc_flags -m64)
+ else()
+ list(APPEND nvcc_flags -m32)
+ endif()
+ # If -ccbin, --compiler-bindir has been specified, don't do anything. Otherwise add it here.
+ list( FIND nvcc_flags "-ccbin" ccbin_found0 )
+ list( FIND nvcc_flags "--compiler-bindir" ccbin_found1 )
+ if( ccbin_found0 LESS 0 AND ccbin_found1 LESS 0 )
+ list(APPEND nvcc_flags -ccbin "\"${CUDA_HOST_COMPILER}\"")
+ endif()
+ set(flags)
+ foreach(config ${CUDA_configuration_types})
+ string(TOUPPER ${config} config_upper)
+ set(important_host_flags)
+ _cuda_get_important_host_flags(important_host_flags ${CMAKE_${CUDA_C_OR_CXX}_FLAGS_${config_upper}})
+ foreach(f ${important_host_flags})
+ list(APPEND flags $<$<CONFIG:${config}>:-Xcompiler> $<$<CONFIG:${config}>:${f}>)
+ endforeach()
+ endforeach()
+ file(RELATIVE_PATH output_file_relative_path "${CMAKE_BINARY_DIR}" "${output_file}")
+
+ # Some generators don't handle the multiple levels of custom command
+ # dependencies correctly (obj1 depends on file1, obj2 depends on obj1), so
+ # we work around that issue by compiling the intermediate link object as a
+ # pre-link custom command in that situation.
+ set(do_obj_build_rule TRUE)
+ if (MSVC_VERSION GREATER 1599)
+ # VS 2010 and 2012 have this problem. If future versions fix this issue,
+ # it should still work, it just won't be as nice as the other method.
+ set(do_obj_build_rule FALSE)
+ endif()
+
+ if (do_obj_build_rule)
+ add_custom_command(
+ OUTPUT ${output_file}
+ DEPENDS ${object_files}
+ COMMAND ${CUDA_NVCC_EXECUTABLE} ${nvcc_flags} -dlink ${object_files} -o ${output_file}
+ ${flags}
+ COMMENT "Building NVCC intermediate link file ${output_file_relative_path}"
+ )
+ else()
+ add_custom_command(
+ TARGET ${cuda_target}
+ PRE_LINK
+ COMMAND ${CMAKE_COMMAND} -E echo "Building NVCC intermediate link file ${output_file_relative_path}"
+ COMMAND ${CUDA_NVCC_EXECUTABLE} ${nvcc_flags} ${flags} -dlink ${object_files} -o "${output_file}"
+ )
+ endif()
+ endif()
+endfunction()
###############################################################################
###############################################################################
@@ -1262,12 +1420,22 @@ macro(CUDA_ADD_LIBRARY cuda_target)
${_cmake_options} ${_cuda_shared_flag}
OPTIONS ${_options} )
+ # Compute the file name of the intermedate link file used for separable
+ # compilation.
+ CUDA_COMPUTE_SEPARABLE_COMPILATION_OBJECT_FILE_NAME(link_file ${cuda_target} "${${cuda_target}_SEPARABLE_COMPILATION_OBJECTS}")
+
# Add the library.
add_library(${cuda_target} ${_cmake_options}
${_generated_files}
${_sources}
+ ${link_file}
)
+ # Add a link phase for the separable compilation if it has been enabled. If
+ # it has been enabled then the ${cuda_target}_SEPARABLE_COMPILATION_OBJECTS
+ # variable will have been defined.
+ CUDA_LINK_SEPARABLE_COMPILATION_OBJECTS("${link_file}" ${cuda_target} "${_options}" "${${cuda_target}_SEPARABLE_COMPILATION_OBJECTS}")
+
target_link_libraries(${cuda_target}
${CUDA_LIBRARIES}
)
@@ -1296,12 +1464,22 @@ macro(CUDA_ADD_EXECUTABLE cuda_target)
# Create custom commands and targets for each file.
CUDA_WRAP_SRCS( ${cuda_target} OBJ _generated_files ${_sources} OPTIONS ${_options} )
+ # Compute the file name of the intermedate link file used for separable
+ # compilation.
+ CUDA_COMPUTE_SEPARABLE_COMPILATION_OBJECT_FILE_NAME(link_file ${cuda_target} "${${cuda_target}_SEPARABLE_COMPILATION_OBJECTS}")
+
# Add the library.
add_executable(${cuda_target} ${_cmake_options}
${_generated_files}
${_sources}
+ ${link_file}
)
+ # Add a link phase for the separable compilation if it has been enabled. If
+ # it has been enabled then the ${cuda_target}_SEPARABLE_COMPILATION_OBJECTS
+ # variable will have been defined.
+ CUDA_LINK_SEPARABLE_COMPILATION_OBJECTS("${link_file}" ${cuda_target} "${_options}" "${${cuda_target}_SEPARABLE_COMPILATION_OBJECTS}")
+
target_link_libraries(${cuda_target}
${CUDA_LIBRARIES}
)
diff --git a/Modules/FindCups.cmake b/Modules/FindCups.cmake
index f74366b..53ab031 100644
--- a/Modules/FindCups.cmake
+++ b/Modules/FindCups.cmake
@@ -28,7 +28,7 @@ find_path(CUPS_INCLUDE_DIR cups/cups.h )
find_library(CUPS_LIBRARIES NAMES cups )
if (CUPS_INCLUDE_DIR AND CUPS_LIBRARIES AND CUPS_REQUIRE_IPP_DELETE_ATTRIBUTE)
- include(CheckLibraryExists)
+ include(${CMAKE_CURRENT_LIST_DIR}/CheckLibraryExists.cmake)
# ippDeleteAttribute is new in cups-1.1.19 (and used by kdeprint)
CHECK_LIBRARY_EXISTS(cups ippDeleteAttribute "" CUPS_HAS_IPP_DELETE_ATTRIBUTE)
diff --git a/Modules/FindCurses.cmake b/Modules/FindCurses.cmake
index 6acf421..09d1ba4 100644
--- a/Modules/FindCurses.cmake
+++ b/Modules/FindCurses.cmake
@@ -56,7 +56,7 @@ endif()
# prefix as the library was found, if still not found, try curses.h with the
# default search paths.
if(CURSES_CURSES_LIBRARY AND CURSES_NEED_NCURSES)
- include(CheckLibraryExists)
+ include(${CMAKE_CURRENT_LIST_DIR}/CheckLibraryExists.cmake)
CHECK_LIBRARY_EXISTS("${CURSES_CURSES_LIBRARY}"
wsyncup "" CURSES_CURSES_HAS_WSYNCUP)
diff --git a/Modules/FindFLEX.cmake b/Modules/FindFLEX.cmake
index daae94f..79a3a1e 100644
--- a/Modules/FindFLEX.cmake
+++ b/Modules/FindFLEX.cmake
@@ -63,7 +63,7 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-find_program(FLEX_EXECUTABLE flex DOC "path to the flex executable")
+find_program(FLEX_EXECUTABLE NAMES flex win_flex DOC "path to the flex executable")
mark_as_advanced(FLEX_EXECUTABLE)
find_library(FL_LIBRARY NAMES fl
@@ -93,10 +93,12 @@ if(FLEX_EXECUTABLE)
else()
# older versions of flex printed "/full/path/to/executable version X.Y"
# newer versions use "basename(executable) X.Y"
- get_filename_component(FLEX_EXE_NAME "${FLEX_EXECUTABLE}" NAME)
- string(REGEX REPLACE "^.*${FLEX_EXE_NAME}\"? (version )?([0-9]+[^ ]*)( .*)?$" "\\2"
+ get_filename_component(FLEX_EXE_NAME_WE "${FLEX_EXECUTABLE}" NAME_WE)
+ get_filename_component(FLEX_EXE_EXT "${FLEX_EXECUTABLE}" EXT)
+ string(REGEX REPLACE "^.*${FLEX_EXE_NAME_WE}(${FLEX_EXE_EXT})?\"? (version )?([0-9]+[^ ]*)( .*)?$" "\\3"
FLEX_VERSION "${FLEX_version_output}")
- unset(FLEX_EXE_NAME)
+ unset(FLEX_EXE_EXT)
+ unset(FLEX_EXE_NAME_WE)
endif()
#============================================================
diff --git a/Modules/FindFLTK.cmake b/Modules/FindFLTK.cmake
index 24cfb87..92c14da 100644
--- a/Modules/FindFLTK.cmake
+++ b/Modules/FindFLTK.cmake
@@ -58,7 +58,7 @@ if(WIN32)
endif()
if(UNIX)
- include(FindX11)
+ include(${CMAKE_CURRENT_LIST_DIR}/FindX11.cmake)
find_library(FLTK_MATH_LIBRARY m)
set( FLTK_PLATFORM_DEPENDENT_LIBS ${X11_LIBRARIES} ${FLTK_MATH_LIBRARY})
endif()
diff --git a/Modules/FindFreetype.cmake b/Modules/FindFreetype.cmake
index cdb46be..1df2399 100644
--- a/Modules/FindFreetype.cmake
+++ b/Modules/FindFreetype.cmake
@@ -46,6 +46,7 @@ find_path(FREETYPE_INCLUDE_DIR_ft2build ft2build.h
HINTS
ENV FREETYPE_DIR
PATHS
+ /usr/X11R6
/usr/local/X11R6
/usr/local/X11
/usr/freeware
@@ -56,6 +57,7 @@ find_path(FREETYPE_INCLUDE_DIR_freetype2 freetype/config/ftheader.h
HINTS
ENV FREETYPE_DIR
PATHS
+ /usr/X11R6
/usr/local/X11R6
/usr/local/X11
/usr/freeware
@@ -68,6 +70,7 @@ find_library(FREETYPE_LIBRARY
ENV FREETYPE_DIR
PATH_SUFFIXES lib
PATHS
+ /usr/X11R6
/usr/local/X11R6
/usr/local/X11
/usr/freeware
diff --git a/Modules/FindGIF.cmake b/Modules/FindGIF.cmake
index 6a665ad..90ff737 100644
--- a/Modules/FindGIF.cmake
+++ b/Modules/FindGIF.cmake
@@ -58,8 +58,8 @@ set(GIF_LIBRARIES ${GIF_LIBRARY})
# one.
# http://giflib.sourcearchive.com/documentation/4.1.4/files.html
if(GIF_INCLUDE_DIR)
- include(CMakePushCheckState)
- include(CheckStructHasMember)
+ include(${CMAKE_CURRENT_LIST_DIR}/CMakePushCheckState.cmake)
+ include(${CMAKE_CURRENT_LIST_DIR}/CheckStructHasMember.cmake)
CMAKE_PUSH_CHECK_STATE()
set(GIF_VERSION 3)
set(CMAKE_REQUIRED_INCLUDES "${GIF_INCLUDE_DIR}")
diff --git a/Modules/FindGLU.cmake b/Modules/FindGLU.cmake
index d87945a..0d36fad 100644
--- a/Modules/FindGLU.cmake
+++ b/Modules/FindGLU.cmake
@@ -19,7 +19,7 @@
message(STATUS
"WARNING: you are using the obsolete 'GLU' package, please use 'OpenGL' instead")
-include(FindOpenGL)
+include(${CMAKE_CURRENT_LIST_DIR}/FindOpenGL.cmake)
if (OPENGL_GLU_FOUND)
set (GLU_LIBRARY ${OPENGL_LIBRARIES})
diff --git a/Modules/FindGLUT.cmake b/Modules/FindGLUT.cmake
index 55790ae..843d138 100644
--- a/Modules/FindGLUT.cmake
+++ b/Modules/FindGLUT.cmake
@@ -40,25 +40,39 @@ else ()
set(GLUT_cocoa_LIBRARY "-framework Cocoa" CACHE STRING "Cocoa framework for OSX")
else ()
+ if (BEOS)
+
+ set(_GLUT_INC_DIR /boot/develop/headers/os/opengl)
+ set(_GLUT_glut_LIB_DIR /boot/develop/lib/x86)
+
+ else()
+
+ find_library( GLUT_Xi_LIBRARY Xi
+ /usr/openwin/lib
+ )
+
+ find_library( GLUT_Xmu_LIBRARY Xmu
+ /usr/openwin/lib
+ )
+
+ endif ()
+
find_path( GLUT_INCLUDE_DIR GL/glut.h
/usr/include/GL
/usr/openwin/share/include
/usr/openwin/include
/opt/graphics/OpenGL/include
/opt/graphics/OpenGL/contrib/libglut
+ ${_GLUT_INC_DIR}
)
find_library( GLUT_glut_LIBRARY glut
/usr/openwin/lib
+ ${_GLUT_glut_LIB_DIR}
)
- find_library( GLUT_Xi_LIBRARY Xi
- /usr/openwin/lib
- )
-
- find_library( GLUT_Xmu_LIBRARY Xmu
- /usr/openwin/lib
- )
+ unset(_GLUT_INC_DIR)
+ unset(_GLUT_glut_LIB_DIR)
endif ()
diff --git a/Modules/FindGTK2.cmake b/Modules/FindGTK2.cmake
index 517a9ac..06cf962 100644
--- a/Modules/FindGTK2.cmake
+++ b/Modules/FindGTK2.cmake
@@ -439,28 +439,19 @@ list(APPEND GTK2_LIBRARIES ${FREETYPE_LIBRARIES})
foreach(_GTK2_component ${GTK2_FIND_COMPONENTS})
if(_GTK2_component STREQUAL "gtk")
- _GTK2_FIND_INCLUDE_DIR(GTK2_GLIB_INCLUDE_DIR glib.h)
- _GTK2_FIND_INCLUDE_DIR(GTK2_GLIBCONFIG_INCLUDE_DIR glibconfig.h)
- _GTK2_FIND_LIBRARY (GTK2_GLIB_LIBRARY glib false true)
-
- _GTK2_FIND_INCLUDE_DIR(GTK2_GOBJECT_INCLUDE_DIR gobject/gobject.h)
- _GTK2_FIND_LIBRARY (GTK2_GOBJECT_LIBRARY gobject false true)
-
- _GTK2_FIND_INCLUDE_DIR(GTK2_GDK_PIXBUF_INCLUDE_DIR gdk-pixbuf/gdk-pixbuf.h)
- _GTK2_FIND_LIBRARY (GTK2_GDK_PIXBUF_LIBRARY gdk_pixbuf false true)
-
- _GTK2_FIND_INCLUDE_DIR(GTK2_GDK_INCLUDE_DIR gdk/gdk.h)
- _GTK2_FIND_INCLUDE_DIR(GTK2_GDKCONFIG_INCLUDE_DIR gdkconfig.h)
_GTK2_FIND_INCLUDE_DIR(GTK2_GTK_INCLUDE_DIR gtk/gtk.h)
if(UNIX)
- _GTK2_FIND_LIBRARY (GTK2_GDK_LIBRARY gdk-x11 false true)
_GTK2_FIND_LIBRARY (GTK2_GTK_LIBRARY gtk-x11 false true)
+ _GTK2_FIND_LIBRARY (GTK2_GDK_LIBRARY gdk-x11 false true)
else()
- _GTK2_FIND_LIBRARY (GTK2_GDK_LIBRARY gdk-win32 false true)
_GTK2_FIND_LIBRARY (GTK2_GTK_LIBRARY gtk-win32 false true)
+ _GTK2_FIND_LIBRARY (GTK2_GDK_LIBRARY gdk-win32 false true)
endif()
+ _GTK2_FIND_INCLUDE_DIR(GTK2_GDK_INCLUDE_DIR gdk/gdk.h)
+ _GTK2_FIND_INCLUDE_DIR(GTK2_GDKCONFIG_INCLUDE_DIR gdkconfig.h)
+
_GTK2_FIND_INCLUDE_DIR(GTK2_CAIRO_INCLUDE_DIR cairo.h)
_GTK2_FIND_LIBRARY (GTK2_CAIRO_LIBRARY cairo false false)
@@ -469,35 +460,40 @@ foreach(_GTK2_component ${GTK2_FIND_COMPONENTS})
_GTK2_FIND_INCLUDE_DIR(GTK2_PANGO_INCLUDE_DIR pango/pango.h)
_GTK2_FIND_LIBRARY (GTK2_PANGO_LIBRARY pango false true)
+ _GTK2_FIND_INCLUDE_DIR(GTK2_GDK_PIXBUF_INCLUDE_DIR gdk-pixbuf/gdk-pixbuf.h)
+ _GTK2_FIND_LIBRARY (GTK2_GDK_PIXBUF_LIBRARY gdk_pixbuf false true)
+
+ _GTK2_FIND_LIBRARY (GTK2_GIO_LIBRARY gio false true)
+
_GTK2_FIND_INCLUDE_DIR(GTK2_ATK_INCLUDE_DIR atk/atk.h)
_GTK2_FIND_LIBRARY (GTK2_ATK_LIBRARY atk false true)
+ _GTK2_FIND_INCLUDE_DIR(GTK2_GOBJECT_INCLUDE_DIR gobject/gobject.h)
+ _GTK2_FIND_LIBRARY (GTK2_GOBJECT_LIBRARY gobject false true)
- elseif(_GTK2_component STREQUAL "gtkmm")
-
- _GTK2_FIND_INCLUDE_DIR(GTK2_GLIBMM_INCLUDE_DIR glibmm.h)
- _GTK2_FIND_INCLUDE_DIR(GTK2_GLIBMMCONFIG_INCLUDE_DIR glibmmconfig.h)
- _GTK2_FIND_LIBRARY (GTK2_GLIBMM_LIBRARY glibmm true true)
+ _GTK2_FIND_INCLUDE_DIR(GTK2_GLIB_INCLUDE_DIR glib.h)
+ _GTK2_FIND_INCLUDE_DIR(GTK2_GLIBCONFIG_INCLUDE_DIR glibconfig.h)
+ _GTK2_FIND_LIBRARY (GTK2_GLIB_LIBRARY glib false true)
- _GTK2_FIND_INCLUDE_DIR(GTK2_GDKMM_INCLUDE_DIR gdkmm.h)
- _GTK2_FIND_INCLUDE_DIR(GTK2_GDKMMCONFIG_INCLUDE_DIR gdkmmconfig.h)
- _GTK2_FIND_LIBRARY (GTK2_GDKMM_LIBRARY gdkmm true true)
+ elseif(_GTK2_component STREQUAL "gtkmm")
_GTK2_FIND_INCLUDE_DIR(GTK2_GTKMM_INCLUDE_DIR gtkmm.h)
_GTK2_FIND_INCLUDE_DIR(GTK2_GTKMMCONFIG_INCLUDE_DIR gtkmmconfig.h)
_GTK2_FIND_LIBRARY (GTK2_GTKMM_LIBRARY gtkmm true true)
- _GTK2_FIND_INCLUDE_DIR(GTK2_CAIROMM_INCLUDE_DIR cairomm/cairomm.h)
- _GTK2_FIND_INCLUDE_DIR(GTK2_CAIROMMCONFIG_INCLUDE_DIR cairommconfig.h)
- _GTK2_FIND_LIBRARY (GTK2_CAIROMM_LIBRARY cairomm true true)
+ _GTK2_FIND_INCLUDE_DIR(GTK2_GDKMM_INCLUDE_DIR gdkmm.h)
+ _GTK2_FIND_INCLUDE_DIR(GTK2_GDKMMCONFIG_INCLUDE_DIR gdkmmconfig.h)
+ _GTK2_FIND_LIBRARY (GTK2_GDKMM_LIBRARY gdkmm true true)
_GTK2_FIND_INCLUDE_DIR(GTK2_PANGOMM_INCLUDE_DIR pangomm.h)
_GTK2_FIND_INCLUDE_DIR(GTK2_PANGOMMCONFIG_INCLUDE_DIR pangommconfig.h)
_GTK2_FIND_LIBRARY (GTK2_PANGOMM_LIBRARY pangomm true true)
- _GTK2_FIND_INCLUDE_DIR(GTK2_SIGC++_INCLUDE_DIR sigc++/sigc++.h)
- _GTK2_FIND_INCLUDE_DIR(GTK2_SIGC++CONFIG_INCLUDE_DIR sigc++config.h)
- _GTK2_FIND_LIBRARY (GTK2_SIGC++_LIBRARY sigc true true)
+ _GTK2_FIND_LIBRARY (GTK2_PANGOCAIRO_LIBRARY pangocairo true true)
+
+ _GTK2_FIND_INCLUDE_DIR(GTK2_CAIROMM_INCLUDE_DIR cairomm/cairomm.h)
+ _GTK2_FIND_INCLUDE_DIR(GTK2_CAIROMMCONFIG_INCLUDE_DIR cairommconfig.h)
+ _GTK2_FIND_LIBRARY (GTK2_CAIROMM_LIBRARY cairomm true true)
_GTK2_FIND_INCLUDE_DIR(GTK2_GIOMM_INCLUDE_DIR giomm.h)
_GTK2_FIND_INCLUDE_DIR(GTK2_GIOMMCONFIG_INCLUDE_DIR giommconfig.h)
@@ -506,6 +502,15 @@ foreach(_GTK2_component ${GTK2_FIND_COMPONENTS})
_GTK2_FIND_INCLUDE_DIR(GTK2_ATKMM_INCLUDE_DIR atkmm.h)
_GTK2_FIND_LIBRARY (GTK2_ATKMM_LIBRARY atkmm true true)
+ _GTK2_FIND_INCLUDE_DIR(GTK2_GLIBMM_INCLUDE_DIR glibmm.h)
+ _GTK2_FIND_INCLUDE_DIR(GTK2_GLIBMMCONFIG_INCLUDE_DIR glibmmconfig.h)
+ _GTK2_FIND_LIBRARY (GTK2_GLIBMM_LIBRARY glibmm true true)
+
+ _GTK2_FIND_INCLUDE_DIR(GTK2_SIGC++_INCLUDE_DIR sigc++/sigc++.h)
+ _GTK2_FIND_INCLUDE_DIR(GTK2_SIGC++CONFIG_INCLUDE_DIR sigc++config.h)
+ _GTK2_FIND_LIBRARY (GTK2_SIGC++_LIBRARY sigc true true)
+
+
elseif(_GTK2_component STREQUAL "glade")
_GTK2_FIND_INCLUDE_DIR(GTK2_GLADE_INCLUDE_DIR glade/glade.h)
@@ -549,13 +554,13 @@ foreach(_GTK2_component ${GTK2_FIND_COMPONENTS})
GTK2_GTK_LIBRARY
GTK2_GTK_INCLUDE_DIR
- GTK2_GLIB_INCLUDE_DIR
- GTK2_GLIBCONFIG_INCLUDE_DIR
- GTK2_GLIB_LIBRARY
-
GTK2_GDK_INCLUDE_DIR
GTK2_GDKCONFIG_INCLUDE_DIR
GTK2_GDK_LIBRARY
+
+ GTK2_GLIB_INCLUDE_DIR
+ GTK2_GLIBCONFIG_INCLUDE_DIR
+ GTK2_GLIB_LIBRARY
)
elseif(_GTK2_component STREQUAL "gtkmm")
FIND_PACKAGE_HANDLE_STANDARD_ARGS(GTK2_${_COMPONENT_UPPER} "Some or all of the gtkmm libraries were not found."
@@ -563,13 +568,14 @@ foreach(_GTK2_component ${GTK2_FIND_COMPONENTS})
GTK2_GTKMM_INCLUDE_DIR
GTK2_GTKMMCONFIG_INCLUDE_DIR
+ GTK2_GDKMM_INCLUDE_DIR
+ GTK2_GDKMMCONFIG_INCLUDE_DIR
+ GTK2_GDKMM_LIBRARY
+
GTK2_GLIBMM_INCLUDE_DIR
GTK2_GLIBMMCONFIG_INCLUDE_DIR
GTK2_GLIBMM_LIBRARY
- GTK2_GDKMM_INCLUDE_DIR
- GTK2_GDKMMCONFIG_INCLUDE_DIR
- GTK2_GDKMM_LIBRARY
)
elseif(_GTK2_component STREQUAL "glade")
FIND_PACKAGE_HANDLE_STANDARD_ARGS(GTK2_${_COMPONENT_UPPER} "The glade library was not found."
diff --git a/Modules/FindGnuplot.cmake b/Modules/FindGnuplot.cmake
index 07af0bf..f2f9dd0 100644
--- a/Modules/FindGnuplot.cmake
+++ b/Modules/FindGnuplot.cmake
@@ -21,7 +21,7 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-include(FindCygwin)
+include(${CMAKE_CURRENT_LIST_DIR}/FindCygwin.cmake)
find_program(GNUPLOT_EXECUTABLE
NAMES
diff --git a/Modules/FindHDF5.cmake b/Modules/FindHDF5.cmake
index 33599be..8514164 100644
--- a/Modules/FindHDF5.cmake
+++ b/Modules/FindHDF5.cmake
@@ -60,7 +60,7 @@
# This module is maintained by Will Dicharry <wdicharry@stellarscience.com>.
-include(SelectLibraryConfigurations)
+include(${CMAKE_CURRENT_LIST_DIR}/SelectLibraryConfigurations.cmake)
include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
# List of the valid HDF5 components
diff --git a/Modules/FindIcotool.cmake b/Modules/FindIcotool.cmake
new file mode 100644
index 0000000..8c10177
--- /dev/null
+++ b/Modules/FindIcotool.cmake
@@ -0,0 +1,56 @@
+# - Find icotool
+# This module looks for icotool. This module defines the
+# following values:
+# ICOTOOL_EXECUTABLE: the full path to the icotool tool.
+# ICOTOOL_FOUND: True if icotool has been found.
+# ICOTOOL_VERSION_STRING: the version of icotool found.
+#
+
+#=============================================================================
+# Copyright 2012 Aleksey Avdeev <solo@altlinux.ru>
+#
+# 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.
+#=============================================================================
+# (To distribute this file outside of CMake, substitute the full
+# License text for the above reference.)
+
+find_program(ICOTOOL_EXECUTABLE
+ icotool
+)
+
+if(ICOTOOL_EXECUTABLE)
+ execute_process(
+ COMMAND ${ICOTOOL_EXECUTABLE} --version
+ OUTPUT_VARIABLE _icotool_version
+ ERROR_QUIET
+ OUTPUT_STRIP_TRAILING_WHITESPACE
+ )
+ if("${_icotool_version}" MATCHES "^icotool \\([^\\)]*\\) ([0-9\\.]+[^ \n]*).*")
+ set( ICOTOOL_VERSION_STRING
+ "${CMAKE_MATCH_1}"
+ )
+ else()
+ set( ICOTOOL_VERSION_STRING
+ ""
+ )
+ endif()
+ unset(_icotool_version)
+endif()
+
+# handle the QUIETLY and REQUIRED arguments and set ICOTOOL_FOUND to TRUE if
+# all listed variables are TRUE
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(
+ Icotool
+ REQUIRED_VARS ICOTOOL_EXECUTABLE
+ VERSION_VAR ICOTOOL_VERSION_STRING
+)
+
+mark_as_advanced(
+ ICOTOOL_EXECUTABLE
+)
diff --git a/Modules/FindImageMagick.cmake b/Modules/FindImageMagick.cmake
index bf09616..cd97b38 100644
--- a/Modules/FindImageMagick.cmake
+++ b/Modules/FindImageMagick.cmake
@@ -147,17 +147,17 @@ foreach(component ${ImageMagick_FIND_COMPONENTS}
)
if(component STREQUAL "Magick++")
FIND_IMAGEMAGICK_API(Magick++ Magick++.h
- Magick++ CORE_RL_Magick++_
+ Magick++ CORE_RL_Magick++_ Magick++-6.Q16 Magick++-Q16 Magick++-6.Q8 Magick++-Q8
)
list(APPEND ImageMagick_REQUIRED_VARS ImageMagick_Magick++_LIBRARY)
elseif(component STREQUAL "MagickWand")
FIND_IMAGEMAGICK_API(MagickWand wand/MagickWand.h
- Wand MagickWand CORE_RL_wand_
+ Wand MagickWand CORE_RL_wand_ MagickWand-6.Q16 MagickWand-Q16 MagickWand-6.Q8 MagickWand-Q8
)
list(APPEND ImageMagick_REQUIRED_VARS ImageMagick_MagickWand_LIBRARY)
elseif(component STREQUAL "MagickCore")
FIND_IMAGEMAGICK_API(MagickCore magick/MagickCore.h
- Magick MagickCore CORE_RL_magick_
+ Magick MagickCore CORE_RL_magick_ MagickCore-6.Q16 MagickCore-Q16 MagickCore-6.Q8 MagickCore-Q8
)
list(APPEND ImageMagick_REQUIRED_VARS ImageMagick_MagickCore_LIBRARY)
else()
diff --git a/Modules/FindJNI.cmake b/Modules/FindJNI.cmake
index 0de3f79..9d708ca 100644
--- a/Modules/FindJNI.cmake
+++ b/Modules/FindJNI.cmake
@@ -120,6 +120,11 @@ JAVA_APPEND_LIBRARY_DIRECTORIES(JAVA_AWT_LIBRARY_DIRECTORIES
/usr/lib/jvm/default-java/jre/lib/{libarch}
/usr/lib/jvm/default-java/jre/lib
/usr/lib/jvm/default-java/lib
+ # OpenBSD specific paths for default JVM
+ /usr/local/jdk-1.7.0/jre/lib/{libarch}
+ /usr/local/jre-1.7.0/lib/{libarch}
+ /usr/local/jdk-1.6.0/jre/lib/{libarch}
+ /usr/local/jre-1.6.0/lib/{libarch}
)
set(JAVA_JVM_LIBRARY_DIRECTORIES)
@@ -153,6 +158,9 @@ set(JAVA_AWT_INCLUDE_DIRECTORIES
/opt/sun-jdk-1.5.0.04/include
# Debian specific path for default JVM
/usr/lib/jvm/default-java/include
+ # OpenBSD specific path for default JVM
+ /usr/local/jdk-1.7.0/include
+ /usr/local/jdk-1.6.0/include
)
foreach(JAVA_PROG "${JAVA_RUNTIME}" "${JAVA_COMPILE}" "${JAVA_ARCHIVE}")
@@ -227,6 +235,7 @@ find_path(JAVA_INCLUDE_PATH2 jni_md.h
${JAVA_INCLUDE_PATH}/win32
${JAVA_INCLUDE_PATH}/linux
${JAVA_INCLUDE_PATH}/freebsd
+ ${JAVA_INCLUDE_PATH}/openbsd
${JAVA_INCLUDE_PATH}/solaris
${JAVA_INCLUDE_PATH}/hp-ux
${JAVA_INCLUDE_PATH}/alpha
diff --git a/Modules/FindJava.cmake b/Modules/FindJava.cmake
index 1b4593d..2f02b7a 100644
--- a/Modules/FindJava.cmake
+++ b/Modules/FindJava.cmake
@@ -80,6 +80,8 @@ set(_JAVA_PATHS
/usr/java/j2sdk1.4.2_09/bin
/usr/lib/j2sdk1.5-sun/bin
/opt/sun-jdk-1.5.0.04/bin
+ /usr/local/jdk-1.7.0/bin
+ /usr/local/jdk-1.6.0/bin
)
find_program(Java_JAVA_EXECUTABLE
NAMES java
@@ -107,6 +109,7 @@ if(Java_JAVA_EXECUTABLE)
# 2. OpenJDK 1.6
# 3. GCJ 1.5
# 4. Kaffe 1.4.2
+ # 5. OpenJDK 1.7.x on OpenBSD
if(var MATCHES "java version \"[0-9]+\\.[0-9]+\\.[0-9_.]+.*\".*")
# This is most likely Sun / OpenJDK, or maybe GCJ-java compat layer
string( REGEX REPLACE ".* version \"([0-9]+\\.[0-9]+\\.[0-9_.]+.*)\".*"
@@ -115,6 +118,10 @@ if(Java_JAVA_EXECUTABLE)
# Kaffe style
string( REGEX REPLACE "java full version \"kaffe-([0-9]+\\.[0-9]+\\.[0-9_]+).*"
"\\1" Java_VERSION_STRING "${var}" )
+ elseif(var MATCHES "openjdk version \"[0-9]+\\.[0-9]+\\.[0-9_]+\".*")
+ # OpenJDK ver 1.7.x on OpenBSD
+ string( REGEX REPLACE "openjdk version \"([0-9]+\\.[0-9]+\\.[0-9_]+).*"
+ "\\1" Java_VERSION_STRING "${var}" )
else()
if(NOT Java_FIND_QUIETLY)
message(WARNING "regex not supported: ${var}. Please report")
diff --git a/Modules/FindKDE3.cmake b/Modules/FindKDE3.cmake
index a092116..70eccef 100644
--- a/Modules/FindKDE3.cmake
+++ b/Modules/FindKDE3.cmake
@@ -245,7 +245,7 @@ endif()
# KDE3Macros.cmake contains all the KDE specific macros
-include(KDE3Macros)
+include(${CMAKE_CURRENT_LIST_DIR}/KDE3Macros.cmake)
macro (KDE3_PRINT_RESULTS)
diff --git a/Modules/FindLAPACK.cmake b/Modules/FindLAPACK.cmake
index 430e45f..3167850 100644
--- a/Modules/FindLAPACK.cmake
+++ b/Modules/FindLAPACK.cmake
@@ -40,9 +40,9 @@ set(_lapack_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
get_property(_LANGUAGES_ GLOBAL PROPERTY ENABLED_LANGUAGES)
if (NOT _LANGUAGES_ MATCHES Fortran)
-include(CheckFunctionExists)
+include(${CMAKE_CURRENT_LIST_DIR}/CheckFunctionExists.cmake)
else ()
-include(CheckFortranFunctionExists)
+include(${CMAKE_CURRENT_LIST_DIR}/CheckFortranFunctionExists.cmake)
endif ()
set(LAPACK_FOUND FALSE)
diff --git a/Modules/FindLua51.cmake b/Modules/FindLua51.cmake
index eac25f5..a2bf0c0 100644
--- a/Modules/FindLua51.cmake
+++ b/Modules/FindLua51.cmake
@@ -28,7 +28,7 @@
find_path(LUA_INCLUDE_DIR lua.h
HINTS
ENV LUA_DIR
- PATH_SUFFIXES include/lua51 include/lua5.1 include/lua include
+ PATH_SUFFIXES include/lua51 include/lua5.1 include/lua-5.1 include/lua include
PATHS
~/Library/Frameworks
/Library/Frameworks
@@ -54,7 +54,7 @@ find_library(LUA_LIBRARY
if(LUA_LIBRARY)
# include the math library for Unix
- if(UNIX AND NOT APPLE)
+ if(UNIX AND NOT APPLE AND NOT BEOS)
find_library(LUA_MATH_LIBRARY m)
set( LUA_LIBRARIES "${LUA_LIBRARY};${LUA_MATH_LIBRARY}" CACHE STRING "Lua Libraries")
# For Windows and Mac, don't need to explicitly include the math library
diff --git a/Modules/FindMPEG2.cmake b/Modules/FindMPEG2.cmake
index 0290eca..fc01c4c 100644
--- a/Modules/FindMPEG2.cmake
+++ b/Modules/FindMPEG2.cmake
@@ -45,7 +45,7 @@ if(MPEG2_FOUND)
#some native mpeg2 installations will depend
#on libSDL, if found, add it in.
- include( FindSDL )
+ include(${CMAKE_CURRENT_LIST_DIR}/FindSDL.cmake)
if(SDL_FOUND)
set( MPEG2_LIBRARIES ${MPEG2_LIBRARIES} ${SDL_LIBRARY})
endif()
diff --git a/Modules/FindMPI.cmake b/Modules/FindMPI.cmake
index 4ce4de9..143d10a 100644
--- a/Modules/FindMPI.cmake
+++ b/Modules/FindMPI.cmake
@@ -78,7 +78,7 @@
# include this to handle the QUIETLY and REQUIRED arguments
include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
-include(GetPrerequisites)
+include(${CMAKE_CURRENT_LIST_DIR}/GetPrerequisites.cmake)
#
# This part detects MPI compilers, attempting to wade through the mess of compiler names in
diff --git a/Modules/FindOpenGL.cmake b/Modules/FindOpenGL.cmake
index a6f4503..96c4d8d 100644
--- a/Modules/FindOpenGL.cmake
+++ b/Modules/FindOpenGL.cmake
@@ -58,14 +58,22 @@ else ()
find_path(OPENGL_INCLUDE_DIR OpenGL/gl.h DOC "Include for OpenGL on OSX")
else()
- # Handle HP-UX cases where we only want to find OpenGL in either hpux64
- # or hpux32 depending on if we're doing a 64 bit build.
- if(CMAKE_SIZEOF_VOID_P EQUAL 4)
- set(HPUX_IA_OPENGL_LIB_PATH /opt/graphics/OpenGL/lib/hpux32/)
- else()
- set(HPUX_IA_OPENGL_LIB_PATH
- /opt/graphics/OpenGL/lib/hpux64/
- /opt/graphics/OpenGL/lib/pa20_64)
+ if (CMAKE_SYSTEM_NAME MATCHES "HP-UX")
+ # Handle HP-UX cases where we only want to find OpenGL in either hpux64
+ # or hpux32 depending on if we're doing a 64 bit build.
+ if(CMAKE_SIZEOF_VOID_P EQUAL 4)
+ set(_OPENGL_LIB_PATH
+ /opt/graphics/OpenGL/lib/hpux32/)
+ else()
+ set(_OPENGL_LIB_PATH
+ /opt/graphics/OpenGL/lib/hpux64/
+ /opt/graphics/OpenGL/lib/pa20_64)
+ endif()
+ elseif(CMAKE_SYSTEM_NAME STREQUAL Haiku)
+ set(_OPENGL_LIB_PATH
+ /boot/develop/lib/x86)
+ set(_OPENGL_INCLUDE_PATH
+ /boot/develop/headers/os/opengl)
endif()
# The first line below is to make sure that the proper headers
@@ -80,6 +88,7 @@ else ()
/usr/share/doc/NVIDIA_GLX-1.0/include
/usr/openwin/share/include
/opt/graphics/OpenGL/include /usr/X11R6/include
+ ${_OPENGL_INCLUDE_PATH}
)
find_path(OPENGL_xmesa_INCLUDE_DIR GL/xmesa.h
@@ -93,9 +102,12 @@ else ()
PATHS /opt/graphics/OpenGL/lib
/usr/openwin/lib
/usr/shlib /usr/X11R6/lib
- ${HPUX_IA_OPENGL_LIB_PATH}
+ ${_OPENGL_LIB_PATH}
)
+ unset(_OPENGL_INCLUDE_PATH)
+ unset(_OPENGL_LIB_PATH)
+
# On Unix OpenGL most certainly always requires X11.
# Feel free to tighten up these conditions if you don't
# think this is always true.
@@ -103,7 +115,7 @@ else ()
if (OPENGL_gl_LIBRARY)
if(NOT X11_FOUND)
- include(FindX11)
+ include(${CMAKE_CURRENT_LIST_DIR}/FindX11.cmake)
endif()
if (X11_FOUND)
if (NOT APPLE)
diff --git a/Modules/FindOpenMP.cmake b/Modules/FindOpenMP.cmake
index ad15d8c..f4a9f44 100644
--- a/Modules/FindOpenMP.cmake
+++ b/Modules/FindOpenMP.cmake
@@ -1,7 +1,9 @@
# - Finds OpenMP support
# This module can be used to detect OpenMP support in a compiler.
# If the compiler supports OpenMP, the flags required to compile with
-# openmp support are set.
+# OpenMP support are returned in variables for the different languages.
+# The variables may be empty if the compiler does not need a special
+# flag to support OpenMP.
#
# The following variables are set:
# OpenMP_C_FLAGS - flags to add to the C compiler for OpenMP support
@@ -95,7 +97,7 @@ if(CMAKE_C_COMPILER_LOADED)
unset(OpenMP_C_FLAG_CANDIDATES)
else()
_OPENMP_FLAG_CANDIDATES("C")
- include(CheckCSourceCompiles)
+ include(${CMAKE_CURRENT_LIST_DIR}/CheckCSourceCompiles.cmake)
endif()
foreach(FLAG ${OpenMP_C_FLAG_CANDIDATES})
@@ -126,7 +128,7 @@ if(CMAKE_CXX_COMPILER_LOADED)
unset(OpenMP_CXX_FLAG_CANDIDATES)
else()
_OPENMP_FLAG_CANDIDATES("CXX")
- include(CheckCXXSourceCompiles)
+ include(${CMAKE_CURRENT_LIST_DIR}/CheckCXXSourceCompiles.cmake)
# use the same source for CXX as C for now
set(OpenMP_CXX_TEST_SOURCE ${OpenMP_C_TEST_SOURCE})
diff --git a/Modules/FindOpenSceneGraph.cmake b/Modules/FindOpenSceneGraph.cmake
index 4a5aaba..7affca8 100644
--- a/Modules/FindOpenSceneGraph.cmake
+++ b/Modules/FindOpenSceneGraph.cmake
@@ -72,7 +72,7 @@
# Output variables of the form OPENSCENEGRAPH_FOO
#
-include(Findosg_functions)
+include(${CMAKE_CURRENT_LIST_DIR}/Findosg_functions.cmake)
set(_osg_modules_to_process)
foreach(_osg_component ${OpenSceneGraph_FIND_COMPONENTS})
diff --git a/Modules/FindPackageHandleStandardArgs.cmake b/Modules/FindPackageHandleStandardArgs.cmake
index 25d8df3..70423a7 100644
--- a/Modules/FindPackageHandleStandardArgs.cmake
+++ b/Modules/FindPackageHandleStandardArgs.cmake
@@ -2,7 +2,7 @@
#
# This function is intended to be used in FindXXX.cmake modules files.
# It handles the REQUIRED, QUIET and version-related arguments to find_package().
-# It also sets the <UPPERCASED_NAME>_FOUND variable.
+# It also sets the <packagename>_FOUND variable.
# The package is considered found if all variables <var1>... listed contain
# valid results, e.g. valid filepaths.
#
@@ -18,14 +18,22 @@
# for the failure case. This is not recommended.
#
# The second mode is more powerful and also supports version checking:
-# FIND_PACKAGE_HANDLE_STANDARD_ARGS(NAME [REQUIRED_VARS <var1>...<varN>]
+# FIND_PACKAGE_HANDLE_STANDARD_ARGS(NAME [FOUND_VAR <resultVar>]
+# [REQUIRED_VARS <var1>...<varN>]
# [VERSION_VAR <versionvar>]
# [HANDLE_COMPONENTS]
# [CONFIG_MODE]
# [FAIL_MESSAGE "Custom failure message"] )
#
-# As above, if <var1> through <varN> are all valid, <UPPERCASED_NAME>_FOUND
-# will be set to TRUE.
+# In this mode, the name of the result-variable can be set either to either
+# <UPPERCASED_NAME>_FOUND or <OriginalCase_Name>_FOUND using the FOUND_VAR option.
+# Other names for the result-variable are not allowed.
+# So for a Find-module named FindFooBar.cmake, the two possible names are
+# FooBar_FOUND and FOOBAR_FOUND. It is recommended to use the original case version.
+# If the FOUND_VAR option is not used, the default is <UPPERCASED_NAME>_FOUND.
+#
+# As in the simple mode, if <var1> through <varN> are all valid,
+# <packagename>_FOUND will be set to TRUE.
# After REQUIRED_VARS the variables which are required for this package are listed.
# Following VERSION_VAR the name of the variable can be specified which holds
# the version of the package which has been found. If this is done, this version
@@ -35,7 +43,7 @@
# which has been actually found, both if the version is ok or not.
# If the package supports components, use the HANDLE_COMPONENTS option to enable
# handling them. In this case, find_package_handle_standard_args() will report
-# which components have been found and which are missing, and the <NAME>_FOUND
+# which components have been found and which are missing, and the <packagename>_FOUND
# variable will be set to FALSE if any of the required components (i.e. not the
# ones listed after OPTIONAL_COMPONENTS) are missing.
# Use the option CONFIG_MODE if your FindXXX.cmake module is a wrapper for
@@ -47,7 +55,7 @@
#
# Example for mode 1:
#
-# FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibXml2 DEFAULT_MSG LIBXML2_LIBRARY LIBXML2_INCLUDE_DIR)
+# find_package_handle_standard_args(LibXml2 DEFAULT_MSG LIBXML2_LIBRARY LIBXML2_INCLUDE_DIR)
#
# LibXml2 is considered to be found, if both LIBXML2_LIBRARY and
# LIBXML2_INCLUDE_DIR are valid. Then also LIBXML2_FOUND is set to TRUE.
@@ -58,20 +66,23 @@
#
# Example for mode 2:
#
-# FIND_PACKAGE_HANDLE_STANDARD_ARGS(BISON REQUIRED_VARS BISON_EXECUTABLE
-# VERSION_VAR BISON_VERSION)
-# In this case, BISON is considered to be found if the variable(s) listed
-# after REQUIRED_VAR are all valid, i.e. BISON_EXECUTABLE in this case.
-# Also the version of BISON will be checked by using the version contained
-# in BISON_VERSION.
+# find_package_handle_standard_args(LibXslt FOUND_VAR LibXslt_FOUND
+# REQUIRED_VARS LibXslt_LIBRARIES LibXslt_INCLUDE_DIRS
+# VERSION_VAR LibXslt_VERSION_STRING)
+# In this case, LibXslt is considered to be found if the variable(s) listed
+# after REQUIRED_VAR are all valid, i.e. LibXslt_LIBRARIES and LibXslt_INCLUDE_DIRS
+# in this case. The result will then be stored in LibXslt_FOUND .
+# Also the version of LibXslt will be checked by using the version contained
+# in LibXslt_VERSION_STRING.
# Since no FAIL_MESSAGE is given, the default messages will be printed.
#
# Another example for mode 2:
#
# find_package(Automoc4 QUIET NO_MODULE HINTS /opt/automoc4)
-# FIND_PACKAGE_HANDLE_STANDARD_ARGS(Automoc4 CONFIG_MODE)
+# find_package_handle_standard_args(Automoc4 CONFIG_MODE)
# In this case, FindAutmoc4.cmake wraps a call to find_package(Automoc4 NO_MODULE)
# and adds an additional search directory for automoc4.
+# Here the result will be stored in AUTOMOC4_FOUND.
# The following FIND_PACKAGE_HANDLE_STANDARD_ARGS() call produces a proper
# success/error message.
@@ -88,8 +99,8 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-include(FindPackageMessage)
-include(CMakeParseArguments)
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageMessage.cmake)
+include(${CMAKE_CURRENT_LIST_DIR}/CMakeParseArguments.cmake)
# internal helper macro
macro(_FPHSA_FAILURE_MESSAGE _msg)
@@ -137,8 +148,8 @@ function(FIND_PACKAGE_HANDLE_STANDARD_ARGS _NAME _FIRST_ARG)
# set up the arguments for CMAKE_PARSE_ARGUMENTS and check whether we are in
# new extended or in the "old" mode:
- set(options CONFIG_MODE HANDLE_COMPONENTS)
- set(oneValueArgs FAIL_MESSAGE VERSION_VAR)
+ set(options CONFIG_MODE HANDLE_COMPONENTS)
+ set(oneValueArgs FAIL_MESSAGE VERSION_VAR FOUND_VAR)
set(multiValueArgs REQUIRED_VARS)
set(_KEYWORDS_FOR_EXTENDED_MODE ${options} ${oneValueArgs} ${multiValueArgs} )
list(FIND _KEYWORDS_FOR_EXTENDED_MODE "${_FIRST_ARG}" INDEX)
@@ -183,20 +194,33 @@ function(FIND_PACKAGE_HANDLE_STANDARD_ARGS _NAME _FIRST_ARG)
string(TOUPPER ${_NAME} _NAME_UPPER)
string(TOLOWER ${_NAME} _NAME_LOWER)
+ if(FPHSA_FOUND_VAR)
+ if(FPHSA_FOUND_VAR MATCHES "^${_NAME}_FOUND$" OR FPHSA_FOUND_VAR MATCHES "^${_NAME_UPPER}_FOUND$")
+ set(_FOUND_VAR ${FPHSA_FOUND_VAR})
+ else()
+ message(FATAL_ERROR "The argument for FOUND_VAR is \"${FPHSA_FOUND_VAR}\", but only \"${_NAME}_FOUND\" and \"${_NAME_UPPER}_FOUND\" are valid names.")
+ endif()
+ else()
+ set(_FOUND_VAR ${_NAME_UPPER}_FOUND)
+ endif()
+
# collect all variables which were not found, so they can be printed, so the
# user knows better what went wrong (#6375)
set(MISSING_VARS "")
set(DETAILS "")
- set(${_NAME_UPPER}_FOUND TRUE)
# check if all passed variables are valid
+ unset(${_FOUND_VAR})
foreach(_CURRENT_VAR ${FPHSA_REQUIRED_VARS})
if(NOT ${_CURRENT_VAR})
- set(${_NAME_UPPER}_FOUND FALSE)
+ set(${_FOUND_VAR} FALSE)
set(MISSING_VARS "${MISSING_VARS} ${_CURRENT_VAR}")
else()
set(DETAILS "${DETAILS}[${${_CURRENT_VAR}}]")
endif()
endforeach()
+ if(NOT "${${_FOUND_VAR}}" STREQUAL "FALSE")
+ set(${_FOUND_VAR} TRUE)
+ endif()
# component handling
unset(FOUND_COMPONENTS_MSG)
@@ -219,7 +243,7 @@ function(FIND_PACKAGE_HANDLE_STANDARD_ARGS _NAME _FIRST_ARG)
set(MISSING_COMPONENTS_MSG "${MISSING_COMPONENTS_MSG} ${comp}")
if(${_NAME}_FIND_REQUIRED_${comp})
- set(${_NAME_UPPER}_FOUND FALSE)
+ set(${_FOUND_VAR} FALSE)
set(MISSING_VARS "${MISSING_VARS} ${comp}")
endif()
@@ -273,12 +297,12 @@ function(FIND_PACKAGE_HANDLE_STANDARD_ARGS _NAME _FIRST_ARG)
if(VERSION_OK)
set(DETAILS "${DETAILS}[v${VERSION}(${${_NAME}_FIND_VERSION})]")
else()
- set(${_NAME_UPPER}_FOUND FALSE)
+ set(${_FOUND_VAR} FALSE)
endif()
# print the result:
- if (${_NAME_UPPER}_FOUND)
+ if (${_FOUND_VAR})
FIND_PACKAGE_MESSAGE(${_NAME} "Found ${_NAME}: ${${_FIRST_REQUIRED_VAR}} ${VERSION_MSG} ${COMPONENT_MSG}" "${DETAILS}")
else ()
@@ -294,6 +318,6 @@ function(FIND_PACKAGE_HANDLE_STANDARD_ARGS _NAME _FIRST_ARG)
endif ()
- set(${_NAME_UPPER}_FOUND ${${_NAME_UPPER}_FOUND} PARENT_SCOPE)
+ set(${_FOUND_VAR} ${${_FOUND_VAR}} PARENT_SCOPE)
endfunction()
diff --git a/Modules/FindPerl.cmake b/Modules/FindPerl.cmake
index e908a65..5eaf207 100644
--- a/Modules/FindPerl.cmake
+++ b/Modules/FindPerl.cmake
@@ -18,7 +18,7 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-include(FindCygwin)
+include(${CMAKE_CURRENT_LIST_DIR}/FindCygwin.cmake)
set(PERL_POSSIBLE_BIN_PATHS
${CYGWIN_INSTALL_PATH}/bin
diff --git a/Modules/FindPerlLibs.cmake b/Modules/FindPerlLibs.cmake
index e9313ad..492f047 100644
--- a/Modules/FindPerlLibs.cmake
+++ b/Modules/FindPerlLibs.cmake
@@ -38,7 +38,7 @@
# License text for the above reference.)
# find the perl executable
-include(FindPerl)
+include(${CMAKE_CURRENT_LIST_DIR}/FindPerl.cmake)
if (PERL_EXECUTABLE)
### PERL_PREFIX
diff --git a/Modules/FindPythonLibs.cmake b/Modules/FindPythonLibs.cmake
index 0a9a990..bffa9fb 100644
--- a/Modules/FindPythonLibs.cmake
+++ b/Modules/FindPythonLibs.cmake
@@ -32,7 +32,7 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-include(CMakeFindFrameworks)
+include(${CMAKE_CURRENT_LIST_DIR}/CMakeFindFrameworks.cmake)
# Search for the python framework on Apple.
CMAKE_FIND_FRAMEWORKS(Python)
diff --git a/Modules/FindQt.cmake b/Modules/FindQt.cmake
index 13f18fe..54b7c6f 100644
--- a/Modules/FindQt.cmake
+++ b/Modules/FindQt.cmake
@@ -31,7 +31,7 @@
# License text for the above reference.)
# look for signs of qt3 installations
-file(GLOB GLOB_TEMP_VAR /usr/lib/qt-3*/bin/qmake)
+file(GLOB GLOB_TEMP_VAR /usr/lib*/qt-3*/bin/qmake /usr/lib*/qt3*/bin/qmake)
if(GLOB_TEMP_VAR)
set(QT3_INSTALLED TRUE)
endif()
@@ -43,6 +43,12 @@ if(GLOB_TEMP_VAR)
endif()
set(GLOB_TEMP_VAR)
+file(GLOB GLOB_TEMP_VAR /usr/local/lib/qt3/bin/qmake)
+if(GLOB_TEMP_VAR)
+ set(QT3_INSTALLED TRUE)
+endif()
+set(GLOB_TEMP_VAR)
+
# look for qt4 installations
file(GLOB GLOB_TEMP_VAR /usr/local/qt-x11-commercial-4*/bin/qmake)
if(GLOB_TEMP_VAR)
@@ -56,6 +62,16 @@ if(GLOB_TEMP_VAR)
endif()
set(GLOB_TEMP_VAR)
+file(GLOB GLOB_TEMP_VAR /usr/local/lib/qt4/bin/qmake)
+if(GLOB_TEMP_VAR)
+ set(QT4_INSTALLED TRUE)
+endif()
+set(GLOB_TEMP_VAR)
+
+if (Qt_FIND_VERSION)
+ set(DESIRED_QT_VERSION "${Qt_FIND_VERSION}")
+endif ()
+
# now find qmake
find_program(QT_QMAKE_EXECUTABLE_FINDQT NAMES qmake PATHS "${QT_SEARCH_PATH}/bin" "$ENV{QTDIR}/bin")
if(QT_QMAKE_EXECUTABLE_FINDQT)
@@ -87,6 +103,7 @@ find_file( QT4_QGLOBAL_H_FILE qglobal.h
/usr/lib/qt/include/Qt
/usr/include/Qt
/usr/share/qt4/include/Qt
+ /usr/local/include/X11/qt4/Qt
C:/Progra~1/qt/include/Qt )
if(QT4_QGLOBAL_H_FILE)
@@ -106,6 +123,7 @@ find_file( QT3_QGLOBAL_H_FILE qglobal.h
/usr/lib/qt/include
/usr/include
/usr/share/qt3/include
+ /usr/local/include/X11/qt3
C:/Progra~1/qt/include
/usr/include/qt3 )
@@ -113,15 +131,15 @@ if(QT3_QGLOBAL_H_FILE)
set(QT3_INSTALLED TRUE)
endif()
-if(QT3_INSTALLED AND QT4_INSTALLED )
+if(QT3_INSTALLED AND QT4_INSTALLED AND NOT DESIRED_QT_VERSION)
# force user to pick if we have both
set(DESIRED_QT_VERSION 0 CACHE STRING "Pick a version of Qt to use: 3 or 4")
else()
# if only one found then pick that one
- if(QT3_INSTALLED)
+ if(QT3_INSTALLED AND NOT DESIRED_QT_VERSION EQUAL 4)
set(DESIRED_QT_VERSION 3 CACHE STRING "Pick a version of Qt to use: 3 or 4")
endif()
- if(QT4_INSTALLED)
+ if(QT4_INSTALLED AND NOT DESIRED_QT_VERSION EQUAL 3)
set(DESIRED_QT_VERSION 4 CACHE STRING "Pick a version of Qt to use: 3 or 4")
endif()
endif()
@@ -129,12 +147,12 @@ endif()
if(DESIRED_QT_VERSION MATCHES 3)
set(Qt3_FIND_REQUIRED ${Qt_FIND_REQUIRED})
set(Qt3_FIND_QUIETLY ${Qt_FIND_QUIETLY})
- include(FindQt3)
+ include(${CMAKE_CURRENT_LIST_DIR}/FindQt3.cmake)
endif()
if(DESIRED_QT_VERSION MATCHES 4)
set(Qt4_FIND_REQUIRED ${Qt_FIND_REQUIRED})
set(Qt4_FIND_QUIETLY ${Qt_FIND_QUIETLY})
- include(FindQt4)
+ include(${CMAKE_CURRENT_LIST_DIR}/FindQt4.cmake)
endif()
if(NOT QT3_INSTALLED AND NOT QT4_INSTALLED)
diff --git a/Modules/FindQt3.cmake b/Modules/FindQt3.cmake
index 07b6fef..4fc8e40 100644
--- a/Modules/FindQt3.cmake
+++ b/Modules/FindQt3.cmake
@@ -64,6 +64,7 @@ find_path(QT_INCLUDE_DIR qt.h
/usr/share/qt3/include
C:/Progra~1/qt/include
/usr/include/qt3
+ /usr/local/include/X11/qt3
)
# if qglobal.h is not in the qt_include_dir then set
@@ -146,7 +147,7 @@ find_library(QT_QASSISTANTCLIENT_LIBRARY
# Qt 3 should prefer QTDIR over the PATH
find_program(QT_MOC_EXECUTABLE
- NAMES moc-qt3 moc
+ NAMES moc-qt3 moc moc3 moc3-mt
HINTS
ENV QTDIR
PATHS
@@ -154,6 +155,7 @@ find_program(QT_MOC_EXECUTABLE
"[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.2.0;InstallDir]/include/Qt"
"[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.1.0;InstallDir]/include/Qt"
${GLOB_PATHS_BIN}
+ /usr/local/lib/qt3
/usr/local/qt
/usr/lib/qt
/usr/lib/qt3
@@ -170,7 +172,7 @@ endif()
# Qt 3 should prefer QTDIR over the PATH
find_program(QT_UIC_EXECUTABLE
- NAMES uic-qt3 uic
+ NAMES uic-qt3 uic uic3 uic3-mt
HINTS
ENV QTDIR
PATHS
diff --git a/Modules/FindQt4.cmake b/Modules/FindQt4.cmake
index a84074b..4c05cc0 100644
--- a/Modules/FindQt4.cmake
+++ b/Modules/FindQt4.cmake
@@ -65,6 +65,16 @@
# is much more flexible, but requires that FindQt4.cmake is executed before
# such an exported dependency file is processed.
#
+# Note that if using IMPORTED targets, the qtmain.lib static library is
+# automatically linked on Windows. To disable that globally, set the
+# QT4_NO_LINK_QTMAIN variable before finding Qt4. To disable that for a
+# particular executable, set the QT4_NO_LINK_QTMAIN target property to
+# True on the executable.
+#
+# QT_INCLUDE_DIRS_NO_SYSTEM
+# If this variable is set to TRUE, the Qt include directories
+# in the QT_USE_FILE will NOT have the SYSTEM keyword set.
+#
# There are also some files that need processing by some Qt tools such as moc
# and uic. Listed below are macros that may be used to process those files.
#
@@ -177,7 +187,8 @@
#
# Below is a detailed list of variables that FindQt4.cmake sets.
# QT_FOUND If false, don't try to use Qt.
-# QT4_FOUND If false, don't try to use Qt 4.
+# Qt4_FOUND If false, don't try to use Qt 4.
+# QT4_FOUND If false, don't try to use Qt 4. This variable is for compatibility only.
#
# QT_VERSION_MAJOR The major version of Qt found.
# QT_VERSION_MINOR The minor version of Qt found.
@@ -376,8 +387,8 @@ if(QT_QT_LIBRARY)
endif()
-include(CheckCXXSymbolExists)
-include(MacroAddFileDependencies)
+include(${CMAKE_CURRENT_LIST_DIR}/CheckCXXSymbolExists.cmake)
+include(${CMAKE_CURRENT_LIST_DIR}/MacroAddFileDependencies.cmake)
include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
set(QT_USE_FILE ${CMAKE_ROOT}/Modules/UseQt4.cmake)
@@ -414,6 +425,15 @@ macro (_QT4_ADJUST_LIB_VARS _camelCaseBasename)
set_property(TARGET Qt4::${_camelCaseBasename} PROPERTY IMPORTED_LOCATION_DEBUG "${QT_${basename}_LIBRARY_DEBUG}" )
endif()
endif ()
+ set_property(TARGET Qt4::${_camelCaseBasename} PROPERTY
+ INTERFACE_INCLUDE_DIRECTORIES
+ "${QT_${basename}_INCLUDE_DIR}"
+ )
+ string(REGEX REPLACE "^QT" "" _stemname ${basename})
+ set_property(TARGET Qt4::${_camelCaseBasename} PROPERTY
+ INTERFACE_COMPILE_DEFINITIONS
+ "QT_${_stemname}_LIB"
+ )
endif()
# If QT_USE_IMPORTED_TARGETS is enabled, the QT_QTFOO_LIBRARY variables are set to point at these
@@ -490,50 +510,72 @@ function(_QT4_QUERY_QMAKE VAR RESULT)
endif()
endfunction()
+function(_QT4_GET_VERSION_COMPONENTS VERSION RESULT_MAJOR RESULT_MINOR RESULT_PATCH)
+ string(REGEX REPLACE "^([0-9]+)\\.[0-9]+\\.[0-9]+.*" "\\1" QT_VERSION_MAJOR "${QTVERSION}")
+ string(REGEX REPLACE "^[0-9]+\\.([0-9]+)\\.[0-9]+.*" "\\1" QT_VERSION_MINOR "${QTVERSION}")
+ string(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1" QT_VERSION_PATCH "${QTVERSION}")
-set(QT4_INSTALLED_VERSION_TOO_OLD FALSE)
+ set(${RESULT_MAJOR} ${QT_VERSION_MAJOR} PARENT_SCOPE)
+ set(${RESULT_MINOR} ${QT_VERSION_MINOR} PARENT_SCOPE)
+ set(${RESULT_PATCH} ${QT_VERSION_PATCH} PARENT_SCOPE)
+endfunction()
-get_filename_component(qt_install_version "[HKEY_CURRENT_USER\\Software\\trolltech\\Versions;DefaultQtVersion]" NAME)
-# check for qmake
-# Debian uses qmake-qt4
-# macports' Qt uses qmake-mac
-find_program(QT_QMAKE_EXECUTABLE NAMES qmake qmake4 qmake-qt4 qmake-mac
- PATHS
- ENV QTDIR
- "[HKEY_CURRENT_USER\\Software\\Trolltech\\Versions\\${qt_install_version};InstallDir]"
- PATH_SUFFIXES bin
- DOC "The qmake executable for the Qt installation to use"
-)
-
-# double check that it was a Qt4 qmake, if not, re-find with different names
-if (QT_QMAKE_EXECUTABLE)
-
- if(QT_QMAKE_EXECUTABLE_LAST)
- string(COMPARE NOTEQUAL "${QT_QMAKE_EXECUTABLE_LAST}" "${QT_QMAKE_EXECUTABLE}" QT_QMAKE_CHANGED)
+function(_QT4_FIND_QMAKE QMAKE_NAMES QMAKE_RESULT VERSION_RESULT)
+ list(LENGTH QMAKE_NAMES QMAKE_NAMES_LEN)
+ if(${QMAKE_NAMES_LEN} EQUAL 0)
+ return()
endif()
+ list(GET QMAKE_NAMES 0 QMAKE_NAME)
- set(QT_QMAKE_EXECUTABLE_LAST "${QT_QMAKE_EXECUTABLE}" CACHE INTERNAL "" FORCE)
+ get_filename_component(qt_install_version "[HKEY_CURRENT_USER\\Software\\trolltech\\Versions;DefaultQtVersion]" NAME)
- _qt4_query_qmake(QT_VERSION QTVERSION)
+ find_program(QT_QMAKE_EXECUTABLE NAMES ${QMAKE_NAME}
+ PATHS
+ ENV QTDIR
+ "[HKEY_CURRENT_USER\\Software\\Trolltech\\Versions\\${qt_install_version};InstallDir]"
+ PATH_SUFFIXES bin
+ DOC "The qmake executable for the Qt installation to use"
+ )
+
+ set(major 0)
+ if (QT_QMAKE_EXECUTABLE)
+ _qt4_query_qmake(QT_VERSION QTVERSION)
+ _qt4_get_version_components("${QTVERSION}" major minor patch)
+ endif()
+
+ if (NOT QT_QMAKE_EXECUTABLE OR NOT "${major}" EQUAL 4)
+ set(curr_qmake "${QT_QMAKE_EXECUTABLE}")
+ set(curr_qt_version "${QTVERSION}")
- # check for qt3 qmake and then try and find qmake4 or qmake-qt4 in the path
- if(NOT QTVERSION)
set(QT_QMAKE_EXECUTABLE NOTFOUND CACHE FILEPATH "" FORCE)
- find_program(QT_QMAKE_EXECUTABLE NAMES qmake4 qmake-qt4 PATHS
- "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\4.0.0;InstallDir]/bin"
- "[HKEY_CURRENT_USER\\Software\\Trolltech\\Versions\\4.0.0;InstallDir]/bin"
- $ENV{QTDIR}/bin
- DOC "The qmake executable for the Qt installation to use"
- )
- if(QT_QMAKE_EXECUTABLE)
- _qt4_query_qmake(QT_VERSION QTVERSION)
+ list(REMOVE_AT QMAKE_NAMES 0)
+ _qt4_find_qmake("${QMAKE_NAMES}" QMAKE QTVERSION)
+
+ _qt4_get_version_components("${QTVERSION}" major minor patch)
+ if (NOT ${major} EQUAL 4)
+ # Restore possibly found qmake and it's version; these are used later
+ # in error message if incorrect version is found
+ set(QT_QMAKE_EXECUTABLE "${curr_qmake}" CACHE FILEPATH "" FORCE)
+ set(QTVERSION "${curr_qt_version}")
endif()
+
endif()
-endif ()
+
+ set(${QMAKE_RESULT} "${QT_QMAKE_EXECUTABLE}" PARENT_SCOPE)
+ set(${VERSION_RESULT} "${QTVERSION}" PARENT_SCOPE)
+endfunction()
+
+
+set(QT4_INSTALLED_VERSION_TOO_OLD FALSE)
+
+set(_QT4_QMAKE_NAMES qmake qmake4 qmake-qt4 qmake-mac)
+_qt4_find_qmake("${_QT4_QMAKE_NAMES}" QT_QMAKE_EXECUTABLE QTVERSION)
if (QT_QMAKE_EXECUTABLE AND QTVERSION)
+ _qt4_get_version_components("${QTVERSION}" QT_VERSION_MAJOR QT_VERSION_MINOR QT_VERSION_PATCH)
+
# ask qmake for the mkspecs directory
# we do this first because QT_LIBINFIX might be set
if (NOT QT_MKSPECS_DIR OR QT_QMAKE_CHANGED)
@@ -644,7 +686,14 @@ if (QT_QMAKE_EXECUTABLE AND QTVERSION)
find_path(QT_QTCORE_INCLUDE_DIR QtCore
HINTS ${qt_headers} ${QT_LIBRARY_DIR}
PATH_SUFFIXES QtCore qt4/QtCore
+ NO_DEFAULT_PATH
)
+ if(NOT QT_QTCORE_INCLUDE_DIR)
+ find_path(QT_QTCORE_INCLUDE_DIR QtCore
+ HINTS ${qt_headers} ${QT_LIBRARY_DIR}
+ PATH_SUFFIXES QtCore qt4/QtCore
+ )
+ endif()
# Set QT_HEADERS_DIR based on finding QtCore header
if(QT_QTCORE_INCLUDE_DIR)
@@ -832,16 +881,20 @@ if (QT_QMAKE_EXECUTABLE AND QTVERSION)
endforeach()
if(Q_WS_WIN)
- set(QT_MODULES ${QT_MODULES} QAxContainer QAxServer)
- # Set QT_AXCONTAINER_INCLUDE_DIR and QT_AXSERVER_INCLUDE_DIR
- find_path(QT_QAXCONTAINER_INCLUDE_DIR ActiveQt
- PATHS ${QT_HEADERS_DIR}/ActiveQt
- NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
- )
- find_path(QT_QAXSERVER_INCLUDE_DIR ActiveQt
- PATHS ${QT_HEADERS_DIR}/ActiveQt
- NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
- )
+ if (QT_QAXCONTAINER_FOUND)
+ set(QT_MODULES ${QT_MODULES} QAxContainer)
+ # Set QT_AXCONTAINER_INCLUDE_DIR and QT_AXSERVER_INCLUDE_DIR
+ find_path(QT_QAXCONTAINER_INCLUDE_DIR ActiveQt
+ PATHS ${QT_HEADERS_DIR}/ActiveQt
+ NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
+ )
+ endif()
+ if (QT_QAXSERVER_FOUND)
+ find_path(QT_QAXSERVER_INCLUDE_DIR ActiveQt
+ PATHS ${QT_HEADERS_DIR}/ActiveQt
+ NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
+ )
+ endif()
endif()
# Set QT_QTDESIGNERCOMPONENTS_INCLUDE_DIR
@@ -938,12 +991,59 @@ if (QT_QMAKE_EXECUTABLE AND QTVERSION)
############################################
+ macro(_qt4_add_target_depends_internal _QT_MODULE _PROPERTY)
+ if (TARGET Qt4::${_QT_MODULE})
+ foreach(_DEPEND ${ARGN})
+ set(_VALID_DEPENDS)
+ if (TARGET Qt4::Qt${_DEPEND})
+ list(APPEND _VALID_DEPENDS Qt4::Qt${_DEPEND})
+ endif()
+ if (_VALID_DEPENDS)
+ set_property(TARGET Qt4::${_QT_MODULE} APPEND PROPERTY
+ ${_PROPERTY}
+ "${_VALID_DEPENDS}"
+ )
+ endif()
+ set(_VALID_DEPENDS)
+ endforeach()
+ endif()
+ endmacro()
+
+ macro(_qt4_add_target_depends _QT_MODULE)
+ get_target_property(_configs Qt4::${_QT_MODULE} IMPORTED_CONFIGURATIONS)
+ foreach(_config ${_configs})
+ _qt4_add_target_depends_internal(${_QT_MODULE} IMPORTED_LINK_INTERFACE_LIBRARIES_${_config} ${ARGN})
+ endforeach()
+ set(_configs)
+ endmacro()
+
+ macro(_qt4_add_target_private_depends _QT_MODULE)
+ get_target_property(_configs ${_QT_MODULE} IMPORTED_CONFIGURATIONS)
+ foreach(_config ${_configs})
+ _qt4_add_target_depends_internal(${_QT_MODULE} IMPORTED_LINK_DEPENDENT_LIBRARIES_${_config} ${ARGN})
+ endforeach()
+ set(_configs)
+ endmacro()
+
+
# Set QT_xyz_LIBRARY variable and add
# library include path to QT_INCLUDES
_QT4_ADJUST_LIB_VARS(QtCore)
+ set_property(TARGET Qt4::QtCore APPEND PROPERTY
+ INTERFACE_INCLUDE_DIRECTORIES
+ "${QT_MKSPECS_DIR}/default"
+ ${QT_INCLUDE_DIR}
+ )
+ set_property(TARGET Qt4::QtCore PROPERTY
+ INTERFACE_QT_MAJOR_VERSION 4
+ )
+ set_property(TARGET Qt4::QtCore APPEND PROPERTY
+ COMPATIBLE_INTERFACE_STRING QT_MAJOR_VERSION
+ )
foreach(QT_MODULE ${QT_MODULES})
_QT4_ADJUST_LIB_VARS(${QT_MODULE})
+ _qt4_add_target_depends(${QT_MODULE} Core)
endforeach()
_QT4_ADJUST_LIB_VARS(QtAssistant)
@@ -954,10 +1054,81 @@ if (QT_QMAKE_EXECUTABLE AND QTVERSION)
# platform dependent libraries
if(Q_WS_WIN)
_QT4_ADJUST_LIB_VARS(qtmain)
- _QT4_ADJUST_LIB_VARS(QAxServer)
- _QT4_ADJUST_LIB_VARS(QAxContainer)
+
+ if(QT_QAXSERVER_FOUND)
+ _QT4_ADJUST_LIB_VARS(QAxServer)
+ set_property(TARGET Qt4::QAxServer PROPERTY
+ INTERFACE_QT4_NO_LINK_QTMAIN ON
+ )
+ set_property(TARGET Qt4::QAxServer APPEND PROPERTY
+ COMPATIBLE_INTERFACE_BOOL QT4_NO_LINK_QTMAIN)
+ endif()
+
+ if(QT_QAXCONTAINER_FOUND)
+ _QT4_ADJUST_LIB_VARS(QAxContainer)
+ endif()
+ endif()
+
+ # Only public dependencies are listed here.
+ # Eg, QtDBus links to QtXml, but users of QtDBus do not need to
+ # link to QtXml because QtDBus only uses it internally, not in public
+ # headers.
+ # Everything depends on QtCore, but that is covered above already
+ _qt4_add_target_depends(Qt3Support Sql Gui Network)
+ if (TARGET Qt4::Qt3Support)
+ # An additional define is required for QT3_SUPPORT
+ set_property(TARGET Qt4::Qt3Support APPEND PROPERTY INTERFACE_COMPILE_DEFINITIONS QT3_SUPPORT)
+ endif()
+ _qt4_add_target_depends(QtDeclarative Script Gui)
+ _qt4_add_target_depends(QtDesigner Gui)
+ _qt4_add_target_depends(QtHelp Gui)
+ _qt4_add_target_depends(QtMultimedia Gui)
+ _qt4_add_target_depends(QtOpenGL Gui)
+ _qt4_add_target_depends(QtSvg Gui)
+ _qt4_add_target_depends(QtWebKit Gui Network)
+
+ _qt4_add_target_private_depends(Qt3Support Xml)
+ if(QT_VERSION VERSION_GREATER 4.6)
+ _qt4_add_target_private_depends(QtSvg Xml)
+ endif()
+ _qt4_add_target_private_depends(QtDBus Xml)
+ _qt4_add_target_private_depends(QtUiTools Xml Gui)
+ _qt4_add_target_private_depends(QtHelp Sql Xml Network)
+ _qt4_add_target_private_depends(QtXmlPatterns Network)
+ _qt4_add_target_private_depends(QtScriptTools Gui)
+ _qt4_add_target_private_depends(QtWebKit XmlPatterns)
+ _qt4_add_target_private_depends(QtDeclarative XmlPatterns Svg Sql Gui)
+ _qt4_add_target_private_depends(QtMultimedia Gui)
+ _qt4_add_target_private_depends(QtOpenGL Gui)
+ if(QT_QAXSERVER_FOUND)
+ _qt4_add_target_private_depends(QAxServer Gui)
+ endif()
+ if(QT_QAXCONTAINER_FOUND)
+ _qt4_add_target_private_depends(QAxContainer Gui)
+ endif()
+ _qt4_add_target_private_depends(phonon Gui)
+ if(QT_QTDBUS_FOUND)
+ _qt4_add_target_private_depends(phonon DBus)
endif()
+ if (WIN32 AND NOT QT4_NO_LINK_QTMAIN)
+ set(_isExe $<STREQUAL:$<TARGET_PROPERTY:TYPE>,EXECUTABLE>)
+ set(_isWin32 $<BOOL:$<TARGET_PROPERTY:WIN32_EXECUTABLE>>)
+ set(_isNotExcluded $<NOT:$<BOOL:$<TARGET_PROPERTY:QT4_NO_LINK_QTMAIN>>>)
+ set(_isPolicyNEW $<TARGET_POLICY:CMP0020>)
+ get_target_property(_configs Qt4::QtCore IMPORTED_CONFIGURATIONS)
+ foreach(_config ${_configs})
+ set_property(TARGET Qt4::QtCore APPEND PROPERTY
+ IMPORTED_LINK_INTERFACE_LIBRARIES_${_config}
+ $<$<AND:${_isExe},${_isWin32},${_isNotExcluded},${_isPolicyNEW}>:Qt4::qtmain>
+ )
+ endforeach()
+ unset(_configs)
+ unset(_isExe)
+ unset(_isWin32)
+ unset(_isNotExcluded)
+ unset(_isPolicyNEW)
+ endif()
#######################################
#
@@ -982,13 +1153,13 @@ if (QT_QMAKE_EXECUTABLE AND QTVERSION)
endif()
find_program(QT_MOC_EXECUTABLE
- NAMES moc-qt4 moc
+ NAMES moc-qt4 moc moc4
PATHS ${QT_BINARY_DIR}
NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
)
find_program(QT_UIC_EXECUTABLE
- NAMES uic-qt4 uic
+ NAMES uic-qt4 uic uic4
PATHS ${QT_BINARY_DIR}
NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
)
@@ -1018,13 +1189,13 @@ if (QT_QMAKE_EXECUTABLE AND QTVERSION)
)
find_program(QT_LUPDATE_EXECUTABLE
- NAMES lupdate-qt4 lupdate
+ NAMES lupdate-qt4 lupdate lupdate4
PATHS ${QT_BINARY_DIR}
NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
)
find_program(QT_LRELEASE_EXECUTABLE
- NAMES lrelease-qt4 lrelease
+ NAMES lrelease-qt4 lrelease lrelease4
PATHS ${QT_BINARY_DIR}
NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
)
@@ -1036,13 +1207,13 @@ if (QT_QMAKE_EXECUTABLE AND QTVERSION)
)
find_program(QT_DESIGNER_EXECUTABLE
- NAMES designer-qt4 designer
+ NAMES designer-qt4 designer designer4
PATHS ${QT_BINARY_DIR}
NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
)
find_program(QT_LINGUIST_EXECUTABLE
- NAMES linguist-qt4 linguist
+ NAMES linguist-qt4 linguist linguist4
PATHS ${QT_BINARY_DIR}
NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
)
@@ -1170,11 +1341,6 @@ if (QT_QMAKE_EXECUTABLE AND QTVERSION)
include("${_qt4_current_dir}/Qt4Macros.cmake")
- # set version variables
- string(REGEX REPLACE "^([0-9]+)\\.[0-9]+\\.[0-9]+.*" "\\1" QT_VERSION_MAJOR "${QTVERSION}")
- string(REGEX REPLACE "^[0-9]+\\.([0-9]+)\\.[0-9]+.*" "\\1" QT_VERSION_MINOR "${QTVERSION}")
- string(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1" QT_VERSION_PATCH "${QTVERSION}")
-
endif()
#support old QT_MIN_VERSION if set, but not if version is supplied by find_package()
@@ -1209,7 +1375,7 @@ else()
endif()
-if (QT_VERSION_MAJOR GREATER 4)
+if (NOT QT_VERSION_MAJOR EQUAL 4)
set(VERSION_MSG "Found unsuitable Qt version \"${QTVERSION}\" from ${QT_QMAKE_EXECUTABLE}")
set(QT4_FOUND FALSE)
if(Qt4_FIND_REQUIRED)
@@ -1220,7 +1386,7 @@ if (QT_VERSION_MAJOR GREATER 4)
endif()
endif()
else()
- FIND_PACKAGE_HANDLE_STANDARD_ARGS(Qt4
+ FIND_PACKAGE_HANDLE_STANDARD_ARGS(Qt4 FOUND_VAR Qt4_FOUND
REQUIRED_VARS ${_QT4_FOUND_REQUIRED_VARS}
VERSION_VAR QTVERSION
)
@@ -1235,5 +1401,6 @@ endif()
set (QT_MOC_EXE ${QT_MOC_EXECUTABLE} )
set (QT_UIC_EXE ${QT_UIC_EXECUTABLE} )
set( QT_QT_LIBRARY "")
-set(QT_FOUND ${QT4_FOUND})
+set(QT4_FOUND ${Qt4_FOUND})
+set(QT_FOUND ${Qt4_FOUND})
diff --git a/Modules/FindRuby.cmake b/Modules/FindRuby.cmake
index 119cb63..c02158f 100644
--- a/Modules/FindRuby.cmake
+++ b/Modules/FindRuby.cmake
@@ -46,15 +46,24 @@ set(_RUBY_POSSIBLE_EXECUTABLE_NAMES ruby)
# if 1.9 is required, don't look for ruby18 and ruby1.8, default to version 1.8
if(Ruby_FIND_VERSION_MAJOR AND Ruby_FIND_VERSION_MINOR)
set(Ruby_FIND_VERSION_SHORT_NODOT "${Ruby_FIND_VERSION_MAJOR}${RUBY_FIND_VERSION_MINOR}")
+ # we can't construct that if only major version is given
+ set(_RUBY_POSSIBLE_EXECUTABLE_NAMES
+ ruby${Ruby_FIND_VERSION_MAJOR}.${Ruby_FIND_VERSION_MINOR}
+ ruby${Ruby_FIND_VERSION_MAJOR}${Ruby_FIND_VERSION_MINOR}
+ ${_RUBY_POSSIBLE_EXECUTABLE_NAMES})
else()
set(Ruby_FIND_VERSION_SHORT_NODOT "18")
endif()
-set(_RUBY_POSSIBLE_EXECUTABLE_NAMES ${_RUBY_POSSIBLE_EXECUTABLE_NAMES} ruby1.9 ruby19)
+if(NOT Ruby_FIND_VERSION_EXACT)
+ list(APPEND _RUBY_POSSIBLE_EXECUTABLE_NAMES ruby1.9 ruby19)
-# if we want a version below 1.9, also look for ruby 1.8
-if("${Ruby_FIND_VERSION_SHORT_NODOT}" VERSION_LESS "19")
- set(_RUBY_POSSIBLE_EXECUTABLE_NAMES ${_RUBY_POSSIBLE_EXECUTABLE_NAMES} ruby1.8 ruby18)
+ # if we want a version below 1.9, also look for ruby 1.8
+ if("${Ruby_FIND_VERSION_SHORT_NODOT}" VERSION_LESS "19")
+ list(APPEND _RUBY_POSSIBLE_EXECUTABLE_NAMES ruby1.8 ruby18)
+ endif()
+
+ list(REMOVE_DUPLICATES _RUBY_POSSIBLE_EXECUTABLE_NAMES)
endif()
find_program(RUBY_EXECUTABLE NAMES ${_RUBY_POSSIBLE_EXECUTABLE_NAMES})
diff --git a/Modules/FindSDL.cmake b/Modules/FindSDL.cmake
index f2e9f25..fec142e 100644
--- a/Modules/FindSDL.cmake
+++ b/Modules/FindSDL.cmake
@@ -122,7 +122,7 @@ if(SDL_LIBRARY_TEMP)
if(SDLMAIN_LIBRARY AND NOT SDL_BUILDING_LIBRARY)
list(FIND SDL_LIBRARY_TEMP "${SDLMAIN_LIBRARY}" _SDL_MAIN_INDEX)
if(_SDL_MAIN_INDEX EQUAL -1)
- list(APPEND SDL_LIBRARY_TEMP "${SDLMAIN_LIBRARY}")
+ set(SDL_LIBRARY_TEMP "${SDLMAIN_LIBRARY}" ${SDL_LIBRARY_TEMP})
endif()
unset(_SDL_MAIN_INDEX)
endif()
diff --git a/Modules/FindSDL_image.cmake b/Modules/FindSDL_image.cmake
index 4cae032..30d74ac 100644
--- a/Modules/FindSDL_image.cmake
+++ b/Modules/FindSDL_image.cmake
@@ -40,7 +40,7 @@ find_path(SDL_IMAGE_INCLUDE_DIR SDL_image.h
HINTS
ENV SDLIMAGEDIR
ENV SDLDIR
- PATH_SUFFIXES SDL SDL12 SDL11
+ PATH_SUFFIXES include/SDL include/SDL12 include/SDL11 include
)
if(NOT SDL_IMAGE_LIBRARY AND SDLIMAGE_LIBRARY)
@@ -52,6 +52,7 @@ find_library(SDL_IMAGE_LIBRARY
HINTS
ENV SDLIMAGEDIR
ENV SDLDIR
+ PATH_SUFFIXES lib
)
if(SDL_IMAGE_INCLUDE_DIR AND EXISTS "${SDL_IMAGE_INCLUDE_DIR}/SDL_image.h")
diff --git a/Modules/FindSDL_mixer.cmake b/Modules/FindSDL_mixer.cmake
index 666fc6e..8ca7cc3 100644
--- a/Modules/FindSDL_mixer.cmake
+++ b/Modules/FindSDL_mixer.cmake
@@ -40,7 +40,7 @@ find_path(SDL_MIXER_INCLUDE_DIR SDL_mixer.h
HINTS
ENV SDLMIXERDIR
ENV SDLDIR
- PATH_SUFFIXES SDL SDL12 SDL11
+ PATH_SUFFIXES include/SDL include/SDL12 include/SDL11 include
)
if(NOT SDL_MIXER_LIBRARY AND SDLMIXER_LIBRARY)
@@ -52,6 +52,7 @@ find_library(SDL_MIXER_LIBRARY
HINTS
ENV SDLMIXERDIR
ENV SDLDIR
+ PATH_SUFFIXES lib
)
if(SDL_MIXER_INCLUDE_DIR AND EXISTS "${SDL_MIXER_INCLUDE_DIR}/SDL_mixer.h")
diff --git a/Modules/FindSDL_net.cmake b/Modules/FindSDL_net.cmake
index d8f479f..ca707af 100644
--- a/Modules/FindSDL_net.cmake
+++ b/Modules/FindSDL_net.cmake
@@ -40,7 +40,7 @@ find_path(SDL_NET_INCLUDE_DIR SDL_net.h
HINTS
ENV SDLNETDIR
ENV SDLDIR
- PATH_SUFFIXES SDL SDL12 SDL11
+ PATH_SUFFIXES include/SDL include/SDL12 include/SDL11 include
)
if(NOT SDL_NET_LIBRARY AND SDLNET_LIBRARY)
@@ -52,6 +52,7 @@ find_library(SDL_NET_LIBRARY
HINTS
ENV SDLNETDIR
ENV SDLDIR
+ PATH_SUFFIXES lib
)
if(SDL_NET_INCLUDE_DIR AND EXISTS "${SDL_NET_INCLUDE_DIR}/SDL_net.h")
diff --git a/Modules/FindSDL_sound.cmake b/Modules/FindSDL_sound.cmake
index 5ff50be..efd2658 100644
--- a/Modules/FindSDL_sound.cmake
+++ b/Modules/FindSDL_sound.cmake
@@ -77,7 +77,7 @@ find_path(SDL_SOUND_INCLUDE_DIR SDL_sound.h
HINTS
ENV SDLSOUNDDIR
ENV SDLDIR
- PATH_SUFFIXES SDL SDL12 SDL11
+ PATH_SUFFIXES include/SDL include/SDL12 include/SDL11 include
)
find_library(SDL_SOUND_LIBRARY
@@ -85,6 +85,7 @@ find_library(SDL_SOUND_LIBRARY
HINTS
ENV SDLSOUNDDIR
ENV SDLDIR
+ PATH_SUFFIXES lib
)
if(SDL_FOUND AND SDL_SOUND_INCLUDE_DIR AND SDL_SOUND_LIBRARY)
diff --git a/Modules/FindSDL_ttf.cmake b/Modules/FindSDL_ttf.cmake
index 2cc5ee2..bb0ca91 100644
--- a/Modules/FindSDL_ttf.cmake
+++ b/Modules/FindSDL_ttf.cmake
@@ -40,7 +40,7 @@ find_path(SDL_TTF_INCLUDE_DIR SDL_ttf.h
HINTS
ENV SDLTTFDIR
ENV SDLDIR
- PATH_SUFFIXES SDL SDL12 SDL11
+ PATH_SUFFIXES include/SDL include/SDL12 include/SDL11 include
)
if(NOT SDL_TTF_LIBRARY AND SDLTTF_LIBRARY)
@@ -52,6 +52,7 @@ find_library(SDL_TTF_LIBRARY
HINTS
ENV SDLTTFDIR
ENV SDLDIR
+ PATH_SUFFIXES lib
)
if(SDL_TTF_INCLUDE_DIR AND EXISTS "${SDL_TTF_INCLUDE_DIR}/SDL_ttf.h")
diff --git a/Modules/FindSelfPackers.cmake b/Modules/FindSelfPackers.cmake
index 7726dce..fd28642 100644
--- a/Modules/FindSelfPackers.cmake
+++ b/Modules/FindSelfPackers.cmake
@@ -18,7 +18,7 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-include(FindCygwin)
+include(${CMAKE_CURRENT_LIST_DIR}/FindCygwin.cmake)
find_program(SELF_PACKER_FOR_EXECUTABLE
upx
diff --git a/Modules/FindSquish.cmake b/Modules/FindSquish.cmake
index a032496..b797805 100644
--- a/Modules/FindSquish.cmake
+++ b/Modules/FindSquish.cmake
@@ -1,9 +1,13 @@
#
# ---- Find Squish
-# This module can be used to find Squish (currently support is aimed at version 3).
+# This module can be used to find Squish. Currently Squish versions 3 and 4 are supported.
#
# ---- Variables and Macros
# SQUISH_FOUND If false, don't try to use Squish
+# SQUISH_VERSION The full version of Squish found
+# SQUISH_VERSION_MAJOR The major version of Squish found
+# SQUISH_VERSION_MINOR The minor version of Squish found
+# SQUISH_VERSION_PATCH The patch version of Squish found
#
# SQUISH_INSTALL_DIR The Squish installation directory (containing bin, lib, etc)
# SQUISH_SERVER_EXECUTABLE The squishserver executable
@@ -13,18 +17,52 @@
# SQUISH_SERVER_EXECUTABLE_FOUND Was the server executable found?
# SQUISH_CLIENT_EXECUTABLE_FOUND Was the client executable found?
#
-# macro SQUISH_ADD_TEST(testName applicationUnderTest testSuite testCase)
+# It provides the function squish_v4_add_test() for adding a squish test to cmake using Squish 4.x:
+#
+# squish_v4_add_test(cmakeTestName AUT targetName SUITE suiteName TEST squishTestName
+# [SETTINGSGROUP group] [PRE_COMMAND command] [POST_COMMAND command] )
+#
+# The arguments have the following meaning:
+# cmakeTestName: this will be used as the first argument for add_test()
+# AUT targetName: the name of the cmake target which will be used as AUT, i.e. the
+# executable which will be tested.
+# SUITE suiteName: this is either the full path to the squish suite, or just the
+# last directory of the suite, i.e. the suite name. In this case
+# the CMakeLists.txt which calls squish_add_test() must be located
+# in the parent directory of the suite directory.
+# TEST squishTestName: the name of the squish test, i.e. the name of the subdirectory
+# of the test inside the suite directory.
+# SETTINGSGROUP group: if specified, the given settings group will be used for executing the test.
+# If not specified, the groupname will be "CTest_<username>"
+# PRE_COMMAND command: if specified, the given command will be executed before starting the squish test.
+# POST_COMMAND command: same as PRE_COMMAND, but after the squish test has been executed.
+#
+# ---- Typical Use
+# enable_testing()
+# find_package(Squish 4.0)
+# if (SQUISH_FOUND)
+# squish_v4_add_test(myTestName AUT myApp SUITE ${CMAKE_SOURCE_DIR}/tests/mySuite TEST someSquishTest SETTINGSGROUP myGroup )
+# endif ()
+#
+#
+# For users of Squish version 3.x the macro squish_v3_add_test() is provided:
+# squish_v3_add_test(testName applicationUnderTest testCase envVars testWrapper)
+# Use this macro to add a test using Squish 3.x.
#
# ---- Typical Use
# enable_testing()
# find_package(Squish)
# if (SQUISH_FOUND)
-# SQUISH_ADD_TEST(myTestName myApplication testSuiteName testCaseName)
+# squish_v3_add_test(myTestName myApplication testCase envVars testWrapper)
# endif ()
#
+# macro SQUISH_ADD_TEST(testName applicationUnderTest testCase envVars testWrapper)
+# This is deprecated. Use SQUISH_V3_ADD_TEST() if you are using Squish 3.x instead.
+
#=============================================================================
# Copyright 2008-2009 Kitware, Inc.
+# Copyright 2012 Alexander Neundorf
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
@@ -36,6 +74,9 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
+
+include(CMakeParseArguments)
+
set(SQUISH_INSTALL_DIR_STRING "Directory containing the bin, doc, and lib directories for Squish; this should be the root of the installation directory.")
set(SQUISH_SERVER_EXECUTABLE_STRING "The squishserver executable program.")
set(SQUISH_CLIENT_EXECUTABLE_STRING "The squishclient executable program.")
@@ -74,21 +115,36 @@ if(SQUISH_INSTALL_DIR)
# find the client program
if(NOT SQUISH_CLIENT_EXECUTABLE)
- find_program(SQUISH_CLIENT_EXECUTABLE ${SQUISH_INSTALL_DIR}/bin/squishrunner DOC "The ${SQUISH_CLIENT_EXECUTABLE_STRING}")
+ find_program(SQUISH_CLIENT_EXECUTABLE ${SQUISH_INSTALL_DIR}/bin/squishrunner${CMAKE_EXECUTABLE_SUFFIX} DOC "The ${SQUISH_CLIENT_EXECUTABLE_STRING}")
endif()
# find the server program
if(NOT SQUISH_SERVER_EXECUTABLE)
- find_program(SQUISH_SERVER_EXECUTABLE ${SQUISH_INSTALL_DIR}/bin/squishserver DOC "The ${SQUISH_SERVER_EXECUTABLE_STRING}")
+ find_program(SQUISH_SERVER_EXECUTABLE ${SQUISH_INSTALL_DIR}/bin/squishserver${CMAKE_EXECUTABLE_SUFFIX} DOC "The ${SQUISH_SERVER_EXECUTABLE_STRING}")
endif()
else()
set(SQUISH_INSTALL_DIR_FOUND 0)
endif()
+
+set(SQUISH_VERSION)
+set(SQUISH_VERSION_MAJOR )
+set(SQUISH_VERSION_MINOR )
+set(SQUISH_VERSION_PATCH )
+
# record if executables are set
if(SQUISH_CLIENT_EXECUTABLE)
set(SQUISH_CLIENT_EXECUTABLE_FOUND 1)
+ execute_process(COMMAND "${SQUISH_CLIENT_EXECUTABLE}" --version
+ OUTPUT_VARIABLE _squishVersionOutput
+ ERROR_QUIET )
+ if("${_squishVersionOutput}" MATCHES "([0-9]+)\\.([0-9]+)\\.([0-9]+).*$")
+ set(SQUISH_VERSION_MAJOR "${CMAKE_MATCH_1}")
+ set(SQUISH_VERSION_MINOR "${CMAKE_MATCH_2}")
+ set(SQUISH_VERSION_PATCH "${CMAKE_MATCH_3}")
+ set(SQUISH_VERSION "${SQUISH_VERSION_MAJOR}.${SQUISH_VERSION_MINOR}.${SQUISH_VERSION_PATCH}" )
+ endif()
else()
set(SQUISH_CLIENT_EXECUTABLE_FOUND 0)
endif()
@@ -100,16 +156,21 @@ else()
endif()
# record if Squish was found
-set(SQUISH_FOUND 1)
-foreach(var SQUISH_INSTALL_DIR_FOUND SQUISH_CLIENT_EXECUTABLE_FOUND SQUISH_SERVER_EXECUTABLE_FOUND)
- if(NOT ${var})
- set(SQUISH_FOUND 0)
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(Squish REQUIRED_VARS SQUISH_INSTALL_DIR SQUISH_CLIENT_EXECUTABLE SQUISH_SERVER_EXECUTABLE
+ VERSION_VAR SQUISH_VERSION )
+
+
+set(_SQUISH_MODULE_DIR "${CMAKE_CURRENT_LIST_DIR}")
+
+macro(SQUISH_V3_ADD_TEST testName testAUT testCase envVars testWraper)
+ if("${SQUISH_VERSION_MAJOR}" STREQUAL "4")
+ message(STATUS "Using squish_v3_add_test(), but SQUISH_VERSION_MAJOR is ${SQUISH_VERSION_MAJOR}.\nThis may not work.")
endif()
-endforeach()
-macro(SQUISH_ADD_TEST testName testAUT testCase envVars testWraper)
add_test(${testName}
${CMAKE_COMMAND} -V -VV
+ "-Dsquish_version:STRING=3"
"-Dsquish_aut:STRING=${testAUT}"
"-Dsquish_server_executable:STRING=${SQUISH_SERVER_EXECUTABLE}"
"-Dsquish_client_executable:STRING=${SQUISH_CLIENT_EXECUTABLE}"
@@ -117,10 +178,84 @@ macro(SQUISH_ADD_TEST testName testAUT testCase envVars testWraper)
"-Dsquish_test_case:STRING=${testCase}"
"-Dsquish_env_vars:STRING=${envVars}"
"-Dsquish_wrapper:STRING=${testWraper}"
- -P "${CMAKE_ROOT}/Modules/SquishTestScript.cmake"
+ "-Dsquish_module_dir:STRING=${_SQUISH_MODULE_DIR}"
+ -P "${_SQUISH_MODULE_DIR}/SquishTestScript.cmake"
)
set_tests_properties(${testName}
PROPERTIES FAIL_REGULAR_EXPRESSION "FAILED;ERROR;FATAL"
)
endmacro()
+
+macro(SQUISH_ADD_TEST)
+ message(STATUS "Using squish_add_test() is deprecated, use squish_v3_add_test() instead.")
+ squish_v3_add_test(${ARGV})
+endmacro()
+
+
+function(SQUISH_V4_ADD_TEST testName)
+
+ if(NOT "${SQUISH_VERSION_MAJOR}" STREQUAL "4")
+ message(STATUS "Using squish_v4_add_test(), but SQUISH_VERSION_MAJOR is ${SQUISH_VERSION_MAJOR}.\nThis may not work.")
+ endif()
+
+ set(oneValueArgs AUT SUITE TEST SETTINGSGROUP PRE_COMMAND POST_COMMAND)
+
+ cmake_parse_arguments(_SQUISH "" "${oneValueArgs}" "" ${ARGN} )
+
+ if(_SQUISH_UNPARSED_ARGUMENTS)
+ message(FATAL_ERROR "Unknown keywords given to SQUISH_ADD_TEST(): \"${_SQUISH_UNPARSED_ARGUMENTS}\"")
+ endif()
+
+ if(NOT _SQUISH_AUT)
+ message(FATAL_ERROR "Required argument AUT not given for SQUISH_ADD_TEST()")
+ endif()
+
+ if(NOT _SQUISH_SUITE)
+ message(FATAL_ERROR "Required argument SUITE not given for SQUISH_ADD_TEST()")
+ endif()
+
+ if(NOT _SQUISH_TEST)
+ message(FATAL_ERROR "Required argument TEST not given for SQUISH_ADD_TEST()")
+ endif()
+
+ get_target_property(testAUTLocation ${_SQUISH_AUT} LOCATION)
+ get_filename_component(testAUTDir ${testAUTLocation} PATH)
+ get_filename_component(testAUTName ${testAUTLocation} NAME)
+
+ get_filename_component(absTestSuite "${_SQUISH_SUITE}" ABSOLUTE)
+ if(NOT EXISTS "${absTestSuite}")
+ message(FATAL_ERROR "Could not find squish test suite ${_SQUISH_SUITE} (checked ${absTestSuite})")
+ endif()
+
+ set(absTestCase "${absTestSuite}/${_SQUISH_TEST}")
+ if(NOT EXISTS "${absTestCase}")
+ message(FATAL_ERROR "Could not find squish testcase ${_SQUISH_TEST} (checked ${absTestCase})")
+ endif()
+
+ if(NOT _SQUISH_SETTINGSGROUP)
+ set(_SQUISH_SETTINGSGROUP "CTest_$ENV{LOGNAME}")
+ endif()
+
+ add_test(${testName}
+ ${CMAKE_COMMAND} -V -VV
+ "-Dsquish_version:STRING=4"
+ "-Dsquish_aut:STRING=${testAUTName}"
+ "-Dsquish_aut_dir:STRING=${testAUTDir}"
+ "-Dsquish_server_executable:STRING=${SQUISH_SERVER_EXECUTABLE}"
+ "-Dsquish_client_executable:STRING=${SQUISH_CLIENT_EXECUTABLE}"
+ "-Dsquish_libqtdir:STRING=${QT_LIBRARY_DIR}"
+ "-Dsquish_test_suite:STRING=${absTestSuite}"
+ "-Dsquish_test_case:STRING=${_SQUISH_TEST}"
+ "-Dsquish_env_vars:STRING=${envVars}"
+ "-Dsquish_wrapper:STRING=${testWraper}"
+ "-Dsquish_module_dir:STRING=${_SQUISH_MODULE_DIR}"
+ "-Dsquish_settingsgroup:STRING=${_SQUISH_SETTINGSGROUP}"
+ "-Dsquish_pre_command:STRING=${_SQUISH_PRE_COMMAND}"
+ "-Dsquish_post_command:STRING=${_SQUISH_POST_COMMAND}"
+ -P "${_SQUISH_MODULE_DIR}/SquishTestScript.cmake"
+ )
+ set_tests_properties(${testName}
+ PROPERTIES FAIL_REGULAR_EXPRESSION "FAIL;FAILED;ERROR;FATAL"
+ )
+endfunction()
diff --git a/Modules/FindTCL.cmake b/Modules/FindTCL.cmake
index 0d20da5..f649ddc 100644
--- a/Modules/FindTCL.cmake
+++ b/Modules/FindTCL.cmake
@@ -44,9 +44,9 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-include(CMakeFindFrameworks)
-include(FindTclsh)
-include(FindWish)
+include(${CMAKE_CURRENT_LIST_DIR}/CMakeFindFrameworks.cmake)
+include(${CMAKE_CURRENT_LIST_DIR}/FindTclsh.cmake)
+include(${CMAKE_CURRENT_LIST_DIR}/FindWish.cmake)
if(TCLSH_VERSION_STRING)
set(TCL_TCLSH_VERSION "${TCLSH_VERSION_STRING}")
@@ -82,6 +82,10 @@ set(TCLTK_POSSIBLE_LIB_PATHS
"${TK_LIBRARY_PATH}"
"${TCL_TCLSH_PATH_PARENT}/lib"
"${TK_WISH_PATH_PARENT}/lib"
+ /usr/local/lib/tcl/tcl8.5
+ /usr/local/lib/tcl/tk8.5
+ /usr/local/lib/tcl/tcl8.4
+ /usr/local/lib/tcl/tk8.4
)
if(WIN32)
@@ -168,6 +172,10 @@ set(TCLTK_POSSIBLE_INCLUDE_PATHS
/usr/include/tcl8.3
/usr/include/tcl8.2
/usr/include/tcl8.0
+ /usr/local/include/tcl8.5
+ /usr/local/include/tk8.5
+ /usr/local/include/tcl8.4
+ /usr/local/include/tk8.4
)
if(WIN32)
diff --git a/Modules/FindTclStub.cmake b/Modules/FindTclStub.cmake
index e66f7bc..8dda94a 100644
--- a/Modules/FindTclStub.cmake
+++ b/Modules/FindTclStub.cmake
@@ -34,7 +34,7 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-include(FindTCL)
+include(${CMAKE_CURRENT_LIST_DIR}/FindTCL.cmake)
get_filename_component(TCL_TCLSH_PATH "${TCL_TCLSH}" PATH)
get_filename_component(TCL_TCLSH_PATH_PARENT "${TCL_TCLSH_PATH}" PATH)
diff --git a/Modules/FindUnixCommands.cmake b/Modules/FindUnixCommands.cmake
index a69e3f1..87caadc 100644
--- a/Modules/FindUnixCommands.cmake
+++ b/Modules/FindUnixCommands.cmake
@@ -15,7 +15,7 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-include(FindCygwin)
+include(${CMAKE_CURRENT_LIST_DIR}/FindCygwin.cmake)
find_program(BASH
bash
diff --git a/Modules/FindVTK.cmake b/Modules/FindVTK.cmake
index fa090ff..0dede2d 100644
--- a/Modules/FindVTK.cmake
+++ b/Modules/FindVTK.cmake
@@ -62,7 +62,7 @@ set(VTK_DIR_MESSAGE "VTK not found. Set the VTK_DIR cmake cache entry to the ${
if(_VTK_40_ALLOW AND VTK_DIR)
if(EXISTS ${VTK_DIR}/UseVTK.cmake AND NOT EXISTS ${VTK_DIR}/VTKConfig.cmake)
set(VTK_FOUND 1)
- include(UseVTKConfig40) # No VTKConfig; load VTK 4.0 settings.
+ include(${CMAKE_CURRENT_LIST_DIR}/UseVTKConfig40.cmake) # No VTKConfig; load VTK 4.0 settings.
endif()
endif()
@@ -117,7 +117,7 @@ if(_VTK_40_ALLOW AND NOT VTK_DIR)
if(VTK_DIR)
if(EXISTS ${VTK_DIR}/UseVTK.cmake AND NOT EXISTS ${VTK_DIR}/VTKConfig.cmake)
set(VTK_FOUND 1)
- include(UseVTKConfig40) # No VTKConfig; load VTK 4.0 settings.
+ include(${CMAKE_CURRENT_LIST_DIR}/UseVTKConfig40.cmake) # No VTKConfig; load VTK 4.0 settings.
else()
# We found the wrong version. Pretend we did not find it.
set(VTK_DIR "VTK_DIR-NOTFOUND" CACHE PATH "The ${VTK_DIR_DESCRIPTION}" FORCE)
diff --git a/Modules/FindWget.cmake b/Modules/FindWget.cmake
index a1dd47f..4da98b1 100644
--- a/Modules/FindWget.cmake
+++ b/Modules/FindWget.cmake
@@ -17,7 +17,7 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-include(FindCygwin)
+include(${CMAKE_CURRENT_LIST_DIR}/FindCygwin.cmake)
find_program(WGET_EXECUTABLE
wget
diff --git a/Modules/FindX11.cmake b/Modules/FindX11.cmake
index e12dc0a..3cd3cef 100644
--- a/Modules/FindX11.cmake
+++ b/Modules/FindX11.cmake
@@ -336,8 +336,8 @@ if (UNIX)
endif ()
if(X11_FOUND)
- include(CheckFunctionExists)
- include(CheckLibraryExists)
+ include(${CMAKE_CURRENT_LIST_DIR}/CheckFunctionExists.cmake)
+ include(${CMAKE_CURRENT_LIST_DIR}/CheckLibraryExists.cmake)
# Translated from an autoconf-generated configure script.
# See libs.m4 in autoconf's m4 directory.
@@ -417,7 +417,7 @@ if (UNIX)
# Build the final list of libraries.
set(X11_LIBRARIES ${X11_X_PRE_LIBS} ${X11_LIBRARIES} ${X11_X_EXTRA_LIBS})
- include(FindPackageMessage)
+ include(${CMAKE_CURRENT_LIST_DIR}/FindPackageMessage.cmake)
FIND_PACKAGE_MESSAGE(X11 "Found X11: ${X11_X11_LIB}"
"[${X11_X11_LIB}][${X11_INCLUDE_DIR}]")
else ()
diff --git a/Modules/Findosg.cmake b/Modules/Findosg.cmake
index fb7421e..bc1e48a 100644
--- a/Modules/Findosg.cmake
+++ b/Modules/Findosg.cmake
@@ -46,7 +46,7 @@
# #include <osg/PositionAttitudeTransform>
# #include <osgUtil/SceneView>
-include(Findosg_functions)
+include(${CMAKE_CURRENT_LIST_DIR}/Findosg_functions.cmake)
OSG_FIND_PATH (OSG osg/PositionAttitudeTransform)
OSG_FIND_LIBRARY(OSG osg)
diff --git a/Modules/FindosgAnimation.cmake b/Modules/FindosgAnimation.cmake
index 1c8eb50..121aefc 100644
--- a/Modules/FindosgAnimation.cmake
+++ b/Modules/FindosgAnimation.cmake
@@ -42,7 +42,7 @@
# #include <osg/PositionAttitudeTransform>
# #include <osgAnimation/Animation>
-include(Findosg_functions)
+include(${CMAKE_CURRENT_LIST_DIR}/Findosg_functions.cmake)
OSG_FIND_PATH (OSGANIMATION osgAnimation/Animation)
OSG_FIND_LIBRARY(OSGANIMATION osgAnimation)
diff --git a/Modules/FindosgDB.cmake b/Modules/FindosgDB.cmake
index 76272aa..1ed94a1 100644
--- a/Modules/FindosgDB.cmake
+++ b/Modules/FindosgDB.cmake
@@ -42,7 +42,7 @@
# #include <osg/PositionAttitudeTransform>
# #include <osgDB/DatabasePager>
-include(Findosg_functions)
+include(${CMAKE_CURRENT_LIST_DIR}/Findosg_functions.cmake)
OSG_FIND_PATH (OSGDB osgDB/DatabasePager)
OSG_FIND_LIBRARY(OSGDB osgDB)
diff --git a/Modules/FindosgFX.cmake b/Modules/FindosgFX.cmake
index 3314750..1f1d59f 100644
--- a/Modules/FindosgFX.cmake
+++ b/Modules/FindosgFX.cmake
@@ -42,7 +42,7 @@
# #include <osg/PositionAttitudeTransform>
# #include <osgFX/BumpMapping>
-include(Findosg_functions)
+include(${CMAKE_CURRENT_LIST_DIR}/Findosg_functions.cmake)
OSG_FIND_PATH (OSGFX osgFX/BumpMapping)
OSG_FIND_LIBRARY(OSGFX osgFX)
diff --git a/Modules/FindosgGA.cmake b/Modules/FindosgGA.cmake
index fd9317d..e60f7f5 100644
--- a/Modules/FindosgGA.cmake
+++ b/Modules/FindosgGA.cmake
@@ -42,7 +42,7 @@
# #include <osg/PositionAttitudeTransform>
# #include <osgGA/FlightManipulator>
-include(Findosg_functions)
+include(${CMAKE_CURRENT_LIST_DIR}/Findosg_functions.cmake)
OSG_FIND_PATH (OSGGA osgGA/FlightManipulator)
OSG_FIND_LIBRARY(OSGGA osgGA)
diff --git a/Modules/FindosgIntrospection.cmake b/Modules/FindosgIntrospection.cmake
index 2394c05..a430ad6 100644
--- a/Modules/FindosgIntrospection.cmake
+++ b/Modules/FindosgIntrospection.cmake
@@ -42,7 +42,7 @@
# #include <osg/PositionAttitudeTransform>
# #include <osgIntrospection/Reflection>
-include(Findosg_functions)
+include(${CMAKE_CURRENT_LIST_DIR}/Findosg_functions.cmake)
OSG_FIND_PATH (OSGINTROSPECTION osgIntrospection/Reflection)
OSG_FIND_LIBRARY(OSGINTROSPECTION osgIntrospection)
diff --git a/Modules/FindosgManipulator.cmake b/Modules/FindosgManipulator.cmake
index 9e58570..32d6def 100644
--- a/Modules/FindosgManipulator.cmake
+++ b/Modules/FindosgManipulator.cmake
@@ -42,7 +42,7 @@
# #include <osg/PositionAttitudeTransform>
# #include <osgManipulator/TrackballDragger>
-include(Findosg_functions)
+include(${CMAKE_CURRENT_LIST_DIR}/Findosg_functions.cmake)
OSG_FIND_PATH (OSGMANIPULATOR osgManipulator/TrackballDragger)
OSG_FIND_LIBRARY(OSGMANIPULATOR osgManipulator)
diff --git a/Modules/FindosgParticle.cmake b/Modules/FindosgParticle.cmake
index 2f93389..1a6ae0b 100644
--- a/Modules/FindosgParticle.cmake
+++ b/Modules/FindosgParticle.cmake
@@ -42,7 +42,7 @@
# #include <osg/PositionAttitudeTransform>
# #include <osgParticle/FireEffect>
-include(Findosg_functions)
+include(${CMAKE_CURRENT_LIST_DIR}/Findosg_functions.cmake)
OSG_FIND_PATH (OSGPARTICLE osgParticle/FireEffect)
OSG_FIND_LIBRARY(OSGPARTICLE osgParticle)
diff --git a/Modules/FindosgPresentation.cmake b/Modules/FindosgPresentation.cmake
index f89e25f..412502a 100644
--- a/Modules/FindosgPresentation.cmake
+++ b/Modules/FindosgPresentation.cmake
@@ -43,7 +43,7 @@
# #include <osg/PositionAttitudeTransform>
# #include <osgPresentation/SlideEventHandler>
-include(Findosg_functions)
+include(${CMAKE_CURRENT_LIST_DIR}/Findosg_functions.cmake)
OSG_FIND_PATH (OSGPRESENTATION osgPresentation/SlideEventHandler)
OSG_FIND_LIBRARY(OSGPRESENTATION osgPresentation)
diff --git a/Modules/FindosgProducer.cmake b/Modules/FindosgProducer.cmake
index 2c3800b..ea561a0 100644
--- a/Modules/FindosgProducer.cmake
+++ b/Modules/FindosgProducer.cmake
@@ -42,7 +42,7 @@
# #include <osg/PositionAttitudeTransform>
# #include <osgProducer/OsgSceneHandler>
-include(Findosg_functions)
+include(${CMAKE_CURRENT_LIST_DIR}/Findosg_functions.cmake)
OSG_FIND_PATH (OSGPRODUCER osgProducer/OsgSceneHandler)
OSG_FIND_LIBRARY(OSGPRODUCER osgProducer)
diff --git a/Modules/FindosgQt.cmake b/Modules/FindosgQt.cmake
index ddc9128..c7e8fee 100644
--- a/Modules/FindosgQt.cmake
+++ b/Modules/FindosgQt.cmake
@@ -43,7 +43,7 @@
# #include <osg/PositionAttitudeTransform>
# #include <osgQt/GraphicsWindowQt>
-include(Findosg_functions)
+include(${CMAKE_CURRENT_LIST_DIR}/Findosg_functions.cmake)
OSG_FIND_PATH (OSGQT osgQt/GraphicsWindowQt)
OSG_FIND_LIBRARY(OSGQT osgQt)
diff --git a/Modules/FindosgShadow.cmake b/Modules/FindosgShadow.cmake
index ca87b56..f3be0bf 100644
--- a/Modules/FindosgShadow.cmake
+++ b/Modules/FindosgShadow.cmake
@@ -42,7 +42,7 @@
# #include <osg/PositionAttitudeTransform>
# #include <osgShadow/ShadowTexture>
-include(Findosg_functions)
+include(${CMAKE_CURRENT_LIST_DIR}/Findosg_functions.cmake)
OSG_FIND_PATH (OSGSHADOW osgShadow/ShadowTexture)
OSG_FIND_LIBRARY(OSGSHADOW osgShadow)
diff --git a/Modules/FindosgSim.cmake b/Modules/FindosgSim.cmake
index 2fc5105..19cd175 100644
--- a/Modules/FindosgSim.cmake
+++ b/Modules/FindosgSim.cmake
@@ -42,7 +42,7 @@
# #include <osg/PositionAttitudeTransform>
# #include <osgSim/ImpostorSprite>
-include(Findosg_functions)
+include(${CMAKE_CURRENT_LIST_DIR}/Findosg_functions.cmake)
OSG_FIND_PATH (OSGSIM osgSim/ImpostorSprite)
OSG_FIND_LIBRARY(OSGSIM osgSim)
diff --git a/Modules/FindosgTerrain.cmake b/Modules/FindosgTerrain.cmake
index eafd8fb..4b7249e 100644
--- a/Modules/FindosgTerrain.cmake
+++ b/Modules/FindosgTerrain.cmake
@@ -42,7 +42,7 @@
# #include <osg/PositionAttitudeTransform>
# #include <osgTerrain/Terrain>
-include(Findosg_functions)
+include(${CMAKE_CURRENT_LIST_DIR}/Findosg_functions.cmake)
OSG_FIND_PATH (OSGTERRAIN osgTerrain/Terrain)
OSG_FIND_LIBRARY(OSGTERRAIN osgTerrain)
diff --git a/Modules/FindosgText.cmake b/Modules/FindosgText.cmake
index 57655b1..41683c7 100644
--- a/Modules/FindosgText.cmake
+++ b/Modules/FindosgText.cmake
@@ -42,7 +42,7 @@
# #include <osg/PositionAttitudeTransform>
# #include <osgText/Text>
-include(Findosg_functions)
+include(${CMAKE_CURRENT_LIST_DIR}/Findosg_functions.cmake)
OSG_FIND_PATH (OSGTEXT osgText/Text)
OSG_FIND_LIBRARY(OSGTEXT osgText)
diff --git a/Modules/FindosgUtil.cmake b/Modules/FindosgUtil.cmake
index eeabc34..85c1177 100644
--- a/Modules/FindosgUtil.cmake
+++ b/Modules/FindosgUtil.cmake
@@ -42,7 +42,7 @@
# #include <osg/PositionAttitudeTransform>
# #include <osgUtil/SceneView>
-include(Findosg_functions)
+include(${CMAKE_CURRENT_LIST_DIR}/Findosg_functions.cmake)
OSG_FIND_PATH (OSGUTIL osgUtil/SceneView)
OSG_FIND_LIBRARY(OSGUTIL osgUtil)
diff --git a/Modules/FindosgViewer.cmake b/Modules/FindosgViewer.cmake
index 2afd761..d2252f4 100644
--- a/Modules/FindosgViewer.cmake
+++ b/Modules/FindosgViewer.cmake
@@ -42,7 +42,7 @@
# #include <osg/PositionAttitudeTransform>
# #include <osgViewer/Viewer>
-include(Findosg_functions)
+include(${CMAKE_CURRENT_LIST_DIR}/Findosg_functions.cmake)
OSG_FIND_PATH (OSGVIEWER osgViewer/Viewer)
OSG_FIND_LIBRARY(OSGVIEWER osgViewer)
diff --git a/Modules/FindosgVolume.cmake b/Modules/FindosgVolume.cmake
index 1fa6764..ae2d95c 100644
--- a/Modules/FindosgVolume.cmake
+++ b/Modules/FindosgVolume.cmake
@@ -42,7 +42,7 @@
# #include <osg/PositionAttitudeTransform>
# #include <osgVolume/Volume>
-include(Findosg_functions)
+include(${CMAKE_CURRENT_LIST_DIR}/Findosg_functions.cmake)
OSG_FIND_PATH (OSGVOLUME osgVolume/Volume)
OSG_FIND_LIBRARY(OSGVOLUME osgVolume)
diff --git a/Modules/FindosgWidget.cmake b/Modules/FindosgWidget.cmake
index 1a51e60..cb2e12f 100644
--- a/Modules/FindosgWidget.cmake
+++ b/Modules/FindosgWidget.cmake
@@ -42,7 +42,7 @@
# #include <osg/PositionAttitudeTransform>
# #include <osgWidget/Widget>
-include(Findosg_functions)
+include(${CMAKE_CURRENT_LIST_DIR}/Findosg_functions.cmake)
OSG_FIND_PATH (OSGWIDGET osgWidget/Widget)
OSG_FIND_LIBRARY(OSGWIDGET osgWidget)
diff --git a/Modules/FindwxWindows.cmake b/Modules/FindwxWindows.cmake
index 5030bcc..4179f7b 100644
--- a/Modules/FindwxWindows.cmake
+++ b/Modules/FindwxWindows.cmake
@@ -26,7 +26,7 @@
# HAVE_ISYSTEM - true required to replace -I by -isystem on g++
#
# For convenience include Use_wxWindows.cmake in your project's
-# CMakeLists.txt using include(Use_wxWindows).
+# CMakeLists.txt using include(${CMAKE_CURRENT_LIST_DIR}/Use_wxWindows.cmake).
#
# USAGE
# set(WXWINDOWS_USE_GL 1)
diff --git a/Modules/GenerateExportHeader.cmake b/Modules/GenerateExportHeader.cmake
index ce23d5d..892ebc6 100644
--- a/Modules/GenerateExportHeader.cmake
+++ b/Modules/GenerateExportHeader.cmake
@@ -47,7 +47,7 @@
# ...
# };
#
-# The CMake fragment will generate a file in the ${CMAKE_CURRENT_BUILD_DIR}
+# The CMake fragment will generate a file in the ${CMAKE_CURRENT_BINARY_DIR}
# called somelib_export.h containing the macros SOMELIB_EXPORT, SOMELIB_NO_EXPORT,
# SOMELIB_DEPRECATED, SOMELIB_DEPRECATED_EXPORT and SOMELIB_DEPRECATED_NO_EXPORT.
# The resulting file should be installed with other headers in the library.
@@ -156,16 +156,12 @@ macro(_test_compiler_hidden_visibility)
if(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.2")
set(GCC_TOO_OLD TRUE)
- message(WARNING "GCC version older than 4.2")
elseif(CMAKE_COMPILER_IS_GNUC AND CMAKE_C_COMPILER_VERSION VERSION_LESS "4.2")
set(GCC_TOO_OLD TRUE)
- message(WARNING "GCC version older than 4.2")
elseif(CMAKE_CXX_COMPILER_ID MATCHES Intel AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS "12.0")
set(_INTEL_TOO_OLD TRUE)
- message(WARNING "Intel compiler older than 12.0")
endif()
-
# Exclude XL here because it misinterprets -fvisibility=hidden even though
# the check_cxx_compiler_flag passes
# http://www.cdash.org/CDash/testDetails.php?test=109109951&build=1419259
diff --git a/Modules/GetPrerequisites.cmake b/Modules/GetPrerequisites.cmake
index 8f2754e..18f449d 100644
--- a/Modules/GetPrerequisites.cmake
+++ b/Modules/GetPrerequisites.cmake
@@ -5,6 +5,7 @@
#
# It uses various tools to obtain the list of required shared library files:
# dumpbin (Windows)
+# objdump (MinGW on Windows)
# ldd (Linux/Unix)
# otool (Mac OSX)
# The following functions are provided by this module:
@@ -567,6 +568,17 @@ function(get_prerequisites target prerequisites_var exclude_system recurse exepa
message("warning: target '${target}' does not exist...")
endif()
+ set(gp_cmd_paths ${gp_cmd_paths}
+ "C:/Program Files/Microsoft Visual Studio 9.0/VC/bin"
+ "C:/Program Files (x86)/Microsoft Visual Studio 9.0/VC/bin"
+ "C:/Program Files/Microsoft Visual Studio 8/VC/BIN"
+ "C:/Program Files (x86)/Microsoft Visual Studio 8/VC/BIN"
+ "C:/Program Files/Microsoft Visual Studio .NET 2003/VC7/BIN"
+ "C:/Program Files (x86)/Microsoft Visual Studio .NET 2003/VC7/BIN"
+ "/usr/local/bin"
+ "/usr/bin"
+ )
+
# <setup-gp_tool-vars>
#
# Try to choose the right tool by default. Caller can set gp_tool prior to
@@ -574,14 +586,28 @@ function(get_prerequisites target prerequisites_var exclude_system recurse exepa
#
if("${gp_tool}" STREQUAL "")
set(gp_tool "ldd")
+
if(APPLE)
set(gp_tool "otool")
endif()
+
if(WIN32 AND NOT UNIX) # This is how to check for cygwin, har!
- set(gp_tool "dumpbin")
+ find_program(gp_dumpbin "dumpbin" PATHS ${gp_cmd_paths})
+ if(gp_dumpbin)
+ set(gp_tool "dumpbin")
+ else() # Try harder. Maybe we're on MinGW
+ set(gp_tool "objdump")
+ endif()
endif()
endif()
+ find_program(gp_cmd ${gp_tool} PATHS ${gp_cmd_paths})
+
+ if(NOT gp_cmd)
+ message(STATUS "warning: could not find '${gp_tool}' - cannot analyze prerequisites...")
+ return()
+ endif()
+
set(gp_tool_known 0)
if("${gp_tool}" STREQUAL "ldd")
@@ -612,30 +638,22 @@ function(get_prerequisites target prerequisites_var exclude_system recurse exepa
set(ENV{VS_UNICODE_OUTPUT} "") # Block extra output from inside VS IDE.
endif()
+ if("${gp_tool}" STREQUAL "objdump")
+ set(gp_cmd_args "-p")
+ set(gp_regex "^\t*DLL Name: (.*\\.[Dd][Ll][Ll])${eol_char}$")
+ set(gp_regex_error "")
+ set(gp_regex_fallback "")
+ set(gp_regex_cmp_count 1)
+ set(gp_tool_known 1)
+ endif()
+
if(NOT gp_tool_known)
message(STATUS "warning: gp_tool='${gp_tool}' is an unknown tool...")
message(STATUS "CMake function get_prerequisites needs more code to handle '${gp_tool}'")
- message(STATUS "Valid gp_tool values are dumpbin, ldd and otool.")
+ message(STATUS "Valid gp_tool values are dumpbin, ldd, objdump and otool.")
return()
endif()
- set(gp_cmd_paths ${gp_cmd_paths}
- "C:/Program Files/Microsoft Visual Studio 9.0/VC/bin"
- "C:/Program Files (x86)/Microsoft Visual Studio 9.0/VC/bin"
- "C:/Program Files/Microsoft Visual Studio 8/VC/BIN"
- "C:/Program Files (x86)/Microsoft Visual Studio 8/VC/BIN"
- "C:/Program Files/Microsoft Visual Studio .NET 2003/VC7/BIN"
- "C:/Program Files (x86)/Microsoft Visual Studio .NET 2003/VC7/BIN"
- "/usr/local/bin"
- "/usr/bin"
- )
-
- find_program(gp_cmd ${gp_tool} PATHS ${gp_cmd_paths})
-
- if(NOT gp_cmd)
- message(STATUS "warning: could not find '${gp_tool}' - cannot analyze prerequisites...")
- return()
- endif()
if("${gp_tool}" STREQUAL "dumpbin")
# When running dumpbin, it also needs the "Common7/IDE" directory in the
diff --git a/Modules/InstallRequiredSystemLibraries.cmake b/Modules/InstallRequiredSystemLibraries.cmake
index bd97501..2479d68 100644
--- a/Modules/InstallRequiredSystemLibraries.cmake
+++ b/Modules/InstallRequiredSystemLibraries.cmake
@@ -182,6 +182,10 @@ if(MSVC)
MSVCRT_FILES_FOR_VERSION(11)
endif()
+ if(MSVC12)
+ MSVCRT_FILES_FOR_VERSION(12)
+ endif()
+
if(CMAKE_INSTALL_MFC_LIBRARIES)
if(MSVC70)
set(__install__libs ${__install__libs}
@@ -330,6 +334,10 @@ if(MSVC)
if(MSVC11)
MFC_FILES_FOR_VERSION(11)
endif()
+
+ if(MSVC12)
+ MFC_FILES_FOR_VERSION(12)
+ endif()
endif()
foreach(lib
diff --git a/Modules/NSIS.template.in b/Modules/NSIS.template.in
index ffc425e..59a444b 100644
--- a/Modules/NSIS.template.in
+++ b/Modules/NSIS.template.in
@@ -37,6 +37,9 @@
;Set compression
SetCompressor @CPACK_NSIS_COMPRESSOR@
+ ;Require administrator access
+ RequestExecutionLevel admin
+
@CPACK_NSIS_DEFINES@
!include Sections.nsh
@@ -119,7 +122,7 @@ Var AR_RegFlags
"exit_${SecName}:"
!macroend
-!macro RemoveSection SecName
+!macro RemoveSection_CPack SecName
; This macro is used to call section's Remove_... macro
;from the uninstaller.
;Input: section index constant name specified in Section command.
@@ -841,7 +844,7 @@ Section "Uninstall"
DeleteRegKey SHCTX "Software\@CPACK_PACKAGE_VENDOR@\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@"
; Removes all optional components
- !insertmacro SectionList "RemoveSection"
+ !insertmacro SectionList "RemoveSection_CPack"
!insertmacro MUI_STARTMENU_GETFOLDER Application $MUI_TEMP
diff --git a/Modules/Platform/AIX-GNU.cmake b/Modules/Platform/AIX-GNU.cmake
index 81ba365..e5d9434 100644
--- a/Modules/Platform/AIX-GNU.cmake
+++ b/Modules/Platform/AIX-GNU.cmake
@@ -21,6 +21,7 @@ set(__AIX_COMPILER_GNU 1)
macro(__aix_compiler_gnu lang)
set(CMAKE_SHARED_LIBRARY_RUNTIME_${lang}_FLAG "-Wl,-blibpath:")
set(CMAKE_SHARED_LIBRARY_RUNTIME_${lang}_FLAG_SEP ":")
- set(CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS "${CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS} -Wl,-G,-brtl,-bnoipath")
+ set(CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS "${CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS} -Wl,-G,-bnoipath")
set(CMAKE_SHARE