From 355c9d4a87392da483da5721f9c9d2725425f956 Mon Sep 17 00:00:00 2001 From: Modestas Vainius Date: Sun, 3 Nov 2013 12:27:13 +0200 Subject: [PATCH] Imported Upstream version 2.8.12 --- CMakeCPack.cmake | 2 + CMakeCPackOptions.cmake.in | 2 +- CMakeLists.txt | 23 +- ChangeLog.manual | 575 +++++ Docs/CMakeLists.txt | 5 +- Docs/bash-completion/CMakeLists.txt | 2 +- Docs/bash-completion/cmake | 16 +- Docs/bash-completion/cpack | 10 +- Docs/bash-completion/ctest | 4 +- Modules/AutomocInfo.cmake.in | 5 +- Modules/CMakeBackwardCompatibilityC.cmake | 2 +- Modules/CMakeCCompilerId.c.in | 7 +- Modules/CMakeCXXCompilerId.cpp.in | 5 + Modules/CMakeCommonLanguageInclude.cmake | 22 + Modules/CMakeDetermineASMCompiler.cmake | 4 + Modules/CMakeDetermineCCompiler.cmake | 7 + Modules/CMakeDetermineCXXCompiler.cmake | 7 + Modules/CMakeDetermineCompiler.cmake | 13 + Modules/CMakeDetermineCompilerABI.cmake | 5 +- Modules/CMakeDetermineCompilerId.cmake | 52 +- Modules/CMakeDetermineRCCompiler.cmake | 10 +- Modules/CMakeDetermineVSServicePack.cmake | 47 +- Modules/CMakeFindPackageMode.cmake | 2 +- Modules/CMakeGraphVizOptions.cmake | 83 + Modules/CMakeMinGWFindMake.cmake | 4 +- Modules/CMakeParseArguments.cmake | 2 +- Modules/CMakeParseImplicitLinkInfo.cmake | 3 +- Modules/CMakePrintHelpers.cmake | 146 ++ Modules/CMakePushCheckState.cmake | 33 +- Modules/CMakeSystem.cmake.in | 10 +- Modules/CMakeTestFortranCompiler.cmake | 2 +- Modules/CMakeUnixFindMake.cmake | 10 + Modules/CPack.cmake | 4 +- Modules/CPackPackageMaker.cmake | 2 +- Modules/CPackRPM.cmake | 75 +- Modules/CPackWIX.cmake | 26 + Modules/CTest.cmake | 4 +- Modules/CheckCCompilerFlag.cmake | 20 +- Modules/CheckCXXCompilerFlag.cmake | 23 +- Modules/CheckFunctionExists.cmake | 2 +- Modules/CheckSizeOf.cmake | 2 +- Modules/Compiler/Clang-CXX.cmake | 2 + Modules/Compiler/Clang.cmake | 1 + Modules/Compiler/GNU-CXX.cmake | 10 + Modules/Compiler/GNU.cmake | 3 + Modules/Compiler/IAR-ASM.cmake | 14 + Modules/Compiler/IAR-C.cmake | 34 + Modules/Compiler/IAR-CXX.cmake | 34 + Modules/Compiler/IAR.cmake | 46 + Modules/Compiler/Intel-C.cmake | 4 + Modules/Compiler/Intel-CXX.cmake | 4 + Modules/CompilerId/VS-10.vcxproj.in | 15 +- Modules/CompilerId/VS-6.dsp.in | 6 +- Modules/CompilerId/VS-7.vcproj.in | 4 +- Modules/CompilerId/Xcode-1.pbxproj.in | 2 +- Modules/CompilerId/Xcode-2.pbxproj.in | 2 +- Modules/CompilerId/Xcode-3.pbxproj.in | 2 +- Modules/ExternalData.cmake | 2 +- Modules/ExternalProject.cmake | 20 +- Modules/FindBoost.cmake | 13 +- Modules/FindCUDA.cmake | 34 +- Modules/FindCUDA/make2cmake.cmake | 2 +- Modules/FindFLTK2.cmake | 2 +- Modules/FindFreetype.cmake | 17 +- Modules/FindGTK2.cmake | 202 +- Modules/FindHDF5.cmake | 38 +- Modules/FindITK.cmake | 4 +- Modules/FindImageMagick.cmake | 8 +- Modules/FindMPI.cmake | 2 +- Modules/FindOpenGL.cmake | 179 +- Modules/FindOpenSSL.cmake | 4 +- Modules/FindPNG.cmake | 38 +- Modules/FindProtobuf.cmake | 13 + Modules/FindQt4.cmake | 52 +- Modules/FindTCL.cmake | 2 + Modules/FindThreads.cmake | 2 +- Modules/FindVTK.cmake | 4 +- Modules/FindX11.cmake | 2 + Modules/FindXMLRPC.cmake | 4 +- Modules/FindwxWidgets.cmake | 8 +- Modules/FindwxWindows.cmake | 6 +- Modules/GenerateExportHeader.cmake | 14 +- Modules/GetPrerequisites.cmake | 1 - Modules/NSIS.template.in | 4 +- Modules/Platform/Darwin-Absoft-Fortran.cmake | 17 + Modules/Platform/Darwin-GNU-Fortran.cmake | 17 + Modules/Platform/Darwin-Intel-Fortran.cmake | 15 + Modules/Platform/Darwin-NAG-Fortran.cmake | 21 + Modules/Platform/Darwin.cmake | 50 +- Modules/Platform/Windows-Embarcadero.cmake | 7 +- Modules/Platform/Windows-Intel.cmake | 4 +- Modules/Platform/Windows-MSVC.cmake | 38 +- Modules/Platform/Windows-df.cmake | 2 - Modules/Platform/WindowsPaths.cmake | 6 +- Modules/Qt4Macros.cmake | 119 +- Modules/SelectLibraryConfigurations.cmake | 74 +- Modules/UseEcos.cmake | 4 +- Modules/UseJava.cmake | 112 +- Source/CMakeLists.txt | 28 +- Source/CMakeVersion.cmake | 4 +- Source/CPack/WiX/cmCPackWIXGenerator.cxx | 141 +- Source/CPack/WiX/cmCPackWIXGenerator.h | 6 +- Source/CPack/cmCPackDocumentVariables.cxx | 4 +- Source/CPack/cmCPackGenerator.cxx | 2 +- Source/CTest/cmCTestBatchTestHandler.cxx | 2 +- Source/CTest/cmCTestBuildCommand.cxx | 3 +- Source/CTest/cmCTestConfigureCommand.cxx | 26 - Source/CTest/cmCTestHandlerCommand.cxx | 27 +- Source/CTest/cmCTestMemCheckHandler.cxx | 122 +- Source/CTest/cmCTestMemCheckHandler.h | 15 +- Source/CTest/cmCTestRunTest.cxx | 22 +- Source/CTest/cmCTestSubmitHandler.cxx | 2 +- Source/CTest/cmCTestTestHandler.cxx | 14 +- Source/CTest/cmCTestTestHandler.h | 2 +- Source/CTest/cmParseGTMCoverage.cxx | 4 +- Source/CTest/cmProcess.cxx | 8 + Source/CursesDialog/CMakeLists.txt | 2 +- Source/CursesDialog/form/frm_driver.c | 6 +- Source/CursesDialog/form/fty_enum.c | 2 +- Source/CursesDialog/form/fty_ipv4.c | 2 +- Source/CursesDialog/form/fty_regex.c | 2 +- Source/QtDialog/CMakeLists.txt | 18 + Source/QtDialog/CMakeSetupDialog.cxx | 163 +- Source/QtDialog/CMakeSetupDialog.h | 6 + Source/QtDialog/CMakeSetupDialog.ui | 5 +- Source/QtDialog/QCMakeCacheView.cxx | 2 +- Source/cmAddCompileOptionsCommand.cxx | 28 + Source/cmAddCompileOptionsCommand.h | 71 + Source/cmAddDefinitionsCommand.h | 4 +- Source/cmAddDependenciesCommand.cxx | 7 + Source/cmAddExecutableCommand.cxx | 72 + Source/cmAddExecutableCommand.h | 13 + Source/cmAddLibraryCommand.cxx | 80 + Source/cmAddLibraryCommand.h | 13 + Source/cmAddSubDirectoryCommand.h | 2 +- Source/cmAddTestCommand.h | 3 + Source/cmBootstrapCommands1.cxx | 91 + ...pCommands.cxx => cmBootstrapCommands2.cxx} | 74 +- Source/cmBuildCommand.cxx | 4 +- .../cmCMakeHostSystemInformationCommand.cxx | 126 ++ Source/cmCMakeHostSystemInformationCommand.h | 102 + Source/cmCPluginAPI.cxx | 5 +- Source/cmCTest.cxx | 15 +- Source/cmCTest.h | 1 + Source/cmCacheManager.cxx | 6 +- Source/cmCacheManager.h | 2 +- Source/cmCommandArgumentLexer.cxx | 30 +- Source/cmCommandArgumentLexer.in.l | 1 + Source/cmCommandArgumentParser.y | 1 + Source/cmCommandArgumentParserHelper.cxx | 4 +- Source/cmCommands.cxx | 6 + Source/cmCommands.h | 5 +- Source/cmComputeLinkInformation.cxx | 92 +- Source/cmComputeLinkInformation.h | 3 +- Source/cmComputeTargetDepends.cxx | 2 + Source/cmConfigure.cmake.h.in | 2 +- Source/cmCoreTryCompile.cxx | 426 ++-- Source/cmCustomCommand.cxx | 28 + Source/cmCustomCommand.h | 1 + Source/cmDependsC.cxx | 18 +- Source/cmDependsFortranLexer.cxx | 40 +- Source/cmDependsFortranLexer.in.l | 1 + Source/cmDependsFortranParser.y | 1 + Source/cmDependsJavaLexer.cxx | 30 +- Source/cmDependsJavaLexer.in.l | 1 + Source/cmDependsJavaParser.cxx | 16 +- Source/cmDependsJavaParser.y | 1 + Source/cmDocumentCompileDefinitions.h | 2 +- Source/cmDocumentGeneratorExpressions.h | 25 +- Source/cmDocumentVariables.cxx | 367 ++-- Source/cmDocumentation.cxx | 4 +- Source/cmELF.cxx | 7 +- Source/cmEnableLanguageCommand.h | 17 +- Source/cmExportBuildFileGenerator.cxx | 34 +- Source/cmExportBuildFileGenerator.h | 2 + Source/cmExportCommand.cxx | 13 +- Source/cmExportCommand.h | 7 +- Source/cmExportFileGenerator.cxx | 119 +- Source/cmExportFileGenerator.h | 18 +- Source/cmExportInstallFileGenerator.cxx | 84 +- Source/cmExportInstallFileGenerator.h | 2 + Source/cmExportTryCompileFileGenerator.cxx | 25 +- Source/cmExportTryCompileFileGenerator.h | 2 + Source/cmExprLexer.cxx | 30 +- Source/cmExprLexer.in.l | 1 + Source/cmExprParser.cxx | 16 +- Source/cmExprParser.y | 1 + Source/cmExprParserHelper.cxx | 4 +- Source/cmExtraCodeBlocksGenerator.cxx | 18 +- Source/cmExtraEclipseCDT4Generator.cxx | 33 +- Source/cmExtraEclipseCDT4Generator.h | 1 + Source/cmExtraSublimeTextGenerator.cxx | 33 +- Source/cmFileCommand.cxx | 86 +- Source/cmFileCommand.h | 19 + Source/cmFunctionCommand.cxx | 2 +- Source/cmGeneratorExpression.cxx | 55 +- Source/cmGeneratorExpression.h | 3 +- Source/cmGeneratorExpressionDAGChecker.cxx | 52 +- Source/cmGeneratorExpressionDAGChecker.h | 26 +- .../cmGeneratorExpressionEvaluationFile.cxx | 151 ++ Source/cmGeneratorExpressionEvaluationFile.h | 48 + Source/cmGeneratorExpressionEvaluator.cxx | 584 +++++- Source/cmGeneratorExpressionEvaluator.h | 8 + Source/cmGeneratorExpressionParser.cxx | 20 +- Source/cmGeneratorTarget.cxx | 63 + Source/cmGeneratorTarget.h | 8 + Source/cmGetCMakePropertyCommand.cxx | 2 + Source/cmGetFilenameComponentCommand.cxx | 2 +- Source/cmGetFilenameComponentCommand.h | 3 +- Source/cmGetPropertyCommand.cxx | 15 + Source/cmGetTargetPropertyCommand.cxx | 25 +- Source/cmGlobalGenerator.cxx | 153 +- Source/cmGlobalGenerator.h | 25 +- Source/cmGlobalNinjaGenerator.cxx | 238 ++- Source/cmGlobalNinjaGenerator.h | 42 +- Source/cmGlobalUnixMakefileGenerator3.cxx | 8 +- Source/cmGlobalUnixMakefileGenerator3.h | 3 +- Source/cmGlobalVisualStudio10Generator.cxx | 63 +- Source/cmGlobalVisualStudio10Generator.h | 11 +- Source/cmGlobalVisualStudio11Generator.cxx | 97 +- Source/cmGlobalVisualStudio11Generator.h | 4 +- Source/cmGlobalVisualStudio12Generator.cxx | 19 +- Source/cmGlobalVisualStudio12Generator.h | 8 +- Source/cmGlobalVisualStudio6Generator.cxx | 3 + Source/cmGlobalVisualStudio6Generator.h | 1 + Source/cmGlobalVisualStudio71Generator.cxx | 11 +- Source/cmGlobalVisualStudio71Generator.h | 2 +- Source/cmGlobalVisualStudio7Generator.cxx | 38 +- Source/cmGlobalVisualStudio7Generator.h | 9 +- Source/cmGlobalVisualStudio8Generator.cxx | 26 +- Source/cmGlobalVisualStudio8Generator.h | 5 +- Source/cmGlobalVisualStudio9Generator.cxx | 7 +- Source/cmGlobalVisualStudio9Generator.h | 2 +- Source/cmGlobalVisualStudioGenerator.cxx | 6 +- Source/cmGlobalVisualStudioGenerator.h | 1 - Source/cmGlobalXCodeGenerator.cxx | 344 ++- Source/cmGlobalXCodeGenerator.h | 3 +- Source/cmIDEOptions.cxx | 5 + Source/cmIDEOptions.h | 1 + Source/cmIfCommand.cxx | 40 +- Source/cmIncludeCommand.cxx | 2 +- Source/cmIncludeCommand.h | 9 +- Source/cmInstallCommand.cxx | 59 +- Source/cmInstallCommand.h | 10 + Source/cmInstallCommandArguments.cxx | 34 + Source/cmInstallCommandArguments.h | 13 + Source/cmInstallExportGenerator.cxx | 3 + Source/cmInstallExportGenerator.h | 3 +- Source/cmInstallTargetGenerator.cxx | 96 +- Source/cmListFileCache.cxx | 222 +- Source/cmListFileCache.h | 17 +- Source/cmListFileLexer.c | 441 ++-- Source/cmListFileLexer.h | 1 + Source/cmListFileLexer.in.l | 27 +- Source/cmLocalGenerator.cxx | 219 +- Source/cmLocalGenerator.h | 18 +- Source/cmLocalNinjaGenerator.cxx | 25 +- Source/cmLocalUnixMakefileGenerator3.cxx | 13 +- Source/cmLocalVisualStudio6Generator.cxx | 178 +- Source/cmLocalVisualStudio7Generator.cxx | 104 +- Source/cmLocalVisualStudio7Generator.h | 2 +- Source/cmLocalXCodeGenerator.cxx | 9 + Source/cmLocalXCodeGenerator.h | 1 + Source/cmMacroCommand.cxx | 2 +- Source/cmMakefile.cxx | 294 ++- Source/cmMakefile.h | 48 +- .../cmMakefileExecutableTargetGenerator.cxx | 5 +- Source/cmMakefileLibraryTargetGenerator.cxx | 23 +- Source/cmMakefileTargetGenerator.cxx | 61 +- Source/cmMakefileTargetGenerator.h | 1 - Source/cmMakefileUtilityTargetGenerator.cxx | 3 - Source/cmNinjaNormalTargetGenerator.cxx | 111 +- Source/cmNinjaTargetGenerator.cxx | 79 +- Source/cmNinjaUtilityTargetGenerator.cxx | 19 +- Source/cmOSXBundleGenerator.cxx | 123 +- Source/cmOSXBundleGenerator.h | 24 +- Source/cmOrderDirectories.cxx | 35 +- Source/cmPolicies.cxx | 78 +- Source/cmPolicies.h | 4 + Source/cmProjectCommand.h | 8 +- Source/cmQtAutomoc.cxx | 241 ++- Source/cmQtAutomoc.h | 5 +- Source/cmSetPropertyCommand.cxx | 11 +- Source/cmSetTargetPropertiesCommand.cxx | 5 + Source/cmSetTargetPropertiesCommand.h | 2 +- Source/cmSourceFile.cxx | 4 +- Source/cmStringCommand.cxx | 42 +- Source/cmStringCommand.h | 6 +- Source/cmSubdirCommand.cxx | 2 +- Source/cmSystemTools.cxx | 101 +- Source/cmSystemTools.h | 19 +- Source/cmTarget.cxx | 1427 +++++++++++-- Source/cmTarget.h | 119 +- Source/cmTargetCompileDefinitionsCommand.cxx | 2 +- Source/cmTargetCompileDefinitionsCommand.h | 2 +- Source/cmTargetCompileOptionsCommand.cxx | 62 + Source/cmTargetCompileOptionsCommand.h | 90 + Source/cmTargetExport.h | 3 + Source/cmTargetIncludeDirectoriesCommand.cxx | 34 +- Source/cmTargetIncludeDirectoriesCommand.h | 16 +- Source/cmTargetLinkLibrariesCommand.cxx | 166 +- Source/cmTargetLinkLibrariesCommand.h | 54 +- Source/cmTargetPropCommandBase.cxx | 69 +- Source/cmTargetPropCommandBase.h | 13 +- Source/cmTest.cxx | 2 +- Source/cmTryCompileCommand.h | 14 +- Source/cmVS10LinkFlagTable.h | 2 +- Source/cmVS11LinkFlagTable.h | 2 +- Source/cmVS12LinkFlagTable.h | 2 +- Source/cmVariableWatch.cxx | 51 +- Source/cmVariableWatch.h | 20 +- Source/cmVariableWatchCommand.cxx | 175 +- Source/cmVariableWatchCommand.h | 17 +- Source/cmVisualStudio10TargetGenerator.cxx | 265 ++- Source/cmVisualStudio10TargetGenerator.h | 4 +- Source/cmVisualStudioGeneratorOptions.cxx | 9 +- Source/cmVisualStudioGeneratorOptions.h | 6 +- Source/cmVisualStudioSlnData.cxx | 62 + Source/cmVisualStudioSlnData.h | 58 + Source/cmVisualStudioSlnParser.cxx | 712 +++++++ Source/cmVisualStudioSlnParser.h | 118 ++ Source/cmVisualStudioWCEPlatformParser.cxx | 8 +- Source/cmWhileCommand.cxx | 4 +- Source/cmWin32ProcessExecution.cxx | 2 +- Source/cmWin32ProcessExecution.h | 2 +- Source/cm_sha2.c | 12 +- Source/cmake.cxx | 54 +- Source/cmake.h | 8 +- Source/cmakemain.cxx | 19 +- Source/cmakewizard.cxx | 11 +- Source/cmcldeps.cxx | 35 +- Source/ctest.cxx | 9 +- Source/kwsys/CMakeLists.txt | 96 +- Source/kwsys/CommandLineArguments.hxx.in | 10 +- Source/kwsys/RegularExpression.cxx | 114 +- Source/kwsys/SharedForward.h.in | 2 +- Source/kwsys/SystemInformation.cxx | 384 +++- Source/kwsys/SystemInformation.hxx.in | 10 +- Source/kwsys/SystemTools.cxx | 287 +-- Source/kwsys/SystemTools.hxx.in | 9 +- Source/kwsys/auto_ptr.hxx.in | 18 + Source/kwsys/hashtable.hxx.in | 18 + Source/kwsys/kwsysPlatformTests.cmake | 3 + Source/kwsys/kwsysPlatformTestsCXX.cxx | 67 + Source/kwsys/testDynamicLoader.cxx | 4 +- Source/kwsys/testIOS.cxx | 2 +- Source/kwsys/testSystemInformation.cxx | 25 +- Tests/AliasTarget/CMakeLists.txt | 47 + Tests/AliasTarget/bat.cpp | 28 + Tests/AliasTarget/commandgenerator.cpp | 15 + Tests/AliasTarget/empty.cpp | 7 + Tests/AliasTarget/object.cpp | 5 + Tests/AliasTarget/object.h | 4 + Tests/AliasTarget/targetgenerator.cpp | 13 + Tests/Architecture/CMakeLists.txt | 4 +- Tests/BuildDepends/CMakeLists.txt | 41 + Tests/BuildDepends/Project/CMakeLists.txt | 20 +- Tests/BuildDepends/Project/ninjadep.cpp | 6 + Tests/BundleUtilities/CMakeLists.txt | 3 +- Tests/CFBundleTest/CMakeLists.txt | 2 + .../add_compile_options/CMakeLists.txt | 14 + .../add_compile_options/main.cpp | 11 + .../target_compile_definitions/CMakeLists.txt | 5 + .../target_compile_options/CMakeLists.txt | 40 + .../target_compile_options/consumer.cpp | 18 + .../target_compile_options/main.cpp | 18 + .../target_include_directories/CMakeLists.txt | 14 + .../target_link_libraries/CMakeLists.txt | 16 + .../cmp0022/CMakeLists.txt | 27 + .../cmp0022/cmp0022exe.cpp | 7 + .../cmp0022/cmp0022ifacelib.cpp | 9 + .../cmp0022/cmp0022ifacelib.h | 9 + .../cmp0022/cmp0022lib.cpp | 7 + .../cmp0022/cmp0022lib.h | 6 + .../cmp0022/staticlib1.cpp | 2 + .../cmp0022/staticlib1.h | 4 + .../cmp0022/staticlib2.cpp | 2 + .../cmp0022/staticlib2.h | 4 + .../cmp0022/staticlib_exe.cpp | 8 + .../target_link_libraries/newsignature1.cpp | 19 + Tests/CMakeLib/CMakeLists.txt | 8 + Tests/CMakeLib/testVisualStudioSlnParser.cxx | 185 ++ Tests/CMakeLib/testVisualStudioSlnParser.h.in | 7 + .../.gitattributes | 1 + .../bom.sln-file | 2 + .../err-data.sln-file | 6 + .../err-empty.sln-file | 0 .../err-structure-global.sln-file | 9 + .../err-structure-header.sln-file | 4 + .../err-structure-projectArgs.sln-file | 4 + .../err-structure-projectContents.sln-file | 6 + .../err-structure-projectSection.sln-file | 11 + .../err-structure-strayParen.sln-file | 4 + .../err-structure-strayQuote.sln-file | 4 + .../err-structure-strayQuote2.sln-file | 4 + .../err-structure-topLevel.sln-file | 4 + .../err-structure-unclosed.sln-file | 5 + .../nobom.sln-file | 2 + .../valid.sln-file | 680 ++++++ Tests/CMakeLists.txt | 172 +- .../CMakeLists.txt | 2 +- .../CMakeHostSystemInformation-BadArg1.cmake | 1 + .../CMakeHostSystemInformation-BadArg2.cmake | 1 + .../CMakeHostSystemInformation-BadArg3.cmake | 1 + ...CMakeHostSystemInformation-QueryList.cmake | 5 + .../CMakeHostSystemInformationTest.cmake.in | 33 + Tests/CMakeTests/CMakeLists.txt | 1 + .../CMakeTests/ImplicitLinkInfoTest.cmake.in | 1 + Tests/CPackWiXGenerator/CMakeLists.txt | 2 + .../CTestBuildCommandProjectInSubdir.cmake.in | 12 + Tests/CTestTestDepends/CMakeLists.txt | 3 +- Tests/CTestTestFdSetSize/CMakeLists.txt | 9 + Tests/CTestTestFdSetSize/CTestConfig.cmake | 1 + Tests/CTestTestFdSetSize/sleep.c | 16 + Tests/CTestTestFdSetSize/test.cmake.in | 23 + Tests/CTestTestMemcheck/CMakeLists.txt | 154 +- Tests/CTestTestMemcheck/CMakeLists.txt.in | 7 + ...CTestConfig.cmake => CTestConfig.cmake.in} | 4 +- .../CTestTestMemcheck/DummyBC/CMakeLists.txt | 5 - .../DummyBC/CTestConfig.cmake | 7 - .../DummyPurify/CMakeLists.txt | 5 - .../DummyPurify/CTestConfig.cmake | 7 - .../DummyPurify/test.cmake.in | 25 - .../DummyValgrind/CMakeLists.txt | 5 - .../DummyValgrind/CTestConfig.cmake | 7 - .../DummyValgrind/test.cmake.in | 25 - .../DummyValgrindFailPost/CMakeLists.txt | 5 - .../DummyValgrindFailPost/CTestConfig.cmake | 7 - .../DummyValgrindFailPost/test.cmake.in | 27 - .../DummyValgrindFailPre/CMakeLists.txt | 5 - .../DummyValgrindFailPre/CTestConfig.cmake | 7 - .../DummyValgrindFailPre/test.cmake.in | 27 - .../CMakeLists.txt | 6 - .../CTestConfig.cmake | 9 - .../DummyValgrindIgnoreMemcheck/test.cmake.in | 25 - .../DummyValgrindPrePost/CMakeLists.txt | 5 - .../DummyValgrindPrePost/test.cmake.in | 28 - .../NoLogDummyChecker/CMakeLists.txt | 17 + .../CTestTestMemcheck/NotExist/CMakeLists.txt | 5 - .../NotExist/CTestConfig.cmake | 7 - .../CTestTestMemcheck/NotExist/test.cmake.in | 19 - .../CTestTestMemcheck/Unknown/CMakeLists.txt | 5 - .../Unknown/CTestConfig.cmake | 7 - Tests/CTestTestMemcheck/Unknown/test.cmake.in | 19 - .../UnknownQuoted/CMakeLists.txt | 5 - .../UnknownQuoted/CTestConfig.cmake | 7 - .../UnknownQuoted/test.cmake.in | 19 - Tests/CTestTestMemcheck/memtester.cxx.in | 52 + .../{DummyBC => }/test.cmake.in | 11 +- Tests/CompatibleInterface/CMakeLists.txt | 6 +- Tests/CompileDefinitions/CMakeLists.txt | 1 + .../add_definitions_command/CMakeLists.txt | 11 +- .../CMakeLists.txt | 4 +- Tests/CompileDefinitions/compiletest.c | 19 + Tests/CompileDefinitions/compiletest.cpp | 35 +- .../CompileDefinitions/compiletest_mixed_c.c | 23 + .../compiletest_mixed_cxx.cpp | 23 + .../target_prop/CMakeLists.txt | 33 +- Tests/CompileOptions/CMakeLists.txt | 38 + Tests/CompileOptions/main.cpp | 24 + Tests/CompileOptions/other.cpp | 5 + Tests/Complex/CMakeLists.txt | 13 +- Tests/Complex/Executable/complex.cxx | 80 - Tests/Complex/VarTests.cmake | 14 - Tests/Complex/cmTestConfigure.h.in | 9 - Tests/ComplexOneConfig/CMakeLists.txt | 13 +- Tests/ComplexOneConfig/Executable/complex.cxx | 80 - Tests/ComplexOneConfig/VarTests.cmake | 14 - Tests/ComplexOneConfig/cmTestConfigure.h.in | 9 - Tests/CustomCommand/CMakeLists.txt | 13 + Tests/EmptyProperty/CMakeLists.txt | 9 + Tests/EmptyProperty/EmptyProperty.cxx | 1 + Tests/ExportImport/Export/CMakeLists.txt | 140 +- Tests/ExportImport/Export/cmp0022.cpp | 7 + Tests/ExportImport/Export/cmp0022.h | 4 + Tests/ExportImport/Export/cmp0022_vs6_1.cpp | 1 + Tests/ExportImport/Export/cmp0022_vs6_2.cpp | 1 + Tests/ExportImport/Export/empty.cpp | 4 + .../Export/renamed/CMakeLists.txt | 20 + Tests/ExportImport/Export/renamed/renamed.cxx | 7 + Tests/ExportImport/Export/renamed/renamed.h | 12 + Tests/ExportImport/Export/testLib4.h | 2 + .../Export/testSharedLibDepends.cpp | 3 +- .../Export/testSharedLibDepends.h | 1 + .../Export/testSharedLibRequiredUser.cpp | 10 + .../Export/testSharedLibRequiredUser.h | 12 + .../Export/testSharedLibRequiredUser2.cpp | 8 + .../Export/testSharedLibRequiredUser2.h | 14 + Tests/ExportImport/Import/A/CMakeLists.txt | 66 + .../ExportImport/Import/A/cmp0022NEW_test.cpp | 12 + .../Import/A/cmp0022NEW_test_vs6_1.cpp | 1 + .../Import/A/cmp0022NEW_test_vs6_2.cpp | 1 + .../ExportImport/Import/A/cmp0022OLD_test.cpp | 12 + .../Import/A/cmp0022OLD_test_vs6_1.cpp | 1 + .../Import/A/cmp0022OLD_test_vs6_2.cpp | 1 + Tests/ExportImport/Import/A/deps_iface.c | 4 + .../Import/A/deps_shared_iface.cpp | 10 +- .../Import/A/excludedFromAll/CMakeLists.txt | 7 + .../A/excludedFromAll/excludedFromAll.cpp | 7 + .../A/excludedFromAll/excludedFromAll.h | 4 + .../A/framework_interface/CMakeLists.txt | 9 + .../A/framework_interface/framework_test.cpp | 6 + Tests/ExportImport/Import/A/iface_test.cpp | 11 + Tests/ExportImport/Import/A/renamed_test.cpp | 8 + .../Import/try_compile/CMakeLists.txt | 27 +- Tests/GeneratorExpression/CMakeLists.txt | 70 +- Tests/GeneratorExpression/check-part2.cmake | 10 + Tests/GeneratorExpression/check-part3.cmake | 28 + Tests/GeneratorExpression/empty.cpp | 6 +- .../IncludeDirectories/CMP0021/CMakeLists.txt | 14 + .../CMP0021/includes/cmp0021/cmp0021.h | 2 + Tests/IncludeDirectories/CMP0021/main.cpp | 11 + Tests/IncludeDirectories/CMakeLists.txt | 21 + .../SystemIncludeDirectories/CMakeLists.txt | 19 + .../SystemIncludeDirectories/consumer.cpp | 7 + .../SystemIncludeDirectories/systemlib.cpp | 4 + .../systemlib/systemlib.h | 19 + .../SystemIncludeDirectories/upstream.cpp | 4 + .../SystemIncludeDirectories/upstream.h | 12 + .../TargetIncludeDirectories/CMakeLists.txt | 21 + .../TargetIncludeDirectories/main.c | 7 + .../TargetIncludeDirectories/main.cpp | 2 + Tests/InterfaceLinkLibraries/CMakeLists.txt | 49 + Tests/InterfaceLinkLibraries/bang.cpp | 15 + Tests/InterfaceLinkLibraries/bang.h | 4 + Tests/InterfaceLinkLibraries/bang_vs6_1.cpp | 1 + Tests/InterfaceLinkLibraries/bang_vs6_2.cpp | 1 + Tests/InterfaceLinkLibraries/bar.cpp | 26 + Tests/InterfaceLinkLibraries/bar.h | 7 + Tests/InterfaceLinkLibraries/bar_vs6_1.cpp | 1 + Tests/InterfaceLinkLibraries/bar_vs6_2.cpp | 1 + Tests/InterfaceLinkLibraries/bar_vs6_3.cpp | 1 + Tests/InterfaceLinkLibraries/bar_vs6_4.cpp | 1 + Tests/InterfaceLinkLibraries/foo.cpp | 15 + Tests/InterfaceLinkLibraries/foo.h | 4 + Tests/InterfaceLinkLibraries/foo_vs6_1.cpp | 1 + Tests/InterfaceLinkLibraries/foo_vs6_2.cpp | 1 + Tests/InterfaceLinkLibraries/foo_vs6_3.cpp | 1 + Tests/InterfaceLinkLibraries/foo_vs6_4.cpp | 1 + Tests/InterfaceLinkLibraries/main.cpp | 19 + Tests/InterfaceLinkLibraries/main_vs6_1.cpp | 1 + Tests/InterfaceLinkLibraries/main_vs6_2.cpp | 1 + Tests/InterfaceLinkLibraries/main_vs6_3.cpp | 1 + Tests/InterfaceLinkLibraries/main_vs6_4.cpp | 1 + Tests/LinkFlags/CMakeLists.txt | 9 + Tests/LinkFlags/LinkerFlags/CMakeLists.txt | 11 + .../LinkerFlagsConfig/CMakeLists.txt | 11 + Tests/MacRuntimePath/A/CMakeLists.txt | 68 + Tests/MacRuntimePath/A/framework.cpp | 8 + Tests/MacRuntimePath/A/framework.h | 17 + Tests/MacRuntimePath/A/framework2.cpp | 8 + Tests/MacRuntimePath/A/framework2.h | 17 + Tests/MacRuntimePath/A/shared.cpp | 8 + Tests/MacRuntimePath/A/shared.h | 17 + Tests/MacRuntimePath/A/test1.cpp | 8 + Tests/MacRuntimePath/A/test2.cpp | 8 + Tests/MacRuntimePath/A/test3.cpp | 8 + Tests/MacRuntimePath/B/CMakeLists.txt | 18 + Tests/MacRuntimePath/CMakeLists.txt | 72 + Tests/MacRuntimePath/InitialCache.cmake.in | 13 + .../GenerateExportHeader/CMakeLists.txt | 9 +- .../c_identifier/CMakeLists.txt | 13 + .../c_identifier/c_identifier_class.cpp | 7 + .../c_identifier/c_identifier_class.h | 13 + .../c_identifier/main.cpp | 8 + .../libsharedtest/CMakeLists.txt | 1 + .../visibility_preset/CMakeLists.txt | 17 + .../visibility_preset/main.cpp | 9 + .../visibility_preset/visibility_preset.cpp | 7 + .../visibility_preset/visibility_preset.h | 13 + Tests/PDBDirectoryAndName/CMakeLists.txt | 11 +- Tests/Preprocess/CMakeLists.txt | 17 +- Tests/Qt4And5Automoc/CMakeLists.txt | 13 + Tests/Qt4And5Automoc/main.cpp | 18 + Tests/Qt4And5Automoc/main_qt4.cpp | 4 + Tests/Qt4And5Automoc/main_qt5.cpp | 4 + Tests/Qt4Targets/CMakeLists.txt | 17 + Tests/Qt4Targets/interface/myinterface.h | 12 + Tests/Qt4Targets/main_gen_test.cpp | 21 + Tests/Qt4Targets/main_wrap_test.cpp | 11 + Tests/Qt4Targets/mywrapobject.h | 17 + Tests/QtAutomoc/Adir/CMakeLists.txt | 2 +- Tests/QtAutomoc/CMakeLists.txt | 26 +- Tests/QtAutomoc/calwidget.cpp | 17 +- Tests/QtAutomoc/defines_test/CMakeLists.txt | 6 + Tests/QtAutomoc/defines_test/defines_test.cpp | 38 + Tests/QtAutomoc/main.cpp | 2 +- Tests/ReturnTest/CMakeLists.txt | 2 +- Tests/RunCMake/CMP0004/CMP0004-NEW.cmake | 2 +- Tests/RunCMake/CMP0004/CMP0004-OLD.cmake | 2 +- .../CMP0004/CMP0004-policy-genex.cmake | 2 +- Tests/RunCMake/CMP0004/CMakeLists.txt | 2 +- Tests/RunCMake/CMP0019/CMakeLists.txt | 2 +- ...22-NOWARN-static-link_libraries-stderr.txt | 1 + ...CMP0022-NOWARN-static-link_libraries.cmake | 9 + .../CMP0022/CMP0022-NOWARN-static-stderr.txt | 1 + .../CMP0022/CMP0022-NOWARN-static.cmake | 8 + .../CMP0022/CMP0022-WARN-static-result.txt | 1 + .../CMP0022/CMP0022-WARN-static-stderr.txt | 10 + .../CMP0022/CMP0022-WARN-static.cmake | 11 + .../RunCMake/CMP0022/CMP0022-WARN-stderr.txt | 17 + .../CMP0022/CMP0022-WARN-tll-result.txt | 1 + .../CMP0022/CMP0022-WARN-tll-stderr.txt | 17 + Tests/RunCMake/CMP0022/CMP0022-WARN-tll.cmake | 11 + Tests/RunCMake/CMP0022/CMP0022-WARN.cmake | 11 + .../CMP0022/CMP0022-export-result.txt | 1 + .../CMP0022/CMP0022-export-stderr.txt | 4 + Tests/RunCMake/CMP0022/CMP0022-export.cmake | 11 + .../CMP0022/CMP0022-install-export-result.txt | 1 + .../CMP0022/CMP0022-install-export-stderr.txt | 4 + .../CMP0022/CMP0022-install-export.cmake | 12 + Tests/RunCMake/CMP0022/CMakeLists.txt | 3 + Tests/RunCMake/CMP0022/RunCMakeTest.cmake | 9 + Tests/RunCMake/CMP0022/dep1/CMakeLists.txt | 2 + Tests/RunCMake/CMP0022/dep2/CMakeLists.txt | 2 + Tests/RunCMake/CMP0022/dep3/CMakeLists.txt | 5 + Tests/RunCMake/CMP0022/empty.cpp | 7 + Tests/RunCMake/CMP0022/empty_vs6_1.cpp | 1 + Tests/RunCMake/CMP0022/empty_vs6_2.cpp | 1 + Tests/RunCMake/CMP0022/empty_vs6_3.cpp | 1 + Tests/RunCMake/CMakeLists.txt | 35 +- Tests/RunCMake/CTest/CMakeLists.txt | 2 +- .../CompatibleInterface/CMakeLists.txt | 2 +- Tests/RunCMake/CompilerChange/CMakeLists.txt | 2 +- Tests/RunCMake/Configure/CMakeLists.txt | 3 + Tests/RunCMake/Configure/ErrorLogs-result.txt | 1 + Tests/RunCMake/Configure/ErrorLogs-stderr.txt | 4 + Tests/RunCMake/Configure/ErrorLogs-stdout.txt | 3 + Tests/RunCMake/Configure/ErrorLogs.cmake | 3 + .../Configure/FailCopyFileABI-check.cmake | 14 + .../Configure/FailCopyFileABI-override.cmake | 6 + .../Configure/FailCopyFileABI-stdout.txt | 4 + .../RunCMake/Configure/FailCopyFileABI.cmake | 2 + Tests/RunCMake/Configure/RunCMakeTest.cmake | 4 + .../ExportWithoutLanguage/CMakeLists.txt | 3 + .../NoLanguage-result.txt | 1 + .../NoLanguage-stderr.txt | 6 + .../ExportWithoutLanguage/NoLanguage.cmake | 2 + .../ExportWithoutLanguage/RunCMakeTest.cmake | 3 + Tests/RunCMake/ExternalData/CMakeLists.txt | 2 +- Tests/RunCMake/FPHSA/CMakeLists.txt | 2 +- .../File_Generate/BadCondition-result.txt | 1 + .../File_Generate/BadCondition-stderr.txt | 3 + .../RunCMake/File_Generate/BadCondition.cmake | 5 + Tests/RunCMake/File_Generate/CMakeLists.txt | 3 + .../File_Generate/CommandConflict-result.txt | 1 + .../File_Generate/CommandConflict-stderr.txt | 1 + .../File_Generate/CommandConflict.cmake | 9 + .../File_Generate/DebugEvaluate.cmake | 5 + .../File_Generate/EmptyCondition1-result.txt | 1 + .../File_Generate/EmptyCondition1-stderr.txt | 4 + .../File_Generate/EmptyCondition1.cmake | 5 + .../File_Generate/EmptyCondition2-result.txt | 1 + .../File_Generate/EmptyCondition2-stderr.txt | 4 + .../File_Generate/EmptyCondition2.cmake | 5 + .../File_Generate/OutputConflict-result.txt | 1 + .../File_Generate/OutputConflict-stderr.txt | 5 + .../File_Generate/OutputConflict.cmake | 4 + .../RunCMake/File_Generate/RunCMakeTest.cmake | 10 + Tests/RunCMake/File_Generate/input.txt | 1 + .../GeneratorExpression/CMakeLists.txt | 2 +- .../RunCMake/GeneratorToolset/CMakeLists.txt | 2 +- Tests/RunCMake/IncompatibleQt/CMakeLists.txt | 2 +- Tests/RunCMake/Languages/CMakeLists.txt | 2 +- .../Languages/LINK_LANGUAGE-genex-result.txt | 1 + .../Languages/LINK_LANGUAGE-genex-stderr.txt | 7 + .../Languages/LINK_LANGUAGE-genex.cmake | 4 + .../Languages/NoLangSHARED-stderr.txt | 2 +- Tests/RunCMake/Languages/RunCMakeTest.cmake | 3 + Tests/RunCMake/Languages/empty.cpp | 7 + ...-libraries-TARGET_FILE-genex-ok-result.txt | 1 + .../link-libraries-TARGET_FILE-genex-ok.cmake | 6 + ...ink-libraries-TARGET_FILE-genex-result.txt | 1 + ...ink-libraries-TARGET_FILE-genex-stderr.txt | 7 + .../link-libraries-TARGET_FILE-genex.cmake | 4 + Tests/RunCMake/ObjectLibrary/CMakeLists.txt | 2 +- .../AutomocMacro-WARN-result.txt | 1 + .../AutomocMacro-WARN-stderr.txt | 5 + .../ObsoleteQtMacros/AutomocMacro-WARN.cmake | 7 + .../RunCMake/ObsoleteQtMacros/CMakeLists.txt | 3 + .../ObsoleteQtMacros/RunCMakeTest.cmake | 6 + .../UseModulesMacro-WARN-result.txt | 1 + .../UseModulesMacro-WARN-stderr.txt | 6 + .../UseModulesMacro-WARN.cmake | 7 + Tests/RunCMake/ObsoleteQtMacros/empty.cpp | 7 + .../PositionIndependentCode/CMakeLists.txt | 2 +- .../SolutionGlobalSections/CMakeLists.txt | 2 +- Tests/RunCMake/Syntax/.gitattributes | 1 + Tests/RunCMake/Syntax/BracketWarn-stderr.txt | 35 + Tests/RunCMake/Syntax/BracketWarn-stdout.txt | 1 + Tests/RunCMake/Syntax/BracketWarn.cmake | 1 + Tests/RunCMake/Syntax/CMakeLists.txt | 3 + .../Syntax/CommandComments-stderr.txt | 4 + Tests/RunCMake/Syntax/CommandComments.cmake | 6 + .../RunCMake/Syntax/CommandError0-result.txt | 1 + .../RunCMake/Syntax/CommandError0-stderr.txt | 8 + Tests/RunCMake/Syntax/CommandError0.cmake | 2 + .../RunCMake/Syntax/CommandError1-result.txt | 1 + .../RunCMake/Syntax/CommandError1-stderr.txt | 7 + Tests/RunCMake/Syntax/CommandError1.cmake | 1 + .../Syntax/CommandNewlines-stderr.txt | 3 + Tests/RunCMake/Syntax/CommandNewlines.cmake | 10 + .../RunCMake/Syntax/CommandSpaces-stderr.txt | 6 + Tests/RunCMake/Syntax/CommandSpaces.cmake | 6 + Tests/RunCMake/Syntax/CommandTabs-stderr.txt | 6 + Tests/RunCMake/Syntax/CommandTabs.cmake | 6 + Tests/RunCMake/Syntax/ParenNoSpace-stderr.txt | 1 + Tests/RunCMake/Syntax/ParenNoSpace-stdout.txt | 2 + Tests/RunCMake/Syntax/ParenNoSpace.cmake | 2 + Tests/RunCMake/Syntax/RunCMakeTest.cmake | 18 + Tests/RunCMake/Syntax/String0-stderr.txt | 1 + Tests/RunCMake/Syntax/String0.cmake | 2 + Tests/RunCMake/Syntax/String1-stderr.txt | 3 + Tests/RunCMake/Syntax/String1.cmake | 3 + .../RunCMake/Syntax/StringNoSpace-stderr.txt | 19 + Tests/RunCMake/Syntax/StringNoSpace.cmake | 4 + Tests/RunCMake/Syntax/Unquoted0-stderr.txt | 1 + Tests/RunCMake/Syntax/Unquoted0.cmake | 2 + Tests/RunCMake/Syntax/Unquoted1-stderr.txt | 1 + Tests/RunCMake/Syntax/Unquoted1.cmake | 1 + .../Syntax/UnterminatedCall1-result.txt | 1 + .../Syntax/UnterminatedCall1-stderr.txt | 7 + Tests/RunCMake/Syntax/UnterminatedCall1.cmake | 1 + .../Syntax/UnterminatedCall2-result.txt | 1 + .../Syntax/UnterminatedCall2-stderr.txt | 7 + Tests/RunCMake/Syntax/UnterminatedCall2.cmake | 3 + .../Syntax/UnterminatedString-result.txt | 1 + .../Syntax/UnterminatedString-stderr.txt | 8 + .../RunCMake/Syntax/UnterminatedString.cmake | 1 + Tests/RunCMake/TargetPolicies/CMakeLists.txt | 3 + .../TargetPolicies/PolicyList-result.txt | 1 + .../TargetPolicies/PolicyList-stderr.txt | 13 + .../RunCMake/TargetPolicies/PolicyList.cmake | 8 + .../TargetPolicies/RunCMakeTest.cmake | 3 + Tests/RunCMake/TargetPolicies/empty.cpp | 7 + .../BadNonTarget-stderr.txt | 4 +- .../BadNonTarget.cmake | 2 +- .../CMakeLists.txt | 2 +- .../RunCMake/VisibilityPreset/CMakeLists.txt | 8 + .../VisibilityPreset/PropertyTypo-result.txt | 1 + .../VisibilityPreset/PropertyTypo-stderr.txt | 1 + .../VisibilityPreset/PropertyTypo.cmake | 3 + .../VisibilityPreset/RunCMakeTest.cmake | 3 + Tests/RunCMake/VisibilityPreset/lib.cpp | 5 + .../RunCMake/add_dependencies/CMakeLists.txt | 2 +- Tests/RunCMake/alias_targets/CMakeLists.txt | 3 + .../RunCMake/alias_targets/RunCMakeTest.cmake | 20 + .../alias_targets/add_dependencies-result.txt | 1 + .../alias_targets/add_dependencies-stderr.txt | 5 + .../alias_targets/add_dependencies.cmake | 9 + .../add_executable-library-result.txt | 1 + .../add_executable-library-stderr.txt | 5 + .../add_executable-library.cmake | 6 + .../add_library-executable-result.txt | 1 + .../add_library-executable-stderr.txt | 5 + .../add_library-executable.cmake | 6 + .../alias_targets/alias-target-result.txt | 1 + .../alias_targets/alias-target-stderr.txt | 5 + .../RunCMake/alias_targets/alias-target.cmake | 8 + Tests/RunCMake/alias_targets/empty.cpp | 7 + .../alias_targets/exclude-from-all-result.txt | 1 + .../alias_targets/exclude-from-all-stderr.txt | 4 + .../alias_targets/exclude-from-all.cmake | 6 + .../RunCMake/alias_targets/export-result.txt | 1 + .../RunCMake/alias_targets/export-stderr.txt | 4 + Tests/RunCMake/alias_targets/export.cmake | 8 + .../alias_targets/imported-result.txt | 1 + .../alias_targets/imported-stderr.txt | 4 + .../alias_targets/imported-target-result.txt | 1 + .../alias_targets/imported-target-stderr.txt | 5 + .../alias_targets/imported-target.cmake | 6 + Tests/RunCMake/alias_targets/imported.cmake | 2 + .../alias_targets/install-export-result.txt | 1 + .../alias_targets/install-export-stderr.txt | 4 + .../alias_targets/install-export.cmake | 9 + .../alias_targets/invalid-name-result.txt | 1 + .../alias_targets/invalid-name-stderr.txt | 4 + .../RunCMake/alias_targets/invalid-name.cmake | 6 + .../alias_targets/invalid-target-result.txt | 1 + .../alias_targets/invalid-target-stderr.txt | 5 + .../alias_targets/invalid-target.cmake | 2 + .../alias_targets/multiple-targets-result.txt | 1 + .../alias_targets/multiple-targets-stderr.txt | 4 + .../alias_targets/multiple-targets.cmake | 7 + .../alias_targets/name-conflict-result.txt | 1 + .../alias_targets/name-conflict-stderr.txt | 5 + .../alias_targets/name-conflict.cmake | 8 + .../alias_targets/no-targets-result.txt | 1 + .../alias_targets/no-targets-stderr.txt | 4 + Tests/RunCMake/alias_targets/no-targets.cmake | 4 + .../alias_targets/set_property-result.txt | 1 + .../alias_targets/set_property-stderr.txt | 4 + .../RunCMake/alias_targets/set_property.cmake | 8 + .../set_target_properties-result.txt | 1 + .../set_target_properties-stderr.txt | 4 + .../alias_targets/set_target_properties.cmake | 8 + .../target_include_directories-result.txt | 1 + .../target_include_directories-stderr.txt | 4 + .../target_include_directories.cmake | 8 + .../target_link_libraries-result.txt | 1 + .../target_link_libraries-stderr.txt | 4 + .../alias_targets/target_link_libraries.cmake | 9 + Tests/RunCMake/build_command/CMakeLists.txt | 2 +- Tests/RunCMake/find_package/CMakeLists.txt | 2 +- .../get_filename_component/CMakeLists.txt | 3 + .../KnownComponents.cmake | 38 + .../get_filename_component/RunCMakeTest.cmake | 4 + .../UnknownComponent-result.txt | 1 + .../UnknownComponent-stderr.txt | 4 + .../UnknownComponent.cmake | 1 + Tests/RunCMake/if/CMakeLists.txt | 3 + Tests/RunCMake/if/IsDirectory-stdout.txt | 1 + Tests/RunCMake/if/IsDirectory.cmake | 5 + Tests/RunCMake/if/IsDirectoryLong-stdout.txt | 1 + Tests/RunCMake/if/IsDirectoryLong.cmake | 10 + Tests/RunCMake/if/RunCMakeTest.cmake | 4 + Tests/RunCMake/include/CMakeLists.txt | 2 +- .../include_directories/CMP0021-result.txt | 1 + .../include_directories/CMP0021-stderr.txt | 4 + .../include_directories/CMP0021.cmake | 9 + .../include_directories/CMakeLists.txt | 2 +- .../DebugIncludes-stderr.txt | 9 + .../include_directories/DebugIncludes.cmake | 8 + .../include_directories/RunCMakeTest.cmake | 2 + .../install_config-result.txt | 1 + .../install_config-stderr.txt | 5 + .../include_directories/install_config.cmake | 6 + .../include_external_msproject/CMakeLists.txt | 2 +- Tests/RunCMake/list/CMakeLists.txt | 2 +- .../CMP0023-NEW-2-result.txt | 1 + .../CMP0023-NEW-2-stderr.txt | 16 + .../target_link_libraries/CMP0023-NEW-2.cmake | 11 + .../CMP0023-NEW-result.txt | 1 + .../CMP0023-NEW-stderr.txt | 16 + .../target_link_libraries/CMP0023-NEW.cmake | 11 + .../CMP0023-WARN-2-stderr.txt | 16 + .../CMP0023-WARN-2.cmake | 9 + .../CMP0023-WARN-stderr.txt | 16 + .../target_link_libraries/CMP0023-WARN.cmake | 9 + .../target_link_libraries/CMakeLists.txt | 3 + .../MixedSignature-result.txt | 1 + .../MixedSignature-stderr.txt | 5 + .../MixedSignature.cmake | 6 + .../target_link_libraries/RunCMakeTest.cmake | 8 + ...arate-PRIVATE-LINK_PRIVATE-uses-result.txt | 1 + .../Separate-PRIVATE-LINK_PRIVATE-uses.cmake | 9 + .../RunCMake/target_link_libraries/empty.cpp | 7 + .../target_link_libraries/empty_vs6_1.cpp | 1 + .../target_link_libraries/empty_vs6_2.cpp | 1 + .../target_link_libraries/empty_vs6_3.cpp | 1 + .../try_compile/BadLinkLibraries-result.txt | 1 + .../try_compile/BadLinkLibraries-stderr.txt | 5 + .../try_compile/BadLinkLibraries.cmake | 3 + .../try_compile/BadSources1-result.txt | 1 + .../try_compile/BadSources1-stderr.txt | 12 + Tests/RunCMake/try_compile/BadSources1.cmake | 1 + .../try_compile/BadSources2-result.txt | 1 + .../try_compile/BadSources2-stderr.txt | 12 + Tests/RunCMake/try_compile/BadSources2.cmake | 5 + Tests/RunCMake/try_compile/CMakeLists.txt | 3 + .../CopyFileErrorNoCopyFile-result.txt | 1 + .../CopyFileErrorNoCopyFile-stderr.txt | 4 + .../try_compile/CopyFileErrorNoCopyFile.cmake | 2 + Tests/RunCMake/try_compile/NoArgs-result.txt | 1 + Tests/RunCMake/try_compile/NoArgs-stderr.txt | 4 + Tests/RunCMake/try_compile/NoArgs.cmake | 1 + .../try_compile/NoCopyFile-result.txt | 1 + .../try_compile/NoCopyFile-stderr.txt | 4 + Tests/RunCMake/try_compile/NoCopyFile.cmake | 2 + .../try_compile/NoCopyFile2-result.txt | 1 + .../try_compile/NoCopyFile2-stderr.txt | 4 + Tests/RunCMake/try_compile/NoCopyFile2.cmake | 2 + .../try_compile/NoCopyFileError-result.txt | 1 + .../try_compile/NoCopyFileError-stderr.txt | 4 + .../try_compile/NoCopyFileError.cmake | 2 + .../try_compile/NoOutputVariable-result.txt | 1 + .../try_compile/NoOutputVariable-stderr.txt | 4 + .../try_compile/NoOutputVariable.cmake | 2 + .../try_compile/NoOutputVariable2-result.txt | 1 + .../try_compile/NoOutputVariable2-stderr.txt | 4 + .../try_compile/NoOutputVariable2.cmake | 2 + .../RunCMake/try_compile/NoSources-result.txt | 1 + .../RunCMake/try_compile/NoSources-stderr.txt | 4 + Tests/RunCMake/try_compile/NoSources.cmake | 1 + .../NonSourceCompileDefinitions-result.txt | 1 + .../NonSourceCompileDefinitions-stderr.txt | 4 + .../NonSourceCompileDefinitions.cmake | 2 + .../try_compile/NonSourceCopyFile-result.txt | 1 + .../try_compile/NonSourceCopyFile-stderr.txt | 4 + .../try_compile/NonSourceCopyFile.cmake | 2 + Tests/RunCMake/try_compile/OneArg-result.txt | 1 + Tests/RunCMake/try_compile/OneArg-stderr.txt | 4 + Tests/RunCMake/try_compile/OneArg.cmake | 1 + Tests/RunCMake/try_compile/RunCMakeTest.cmake | 17 + Tests/RunCMake/try_compile/TwoArgs-result.txt | 1 + Tests/RunCMake/try_compile/TwoArgs-stderr.txt | 4 + Tests/RunCMake/try_compile/TwoArgs.cmake | 1 + .../RunCMake/try_compile/proj/CMakeLists.txt | 2 + Tests/RunCMake/try_compile/src.c | 1 + Tests/RunCMake/variable_watch/CMakeLists.txt | 3 + .../variable_watch/ModifiedAccess-stderr.txt | 4 + .../variable_watch/ModifiedAccess.cmake | 3 + .../variable_watch/NoWatcher-stderr.txt | 5 + Tests/RunCMake/variable_watch/NoWatcher.cmake | 8 + .../variable_watch/RunCMakeTest.cmake | 5 + .../variable_watch/WatchTwice-stderr.txt | 2 + .../RunCMake/variable_watch/WatchTwice.cmake | 11 + Tests/SimpleInstall/CMakeLists.txt | 2 +- Tests/SimpleInstallS2/CMakeLists.txt | 2 +- Tests/StringFileTest/CMakeLists.txt | 6 + Tests/TryCompile/CMakeLists.txt | 53 + Tests/TryCompile/fail2a.c | 1 + Tests/TryCompile/fail2b.c | 1 + Tests/TryCompile/pass2a.c | 2 + Tests/TryCompile/pass2b.cxx | 1 + Tests/TryCompile/testdef.c | 4 + Tests/VSProjectInSubdir/CMakeLists.txt | 3 + Tests/VSProjectInSubdir/subdir/CMakeLists.txt | 1 + Tests/VSWindowsFormsResx/CMakeLists.txt | 45 + .../WindowsFormsResx/Header.h | 0 .../WindowsFormsResx/MyForm.cpp | 1 + .../WindowsFormsResx/MyForm.h | 78 + .../WindowsFormsResx/MyForm.resx | 61 + .../WindowsFormsResx/Source.cpp | 4 + Tests/WarnUnusedCliUnused/CMakeLists.txt | 9 + Tests/WarnUnusedCliUnused/empty.cpp | 7 + Utilities/CMakeLists.txt | 15 +- Utilities/cmcompress/CMakeLists.txt | 2 +- Utilities/cmcurl/CMakeLists.txt | 4 +- Utilities/cmcurl/Testing/sepheaders.c | 2 + Utilities/cmcurl/Testing/simplessl.c | 2 + Utilities/cmcurl/cookie.c | 2 + Utilities/cmcurl/ftp.c | 2 +- Utilities/cmcurl/http.c | 2 +- Utilities/cmcurl/ssluse.c | 2 +- Utilities/cmcurl/urldata.h | 2 +- Utilities/cmexpat/CMakeLists.txt | 2 +- Utilities/cmlibarchive/CMakeLists.txt | 328 ++- Utilities/cmlibarchive/README-CMake.txt | 8 +- .../cmlibarchive/build/cmake/FindLibGCC.cmake | 22 + .../cmlibarchive/build/cmake/FindNettle.cmake | 23 + .../build/cmake/FindPCREPOSIX.cmake | 34 + .../cmlibarchive/build/cmake/config.h.in | 51 +- .../utils/gen_archive_string_composition_h.sh | 47 +- Utilities/cmlibarchive/build/version | 2 +- .../cmlibarchive/libarchive/CMakeLists.txt | 23 +- Utilities/cmlibarchive/libarchive/archive.h | 308 ++- .../cmlibarchive/libarchive/archive_acl.c | 82 +- .../libarchive/archive_check_magic.c | 1 + .../cmlibarchive/libarchive/archive_cmdline.c | 227 ++ .../libarchive/archive_cmdline_private.h | 47 + .../cmlibarchive/libarchive/archive_crypto.c | 8 +- .../cmlibarchive/libarchive/archive_endian.h | 8 +- .../cmlibarchive/libarchive/archive_entry.3 | 6 +- .../cmlibarchive/libarchive/archive_entry.c | 81 +- .../cmlibarchive/libarchive/archive_entry.h | 45 +- .../libarchive/archive_entry_acl.3 | 6 +- .../libarchive/archive_entry_copy_bhfi.c | 6 +- .../libarchive/archive_entry_link_resolver.c | 5 +- .../libarchive/archive_entry_linkify.3 | 4 +- .../libarchive/archive_entry_paths.3 | 4 +- .../libarchive/archive_entry_perms.3 | 4 +- .../libarchive/archive_entry_stat.3 | 6 +- .../libarchive/archive_entry_stat.c | 10 +- .../libarchive/archive_entry_time.3 | 6 +- .../cmlibarchive/libarchive/archive_getdate.c | 1037 ++++++++++ .../cmlibarchive/libarchive/archive_match.c | 1841 +++++++++++++++++ .../cmlibarchive/libarchive/archive_options.c | 53 +- .../libarchive/archive_pathmatch.c | 459 ++++ .../libarchive/archive_pathmatch.h | 52 + .../cmlibarchive/libarchive/archive_ppmd7.c | 7 +- .../libarchive/archive_ppmd_private.h | 4 +- .../cmlibarchive/libarchive/archive_private.h | 2 + .../cmlibarchive/libarchive/archive_rb.c | 24 +- .../cmlibarchive/libarchive/archive_read.3 | 6 +- .../cmlibarchive/libarchive/archive_read.c | 422 +++- .../libarchive/archive_read_append_filter.c | 198 ++ .../libarchive/archive_read_data.3 | 4 +- .../libarchive/archive_read_data_into_fd.c | 2 +- .../libarchive/archive_read_disk.3 | 6 +- .../archive_read_disk_entry_from_file.c | 476 +++-- .../libarchive/archive_read_disk_posix.c | 580 ++++-- .../libarchive/archive_read_disk_private.h | 23 +- .../libarchive/archive_read_disk_windows.c | 719 +++++-- .../libarchive/archive_read_extract.3 | 4 +- .../libarchive/archive_read_extract.c | 2 +- .../libarchive/archive_read_filter.3 | 4 +- .../libarchive/archive_read_format.3 | 6 +- .../libarchive/archive_read_free.3 | 6 +- .../libarchive/archive_read_header.3 | 4 +- .../libarchive/archive_read_new.3 | 6 +- .../libarchive/archive_read_open.3 | 6 +- .../libarchive/archive_read_open_fd.c | 7 +- .../libarchive/archive_read_open_file.c | 4 +- .../libarchive/archive_read_open_filename.c | 177 +- .../libarchive/archive_read_open_memory.c | 1 + .../libarchive/archive_read_private.h | 44 +- .../libarchive/archive_read_set_format.c | 105 + .../libarchive/archive_read_set_options.3 | 4 +- .../libarchive/archive_read_set_options.c | 12 +- .../archive_read_support_filter_all.c | 8 +- .../archive_read_support_filter_bzip2.c | 9 +- .../archive_read_support_filter_compress.c | 3 +- .../archive_read_support_filter_grzip.c | 121 ++ .../archive_read_support_filter_gzip.c | 21 +- .../archive_read_support_filter_lrzip.c | 132 ++ .../archive_read_support_filter_lzop.c | 486 +++++ .../archive_read_support_filter_program.c | 188 +- .../archive_read_support_filter_rpm.c | 5 +- .../archive_read_support_filter_uu.c | 28 +- .../archive_read_support_filter_xz.c | 33 +- .../archive_read_support_format_7zip.c | 260 ++- .../archive_read_support_format_ar.c | 1 + .../archive_read_support_format_cab.c | 283 +-- .../archive_read_support_format_cpio.c | 70 +- .../archive_read_support_format_empty.c | 1 + .../archive_read_support_format_iso9660.c | 456 ++-- .../archive_read_support_format_lha.c | 45 +- .../archive_read_support_format_mtree.c | 232 ++- .../archive_read_support_format_rar.c | 468 ++++- .../archive_read_support_format_raw.c | 3 +- .../archive_read_support_format_tar.c | 260 ++- .../archive_read_support_format_xar.c | 19 +- .../archive_read_support_format_zip.c | 734 +++++-- .../cmlibarchive/libarchive/archive_string.c | 834 ++++---- .../cmlibarchive/libarchive/archive_string.h | 10 +- .../libarchive/archive_string_composition.h | 945 ++++++++- .../libarchive/archive_string_sprintf.c | 14 +- .../cmlibarchive/libarchive/archive_util.3 | 6 +- .../cmlibarchive/libarchive/archive_util.c | 50 +- .../cmlibarchive/libarchive/archive_virtual.c | 15 +- .../cmlibarchive/libarchive/archive_windows.c | 175 +- .../cmlibarchive/libarchive/archive_windows.h | 29 +- .../cmlibarchive/libarchive/archive_write.3 | 6 +- .../cmlibarchive/libarchive/archive_write.c | 190 +- .../libarchive/archive_write_add_filter.c | 70 + .../archive_write_add_filter_b64encode.c | 314 +++ .../archive_write_add_filter_by_name.c | 75 + .../archive_write_add_filter_bzip2.c | 170 +- .../archive_write_add_filter_compress.c | 24 +- .../archive_write_add_filter_grzip.c | 135 ++ .../archive_write_add_filter_gzip.c | 208 +- .../archive_write_add_filter_lrzip.c | 192 ++ .../archive_write_add_filter_lzop.c | 486 +++++ .../archive_write_add_filter_program.c | 327 +-- .../archive_write_add_filter_uuencode.c | 305 +++ .../libarchive/archive_write_add_filter_xz.c | 35 +- .../libarchive/archive_write_blocksize.3 | 4 +- .../libarchive/archive_write_data.3 | 8 +- .../libarchive/archive_write_disk.3 | 6 +- .../libarchive/archive_write_disk_acl.c | 249 +++ .../libarchive/archive_write_disk_posix.c | 1291 ++++++++++-- .../libarchive/archive_write_disk_private.h | 5 + .../archive_write_disk_set_standard_lookup.c | 28 +- .../libarchive/archive_write_disk_windows.c | 175 +- .../libarchive/archive_write_filter.3 | 4 +- .../libarchive/archive_write_finish_entry.3 | 6 +- .../libarchive/archive_write_format.3 | 4 +- .../libarchive/archive_write_free.3 | 17 +- .../libarchive/archive_write_header.3 | 4 +- .../libarchive/archive_write_new.3 | 4 +- .../libarchive/archive_write_open.3 | 8 +- .../libarchive/archive_write_open_filename.c | 170 +- .../libarchive/archive_write_private.h | 11 +- .../archive_write_set_format_7zip.c | 155 +- .../libarchive/archive_write_set_format_ar.c | 4 +- .../archive_write_set_format_by_name.c | 4 + .../archive_write_set_format_cpio.c | 76 +- .../archive_write_set_format_cpio_newc.c | 78 +- .../archive_write_set_format_gnutar.c | 155 +- .../archive_write_set_format_iso9660.c | 250 ++- .../archive_write_set_format_mtree.c | 1571 ++++++++++---- .../libarchive/archive_write_set_format_pax.c | 121 +- .../archive_write_set_format_ustar.c | 110 +- .../archive_write_set_format_v7tar.c | 661 ++++++ .../libarchive/archive_write_set_format_xar.c | 68 +- .../libarchive/archive_write_set_format_zip.c | 446 ++-- .../libarchive/archive_write_set_options.3 | 8 +- .../libarchive/archive_write_set_options.c | 14 +- Utilities/cmlibarchive/libarchive/cpio.5 | 4 +- .../cmlibarchive/libarchive/filter_fork.h | 2 +- .../{filter_fork.c => filter_fork_posix.c} | 107 +- .../libarchive/filter_fork_windows.c | 143 +- .../libarchive/libarchive-formats.5 | 108 +- .../cmlibarchive/libarchive/libarchive.3 | 69 +- .../libarchive/libarchive_changes.3 | 2 +- .../libarchive/libarchive_internals.3 | 6 +- Utilities/cmlibarchive/libarchive/mtree.5 | 2 +- Utilities/cmlibarchive/libarchive/tar.5 | 4 +- Utilities/cmzlib/CMakeLists.txt | 2 +- Utilities/cmzlib/zlib.h | 2 +- bootstrap | 61 +- 1092 files changed, 35574 insertions(+), 8333 deletions(-) create mode 100644 Modules/CMakeGraphVizOptions.cmake create mode 100644 Modules/CMakePrintHelpers.cmake create mode 100644 Modules/Compiler/IAR-ASM.cmake create mode 100644 Modules/Compiler/IAR-C.cmake create mode 100644 Modules/Compiler/IAR-CXX.cmake create mode 100644 Modules/Compiler/IAR.cmake create mode 100644 Modules/Platform/Darwin-Intel-Fortran.cmake create mode 100644 Source/cmAddCompileOptionsCommand.cxx create mode 100644 Source/cmAddCompileOptionsCommand.h create mode 100644 Source/cmBootstrapCommands1.cxx rename Source/{cmBootstrapCommands.cxx => cmBootstrapCommands2.cxx} (58%) create mode 100644 Source/cmCMakeHostSystemInformationCommand.cxx create mode 100644 Source/cmCMakeHostSystemInformationCommand.h create mode 100644 Source/cmGeneratorExpressionEvaluationFile.cxx create mode 100644 Source/cmGeneratorExpressionEvaluationFile.h create mode 100644 Source/cmTargetCompileOptionsCommand.cxx create mode 100644 Source/cmTargetCompileOptionsCommand.h create mode 100644 Source/cmVisualStudioSlnData.cxx create mode 100644 Source/cmVisualStudioSlnData.h create mode 100644 Source/cmVisualStudioSlnParser.cxx create mode 100644 Source/cmVisualStudioSlnParser.h create mode 100644 Tests/AliasTarget/CMakeLists.txt create mode 100644 Tests/AliasTarget/bat.cpp create mode 100644 Tests/AliasTarget/commandgenerator.cpp create mode 100644 Tests/AliasTarget/empty.cpp create mode 100644 Tests/AliasTarget/object.cpp create mode 100644 Tests/AliasTarget/object.h create mode 100644 Tests/AliasTarget/targetgenerator.cpp create mode 100644 Tests/BuildDepends/Project/ninjadep.cpp create mode 100644 Tests/CMakeCommands/add_compile_options/CMakeLists.txt create mode 100644 Tests/CMakeCommands/add_compile_options/main.cpp create mode 100644 Tests/CMakeCommands/target_compile_options/CMakeLists.txt create mode 100644 Tests/CMakeCommands/target_compile_options/consumer.cpp create mode 100644 Tests/CMakeCommands/target_compile_options/main.cpp create mode 100644 Tests/CMakeCommands/target_link_libraries/cmp0022/CMakeLists.txt create mode 100644 Tests/CMakeCommands/target_link_libraries/cmp0022/cmp0022exe.cpp create mode 100644 Tests/CMakeCommands/target_link_libraries/cmp0022/cmp0022ifacelib.cpp create mode 100644 Tests/CMakeCommands/target_link_libraries/cmp0022/cmp0022ifacelib.h create mode 100644 Tests/CMakeCommands/target_link_libraries/cmp0022/cmp0022lib.cpp create mode 100644 Tests/CMakeCommands/target_link_libraries/cmp0022/cmp0022lib.h create mode 100644 Tests/CMakeCommands/target_link_libraries/cmp0022/staticlib1.cpp create mode 100644 Tests/CMakeCommands/target_link_libraries/cmp0022/staticlib1.h create mode 100644 Tests/CMakeCommands/target_link_libraries/cmp0022/staticlib2.cpp create mode 100644 Tests/CMakeCommands/target_link_libraries/cmp0022/staticlib2.h create mode 100644 Tests/CMakeCommands/target_link_libraries/cmp0022/staticlib_exe.cpp create mode 100644 Tests/CMakeCommands/target_link_libraries/newsignature1.cpp create mode 100644 Tests/CMakeLib/testVisualStudioSlnParser.cxx create mode 100644 Tests/CMakeLib/testVisualStudioSlnParser.h.in create mode 100644 Tests/CMakeLib/testVisualStudioSlnParser_data/.gitattributes create mode 100644 Tests/CMakeLib/testVisualStudioSlnParser_data/bom.sln-file create mode 100644 Tests/CMakeLib/testVisualStudioSlnParser_data/err-data.sln-file create mode 100644 Tests/CMakeLib/testVisualStudioSlnParser_data/err-empty.sln-file create mode 100644 Tests/CMakeLib/testVisualStudioSlnParser_data/err-structure-global.sln-file create mode 100644 Tests/CMakeLib/testVisualStudioSlnParser_data/err-structure-header.sln-file create mode 100644 Tests/CMakeLib/testVisualStudioSlnParser_data/err-structure-projectArgs.sln-file create mode 100644 Tests/CMakeLib/testVisualStudioSlnParser_data/err-structure-projectContents.sln-file create mode 100644 Tests/CMakeLib/testVisualStudioSlnParser_data/err-structure-projectSection.sln-file create mode 100644 Tests/CMakeLib/testVisualStudioSlnParser_data/err-structure-strayParen.sln-file create mode 100644 Tests/CMakeLib/testVisualStudioSlnParser_data/err-structure-strayQuote.sln-file create mode 100644 Tests/CMakeLib/testVisualStudioSlnParser_data/err-structure-strayQuote2.sln-file create mode 100644 Tests/CMakeLib/testVisualStudioSlnParser_data/err-structure-topLevel.sln-file create mode 100644 Tests/CMakeLib/testVisualStudioSlnParser_data/err-structure-unclosed.sln-file create mode 100644 Tests/CMakeLib/testVisualStudioSlnParser_data/nobom.sln-file create mode 100644 Tests/CMakeLib/testVisualStudioSlnParser_data/valid.sln-file create mode 100644 Tests/CMakeTests/CMakeHostSystemInformation-BadArg1.cmake create mode 100644 Tests/CMakeTests/CMakeHostSystemInformation-BadArg2.cmake create mode 100644 Tests/CMakeTests/CMakeHostSystemInformation-BadArg3.cmake create mode 100644 Tests/CMakeTests/CMakeHostSystemInformation-QueryList.cmake create mode 100644 Tests/CMakeTests/CMakeHostSystemInformationTest.cmake.in create mode 100644 Tests/CTestBuildCommandProjectInSubdir/CTestBuildCommandProjectInSubdir.cmake.in create mode 100644 Tests/CTestTestFdSetSize/CMakeLists.txt create mode 100644 Tests/CTestTestFdSetSize/CTestConfig.cmake create mode 100644 Tests/CTestTestFdSetSize/sleep.c create mode 100644 Tests/CTestTestFdSetSize/test.cmake.in create mode 100644 Tests/CTestTestMemcheck/CMakeLists.txt.in rename Tests/CTestTestMemcheck/{DummyValgrindPrePost/CTestConfig.cmake => CTestConfig.cmake.in} (75%) delete mode 100644 Tests/CTestTestMemcheck/DummyBC/CMakeLists.txt delete mode 100644 Tests/CTestTestMemcheck/DummyBC/CTestConfig.cmake delete mode 100644 Tests/CTestTestMemcheck/DummyPurify/CMakeLists.txt delete mode 100644 Tests/CTestTestMemcheck/DummyPurify/CTestConfig.cmake delete mode 100644 Tests/CTestTestMemcheck/DummyPurify/test.cmake.in delete mode 100644 Tests/CTestTestMemcheck/DummyValgrind/CMakeLists.txt delete mode 100644 Tests/CTestTestMemcheck/DummyValgrind/CTestConfig.cmake delete mode 100644 Tests/CTestTestMemcheck/DummyValgrind/test.cmake.in delete mode 100644 Tests/CTestTestMemcheck/DummyValgrindFailPost/CMakeLists.txt delete mode 100644 Tests/CTestTestMemcheck/DummyValgrindFailPost/CTestConfig.cmake delete mode 100644 Tests/CTestTestMemcheck/DummyValgrindFailPost/test.cmake.in delete mode 100644 Tests/CTestTestMemcheck/DummyValgrindFailPre/CMakeLists.txt delete mode 100644 Tests/CTestTestMemcheck/DummyValgrindFailPre/CTestConfig.cmake delete mode 100644 Tests/CTestTestMemcheck/DummyValgrindFailPre/test.cmake.in delete mode 100644 Tests/CTestTestMemcheck/DummyValgrindIgnoreMemcheck/CMakeLists.txt delete mode 100644 Tests/CTestTestMemcheck/DummyValgrindIgnoreMemcheck/CTestConfig.cmake delete mode 100644 Tests/CTestTestMemcheck/DummyValgrindIgnoreMemcheck/test.cmake.in delete mode 100644 Tests/CTestTestMemcheck/DummyValgrindPrePost/CMakeLists.txt delete mode 100644 Tests/CTestTestMemcheck/DummyValgrindPrePost/test.cmake.in create mode 100644 Tests/CTestTestMemcheck/NoLogDummyChecker/CMakeLists.txt delete mode 100644 Tests/CTestTestMemcheck/NotExist/CMakeLists.txt delete mode 100644 Tests/CTestTestMemcheck/NotExist/CTestConfig.cmake delete mode 100644 Tests/CTestTestMemcheck/NotExist/test.cmake.in delete mode 100644 Tests/CTestTestMemcheck/Unknown/CMakeLists.txt delete mode 100644 Tests/CTestTestMemcheck/Unknown/CTestConfig.cmake delete mode 100644 Tests/CTestTestMemcheck/Unknown/test.cmake.in delete mode 100644 Tests/CTestTestMemcheck/UnknownQuoted/CMakeLists.txt delete mode 100644 Tests/CTestTestMemcheck/UnknownQuoted/CTestConfig.cmake delete mode 100644 Tests/CTestTestMemcheck/UnknownQuoted/test.cmake.in create mode 100644 Tests/CTestTestMemcheck/memtester.cxx.in rename Tests/CTestTestMemcheck/{DummyBC => }/test.cmake.in (77%) create mode 100644 Tests/CompileDefinitions/compiletest.c create mode 100644 Tests/CompileDefinitions/compiletest_mixed_c.c create mode 100644 Tests/CompileDefinitions/compiletest_mixed_cxx.cpp create mode 100644 Tests/CompileOptions/CMakeLists.txt create mode 100644 Tests/CompileOptions/main.cpp create mode 100644 Tests/CompileOptions/other.cpp create mode 100644 Tests/EmptyProperty/CMakeLists.txt create mode 100644 Tests/EmptyProperty/EmptyProperty.cxx create mode 100644 Tests/ExportImport/Export/cmp0022.cpp create mode 100644 Tests/ExportImport/Export/cmp0022.h create mode 100644 Tests/ExportImport/Export/cmp0022_vs6_1.cpp create mode 100644 Tests/ExportImport/Export/cmp0022_vs6_2.cpp create mode 100644 Tests/ExportImport/Export/empty.cpp create mode 100644 Tests/ExportImport/Export/renamed/CMakeLists.txt create mode 100644 Tests/ExportImport/Export/renamed/renamed.cxx create mode 100644 Tests/ExportImport/Export/renamed/renamed.h create mode 100644 Tests/ExportImport/Export/testLib4.h create mode 100644 Tests/ExportImport/Export/testSharedLibRequiredUser.cpp create mode 100644 Tests/ExportImport/Export/testSharedLibRequiredUser.h create mode 100644 Tests/ExportImport/Export/testSharedLibRequiredUser2.cpp create mode 100644 Tests/ExportImport/Export/testSharedLibRequiredUser2.h create mode 100644 Tests/ExportImport/Import/A/cmp0022NEW_test.cpp create mode 100644 Tests/ExportImport/Import/A/cmp0022NEW_test_vs6_1.cpp create mode 100644 Tests/ExportImport/Import/A/cmp0022NEW_test_vs6_2.cpp create mode 100644 Tests/ExportImport/Import/A/cmp0022OLD_test.cpp create mode 100644 Tests/ExportImport/Import/A/cmp0022OLD_test_vs6_1.cpp create mode 100644 Tests/ExportImport/Import/A/cmp0022OLD_test_vs6_2.cpp create mode 100644 Tests/ExportImport/Import/A/excludedFromAll/CMakeLists.txt create mode 100644 Tests/ExportImport/Import/A/excludedFromAll/excludedFromAll.cpp create mode 100644 Tests/ExportImport/Import/A/excludedFromAll/excludedFromAll.h create mode 100644 Tests/ExportImport/Import/A/framework_interface/CMakeLists.txt create mode 100644 Tests/ExportImport/Import/A/framework_interface/framework_test.cpp create mode 100644 Tests/ExportImport/Import/A/iface_test.cpp create mode 100644 Tests/ExportImport/Import/A/renamed_test.cpp create mode 100644 Tests/GeneratorExpression/check-part3.cmake create mode 100644 Tests/IncludeDirectories/CMP0021/CMakeLists.txt create mode 100644 Tests/IncludeDirectories/CMP0021/includes/cmp0021/cmp0021.h create mode 100644 Tests/IncludeDirectories/CMP0021/main.cpp create mode 100644 Tests/IncludeDirectories/SystemIncludeDirectories/CMakeLists.txt create mode 100644 Tests/IncludeDirectories/SystemIncludeDirectories/consumer.cpp create mode 100644 Tests/IncludeDirectories/SystemIncludeDirectories/systemlib.cpp create mode 100644 Tests/IncludeDirectories/SystemIncludeDirectories/systemlib/systemlib.h create mode 100644 Tests/IncludeDirectories/SystemIncludeDirectories/upstream.cpp create mode 100644 Tests/IncludeDirectories/SystemIncludeDirectories/upstream.h create mode 100644 Tests/IncludeDirectories/TargetIncludeDirectories/main.c create mode 100644 Tests/InterfaceLinkLibraries/CMakeLists.txt create mode 100644 Tests/InterfaceLinkLibraries/bang.cpp create mode 100644 Tests/InterfaceLinkLibraries/bang.h create mode 100644 Tests/InterfaceLinkLibraries/bang_vs6_1.cpp create mode 100644 Tests/InterfaceLinkLibraries/bang_vs6_2.cpp create mode 100644 Tests/InterfaceLinkLibraries/bar.cpp create mode 100644 Tests/InterfaceLinkLibraries/bar.h create mode 100644 Tests/InterfaceLinkLibraries/bar_vs6_1.cpp create mode 100644 Tests/InterfaceLinkLibraries/bar_vs6_2.cpp create mode 100644 Tests/InterfaceLinkLibraries/bar_vs6_3.cpp create mode 100644 Tests/InterfaceLinkLibraries/bar_vs6_4.cpp create mode 100644 Tests/InterfaceLinkLibraries/foo.cpp create mode 100644 Tests/InterfaceLinkLibraries/foo.h create mode 100644 Tests/InterfaceLinkLibraries/foo_vs6_1.cpp create mode 100644 Tests/InterfaceLinkLibraries/foo_vs6_2.cpp create mode 100644 Tests/InterfaceLinkLibraries/foo_vs6_3.cpp create mode 100644 Tests/InterfaceLinkLibraries/foo_vs6_4.cpp create mode 100644 Tests/InterfaceLinkLibraries/main.cpp create mode 100644 Tests/InterfaceLinkLibraries/main_vs6_1.cpp create mode 100644 Tests/InterfaceLinkLibraries/main_vs6_2.cpp create mode 100644 Tests/InterfaceLinkLibraries/main_vs6_3.cpp create mode 100644 Tests/InterfaceLinkLibraries/main_vs6_4.cpp create mode 100644 Tests/LinkFlags/LinkerFlags/CMakeLists.txt create mode 100644 Tests/LinkFlags/LinkerFlagsConfig/CMakeLists.txt create mode 100644 Tests/MacRuntimePath/A/CMakeLists.txt create mode 100644 Tests/MacRuntimePath/A/framework.cpp create mode 100644 Tests/MacRuntimePath/A/framework.h create mode 100644 Tests/MacRuntimePath/A/framework2.cpp create mode 100644 Tests/MacRuntimePath/A/framework2.h create mode 100644 Tests/MacRuntimePath/A/shared.cpp create mode 100644 Tests/MacRuntimePath/A/shared.h create mode 100644 Tests/MacRuntimePath/A/test1.cpp create mode 100644 Tests/MacRuntimePath/A/test2.cpp create mode 100644 Tests/MacRuntimePath/A/test3.cpp create mode 100644 Tests/MacRuntimePath/B/CMakeLists.txt create mode 100644 Tests/MacRuntimePath/CMakeLists.txt create mode 100644 Tests/MacRuntimePath/InitialCache.cmake.in create mode 100644 Tests/Module/GenerateExportHeader/c_identifier/CMakeLists.txt create mode 100644 Tests/Module/GenerateExportHeader/c_identifier/c_identifier_class.cpp create mode 100644 Tests/Module/GenerateExportHeader/c_identifier/c_identifier_class.h create mode 100644 Tests/Module/GenerateExportHeader/c_identifier/main.cpp create mode 100644 Tests/Module/GenerateExportHeader/visibility_preset/CMakeLists.txt create mode 100644 Tests/Module/GenerateExportHeader/visibility_preset/main.cpp create mode 100644 Tests/Module/GenerateExportHeader/visibility_preset/visibility_preset.cpp create mode 100644 Tests/Module/GenerateExportHeader/visibility_preset/visibility_preset.h create mode 100644 Tests/Qt4And5Automoc/CMakeLists.txt create mode 100644 Tests/Qt4And5Automoc/main.cpp create mode 100644 Tests/Qt4And5Automoc/main_qt4.cpp create mode 100644 Tests/Qt4And5Automoc/main_qt5.cpp create mode 100644 Tests/Qt4Targets/interface/myinterface.h create mode 100644 Tests/Qt4Targets/main_gen_test.cpp create mode 100644 Tests/Qt4Targets/main_wrap_test.cpp create mode 100644 Tests/Qt4Targets/mywrapobject.h create mode 100644 Tests/QtAutomoc/defines_test/CMakeLists.txt create mode 100644 Tests/QtAutomoc/defines_test/defines_test.cpp create mode 100644 Tests/RunCMake/CMP0022/CMP0022-NOWARN-static-link_libraries-stderr.txt create mode 100644 Tests/RunCMake/CMP0022/CMP0022-NOWARN-static-link_libraries.cmake create mode 100644 Tests/RunCMake/CMP0022/CMP0022-NOWARN-static-stderr.txt create mode 100644 Tests/RunCMake/CMP0022/CMP0022-NOWARN-static.cmake create mode 100644 Tests/RunCMake/CMP0022/CMP0022-WARN-static-result.txt create mode 100644 Tests/RunCMake/CMP0022/CMP0022-WARN-static-stderr.txt create mode 100644 Tests/RunCMake/CMP0022/CMP0022-WARN-static.cmake create mode 100644 Tests/RunCMake/CMP0022/CMP0022-WARN-stderr.txt create mode 100644 Tests/RunCMake/CMP0022/CMP0022-WARN-tll-result.txt create mode 100644 Tests/RunCMake/CMP0022/CMP0022-WARN-tll-stderr.txt create mode 100644 Tests/RunCMake/CMP0022/CMP0022-WARN-tll.cmake create mode 100644 Tests/RunCMake/CMP0022/CMP0022-WARN.cmake create mode 100644 Tests/RunCMake/CMP0022/CMP0022-export-result.txt create mode 100644 Tests/RunCMake/CMP0022/CMP0022-export-stderr.txt create mode 100644 Tests/RunCMake/CMP0022/CMP0022-export.cmake create mode 100644 Tests/RunCMake/CMP0022/CMP0022-install-export-result.txt create mode 100644 Tests/RunCMake/CMP0022/CMP0022-install-export-stderr.txt create mode 100644 Tests/RunCMake/CMP0022/CMP0022-install-export.cmake create mode 100644 Tests/RunCMake/CMP0022/CMakeLists.txt create mode 100644 Tests/RunCMake/CMP0022/RunCMakeTest.cmake create mode 100644 Tests/RunCMake/CMP0022/dep1/CMakeLists.txt create mode 100644 Tests/RunCMake/CMP0022/dep2/CMakeLists.txt create mode 100644 Tests/RunCMake/CMP0022/dep3/CMakeLists.txt create mode 100644 Tests/RunCMake/CMP0022/empty.cpp create mode 100644 Tests/RunCMake/CMP0022/empty_vs6_1.cpp create mode 100644 Tests/RunCMake/CMP0022/empty_vs6_2.cpp create mode 100644 Tests/RunCMake/CMP0022/empty_vs6_3.cpp create mode 100644 Tests/RunCMake/Configure/CMakeLists.txt create mode 100644 Tests/RunCMake/Configure/ErrorLogs-result.txt create mode 100644 Tests/RunCMake/Configure/ErrorLogs-stderr.txt create mode 100644 Tests/RunCMake/Configure/ErrorLogs-stdout.txt create mode 100644 Tests/RunCMake/Configure/ErrorLogs.cmake create mode 100644 Tests/RunCMake/Configure/FailCopyFileABI-check.cmake create mode 100644 Tests/RunCMake/Configure/FailCopyFileABI-override.cmake create mode 100644 Tests/RunCMake/Configure/FailCopyFileABI-stdout.txt create mode 100644 Tests/RunCMake/Configure/FailCopyFileABI.cmake create mode 100644 Tests/RunCMake/Configure/RunCMakeTest.cmake create mode 100644 Tests/RunCMake/ExportWithoutLanguage/CMakeLists.txt create mode 100644 Tests/RunCMake/ExportWithoutLanguage/NoLanguage-result.txt create mode 100644 Tests/RunCMake/ExportWithoutLanguage/NoLanguage-stderr.txt create mode 100644 Tests/RunCMake/ExportWithoutLanguage/NoLanguage.cmake create mode 100644 Tests/RunCMake/ExportWithoutLanguage/RunCMakeTest.cmake create mode 100644 Tests/RunCMake/File_Generate/BadCondition-result.txt create mode 100644 Tests/RunCMake/File_Generate/BadCondition-stderr.txt create mode 100644 Tests/RunCMake/File_Generate/BadCondition.cmake create mode 100644 Tests/RunCMake/File_Generate/CMakeLists.txt create mode 100644 Tests/RunCMake/File_Generate/CommandConflict-result.txt create mode 100644 Tests/RunCMake/File_Generate/CommandConflict-stderr.txt create mode 100644 Tests/RunCMake/File_Generate/CommandConflict.cmake create mode 100644 Tests/RunCMake/File_Generate/DebugEvaluate.cmake create mode 100644 Tests/RunCMake/File_Generate/EmptyCondition1-result.txt create mode 100644 Tests/RunCMake/File_Generate/EmptyCondition1-stderr.txt create mode 100644 Tests/RunCMake/File_Generate/EmptyCondition1.cmake create mode 100644 Tests/RunCMake/File_Generate/EmptyCondition2-result.txt create mode 100644 Tests/RunCMake/File_Generate/EmptyCondition2-stderr.txt create mode 100644 Tests/RunCMake/File_Generate/EmptyCondition2.cmake create mode 100644 Tests/RunCMake/File_Generate/OutputConflict-result.txt create mode 100644 Tests/RunCMake/File_Generate/OutputConflict-stderr.txt create mode 100644 Tests/RunCMake/File_Generate/OutputConflict.cmake create mode 100644 Tests/RunCMake/File_Generate/RunCMakeTest.cmake create mode 100644 Tests/RunCMake/File_Generate/input.txt create mode 100644 Tests/RunCMake/Languages/LINK_LANGUAGE-genex-result.txt create mode 100644 Tests/RunCMake/Languages/LINK_LANGUAGE-genex-stderr.txt create mode 100644 Tests/RunCMake/Languages/LINK_LANGUAGE-genex.cmake create mode 100644 Tests/RunCMake/Languages/empty.cpp create mode 100644 Tests/RunCMake/Languages/link-libraries-TARGET_FILE-genex-ok-result.txt create mode 100644 Tests/RunCMake/Languages/link-libraries-TARGET_FILE-genex-ok.cmake create mode 100644 Tests/RunCMake/Languages/link-libraries-TARGET_FILE-genex-result.txt create mode 100644 Tests/RunCMake/Languages/link-libraries-TARGET_FILE-genex-stderr.txt create mode 100644 Tests/RunCMake/Languages/link-libraries-TARGET_FILE-genex.cmake create mode 100644 Tests/RunCMake/ObsoleteQtMacros/AutomocMacro-WARN-result.txt create mode 100644 Tests/RunCMake/ObsoleteQtMacros/AutomocMacro-WARN-stderr.txt create mode 100644 Tests/RunCMake/ObsoleteQtMacros/AutomocMacro-WARN.cmake create mode 100644 Tests/RunCMake/ObsoleteQtMacros/CMakeLists.txt create mode 100644 Tests/RunCMake/ObsoleteQtMacros/RunCMakeTest.cmake create mode 100644 Tests/RunCMake/ObsoleteQtMacros/UseModulesMacro-WARN-result.txt create mode 100644 Tests/RunCMake/ObsoleteQtMacros/UseModulesMacro-WARN-stderr.txt create mode 100644 Tests/RunCMake/ObsoleteQtMacros/UseModulesMacro-WARN.cmake create mode 100644 Tests/RunCMake/ObsoleteQtMacros/empty.cpp create mode 100644 Tests/RunCMake/Syntax/.gitattributes create mode 100644 Tests/RunCMake/Syntax/BracketWarn-stderr.txt create mode 100644 Tests/RunCMake/Syntax/BracketWarn-stdout.txt create mode 100644 Tests/RunCMake/Syntax/BracketWarn.cmake create mode 100644 Tests/RunCMake/Syntax/CMakeLists.txt create mode 100644 Tests/RunCMake/Syntax/CommandComments-stderr.txt create mode 100644 Tests/RunCMake/Syntax/CommandComments.cmake create mode 100644 Tests/RunCMake/Syntax/CommandError0-result.txt create mode 100644 Tests/RunCMake/Syntax/CommandError0-stderr.txt create mode 100644 Tests/RunCMake/Syntax/CommandError0.cmake create mode 100644 Tests/RunCMake/Syntax/CommandError1-result.txt create mode 100644 Tests/RunCMake/Syntax/CommandError1-stderr.txt create mode 100644 Tests/RunCMake/Syntax/CommandError1.cmake create mode 100644 Tests/RunCMake/Syntax/CommandNewlines-stderr.txt create mode 100644 Tests/RunCMake/Syntax/CommandNewlines.cmake create mode 100644 Tests/RunCMake/Syntax/CommandSpaces-stderr.txt create mode 100644 Tests/RunCMake/Syntax/CommandSpaces.cmake create mode 100644 Tests/RunCMake/Syntax/CommandTabs-stderr.txt create mode 100644 Tests/RunCMake/Syntax/CommandTabs.cmake create mode 100644 Tests/RunCMake/Syntax/ParenNoSpace-stderr.txt create mode 100644 Tests/RunCMake/Syntax/ParenNoSpace-stdout.txt create mode 100644 Tests/RunCMake/Syntax/ParenNoSpace.cmake create mode 100644 Tests/RunCMake/Syntax/RunCMakeTest.cmake create mode 100644 Tests/RunCMake/Syntax/String0-stderr.txt create mode 100644 Tests/RunCMake/Syntax/String0.cmake create mode 100644 Tests/RunCMake/Syntax/String1-stderr.txt create mode 100644 Tests/RunCMake/Syntax/String1.cmake create mode 100644 Tests/RunCMake/Syntax/StringNoSpace-stderr.txt create mode 100644 Tests/RunCMake/Syntax/StringNoSpace.cmake create mode 100644 Tests/RunCMake/Syntax/Unquoted0-stderr.txt create mode 100644 Tests/RunCMake/Syntax/Unquoted0.cmake create mode 100644 Tests/RunCMake/Syntax/Unquoted1-stderr.txt create mode 100644 Tests/RunCMake/Syntax/Unquoted1.cmake create mode 100644 Tests/RunCMake/Syntax/UnterminatedCall1-result.txt create mode 100644 Tests/RunCMake/Syntax/UnterminatedCall1-stderr.txt create mode 100644 Tests/RunCMake/Syntax/UnterminatedCall1.cmake create mode 100644 Tests/RunCMake/Syntax/UnterminatedCall2-result.txt create mode 100644 Tests/RunCMake/Syntax/UnterminatedCall2-stderr.txt create mode 100644 Tests/RunCMake/Syntax/UnterminatedCall2.cmake create mode 100644 Tests/RunCMake/Syntax/UnterminatedString-result.txt create mode 100644 Tests/RunCMake/Syntax/UnterminatedString-stderr.txt create mode 100644 Tests/RunCMake/Syntax/UnterminatedString.cmake create mode 100644 Tests/RunCMake/TargetPolicies/CMakeLists.txt create mode 100644 Tests/RunCMake/TargetPolicies/PolicyList-result.txt create mode 100644 Tests/RunCMake/TargetPolicies/PolicyList-stderr.txt create mode 100644 Tests/RunCMake/TargetPolicies/PolicyList.cmake create mode 100644 Tests/RunCMake/TargetPolicies/RunCMakeTest.cmake create mode 100644 Tests/RunCMake/TargetPolicies/empty.cpp create mode 100644 Tests/RunCMake/VisibilityPreset/CMakeLists.txt create mode 100644 Tests/RunCMake/VisibilityPreset/PropertyTypo-result.txt create mode 100644 Tests/RunCMake/VisibilityPreset/PropertyTypo-stderr.txt create mode 100644 Tests/RunCMake/VisibilityPreset/PropertyTypo.cmake create mode 100644 Tests/RunCMake/VisibilityPreset/RunCMakeTest.cmake create mode 100644 Tests/RunCMake/VisibilityPreset/lib.cpp create mode 100644 Tests/RunCMake/alias_targets/CMakeLists.txt create mode 100644 Tests/RunCMake/alias_targets/RunCMakeTest.cmake create mode 100644 Tests/RunCMake/alias_targets/add_dependencies-result.txt create mode 100644 Tests/RunCMake/alias_targets/add_dependencies-stderr.txt create mode 100644 Tests/RunCMake/alias_targets/add_dependencies.cmake create mode 100644 Tests/RunCMake/alias_targets/add_executable-library-result.txt create mode 100644 Tests/RunCMake/alias_targets/add_executable-library-stderr.txt create mode 100644 Tests/RunCMake/alias_targets/add_executable-library.cmake create mode 100644 Tests/RunCMake/alias_targets/add_library-executable-result.txt create mode 100644 Tests/RunCMake/alias_targets/add_library-executable-stderr.txt create mode 100644 Tests/RunCMake/alias_targets/add_library-executable.cmake create mode 100644 Tests/RunCMake/alias_targets/alias-target-result.txt create mode 100644 Tests/RunCMake/alias_targets/alias-target-stderr.txt create mode 100644 Tests/RunCMake/alias_targets/alias-target.cmake create mode 100644 Tests/RunCMake/alias_targets/empty.cpp create mode 100644 Tests/RunCMake/alias_targets/exclude-from-all-result.txt create mode 100644 Tests/RunCMake/alias_targets/exclude-from-all-stderr.txt create mode 100644 Tests/RunCMake/alias_targets/exclude-from-all.cmake create mode 100644 Tests/RunCMake/alias_targets/export-result.txt create mode 100644 Tests/RunCMake/alias_targets/export-stderr.txt create mode 100644 Tests/RunCMake/alias_targets/export.cmake create mode 100644 Tests/RunCMake/alias_targets/imported-result.txt create mode 100644 Tests/RunCMake/alias_targets/imported-stderr.txt create mode 100644 Tests/RunCMake/alias_targets/imported-target-result.txt create mode 100644 Tests/RunCMake/alias_targets/imported-target-stderr.txt create mode 100644 Tests/RunCMake/alias_targets/imported-target.cmake create mode 100644 Tests/RunCMake/alias_targets/imported.cmake create mode 100644 Tests/RunCMake/alias_targets/install-export-result.txt create mode 100644 Tests/RunCMake/alias_targets/install-export-stderr.txt create mode 100644 Tests/RunCMake/alias_targets/install-export.cmake create mode 100644 Tests/RunCMake/alias_targets/invalid-name-result.txt create mode 100644 Tests/RunCMake/alias_targets/invalid-name-stderr.txt create mode 100644 Tests/RunCMake/alias_targets/invalid-name.cmake create mode 100644 Tests/RunCMake/alias_targets/invalid-target-result.txt create mode 100644 Tests/RunCMake/alias_targets/invalid-target-stderr.txt create mode 100644 Tests/RunCMake/alias_targets/invalid-target.cmake create mode 100644 Tests/RunCMake/alias_targets/multiple-targets-result.txt create mode 100644 Tests/RunCMake/alias_targets/multiple-targets-stderr.txt create mode 100644 Tests/RunCMake/alias_targets/multiple-targets.cmake create mode 100644 Tests/RunCMake/alias_targets/name-conflict-result.txt create mode 100644 Tests/RunCMake/alias_targets/name-conflict-stderr.txt create mode 100644 Tests/RunCMake/alias_targets/name-conflict.cmake create mode 100644 Tests/RunCMake/alias_targets/no-targets-result.txt create mode 100644 Tests/RunCMake/alias_targets/no-targets-stderr.txt create mode 100644 Tests/RunCMake/alias_targets/no-targets.cmake create mode 100644 Tests/RunCMake/alias_targets/set_property-result.txt create mode 100644 Tests/RunCMake/alias_targets/set_property-stderr.txt create mode 100644 Tests/RunCMake/alias_targets/set_property.cmake create mode 100644 Tests/RunCMake/alias_targets/set_target_properties-result.txt create mode 100644 Tests/RunCMake/alias_targets/set_target_properties-stderr.txt create mode 100644 Tests/RunCMake/alias_targets/set_target_properties.cmake create mode 100644 Tests/RunCMake/alias_targets/target_include_directories-result.txt create mode 100644 Tests/RunCMake/alias_targets/target_include_directories-stderr.txt create mode 100644 Tests/RunCMake/alias_targets/target_include_directories.cmake create mode 100644 Tests/RunCMake/alias_targets/target_link_libraries-result.txt create mode 100644 Tests/RunCMake/alias_targets/target_link_libraries-stderr.txt create mode 100644 Tests/RunCMake/alias_targets/target_link_libraries.cmake create mode 100644 Tests/RunCMake/get_filename_component/CMakeLists.txt create mode 100644 Tests/RunCMake/get_filename_component/KnownComponents.cmake create mode 100644 Tests/RunCMake/get_filename_component/RunCMakeTest.cmake create mode 100644 Tests/RunCMake/get_filename_component/UnknownComponent-result.txt create mode 100644 Tests/RunCMake/get_filename_component/UnknownComponent-stderr.txt create mode 100644 Tests/RunCMake/get_filename_component/UnknownComponent.cmake create mode 100644 Tests/RunCMake/if/CMakeLists.txt create mode 100644 Tests/RunCMake/if/IsDirectory-stdout.txt create mode 100644 Tests/RunCMake/if/IsDirectory.cmake create mode 100644 Tests/RunCMake/if/IsDirectoryLong-stdout.txt create mode 100644 Tests/RunCMake/if/IsDirectoryLong.cmake create mode 100644 Tests/RunCMake/if/RunCMakeTest.cmake create mode 100644 Tests/RunCMake/include_directories/CMP0021-result.txt create mode 100644 Tests/RunCMake/include_directories/CMP0021-stderr.txt create mode 100644 Tests/RunCMake/include_directories/CMP0021.cmake create mode 100644 Tests/RunCMake/include_directories/install_config-result.txt create mode 100644 Tests/RunCMake/include_directories/install_config-stderr.txt create mode 100644 Tests/RunCMake/include_directories/install_config.cmake create mode 100644 Tests/RunCMake/target_link_libraries/CMP0023-NEW-2-result.txt create mode 100644 Tests/RunCMake/target_link_libraries/CMP0023-NEW-2-stderr.txt create mode 100644 Tests/RunCMake/target_link_libraries/CMP0023-NEW-2.cmake create mode 100644 Tests/RunCMake/target_link_libraries/CMP0023-NEW-result.txt create mode 100644 Tests/RunCMake/target_link_libraries/CMP0023-NEW-stderr.txt create mode 100644 Tests/RunCMake/target_link_libraries/CMP0023-NEW.cmake create mode 100644 Tests/RunCMake/target_link_libraries/CMP0023-WARN-2-stderr.txt create mode 100644 Tests/RunCMake/target_link_libraries/CMP0023-WARN-2.cmake create mode 100644 Tests/RunCMake/target_link_libraries/CMP0023-WARN-stderr.txt create mode 100644 Tests/RunCMake/target_link_libraries/CMP0023-WARN.cmake create mode 100644 Tests/RunCMake/target_link_libraries/CMakeLists.txt create mode 100644 Tests/RunCMake/target_link_libraries/MixedSignature-result.txt create mode 100644 Tests/RunCMake/target_link_libraries/MixedSignature-stderr.txt create mode 100644 Tests/RunCMake/target_link_libraries/MixedSignature.cmake create mode 100644 Tests/RunCMake/target_link_libraries/RunCMakeTest.cmake create mode 100644 Tests/RunCMake/target_link_libraries/Separate-PRIVATE-LINK_PRIVATE-uses-result.txt create mode 100644 Tests/RunCMake/target_link_libraries/Separate-PRIVATE-LINK_PRIVATE-uses.cmake create mode 100644 Tests/RunCMake/target_link_libraries/empty.cpp create mode 100644 Tests/RunCMake/target_link_libraries/empty_vs6_1.cpp create mode 100644 Tests/RunCMake/target_link_libraries/empty_vs6_2.cpp create mode 100644 Tests/RunCMake/target_link_libraries/empty_vs6_3.cpp create mode 100644 Tests/RunCMake/try_compile/BadLinkLibraries-result.txt create mode 100644 Tests/RunCMake/try_compile/BadLinkLibraries-stderr.txt create mode 100644 Tests/RunCMake/try_compile/BadLinkLibraries.cmake create mode 100644 Tests/RunCMake/try_compile/BadSources1-result.txt create mode 100644 Tests/RunCMake/try_compile/BadSources1-stderr.txt create mode 100644 Tests/RunCMake/try_compile/BadSources1.cmake create mode 100644 Tests/RunCMake/try_compile/BadSources2-result.txt create mode 100644 Tests/RunCMake/try_compile/BadSources2-stderr.txt create mode 100644 Tests/RunCMake/try_compile/BadSources2.cmake create mode 100644 Tests/RunCMake/try_compile/CMakeLists.txt create mode 100644 Tests/RunCMake/try_compile/CopyFileErrorNoCopyFile-result.txt create mode 100644 Tests/RunCMake/try_compile/CopyFileErrorNoCopyFile-stderr.txt create mode 100644 Tests/RunCMake/try_compile/CopyFileErrorNoCopyFile.cmake create mode 100644 Tests/RunCMake/try_compile/NoArgs-result.txt create mode 100644 Tests/RunCMake/try_compile/NoArgs-stderr.txt create mode 100644 Tests/RunCMake/try_compile/NoArgs.cmake create mode 100644 Tests/RunCMake/try_compile/NoCopyFile-result.txt create mode 100644 Tests/RunCMake/try_compile/NoCopyFile-stderr.txt create mode 100644 Tests/RunCMake/try_compile/NoCopyFile.cmake create mode 100644 Tests/RunCMake/try_compile/NoCopyFile2-result.txt create mode 100644 Tests/RunCMake/try_compile/NoCopyFile2-stderr.txt create mode 100644 Tests/RunCMake/try_compile/NoCopyFile2.cmake create mode 100644 Tests/RunCMake/try_compile/NoCopyFileError-result.txt create mode 100644 Tests/RunCMake/try_compile/NoCopyFileError-stderr.txt create mode 100644 Tests/RunCMake/try_compile/NoCopyFileError.cmake create mode 100644 Tests/RunCMake/try_compile/NoOutputVariable-result.txt create mode 100644 Tests/RunCMake/try_compile/NoOutputVariable-stderr.txt create mode 100644 Tests/RunCMake/try_compile/NoOutputVariable.cmake create mode 100644 Tests/RunCMake/try_compile/NoOutputVariable2-result.txt create mode 100644 Tests/RunCMake/try_compile/NoOutputVariable2-stderr.txt create mode 100644 Tests/RunCMake/try_compile/NoOutputVariable2.cmake create mode 100644 Tests/RunCMake/try_compile/NoSources-result.txt create mode 100644 Tests/RunCMake/try_compile/NoSources-stderr.txt create mode 100644 Tests/RunCMake/try_compile/NoSources.cmake create mode 100644 Tests/RunCMake/try_compile/NonSourceCompileDefinitions-result.txt create mode 100644 Tests/RunCMake/try_compile/NonSourceCompileDefinitions-stderr.txt create mode 100644 Tests/RunCMake/try_compile/NonSourceCompileDefinitions.cmake create mode 100644 Tests/RunCMake/try_compile/NonSourceCopyFile-result.txt create mode 100644 Tests/RunCMake/try_compile/NonSourceCopyFile-stderr.txt create mode 100644 Tests/RunCMake/try_compile/NonSourceCopyFile.cmake create mode 100644 Tests/RunCMake/try_compile/OneArg-result.txt create mode 100644 Tests/RunCMake/try_compile/OneArg-stderr.txt create mode 100644 Tests/RunCMake/try_compile/OneArg.cmake create mode 100644 Tests/RunCMake/try_compile/RunCMakeTest.cmake create mode 100644 Tests/RunCMake/try_compile/TwoArgs-result.txt create mode 100644 Tests/RunCMake/try_compile/TwoArgs-stderr.txt create mode 100644 Tests/RunCMake/try_compile/TwoArgs.cmake create mode 100644 Tests/RunCMake/try_compile/proj/CMakeLists.txt create mode 100644 Tests/RunCMake/try_compile/src.c create mode 100644 Tests/RunCMake/variable_watch/CMakeLists.txt create mode 100644 Tests/RunCMake/variable_watch/ModifiedAccess-stderr.txt create mode 100644 Tests/RunCMake/variable_watch/ModifiedAccess.cmake create mode 100644 Tests/RunCMake/variable_watch/NoWatcher-stderr.txt create mode 100644 Tests/RunCMake/variable_watch/NoWatcher.cmake create mode 100644 Tests/RunCMake/variable_watch/RunCMakeTest.cmake create mode 100644 Tests/RunCMake/variable_watch/WatchTwice-stderr.txt create mode 100644 Tests/RunCMake/variable_watch/WatchTwice.cmake create mode 100644 Tests/TryCompile/fail2a.c create mode 100644 Tests/TryCompile/fail2b.c create mode 100644 Tests/TryCompile/pass2a.c create mode 100644 Tests/TryCompile/pass2b.cxx create mode 100644 Tests/TryCompile/testdef.c create mode 100644 Tests/VSProjectInSubdir/CMakeLists.txt create mode 100644 Tests/VSProjectInSubdir/subdir/CMakeLists.txt create mode 100644 Tests/VSWindowsFormsResx/CMakeLists.txt create mode 100644 Tests/VSWindowsFormsResx/WindowsFormsResx/Header.h create mode 100644 Tests/VSWindowsFormsResx/WindowsFormsResx/MyForm.cpp create mode 100644 Tests/VSWindowsFormsResx/WindowsFormsResx/MyForm.h create mode 100644 Tests/VSWindowsFormsResx/WindowsFormsResx/MyForm.resx create mode 100644 Tests/VSWindowsFormsResx/WindowsFormsResx/Source.cpp create mode 100644 Tests/WarnUnusedCliUnused/CMakeLists.txt create mode 100644 Tests/WarnUnusedCliUnused/empty.cpp create mode 100644 Utilities/cmlibarchive/build/cmake/FindLibGCC.cmake create mode 100644 Utilities/cmlibarchive/build/cmake/FindNettle.cmake create mode 100644 Utilities/cmlibarchive/build/cmake/FindPCREPOSIX.cmake mode change 100644 => 100755 Utilities/cmlibarchive/build/utils/gen_archive_string_composition_h.sh create mode 100644 Utilities/cmlibarchive/libarchive/archive_cmdline.c create mode 100644 Utilities/cmlibarchive/libarchive/archive_cmdline_private.h create mode 100644 Utilities/cmlibarchive/libarchive/archive_getdate.c create mode 100644 Utilities/cmlibarchive/libarchive/archive_match.c create mode 100644 Utilities/cmlibarchive/libarchive/archive_pathmatch.c create mode 100644 Utilities/cmlibarchive/libarchive/archive_pathmatch.h create mode 100644 Utilities/cmlibarchive/libarchive/archive_read_append_filter.c create mode 100644 Utilities/cmlibarchive/libarchive/archive_read_set_format.c create mode 100644 Utilities/cmlibarchive/libarchive/archive_read_support_filter_grzip.c create mode 100644 Utilities/cmlibarchive/libarchive/archive_read_support_filter_lrzip.c create mode 100644 Utilities/cmlibarchive/libarchive/archive_read_support_filter_lzop.c create mode 100644 Utilities/cmlibarchive/libarchive/archive_write_add_filter.c create mode 100644 Utilities/cmlibarchive/libarchive/archive_write_add_filter_b64encode.c create mode 100644 Utilities/cmlibarchive/libarchive/archive_write_add_filter_by_name.c create mode 100644 Utilities/cmlibarchive/libarchive/archive_write_add_filter_grzip.c create mode 100644 Utilities/cmlibarchive/libarchive/archive_write_add_filter_lrzip.c create mode 100644 Utilities/cmlibarchive/libarchive/archive_write_add_filter_lzop.c create mode 100644 Utilities/cmlibarchive/libarchive/archive_write_add_filter_uuencode.c create mode 100644 Utilities/cmlibarchive/libarchive/archive_write_disk_acl.c create mode 100644 Utilities/cmlibarchive/libarchive/archive_write_set_format_v7tar.c rename Utilities/cmlibarchive/libarchive/{filter_fork.c => filter_fork_posix.c} (62%) diff --git a/CMakeCPack.cmake b/CMakeCPack.cmake index a27d00004..2495c4476 100644 --- a/CMakeCPack.cmake +++ b/CMakeCPack.cmake @@ -113,6 +113,8 @@ if(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake") include(Utilities/Release/Cygwin/CMakeLists.txt) endif() + set(CPACK_WIX_UPGRADE_GUID "8ffd1d72-b7f1-11e2-8ee5-00238bca4991") + # Set the options file that needs to be included inside CMakeCPackOptions.cmake set(QT_DIALOG_CPACK_OPTIONS_FILE ${CMake_BINARY_DIR}/Source/QtDialog/QtDialogCPack.cmake) configure_file("${CMake_SOURCE_DIR}/CMakeCPackOptions.cmake.in" diff --git a/CMakeCPackOptions.cmake.in b/CMakeCPackOptions.cmake.in index 47dad49c2..008a102b5 100644 --- a/CMakeCPackOptions.cmake.in +++ b/CMakeCPackOptions.cmake.in @@ -34,7 +34,7 @@ if(CPACK_GENERATOR MATCHES "NSIS") set(CPACK_NSIS_MODIFY_PATH ON) endif() -# include the cpack options for qt dialog if they exisit +# include the cpack options for qt dialog if they exist # they might not if qt was not enabled for the build include("@QT_DIALOG_CPACK_OPTIONS_FILE@" OPTIONAL) diff --git a/CMakeLists.txt b/CMakeLists.txt index 75d372d03..1fbbe08a1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -231,7 +231,7 @@ macro (CMAKE_BUILD_UTILITIES) set(KWSYS_USE_Process 1) set(KWSYS_USE_CommandLineArguments 1) set(KWSYS_HEADER_ROOT ${CMake_BINARY_DIR}/Source) - set(KWSYS_INSTALL_DOC_DIR "${CMake_DOC_DEST}") + set(KWSYS_INSTALL_DOC_DIR "${CMAKE_DOC_DIR}") add_subdirectory(Source/kwsys) set(kwsys_folder "Utilities/KWSys") CMAKE_SET_TARGET_FOLDER(${KWSYS_NAMESPACE} "${kwsys_folder}") @@ -460,26 +460,27 @@ set(LIBRARY_OUTPUT_PATH "" CACHE INTERNAL # install tree. set(CMAKE_SKIP_RPATH ON CACHE INTERNAL "CMake does not need RPATHs.") -set(CMAKE_DATA_DIR "/share/cmake-${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}" CACHE STRING +set(CMAKE_DATA_DIR "share/cmake-${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}" CACHE STRING "Install location for data (relative to prefix).") -set(CMAKE_DOC_DIR "/doc/cmake-${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}" CACHE STRING +set(CMAKE_DOC_DIR "doc/cmake-${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}" CACHE STRING "Install location for documentation (relative to prefix).") -set(CMAKE_MAN_DIR "/man" CACHE STRING +set(CMAKE_MAN_DIR "man" CACHE STRING "Install location for man pages (relative to prefix).") mark_as_advanced(CMAKE_DATA_DIR CMAKE_DOC_DIR CMAKE_MAN_DIR) if(CYGWIN AND EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake") # Force doc, data and man dirs to conform to cygwin layout. - set(CMAKE_DOC_DIR "/share/doc/cmake-${CMake_VERSION}") - set(CMAKE_DATA_DIR "/share/cmake-${CMake_VERSION}") - set(CMAKE_MAN_DIR "/share/man") + set(CMAKE_DOC_DIR "share/doc/cmake-${CMake_VERSION}") + set(CMAKE_DATA_DIR "share/cmake-${CMake_VERSION}") + set(CMAKE_MAN_DIR "share/man") # let the user know we just forced these values message(STATUS "Setup for Cygwin packaging") message(STATUS "Override cache CMAKE_DOC_DIR = ${CMAKE_DOC_DIR}") message(STATUS "Override cache CMAKE_DATA_DIR = ${CMAKE_DATA_DIR}") message(STATUS "Override cache CMAKE_MAN_DIR = ${CMAKE_MAN_DIR}") endif() -string(REGEX REPLACE "^/" "" CMake_DATA_DEST "${CMAKE_DATA_DIR}") -string(REGEX REPLACE "^/" "" CMake_DOC_DEST "${CMAKE_DOC_DIR}") +string(REGEX REPLACE "^/" "" CMAKE_DATA_DIR "${CMAKE_DATA_DIR}") +string(REGEX REPLACE "^/" "" CMAKE_DOC_DIR "${CMAKE_DOC_DIR}") +string(REGEX REPLACE "^/" "" CMAKE_MAN_DIR "${CMAKE_MAN_DIR}") if(BUILD_TESTING) include(${CMake_SOURCE_DIR}/Tests/CMakeInstall.cmake) @@ -625,12 +626,12 @@ add_test(SystemInformationNew "${CMAKE_CMAKE_COMMAND}" --system-information -G "${CMAKE_TEST_GENERATOR}" ) # Install license file as it requires. -install(FILES Copyright.txt DESTINATION ${CMake_DOC_DEST}) +install(FILES Copyright.txt DESTINATION ${CMAKE_DOC_DIR}) # Install script directories. install( DIRECTORY Modules Templates - DESTINATION "${CMake_DATA_DEST}" + DESTINATION ${CMAKE_DATA_DIR} FILE_PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ DIRECTORY_PERMISSIONS OWNER_READ OWNER_EXECUTE OWNER_WRITE GROUP_READ GROUP_EXECUTE diff --git a/ChangeLog.manual b/ChangeLog.manual index 134b4aa17..0e84fb6d2 100644 --- a/ChangeLog.manual +++ b/ChangeLog.manual @@ -1,3 +1,578 @@ +Changes in CMake 2.8.12 (since 2.8.12-rc4) +------------------------------------------ +Brad King (4): + Xcode: Fix test architecture selection for Xcode >= 5 + Xcode: Teach Tests/BuildDepends to allow LINK_DEPENDS_NO_SHARED failure + Xcode: Drop XCODE_DEPEND_HELPER for Xcode >= 5 + Xcode: Fix OBJECT library support for Xcode 5 (#14254) + +Stephen Kelly (1): + Genex: Fix processing multiple include directories for relative paths + +Changes in CMake 2.8.12-rc4 (since 2.8.12-rc3) +---------------------------------------------- +Brad King (8): + VS: Future-proof Intel project format selection + MSVC: Drop /link from executable link lines with Ninja + FindCUDA: Always list custom command outputs in their targets + FindPNG: Honor old PNG_LIBRARY if provided (#14398) + FindHDF5: Fix regression in per-configuration library selection + bash-completion: Future-proof --help-*-list "cXXXX version" filtering + OS X: Search system SDKs for frameworks + Use first custom command for the same output (#14446) + +Patrick Gansterer (3): + MSVC: Fix version test for linking corelibc on Windows CE (#14420) + MSVC: Fix WinCE arch family preprocessor symbol (#14436) + VS: Use version-specific subsystem for WinCE compiler id (#14440) + +Rolf Eike Beer (1): + bootstrap: try better workaround for builds on Linux/HPPA + +Stephen Kelly (3): + Add differing target property content to policy CMP0022 warning + Fix CMP0022 warning when no old-style property is set + genex: Fix preprocessing with incomplete content (#14410). + +Changes in CMake 2.8.12-rc3 (since 2.8.12-rc2) +---------------------------------------------- +Robert Maynard (1): + cmMakefile: Do not track CMake temporary files. + +Changes in CMake 2.8.12-rc2 (since 2.8.12-rc1) +---------------------------------------------- +Brad King (2): + Fix RunCMake.Configure test expectation newline matching + Clean up install rules of CMake itself (#14371) + +Clinton Stimpson (1): + OSX: Allow an empty INSTALL_NAME_DIR to override MACOSX_RPATH. + +Eric Bélanger (1): + FindImageMagick: Find libraries named with HDRI support (#14348) + +Raphael Kubo da Costa (1): + FindTCL: Add BSD paths for Tcl/Tk 8.6 + +Robert Maynard (2): + VS: Generate ToolsVersion matching each VS version + cmMakefile: Do not track configured files known to be temporary + +Rolf Eike Beer (1): + CheckC*CompilerFlag: add documentation what to expect from a positive result + +Stephen Kelly (6): + Fix OLD behavior of CMP0021. + try_compile: Extract IMPORTED targets from LINK_DEPENDENT_LIBRARIES + try_compile: Extract IMPORTED targets from INTERFACE_LINK_LIBRARIES + Genex: Fix evaluation of MAP_IMPORTED_CONFIG_ + Fix some whitespace errors in docs. + Normalize system directories from the interface target property + +Yury G. Kudryashov (1): + CPack: Fix a typo in documentation + +Zack Galbreath (1): + CTest: Fix GTM coverage parsing line offset bug + +Changes in CMake 2.8.12-rc1 (since 2.8.11.2) +-------------------------------------------- +Adam J. Weigold (1): + CPackWIX: Add support for custom WiX templates + +Alex Neundorf (12): + CMakeSystem: include toolchain file after setting CMAKE_HOST_ (#13796) + Add support files for C, C++ and ASM for the IAR toolchain. + Add regexps for the IAR toolchain to the vendor list. + Add IAR to the CMakeDetectC(XX)CompilerID.c(pp).in + cmake-gui: use shortcut F only for "Find in Output" + Eclipse: fix #14204 and #14205: no file links to directories + automoc: add a global AUTOMOC_TARGETS_FOLDER property + install: do not strip dll import libraries (#14123) + ExportTargets: add one more comment to the generated file. + Add documentation for the --graphviz support + graphvizoptions: add copyright notice + add macros cmake_print_properties() and cmake_print_variables() + +Alexander Mohr (1): + VS: Detect MSVC compiler id on ARM toolchain + +Andreas Mohr (10): + Fix spelling and typos (affecting users) + Fix spelling and typos (affecting binary data / module messages) + Fix spelling and typos (non-binary) + Fix spelling and typos (product names) + FindwxWidgets: add DOC strings with usual style + Explain distribution of Win9x binary on all Windows versions. + VS10: add detailed comment about MIDL processing + Docs: Update description of CMAKE_(BUILD_TYPE|CONFIGURATION_TYPES) + Docs: Clarify that CMAKE_*_(PREFIX|SUFFIX) affect filenames + Docs: Clarify wording "flag used" => "flag (to|will) be used" + +Ben Boeckel (12): + set_property: Do not remove a property when APPENDing nothing + Tests/RunCMake: Document stripping of expected output + export: Error when exporting a target without a language + variable_watch: Store client data as pointers + variable_watch: Add a deleter for the client data + variable_watch: Match client_data when finding duplicates + variable_watch: Allow specifying the data to match in RemoveWatch + variable_watch: Prevent making extra entries in the watch map + variable_watch: Fix a typo in the error message + variable_watch: Don't share memory for callbacks + variable_watch: Check newValue for NULL + variable_watch: Add test for watching a variable multiple times + +Bill Hoffman (1): + Do not set CMAKE_MATCH_ variables when not neeeded + +Bjoern Thiel (1): + SelectLibraryConfigurations: Fix for cached _LIBRARY + +Brad King (91): + VS: Separate compiler and linker PDB files (#11899, #14062) + MSVC: Invoke 'link' directly for executables + Ninja: Fix OBJECT_DIR placeholder path conversion + VS 10: Escape ; as %3B in preprocessor definitions (#14073) + CTest: Simplify ctest_* command source/build dir lookup + get_filename_component: Add explicit unit tests + get_filename_component: Add DIRECTORY option (#14091) + Xcode: Use explicitFileType to mark source types (#14093) + Check{C,CXX}CompilerFlag: Test using C locale (#14102) + Windows: Search '/' prefix only when cross compiling (#10994) + Recognize ld with toolchain prefix (#13960) + VS: Always initialize CMAKE_CONFIGURATION_TYPES in IDE generators + Begin post-2.8.11 development + Sanitize linker name to parse implicit link line (#14154) + VS: Allow /Fa to set AssemblerListingLocation (#14153) + Tests/IncludeDirectories: Avoid shared library with no symbols + if: Add test for IS_DIRECTORY + try_compile: Add test for bad call error cases + try_compile: Refactor argument processing + variable_watch: Add test for MODIFIED_ACCESS report + bootstrap: Compile KWSys SystemTools with UTIME(S|NSAT) values + variable_watch: Remove leftover debugging code (#14187) + variable_watch: Print accesses as "CMake Debug Log" messages + Docs: Clarify CMAKE_PARENT_LIST_FILE (#14194) + get_filename_component: Test ABSOLUTE of .. after root component + try_compile: Add signature to allow multiple SOURCES + enable_language: Clarify documentation + Split cmBootstrapCommands.cxx into two sources + Document CMAKE_INSTALL_PREFIX in CMAKE_SYSTEM_PREFIX_PATH + cmake: Document "-E tar" support for .zip (#14225) + FindBoost: Clarify failure on missing 'static' libs (#14235) + CMakeDetermineVSServicePack: Improve documentation + CMakeDetermineVSServicePack: Add VS 11 update 1 and 2 (#14239) + Document ENV syntax as a "variable" (#14245) + Embarcadero: Use response files only for includes, objects, and libs + Escape target flags taken from COMPILE_OPTIONS + Refactor target COMPILE_OPTIONS and COMPILE_FLAGS handling + CMakeDetermineVSServicePack: Add VS 11 update 3 + Document removal of 'register' from flex/bison output + VS12: Find proper MSBuild for VSProjectInSubdir test + Fortran: Use explicit type in Fortran 90 check + project: Document top-level CMakeLists.txt requirement + ExternalProject: Document multiple COMMAND lines + include: Clarify variable access scope for included file + VS: Fix /MAP:mapfile flag mapping (#14282) + cmake: On configure error suggest looking at CMake*.log files + try_compile: Escape CMAKE__FLAGS in test projects (#14268) + try_compile: Add COPY_FILE_ERROR option to capture failure + FindPNG: Add versioned library names for 1.6 (#14289) + cmake: Fix resource leak reported by cppcheck + VS,Xcode: Drop incorrect legacy dependency trace (#14291) + OS X: Add copyright notices to Darwin-*-Fortran.cmake + VS: Avoid leaking child process output back to IDE (#14266) + Fix ExportImport test cmp0022NEW build on Watcom + add_test: Document test name restrictions (#14298) + UseJava: Update notice of copyright by Kitware + add_custom_command: Manage backtrace memory correctly (#14299) + Teach compiler ABI check to tolerate try_compile COPY_FILE failure + Test COMPILE_DEFINITIONS target property get/set/get round-trip + Check*CompilerFlag: Document use of CMAKE_REQUIRED_DEFINITIONS (#14309) + sha2: Avoid type-punned pointer dereference (#14314) + VS 6: Tell BuildDepends test to tolerate ninjadep failure + cmMakefile: Do not track configured files known to be temporary + libarchive: Update README-CMake.txt for new snapshot + libarchive: Include cm_zlib.h to get zlib used by CMake + libarchive: Silence API deprecation warnings + libarchive: Avoid struct init with variable + libarchive: Remove build options not used by CMake + libarchive: Backport to CMake 2.8.2 + VS10: Honor user-specified /SUBSYSTEM: flag (#14326) + VS10: Escape include paths in XML project files (#14331) + OS X: Search for SDK based on deployment target (#14324) + bootstrap: Do not suppress CMAKE_OSX_SYSROOT if CFLAGS have -isysroot (#14324) + OS X: Enable command-line build without tools in PATH + VS 6,7: Refactor local generators to avoid GetSourceFileWithOutput + cmake-gui: Fix build rules for Qt5 on Windows + Include cmMakefile.h before cm*Lexer.h to get stdint.h first + Skip CTestLimitDashJ test on Borland + Add RunCMake.Syntax test to cover argument parsing + cmListFileLexer: Fix line number after backslash in string + cmListFileLexer: Split normal and legacy unquoted arguments + cmListFileArgument: Generalize 'Quoted' bool to 'Delimeter' enum + Add RunCMake.Syntax test cases for command invocation styles + cmListFileCache: Convert CMake language parser to class + Warn about arguments not separated by whitespace + Warn about unquoted arguments that look like long brackets + cmListFileLexer: Modify flex output to avoid Borland warning + Cygwin: Avoid legacy warnings in RunCMake.* tests + Update version introducing CMP0021, CMP0022, and CMP0023 + OS X: Do not default to non-existent deployment target SDK + Do not warn about left paren not separated by a space + +Christian Maaser (1): + VS: Add support for .NET target framework version + +Clinton Stimpson (12): + Improve documentation for CPACK_PACKAGE_INSTALL_REGISTRY_KEY. + Refactor how bundles and frameworks are supported. + Xcode: Add support for shared library versioning + OS X: Fix getting of CFBundle LOCATION property. + OS X: Add RPATH support for Mac. + Xcode: Add rpath support in Xcode generator. + OS X: Add support for @rpath in export files. + OS X: Add test for rpaths on Mac. + OS X: Improvements for getting install name of dylib. + OS X: Enable rpath support on Mac OS X when find_library() is used. + OS X: Fix regression handling frameworks for Ninja + OS X: If necessary, use xcrun to help find otool used to query install names. + +Cédric OCHS (1): + Xcode: Support XCODE_ATTRIBUTE_ with [variant=] (#12532) + +Daniele E. Domenichelli (15): + FindGTK2: Move check for pangocairo in gtk module + FindGTK2: Detect gthread library + FindFreetype: Detect Freetype installed by GtkMM installer for win + FindGTK2: Do not fail on MSVC11 if vc100 libraries are available + FindGTK2: Add GTK2_DEFINITIONS variable + SelectLibraryConfigurations: Do not cache the _LIBRARY variable + SelectLibraryConfigurations: Use -NOTFOUND instead of copying the vars + FindGTK2: Use GTK_XXX_LIBRARY_DEBUG libraries in debug mode + FindGTK2: Append _LIBRARY to var name in _GTK2_FIND_LIBRARY + FindGTK2: Append _INCLUDE_DIR to var name in _GTK2_FIND_INCLUDE_DIR + FindGTK2: Update local changelog + FindGTK2: Remove GTK2_SKIP_MARK_AS_ADVANCED option + FindGTK2: gthread-2.0 folder does not exist + FindGTK2: Detect gmodule library + FindGTK2: Detect pangoft2 and pangoxft libraries + +David Coppa (1): + OpenBSD: Enable ELF parsing and editing (#14241) + +David Golub (1): + CPack/NSIS: Obtain path from which to uninstall from registry (#14124) + +Eric NOULARD (5): + Add support for componentized USER spec file + CPackRPM add mechanism to remove path from generated list of file in RPM spec. + CPackRPM add /usr/lib64 to the list of builtin to-be-excluded path + CPackRPM protect '@' character in filename processed in the spec file. + CPackRPM make the changelog line conform to expected format + +Fredrik Axelsson (1): + CPackWIX: Handle CPACK_PACKAGE_EXECUTABLES (#13967) + +Funda Wang (1): + FindImageMagick: Find v6 include dir (#14174) + +Graham Markall (2): + OS X: Add Fortran library version flags (#14249) + UseJava: Pass sources to javac using response file (#13028) + +Gregoire Lejeune (1): + Allow using Java in a cross-compilation toolchain + +Ian Monroe (2): + Ninja: use cd /D to set directory on Windows + CPackWIX: Fix MSI package layout regression from parent + +Igor Murzov (2): + bash-completion: Add -S,-SP options arguments completion + bash-completion: Fix/improve generator names extraction + +Jack O'Connor (1): + Eclipse: Add a missing space in the documentation + +Jason Spiro (1): + MinGW: Find mingw32-make included with Code::Blocks IDE (#14302) + +John Farrier (2): + VS: Add Windows Forms Support + VS: Add VS_GLOBAL_ROOTNAMESPACE target property + +Jonas Andersen (1): + VS: Add Resx configuration to the vcxproj file + +LibArchive Upstream (1): + libarchive 3.1.2 (reduced) + +Marc Bartholomaeus (4): + cmake-gui: Add search functions for Output window (#9733) + cmake-gui: Add search functions to the context menu of the Output widget + cmake-gui: Change shortcut of the search field from Ctrl-F to Alt-E + cmake-gui: Add function for going to next error message in Output window + +Marcel Loose (1): + FindCUDA: Remove duplicate entries from INCLUDE_DIRECTORIES. + +Marius Schamschula (1): + FindX11: Search in /opt/X11 for OS X 10.8 (#14232) + +Mathias Gaunard (1): + FindCUDA: CUDA_COMPUTE_BUILD_PATH uses relative paths to binary dir. + +Matt McCormick (1): + ExternalProject: Allow blank SVN_USERNAME/SVN_PASSWORD (#14128) + +Matthew Bentham (1): + Xcode: Honor CMAKE_(MODULE|SHARED)_LINKER_FLAGS_ (#14161) + +Matthew Woehlke (3): + UseJava.cmake: fully use cmake_parse_arguments in add_jar + FindProtobuf: also find pthread + UseJava.cmake: document add_jar compat shim + +Nicolas Despres (1): + Optimize custom command full-path dependency lookup + +Nils Gladitz (1): + Add cmake_host_system_information command + +Patrick Gansterer (20): + Add option to use stdout/stderr of original terminal in cmake --build + Unify the way the flags of a static library are read + Add support for CMAKE_STATIC_LINKER_FLAGS + Add CMAKE_STATIC_LINKER_FLAGS to CMakeCommonLanguageInclude + Add documentation for the missing CMAKE_*_LINKER_FLAGS_* variables + Add additonal tests for the linker flags + VS6: Add handling of CMAKE_*_LINKER_FLAGS_ variables + VS6: Hardcode id_machine_6 for compiler detection + VS10: Do not set the TargetMachine when detecting the compiler + VS: Set CMAKE_VS_PLATFORM_NAME for VS7 and VS71 too + VS: Replace ArchitectureId with PlatformName + VS12: Remove duplicated overload of UseFolderProperty() + Fix detection of WinCE SDKs with 64bit verion of CMake + VS: Unify how the name of the generator is specified + VS10: Add support for assembler code (#11536) + WIN: Use COFF file header header for architecture detection (#14083) + Improve const-correctness in cmVisualStudioGeneratorOptions + Fix setting of the entry point symbol for Windows CE (#14088) + Add support for new Windows CE compiler + VS11: Add support for Windows CE SDKs + +Paul Kunysch (1): + CTest: Add test for running many tests in parallel + +Pavel Shramov (1): + cmDependsC: Collapse relative include paths + +Petr Kmoch (5): + Add projectDir parameter to GenerateBuildCommand + VS: Create parser for Visual Studio .sln files + VS: Use .sln parser to build targets in subdirs with msbuild (#13623) + VS: Add test for building MSBuild project in subdir + ctest_build: Pass projectDir to GenerateBuildCommand + +Reid Kleckner (1): + Ninja: Make cmcldeps depfile output more consistent with 'ninja -t msvc' + +Richard Ulrich (3): + CPackWIX: Handle multiple shortcuts in the start menu + CPackWIX: Add option to specify the language(s) of the installer + CMakeCPack: Provide an upgrade guid for WiX + +Robert Maynard (9): + cmMakefile: Refactor AddCMakeDependFile and AddCMakeOutputFile. + Ninja: Track configured files so we can regenerate them. + cmMakefile: Track configured files so we can regenerate them (#13582) + Add a test to expose a bug with add_custom_command and ninja. + Ninja: GlobalNinjaGenerator WriteBuild and WritePhonyBuild non static + Ninja: Custom Command file depends don't need to exist before building + FindCUDA: Search for libraries in /lib//nvidida-current. + Ninja: Properly convert all paths to unix style before we do set intersection. + Ninja: Update BuildDepends test to verify cmcldeps depfiles. + +Robin Lee (1): + FindOpenSSL: Fix spelling of CMAKE_CROSSCOMPILING (#14075) + +Rolf Eike Beer (25): + FindOpenGL: simplify OS selection code + FindOpenGL: require headers to be found on non-Windows platforms (#13746) + Tests: create output files for all memory checkers + CTest: use an output file for Valgrind (#14110) + CTest: remove unreachable code and CTestTestMemcheckUnknown test + Tests: remove code duplication in CTestTestMemCheck tests + Tests: verify that memory checker output files are always present + CTest: drop suppression for gcc 2.9.6 errors from default Valgrind flags + Tests: add test for non-existent Valgrind suppression file + CTest: fix comment documenting cmBoundsCheckerParser class + Tests: add a test with custom options passed to valgrind + CTest: make sure never to report negative test times (#14132) + Doc: fix example for FAIL_REGULAR_EXPRESSION + CTest: break after first regex match on output + Tests: ignore Guard Malloc messages in MemChecker tests + CTest: avoid useless changing of directory + Tests: fix build of dummy memtester on AIX + wizard: fix warnings + wizard: simplify control flow + cmTarget: drop the unused local typedef LinkLine + Tests: ignore GuardMalloc messages on all Apple build, not just XCode ones + replace string(... MATCHES "^const$) with string(... STREQUAL "const") + Revert "CTest: fix pre and post test commands with spaces" (#13887) + FindPNG: improve library detection (#14301) + CTest: create one output file per memcheck (#14303) + +Sean McBride (1): + Remove some uses of obsolete 'register' storage specifier + +Sebastian Leske (1): + Document CMAKE__FLAGS variable (#14305) + +Stephen Kelly (126): + Make the QtAutomoc test compile with either Qt 4 or Qt 5 + Add a test for Qt5Automoc + Remove an endif() followed by an if() for the same condition. + Fix some copyastos in the DetermineRCCompiler file. + Test transitive includes from setting the LINK_LIBRARIES property. + Test the use of target transitive compile definitions with moc. + Fix handling of commas in arbitrary content in genexes. + Fix style. + Remove unused marker for a variable which is now used. + Extract the ProcessArbitraryContent method. + Rename the method determining if a genex accepts arbitrary content. + Make it possible for any genex to have arbitrary content at the end. + Add the JOIN generator expression. + Test that linking using the debug keyword to tll works. + automoc: Read target defines unconditionally + Remove unused typedef. + Fix brace indentation. + Add EXPORT_NAME property. + Remove unused vector population. + Sublime: Honor source-level COMPILE_FLAGS property + Docs: cmake -G selects a "build system" generator + Recognize shared library files with a numerical suffix + FindQt4: Fix QUIET failure with Qt 5 but not Qt 4 + Error on relative path in INCLUDE_DIRECTORIES target property. + include_directories: Fix handling of empty or space-only entries + CTest: Read CTEST_PARALLEL_LEVEL from environment + string: Add MAKE_C_IDENTIFIER subcommand + GenerateExportHeader: Add newlines to separate the compiler output. + GenerateExportHeader: Allow use of of this macro with MODULEs. + file: Add GENERATE command to produce files at generate time + Tests/Module/GenerateExportHeader: Test exported free-function + Add $ generator expression + GenerateExportHeader: Generate only C identifiers as defines + Tests/CompileDefinitions: Avoid spaces in defines on VS 6 + Use the qt5::moc imported target instead of a variable. + QtAutomoc: Get the Qt version through the target link interface + Fix indentation. + VS6: Rename some variables to correspond to config values. + Add cmLocalGenerator::GetCompileOptions. + Add _COMPILER_ID generator expressions. + cmTarget: Rename struct to be more re-usable. + cmTarget: Rename LinkInterfaceIncludeDirectoriesEntries + Add COMPILE_OPTIONS target property. + Add target_compile_options command. + Introduce target property _VISIBILITY_PRESET + Add a COMPILE_OPTION for a VISIBILITY_INLINES_HIDDEN target property. + Qt4Macros: Allow specifying a TARGET in invokations of macros. + Introduce add_compile_options command. + Remove unused cmAddDefinitionsCommand::ParseDefinition method. + Add some spaces to the INCLUDE_DIRECTORIES documentation. + CLI: Suppress the unused warning if the key value pair is cached. + Use --sysroot when cross compiling. + Add missing 'seen' check for evaluating COMPILE_OPTIONS. + Find targets in INTERFACE_COMPILE_OPTIONS when exporting for try_compile. + Use a preprocessor loop to manage the valid transitive properties. + Generate INTERFACE_COMPILE_OPTIONS on export. + Genex: Fix indentation in docs. + cmSystemTools: Fix typo in comment. + Style: Don't put an else after a return. + Add compiler target compile options. + QtAutomoc: Fix handling of list separator for compile definitions. + QtAutomoc: Use config-dependent compile definitions and includes. + De-duplicate version comparison code. + Add generator expressions for version comparision. + Don't run the WarnUnusedCliUnused test on Windows. + Add whitespace after colons in error messages. + Add missing return after error report. + Genex: Make LINK_LANGUAGE report an error when evaluating link libraries. + Genex: Extend EvaluatingLinkLibraries to also check the top target name. + Genex: Report error if a target file is needed to evaluate link libraries. + Add generator expressions for compiler versions. + Split the GeneratorExpression test into a third part. + Remove unused variable. + Add Target API to determine if an include is a system include. + Store system include directories in the cmTarget. + Extend the cmTargetPropCommandBase interface property handling. + Add a SYSTEM parameter to target_include_directories (#14180) + Add entire link interface transitive closure as target depends. + Test non-IMPORTED libraries in the INTERFACE of IMPORTED libraries. + GenexEval: Add abstracted access to link interface for a target. + Introduce the LINK_ONLY generator expression. + Introduce the INTERFACE_LINK_LIBRARIES property. + Export: Generate INTERFACE_LINK_LIBRARIES property on targets. + TLL: Don't populate old link interface if CMP0022 is NEW. + Overload cmLocalGenerator::AppendDefines to add a list. + Add an overload of cmIDEOptions::AddDefines taking a vector of strings. + Refactor cmTarget::GetCompileDefinitions to use an out-vector, not a string. + Document some variables for deprecation control. + Genex: Make CMP0021 and CMP0022 usable with TARGET_POLICY + Revert "Use --sysroot when cross compiling." + Add target property debugging for COMPILE_DEFINITIONS + Mark qt4_use_modules and qt4_automoc as obsolete. + Add the INTERFACE_SYSTEM_INCLUDE_DIRECTORIES target property. + Don't add trailing whitespace to error message. + Remove TODO to uniq COMPILE_OPTIONS + Remove the LINK_LANGUAGE generator expression. + Genex: Fix $ with IMPORTED targets and multiple locations. + FindQt4: Don't use Qt component _FOUND vars before they're defined (#14286) + Add a convenient way to add the includes install dir to the INTERFACE. + Use linked frameworks as a source of include directories. + target_link_libraries: Add PUBLIC/PRIVATE/INTERFACE keyword signature + FindQt4: Re-add QAxServer to the QT_MODULES. + FindQt4: Populate the INTERFACE_LINK_LIBRARIES of IMPORTED targets. + Genex: Allow relative paths in INSTALL_INTERFACE. + cmTarget: Fix property name typo in docs. + Docs: Document file(GENERATE) CONDITION as optional. + Qt4Macros: Remove unneeded generate CONDITION. + Qt4Macros: Remove undefined varible use. + Qt4Macros: Simplify some variable population. + Docs: Document existing target property debugging options. + Docs: Trim trailing whitespace in generated doc. + Docs: Generalize and de-duplicate VISIBILITY_PREFIX docs. + Docs: Document variables for default visibility values. + Export: Fix typo of LINK_INTERFACE_LIBRARIES. + cmTarget: Remove duplicates when printing traces of tll signatures + cmTarget: Fix iface libraries and languages for static libraries. + Genex: Disallow LINKER_LANGUAGE only when used on a static library. + install: Remove error condition using INCLUDES DESTINATION without EXPORT. + Fix crash on export of target with empty INTERFACE_INCLUDE_DIRECTORIES. + Allow target commands to be invoked with no items (#14325). + Docs: Fix typo in CMAKE_DEBUG_TARGET_PROPERTIES + cmTarget: Add NAME property + Export: Process generator expressions from INCLUDES DESTINATION. + Add the ALIAS target concept for libraries and executables. + Revert "Add compiler target compile options." + Genex: Fix segfault when parsing ends with parameter expectation. + +Vadim Zhukov (1): + Add cmake_reset_check_state() macro + +Victor Zverovich (1): + Use GmakeErrorParser instead of deprecated MakeErrorParser (fixes bug 0013699) + +Yichao Yu (1): + variable_watch: Add missing string enumeration entry (#14188) + +Ömer Fadıl USTA (3): + ccmake: Add missing initializers reported by cppcheck + libarchive: Fix free() order to avoid accessing freed memory + cmcurl: Fix resource leak reported by cppcheck + Changes in CMake 2.8.11.2 (since 2.8.11.1) ------------------------------------------ Alex Neundorf (1): diff --git a/Docs/CMakeLists.txt b/Docs/CMakeLists.txt index a5e91c9d1..34090d234 100644 --- a/Docs/CMakeLists.txt +++ b/Docs/CMakeLists.txt @@ -1,4 +1,3 @@ -string(REGEX REPLACE "^/(.*)" "\\1" REL_CMAKE_DATA_DIR "${CMAKE_DATA_DIR}") -install(FILES cmake-help.vim cmake-indent.vim cmake-syntax.vim DESTINATION ${REL_CMAKE_DATA_DIR}/editors/vim) -install(FILES cmake-mode.el DESTINATION ${REL_CMAKE_DATA_DIR}/editors/emacs) +install(FILES cmake-help.vim cmake-indent.vim cmake-syntax.vim DESTINATION ${CMAKE_DATA_DIR}/editors/vim) +install(FILES cmake-mode.el DESTINATION ${CMAKE_DATA_DIR}/editors/emacs) add_subdirectory (bash-completion) diff --git a/Docs/bash-completion/CMakeLists.txt b/Docs/bash-completion/CMakeLists.txt index 592b71e93..c0a88999e 100644 --- a/Docs/bash-completion/CMakeLists.txt +++ b/Docs/bash-completion/CMakeLists.txt @@ -5,4 +5,4 @@ # add symlinks to the files in appropriate places # /etc/bash_completion.d/ # DATADIR/completions (may be /usr/share//completions -install(FILES cmake cpack ctest DESTINATION ${REL_CMAKE_DATA_DIR}/completions) +install(FILES cmake cpack ctest DESTINATION ${CMAKE_DATA_DIR}/completions) diff --git a/Docs/bash-completion/cmake b/Docs/bash-completion/cmake index 59b565ac0..59e02987b 100644 --- a/Docs/bash-completion/cmake +++ b/Docs/bash-completion/cmake @@ -100,21 +100,23 @@ _cmake() return ;; -G) - # FIXME: doesn't work properly local IFS=$'\n' + local quoted + printf -v quoted %q "$cur" COMPREPLY=( $( compgen -W '$( cmake --help 2>/dev/null | sed -n \ - "/^.*[^ ].*= Generates/{s|^ *\(.*[^ ]\) *= Generates.*$|\1|;s| |\\\\ |g;p}" \ - 2>/dev/null )' -- "$cur" ) ) + -e "1,/^Generators/d" \ + -e "/^ *[^ =]/{s|^ *\([^=]*[^ =]\).*$|\1|;s| |\\\\ |g;p}" \ + 2>/dev/null )' -- "$quoted" ) ) return ;; --help-command) COMPREPLY=( $( compgen -W '$( cmake --help-command-list 2>/dev/null| - tail -n +2 )' -- "$cur" ) ) + grep -v "^cmake version " )' -- "$cur" ) ) return ;; --help-module) COMPREPLY=( $( compgen -W '$( cmake --help-module-list 2>/dev/null| - tail -n +2 )' -- "$cur" ) ) + grep -v "^cmake version " )' -- "$cur" ) ) return ;; --help-policy) @@ -124,12 +126,12 @@ _cmake() ;; --help-property) COMPREPLY=( $( compgen -W '$( cmake --help-property-list \ - 2>/dev/null | tail -n +2 )' -- "$cur" ) ) + 2>/dev/null | grep -v "^cmake version " )' -- "$cur" ) ) return ;; --help-variable) COMPREPLY=( $( compgen -W '$( cmake --help-variable-list \ - 2>/dev/null | tail -n +2 )' -- "$cur" ) ) + 2>/dev/null | grep -v "^cmake version " )' -- "$cur" ) ) return ;; esac diff --git a/Docs/bash-completion/cpack b/Docs/bash-completion/cpack index a0c1f8375..9ab604839 100644 --- a/Docs/bash-completion/cpack +++ b/Docs/bash-completion/cpack @@ -8,8 +8,8 @@ _cpack() case "$prev" in -G) COMPREPLY=( $( compgen -W '$( cpack --help 2>/dev/null | - grep "^ .*= .*" 2> /dev/null | grep -v "^ -" 2>/dev/null | - cut -d" " -f 3 )' -- "$cur" ) ) + sed -e "1,/^Generators/d" -e "s|^ *\([^ ]*\) .*$|\1|" \ + 2>/dev/null )' -- "$cur" ) ) return ;; -C) @@ -20,7 +20,7 @@ _cpack() -D) [[ $cur == *=* ]] && return # no completion for values COMPREPLY=( $( compgen -W '$( cpack --help-variable-list \ - 2>/dev/null | tail -n +2 )' -S = -- "$cur" ) ) + 2>/dev/null | grep -v "^cpack version " )' -S = -- "$cur" ) ) compopt -o nospace return ;; @@ -38,12 +38,12 @@ _cpack() ;; --help-command) COMPREPLY=( $( compgen -W '$( cpack --help-command-list 2>/dev/null| - tail -n +2 )' -- "$cur" ) ) + grep -v "^cpack version " )' -- "$cur" ) ) return ;; --help-variable) COMPREPLY=( $( compgen -W '$( cpack --help-variable-list \ - 2>/dev/null | tail -n +2 )' -- "$cur" ) ) + 2>/dev/null | grep -v "^cpack version " )' -- "$cur" ) ) return ;; esac diff --git a/Docs/bash-completion/ctest b/Docs/bash-completion/ctest index 9707f6269..25cb99841 100644 --- a/Docs/bash-completion/ctest +++ b/Docs/bash-completion/ctest @@ -54,7 +54,7 @@ _ctest() return ;; -S|--script|-SP|--script-new-process) - # FIXME ? + _filedir '@(cmake|ctest)' return ;; --interactive-debug-mode) @@ -63,7 +63,7 @@ _ctest() ;; --help-command) COMPREPLY=( $( compgen -W '$( ctest --help-command-list 2>/dev/null| - tail -n +2 )' -- "$cur" ) ) + grep -v "^ctest version " )' -- "$cur" ) ) return ;; esac diff --git a/Modules/AutomocInfo.cmake.in b/Modules/AutomocInfo.cmake.in index 640bf70a0..9cff735fb 100644 --- a/Modules/AutomocInfo.cmake.in +++ b/Modules/AutomocInfo.cmake.in @@ -6,10 +6,9 @@ set(AM_MOC_OPTIONS @_moc_options@) set(AM_CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE "@CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE@") set(AM_CMAKE_BINARY_DIR "@CMAKE_BINARY_DIR@/") set(AM_CMAKE_SOURCE_DIR "@CMAKE_SOURCE_DIR@/") -set(AM_QT_MOC_EXECUTABLE "@QT_MOC_EXECUTABLE@") +set(AM_QT_MOC_EXECUTABLE "@_qt_moc_executable@") set(AM_CMAKE_CURRENT_SOURCE_DIR "@CMAKE_CURRENT_SOURCE_DIR@/") set(AM_CMAKE_CURRENT_BINARY_DIR "@CMAKE_CURRENT_BINARY_DIR@/") -set(AM_QT_VERSION_MAJOR "@QT_VERSION_MAJOR@" ) -set(AM_Qt5Core_VERSION_MAJOR "@Qt5Core_VERSION_MAJOR@" ) +set(AM_QT_VERSION_MAJOR "@_target_qt_version@") set(AM_TARGET_NAME @_moc_target_name@) set(AM_RELAXED_MODE "@_moc_relaxed_mode@") diff --git a/Modules/CMakeBackwardCompatibilityC.cmake b/Modules/CMakeBackwardCompatibilityC.cmake index e3b6c823e..4783d68cd 100644 --- a/Modules/CMakeBackwardCompatibilityC.cmake +++ b/Modules/CMakeBackwardCompatibilityC.cmake @@ -55,7 +55,7 @@ if(NOT CMAKE_SKIP_COMPATIBILITY_TESTS) TEST_BIG_ENDIAN(CMAKE_WORDS_BIGENDIAN) include (FindX11) - if("${X11_X11_INCLUDE_PATH}" MATCHES "^/usr/include$") + if("${X11_X11_INCLUDE_PATH}" STREQUAL "/usr/include") set (CMAKE_X_CFLAGS "" CACHE STRING "X11 extra flags.") else() set (CMAKE_X_CFLAGS "-I${X11_X11_INCLUDE_PATH}" CACHE STRING diff --git a/Modules/CMakeCCompilerId.c.in b/Modules/CMakeCCompilerId.c.in index c25df0cb5..66a558265 100644 --- a/Modules/CMakeCCompilerId.c.in +++ b/Modules/CMakeCCompilerId.c.in @@ -160,10 +160,9 @@ # define COMPILER_ID "ADSP" /* IAR Systems compiler for embedded systems. - http://www.iar.com - Not supported yet by CMake -#elif defined(__IAR_SYSTEMS_ICC__) -# define COMPILER_ID "IAR" */ + http://www.iar.com */ +#elif defined(__IAR_SYSTEMS_ICC__ ) || defined(__IAR_SYSTEMS_ICC) +# define COMPILER_ID "IAR" /* sdcc, the small devices C compiler for embedded systems, http://sdcc.sourceforge.net */ diff --git a/Modules/CMakeCXXCompilerId.cpp.in b/Modules/CMakeCXXCompilerId.cpp.in index e2119c2bf..5e87715c0 100644 --- a/Modules/CMakeCXXCompilerId.cpp.in +++ b/Modules/CMakeCXXCompilerId.cpp.in @@ -161,6 +161,11 @@ #elif defined(__ADSPBLACKFIN__) || defined(__ADSPTS__) || defined(__ADSP21000__) # define COMPILER_ID "ADSP" +/* IAR Systems compiler for embedded systems. + http://www.iar.com */ +#elif defined(__IAR_SYSTEMS_ICC__ ) || defined(__IAR_SYSTEMS_ICC) +# define COMPILER_ID "IAR" + #elif defined(_SGI_COMPILER_VERSION) || defined(_COMPILER_VERSION) # define COMPILER_ID "MIPSpro" # if defined(_SGI_COMPILER_VERSION) diff --git a/Modules/CMakeCommonLanguageInclude.cmake b/Modules/CMakeCommonLanguageInclude.cmake index bf94f9ff6..e945aa7c8 100644 --- a/Modules/CMakeCommonLanguageInclude.cmake +++ b/Modules/CMakeCommonLanguageInclude.cmake @@ -68,6 +68,19 @@ if(NOT CMAKE_NOT_USING_CONFIG_FLAGS) ${CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO_INIT} CACHE STRING "Flags used by the linker during Release with Debug Info builds.") + set (CMAKE_STATIC_LINKER_FLAGS_DEBUG ${CMAKE_STATIC_LINKER_FLAGS_DEBUG_INIT} CACHE STRING + "Flags used by the linker during debug builds.") + + set (CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL ${CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL_INIT} + CACHE STRING + "Flags used by the linker during release minsize builds.") + + set (CMAKE_STATIC_LINKER_FLAGS_RELEASE ${CMAKE_STATIC_LINKER_FLAGS_RELEASE_INIT} CACHE STRING + "Flags used by the linker during release builds.") + + set (CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO + ${CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO_INIT} CACHE STRING + "Flags used by the linker during Release with Debug Info builds.") endif() # shared linker flags set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS_INIT} $ENV{LDFLAGS}" @@ -77,6 +90,10 @@ set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS_INIT} $ENV{LDFLAGS}" set (CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS_INIT} $ENV{LDFLAGS}" CACHE STRING "Flags used by the linker during the creation of modules.") +# static linker flags +set (CMAKE_STATIC_LINKER_FLAGS "${CMAKE_STATIC_LINKER_FLAGS_INIT}" + CACHE STRING "Flags used by the linker during the creation of static libraries.") + set(CMAKE_BUILD_TOOL ${CMAKE_MAKE_PROGRAM} CACHE INTERNAL "What is the target build tool cmake is generating for.") @@ -103,5 +120,10 @@ CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL CMAKE_MODULE_LINKER_FLAGS_RELEASE CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO +CMAKE_STATIC_LINKER_FLAGS +CMAKE_STATIC_LINKER_FLAGS_DEBUG +CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL +CMAKE_STATIC_LINKER_FLAGS_RELEASE +CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO ) diff --git a/Modules/CMakeDetermineASMCompiler.cmake b/Modules/CMakeDetermineASMCompiler.cmake index 99b04e39b..0fecb5db6 100644 --- a/Modules/CMakeDetermineASMCompiler.cmake +++ b/Modules/CMakeDetermineASMCompiler.cmake @@ -103,6 +103,10 @@ if(NOT CMAKE_ASM${ASM_DIALECT}_COMPILER_ID) set(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_FLAGS_TI "-h") set(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_REGEX_TI "Texas Instruments") + list(APPEND CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDORS GNU IAR) + set(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_FLAGS_IAR ) + set(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_REGEX_IAR "IAR Assembler") + include(CMakeDetermineCompilerId) CMAKE_DETERMINE_COMPILER_ID_VENDOR(ASM${ASM_DIALECT}) diff --git a/Modules/CMakeDetermineCCompiler.cmake b/Modules/CMakeDetermineCCompiler.cmake index d2220e09e..8769c668b 100644 --- a/Modules/CMakeDetermineCCompiler.cmake +++ b/Modules/CMakeDetermineCCompiler.cmake @@ -120,6 +120,13 @@ if(NOT CMAKE_C_COMPILER_ID_RUN) set(CMAKE_C_COMPILER_ID) file(READ ${CMAKE_ROOT}/Modules/CMakePlatformId.h.in CMAKE_C_COMPILER_ID_PLATFORM_CONTENT) + + # The IAR compiler produces weird output. + # See http://www.cmake.org/Bug/view.php?id=10176#c19598 + list(APPEND CMAKE_C_COMPILER_ID_VENDORS IAR) + set(CMAKE_C_COMPILER_ID_VENDOR_FLAGS_IAR ) + set(CMAKE_C_COMPILER_ID_VENDOR_REGEX_IAR "IAR .+ Compiler") + include(${CMAKE_ROOT}/Modules/CMakeDetermineCompilerId.cmake) CMAKE_DETERMINE_COMPILER_ID(C CFLAGS CMakeCCompilerId.c) diff --git a/Modules/CMakeDetermineCXXCompiler.cmake b/Modules/CMakeDetermineCXXCompiler.cmake index 6f7e8f6d4..c79ba898d 100644 --- a/Modules/CMakeDetermineCXXCompiler.cmake +++ b/Modules/CMakeDetermineCXXCompiler.cmake @@ -116,6 +116,13 @@ if(NOT CMAKE_CXX_COMPILER_ID_RUN) set(CMAKE_CXX_COMPILER_ID) file(READ ${CMAKE_ROOT}/Modules/CMakePlatformId.h.in CMAKE_CXX_COMPILER_ID_PLATFORM_CONTENT) + + # The IAR compiler produces weird output. + # See http://www.cmake.org/Bug/view.php?id=10176#c19598 + list(APPEND CMAKE_CXX_COMPILER_ID_VENDORS IAR) + set(CMAKE_CXX_COMPILER_ID_VENDOR_FLAGS_IAR ) + set(CMAKE_CXX_COMPILER_ID_VENDOR_REGEX_IAR "IAR .+ Compiler") + include(${CMAKE_ROOT}/Modules/CMakeDetermineCompilerId.cmake) CMAKE_DETERMINE_COMPILER_ID(CXX CXXFLAGS CMakeCXXCompilerId.cpp) diff --git a/Modules/CMakeDetermineCompiler.cmake b/Modules/CMakeDetermineCompiler.cmake index 2d12c0757..f522c4408 100644 --- a/Modules/CMakeDetermineCompiler.cmake +++ b/Modules/CMakeDetermineCompiler.cmake @@ -69,4 +69,17 @@ macro(_cmake_find_compiler lang) endif() unset(_${lang}_COMPILER_HINTS) unset(_languages) + + # Look for a make tool provided by Xcode + if(CMAKE_${lang}_COMPILER STREQUAL "CMAKE_${lang}_COMPILER-NOTFOUND" AND CMAKE_HOST_APPLE) + foreach(comp ${CMAKE_${lang}_COMPILER_LIST}) + execute_process(COMMAND xcrun --find ${comp} + OUTPUT_VARIABLE _xcrun_out OUTPUT_STRIP_TRAILING_WHITESPACE + ERROR_VARIABLE _xcrun_err) + if(_xcrun_out) + set_property(CACHE CMAKE_${lang}_COMPILER PROPERTY VALUE "${_xcrun_out}") + break() + endif() + endforeach() + endif() endmacro() diff --git a/Modules/CMakeDetermineCompilerABI.cmake b/Modules/CMakeDetermineCompilerABI.cmake index 25d6bbea7..5d35ce378 100644 --- a/Modules/CMakeDetermineCompilerABI.cmake +++ b/Modules/CMakeDetermineCompilerABI.cmake @@ -38,6 +38,7 @@ function(CMAKE_DETERMINE_COMPILER_ABI lang src) "--no-warn-unused-cli" OUTPUT_VARIABLE OUTPUT COPY_FILE "${BIN}" + COPY_FILE_ERROR _copy_error ) # Move result from cache to normal variable. set(CMAKE_${lang}_ABI_COMPILED ${CMAKE_${lang}_ABI_COMPILED}) @@ -45,7 +46,7 @@ function(CMAKE_DETERMINE_COMPILER_ABI lang src) set(CMAKE_${lang}_ABI_COMPILED ${CMAKE_${lang}_ABI_COMPILED} PARENT_SCOPE) # Load the resulting information strings. - if(CMAKE_${lang}_ABI_COMPILED) + if(CMAKE_${lang}_ABI_COMPILED AND NOT _copy_error) message(STATUS "Detecting ${lang} compiler ABI info - done") file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log "Detecting ${lang} compiler ABI info compiled with the following output:\n${OUTPUT}\n\n") @@ -128,7 +129,7 @@ function(CMAKE_DETERMINE_COMPILER_ABI lang src) else() message(STATUS "Detecting ${lang} compiler ABI info - failed") file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log - "Detecting ${lang} compiler ABI info failed to compile with the following output:\n${OUTPUT}\n\n") + "Detecting ${lang} compiler ABI info failed to compile with the following output:\n${OUTPUT}\n${_copy_error}\n\n") endif() endif() endfunction() diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake index b9180921d..8ca53348b 100644 --- a/Modules/CMakeDetermineCompilerId.cmake +++ b/Modules/CMakeDetermineCompilerId.cmake @@ -109,12 +109,9 @@ Id flags: ${testflags} # Compile the compiler identification source. if("${CMAKE_GENERATOR}" MATCHES "Visual Studio ([0-9]+)") set(vs_version ${CMAKE_MATCH_1}) - set(id_arch ${CMAKE_VS_PLATFORM_NAME}) + set(id_platform ${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) @@ -126,14 +123,8 @@ Id flags: ${testflags} set(v 6) set(ext dsp) endif() - if("${id_arch}" STREQUAL "x64") - set(id_machine_10 MachineX64) - elseif("${id_arch}" STREQUAL "Itanium") - set(id_machine_10 MachineIA64) - set(id_arch ia64) - else() - set(id_machine_6 x86) - set(id_machine_10 MachineX86) + if("${id_platform}" STREQUAL "Itanium") + set(id_platform ia64) endif() if(CMAKE_VS_PLATFORM_TOOLSET) set(id_toolset "${CMAKE_VS_PLATFORM_TOOLSET}") @@ -142,12 +133,16 @@ Id flags: ${testflags} endif() if(CMAKE_VS_WINCE_VERSION) set(id_entrypoint "mainACRTStartup") - set(id_subsystem 9) + if("${vs_version}" VERSION_LESS 9) + set(id_subsystem 9) + else() + set(id_subsystem 8) + endif() 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) + set(build /p:Configuration=Debug /p:Platform=@id_platform@ /p:VisualStudioVersion=${vs_version}.0) elseif("${CMAKE_MAKE_PROGRAM}" MATCHES "[Mm][Ss][Dd][Ee][Vv]") set(build /make) else() @@ -339,6 +334,35 @@ function(CMAKE_DETERMINE_COMPILER_ID_CHECK lang file) endif() endforeach() + # Detect the exact architecture from the PE header. + if(WIN32) + # The offset to the PE signature is stored at 0x3c. + file(READ ${file} peoffsethex LIMIT 1 OFFSET 60 HEX) + string(SUBSTRING "${peoffsethex}" 0 1 peoffsethex1) + string(SUBSTRING "${peoffsethex}" 1 1 peoffsethex2) + set(peoffsetexpression "${peoffsethex1} * 16 + ${peoffsethex2}") + string(REPLACE "a" "10" peoffsetexpression "${peoffsetexpression}") + string(REPLACE "b" "11" peoffsetexpression "${peoffsetexpression}") + string(REPLACE "c" "12" peoffsetexpression "${peoffsetexpression}") + string(REPLACE "d" "13" peoffsetexpression "${peoffsetexpression}") + string(REPLACE "e" "14" peoffsetexpression "${peoffsetexpression}") + string(REPLACE "f" "15" peoffsetexpression "${peoffsetexpression}") + math(EXPR peoffset "${peoffsetexpression}") + + file(READ ${file} peheader LIMIT 6 OFFSET ${peoffset} HEX) + if(peheader STREQUAL "50450000a201") + set(ARCHITECTURE_ID "SH3") + elseif(peheader STREQUAL "50450000a301") + set(ARCHITECTURE_ID "SH3DSP") + elseif(peheader STREQUAL "50450000a601") + set(ARCHITECTURE_ID "SH4") + elseif(peheader STREQUAL "50450000a801") + set(ARCHITECTURE_ID "SH5") + elseif(peheader STREQUAL "50450000c201") + set(ARCHITECTURE_ID "THUMB") + endif() + endif() + # Check if a valid compiler and platform were found. if(COMPILER_ID AND NOT COMPILER_ID_TWICE) set(CMAKE_${lang}_COMPILER_ID "${COMPILER_ID}") diff --git a/Modules/CMakeDetermineRCCompiler.cmake b/Modules/CMakeDetermineRCCompiler.cmake index fa78da03c..c4600c7fe 100644 --- a/Modules/CMakeDetermineRCCompiler.cmake +++ b/Modules/CMakeDetermineRCCompiler.cmake @@ -12,14 +12,14 @@ # (To distribute this file outside of CMake, substitute the full # License text for the above reference.) -# determine the compiler to use for C programs -# NOTE, a generator may set CMAKE_C_COMPILER before +# determine the compiler to use for RC programs +# NOTE, a generator may set CMAKE_RC_COMPILER before # loading this file to force a compiler. -# use environment variable CCC first if defined by user, next use -# the cmake variable CMAKE_GENERATOR_CC which can be defined by a generator +# use environment variable RC first if defined by user, next use +# the cmake variable CMAKE_GENERATOR_RC which can be defined by a generator # as a default compiler if(NOT CMAKE_RC_COMPILER) - # prefer the environment variable CC + # prefer the environment variable RC if($ENV{RC} MATCHES ".+") get_filename_component(CMAKE_RC_COMPILER_INIT $ENV{RC} PROGRAM PROGRAM_ARGS CMAKE_RC_FLAGS_ENV_INIT) if(CMAKE_RC_FLAGS_ENV_INIT) diff --git a/Modules/CMakeDetermineVSServicePack.cmake b/Modules/CMakeDetermineVSServicePack.cmake index 98e5bb873..f49482e7f 100644 --- a/Modules/CMakeDetermineVSServicePack.cmake +++ b/Modules/CMakeDetermineVSServicePack.cmake @@ -1,32 +1,25 @@ -# - Includes a public function for assisting users in trying to determine the -# Visual Studio service pack in use. -# -# Sets the passed in variable to one of the following values or an empty -# string if unknown. -# vc80 -# vc80sp1 -# vc90 -# vc90sp1 -# vc100 -# vc100sp1 -# vc110 +# - Determine the Visual Studio service pack of the 'cl' in use. +# The functionality of this module has been superseded by the platform +# variable CMAKE__COMPILER_VERSION that contains the compiler version +# number. # # Usage: -# =========================== -# -# if(MSVC) -# include(CMakeDetermineVSServicePack) -# DetermineVSServicePack( my_service_pack ) -# -# if( my_service_pack ) -# message(STATUS "Detected: ${my_service_pack}") -# endif() +# if(MSVC) +# include(CMakeDetermineVSServicePack) +# DetermineVSServicePack( my_service_pack ) +# if( my_service_pack ) +# message(STATUS "Detected: ${my_service_pack}") # endif() -# -# =========================== +# endif() +# Function DetermineVSServicePack sets the given variable to one of the +# following values or an empty string if unknown: +# vc80, vc80sp1 +# vc90, vc90sp1 +# vc100, vc100sp1 +# vc110, vc110sp1, vc110sp2 #============================================================================= -# Copyright 2009-2011 Kitware, Inc. +# Copyright 2009-2013 Kitware, Inc. # Copyright 2009-2010 Philip Lowman # Copyright 2010-2011 Aaron C. meadows # @@ -57,6 +50,12 @@ function(_DetermineVSServicePackFromCompiler _OUT_VAR _cl_version) set(_version "vc100sp1") elseif(${_cl_version} VERSION_EQUAL "17.00.50727.1") set(_version "vc110") + elseif(${_cl_version} VERSION_EQUAL "17.00.51106.1") + set(_version "vc110sp1") + elseif(${_cl_version} VERSION_EQUAL "17.00.60315.1") + set(_version "vc110sp2") + elseif(${_cl_version} VERSION_EQUAL "17.00.60610.1") + set(_version "vc110sp3") else() set(_version "") endif() diff --git a/Modules/CMakeFindPackageMode.cmake b/Modules/CMakeFindPackageMode.cmake index cea018706..e5216f4e0 100644 --- a/Modules/CMakeFindPackageMode.cmake +++ b/Modules/CMakeFindPackageMode.cmake @@ -3,7 +3,7 @@ # NAME = name of the package # COMPILER_ID = the CMake compiler ID for which the result is, i.e. GNU/Intel/Clang/MSVC, etc. # LANGUAGE = language for which the result will be used, i.e. C/CXX/Fortan/ASM -# MODE = EXIST : only check for existance of the given package +# MODE = EXIST : only check for existence of the given package # COMPILE : print the flags needed for compiling an object file which uses the given package # LINK : print the flags needed for linking when using the given package # QUIET = if TRUE, don't print anything diff --git a/Modules/CMakeGraphVizOptions.cmake b/Modules/CMakeGraphVizOptions.cmake new file mode 100644 index 000000000..e4af54c0a --- /dev/null +++ b/Modules/CMakeGraphVizOptions.cmake @@ -0,0 +1,83 @@ +##section Variables specific to the graphviz support +##end +##module +# - The builtin graphviz support of CMake. +# CMake can generate graphviz files, showing the dependencies between +# the targets in a project and also external libraries which are linked +# against. +# When CMake is run with the --graphiz=foo option, it will produce +# * a foo.dot file showing all dependencies in the project +# * a foo.dot. file for each target, file showing on which other targets the respective target depends +# * a foo.dot..dependers file, showing which other targets depend on the respective target +# +# This can result in huge graphs. Using the file CMakeGraphVizOptions.cmake +# the look and content of the generated graphs can be influenced. +# This file is searched first in ${CMAKE_BINARY_DIR} and then in +# ${CMAKE_SOURCE_DIR}. If found, it is read and the variables set in it +# are used to adjust options for the generated graphviz files. +##end +# +##variable +# GRAPHVIZ_GRAPH_TYPE - The graph type +# Mandatory : NO +# Default : "digraph" +##end +##variable +# GRAPHVIZ_GRAPH_NAME - The graph name. +# Mandatory : NO +# Default : "GG" +##end +##variable +# GRAPHVIZ_GRAPH_HEADER - The header written at the top of the graphviz file. +# Mandatory : NO +# Default : "node [n fontsize = "12"];" +##end +##variable +# GRAPHVIZ_NODE_PREFIX - The prefix for each node in the graphviz file. +# Mandatory : NO +# Default : "node" +##end +##variable +# GRAPHVIZ_EXECUTABLES - Set this to FALSE to exclude executables from the generated graphs. +# Mandatory : NO +# Default : TRUE +##end +##variable +# GRAPHVIZ_STATIC_LIBS - Set this to FALSE to exclude static libraries from the generated graphs. +# Mandatory : NO +# Default : TRUE +##end +##variable +# GRAPHVIZ_SHARED_LIBS - Set this to FALSE to exclude shared libraries from the generated graphs. +# Mandatory : NO +# Default : TRUE +##end +##variable +# GRAPHVIZ_MODULE_LIBS - Set this to FALSE to exclude static libraries from the generated graphs. +# Mandatory : NO +# Default : TRUE +##end +##variable +# GRAPHVIZ_EXTERNAL_LIBS - Set this to FALSE to exclude external libraries from the generated graphs. +# Mandatory : NO +# Default : TRUE +##end +##variable +# GRAPHVIZ_IGNORE_TARGETS - A list of regular expressions for ignoring targets. +# Mandatory : NO +# Default : empty +##end + +#============================================================================= +# Copyright 2007-2009 Kitware, Inc. +# Copyright 2013 Alexander Neundorf +# +# 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.) diff --git a/Modules/CMakeMinGWFindMake.cmake b/Modules/CMakeMinGWFindMake.cmake index efba20a31..d7298dcef 100644 --- a/Modules/CMakeMinGWFindMake.cmake +++ b/Modules/CMakeMinGWFindMake.cmake @@ -14,7 +14,9 @@ find_program(CMAKE_MAKE_PROGRAM mingw32-make.exe PATHS "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\MinGW;InstallLocation]/bin" - c:/MinGW/bin /MinGW/bin) + c:/MinGW/bin /MinGW/bin + "[HKEY_CURRENT_USER\\Software\\CodeBlocks;Path]/MinGW/bin" + ) find_program(CMAKE_SH sh.exe ) if(CMAKE_SH) message(FATAL_ERROR "sh.exe was found in your PATH, here:\n${CMAKE_SH}\nFor MinGW make to work correctly sh.exe must NOT be in your path.\nRun cmake from a shell that does not have sh.exe in your PATH.\nIf you want to use a UNIX shell, then use MSYS Makefiles.\n") diff --git a/Modules/CMakeParseArguments.cmake b/Modules/CMakeParseArguments.cmake index 406780eb4..016da0c97 100644 --- a/Modules/CMakeParseArguments.cmake +++ b/Modules/CMakeParseArguments.cmake @@ -51,7 +51,7 @@ # MY_INSTALL_CONFIGURATIONS = "" (was not used) # MY_INSTALL_UNPARSED_ARGUMENTS = "blub" (no value expected after "OPTIONAL" # -# You can the continue and process these variables. +# You can then continue and process these variables. # # Keywords terminate lists of values, e.g. if directly after a one_value_keyword # another recognized keyword follows, this is interpreted as the beginning of diff --git a/Modules/CMakeParseImplicitLinkInfo.cmake b/Modules/CMakeParseImplicitLinkInfo.cmake index 80e02188a..4724a8c7b 100644 --- a/Modules/CMakeParseImplicitLinkInfo.cmake +++ b/Modules/CMakeParseImplicitLinkInfo.cmake @@ -26,10 +26,11 @@ function(CMAKE_PARSE_IMPLICIT_LINK_INFO text lib_var dir_var fwk_var log_var obj set(linker "CMAKE_LINKER-NOTFOUND") if(CMAKE_LINKER) get_filename_component(linker ${CMAKE_LINKER} NAME) + string(REGEX REPLACE "([][+.*?()^$])" "\\\\\\1" linker "${linker}") endif() # Construct a regex to match linker lines. It must match both the # whole line and just the command (argv[0]). - set(linker_regex "^( *|.*[/\\])(${linker}|ld|collect2)[^/\\]*( |$)") + set(linker_regex "^( *|.*[/\\])(${linker}|([^/\\]+-)?ld|collect2)[^/\\]*( |$)") set(linker_exclude_regex "collect2 version ") set(log "${log} link line regex: [${linker_regex}]\n") string(REGEX REPLACE "\r?\n" ";" output_lines "${text}") diff --git a/Modules/CMakePrintHelpers.cmake b/Modules/CMakePrintHelpers.cmake new file mode 100644 index 000000000..ef5d857b6 --- /dev/null +++ b/Modules/CMakePrintHelpers.cmake @@ -0,0 +1,146 @@ +# - Convenience macros for printing properties and variables, useful e.g. for debugging. +# +# +# CMAKE_PRINT_PROPERTIES([TARGETS target1 .. targetN] +# [SOURCES source1 .. sourceN] +# [DIRECTORIES dir1 .. dirN] +# [TESTS test1 .. testN] +# [CACHE_ENTRIES entry1 .. entryN] +# PROPERTIES prop1 .. propN ) +# +# This macro prints the values of the properties of the given targets, +# source files, directories, tests or cache entries. Exactly one of the +# scope keywords must be used. +# Example: +# cmake_print_properties(TARGETS foo bar PROPERTIES LOCATION INTERFACE_INCLUDE_DIRS) +# This will print the LOCATION and INTERFACE_INCLUDE_DIRS properties for both +# targets foo and bar. +# +# +# CMAKE_PRINT_VARIABLES(var1 var2 .. varN) +# +# This macro will print the name of each variable followed by its value. +# Example: +# cmake_print_variables(CMAKE_C_COMPILER CMAKE_MAJOR_VERSION THIS_ONE_DOES_NOT_EXIST) +# Gives: +# -- CMAKE_C_COMPILER="/usr/bin/gcc" ; CMAKE_MAJOR_VERSION="2" ; THIS_ONE_DOES_NOT_EXIST="" + +#============================================================================= +# Copyright 2013 Alexander Neundorf, +# +# 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.) + +include(CMakeParseArguments) + +function(CMAKE_PRINT_VARIABLES) + set(msg "") + foreach(var ${ARGN}) + if(msg) + set(msg "${msg} ; ") + endif() + set(msg "${msg}${var}=\"${${var}}\"") + endforeach() + message(STATUS "${msg}") +endfunction() + + +function(CMAKE_PRINT_PROPERTIES ) + set(options ) + set(oneValueArgs ) + set(multiValueArgs TARGETS SOURCES TESTS DIRECTORIES CACHE_ENTRIES PROPERTIES ) + + cmake_parse_arguments(CPP "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) + + if(CPP_UNPARSED_ARGUMENTS) + message(FATAL_ERROR "Unknown keywords given to cmake_print_properties(): \"${CPP_UNPARSED_ARGUMENTS}\"") + return() + endif() + + if(NOT CPP_PROPERTIES) + message(FATAL_ERROR "Required argument PROPERTIES missing in cmake_print_properties() call") + return() + endif() + + set(mode) + set(items) + set(keyword) + + if(CPP_TARGETS) + set(items ${CPP_TARGETS}) + set(mode ${mode} TARGETS) + set(keyword TARGET) + endif() + + if(CPP_SOURCES) + set(items ${CPP_SOURCES}) + set(mode ${mode} SOURCES) + set(keyword SOURCE) + endif() + + if(CPP_TESTS) + set(items ${CPP_TESTS}) + set(mode ${mode} TESTS) + set(keyword TEST) + endif() + + if(CPP_DIRECTORIES) + set(items ${CPP_DIRECTORIES}) + set(mode ${mode} DIRECTORIES) + set(keyword DIRECTORY) + endif() + + if(CPP_CACHE_ENTRIES) + set(items ${CPP_CACHE_ENTRIES}) + set(mode ${mode} CACHE_ENTRIES) + set(keyword CACHE) + endif() + + if(NOT mode) + message(FATAL_ERROR "Mode keyword missing in cmake_print_properties() call, must be one of TARGETS SOURCES TESTS DIRECTORIES CACHE_ENTRIES PROPERTIES") + return() + endif() + + list(LENGTH mode modeLength) + if("${modeLength}" GREATER 1) + message(FATAL_ERROR "Multiple mode keyword used in cmake_print_properties() call, it must be exactly one of TARGETS SOURCES TESTS DIRECTORIES CACHE_ENTRIES PROPERTIES") + return() + endif() + + set(msg "\n") + foreach(item ${items}) + + set(itemExists TRUE) + if(keyword STREQUAL "TARGET") + if(NOT TARGET ${item}) + set(itemExists FALSE) + set(msg "${msg}\n No such TARGET \"${item}\" !\n\n") + endif() + endif() + + if (itemExists) + set(msg "${msg} Properties for ${keyword} ${item}:\n") + foreach(prop ${CPP_PROPERTIES}) + + get_property(propertySet ${keyword} ${item} PROPERTY "${prop}" SET) + + if(propertySet) + get_property(property ${keyword} ${item} PROPERTY "${prop}") + set(msg "${msg} ${item}.${prop} = \"${property}\"\n") + else() + set(msg "${msg} ${item}.${prop} = \n") + endif() + endforeach() + endif() + + endforeach() + message(STATUS "${msg}") + +endfunction() diff --git a/Modules/CMakePushCheckState.cmake b/Modules/CMakePushCheckState.cmake index 08809bf25..b37b706ac 100644 --- a/Modules/CMakePushCheckState.cmake +++ b/Modules/CMakePushCheckState.cmake @@ -1,8 +1,10 @@ -# This module defines two macros: +# This module defines three macros: # CMAKE_PUSH_CHECK_STATE() -# and # CMAKE_POP_CHECK_STATE() -# These two macros can be used to save and restore the state of the variables +# and +# CMAKE_RESET_CHECK_STATE() +# These macros can be used to save, restore and reset (i.e., clear contents) +# the state of the variables # CMAKE_REQUIRED_FLAGS, CMAKE_REQUIRED_DEFINITIONS, CMAKE_REQUIRED_LIBRARIES # and CMAKE_REQUIRED_INCLUDES used by the various Check-files coming with CMake, # like e.g. check_function_exists() etc. @@ -11,9 +13,16 @@ # but after the Find-module has been executed they should have the same value # as they had before. # +# CMAKE_PUSH_CHECK_STATE() macro receives optional argument RESET. Whether it's specified, +# CMAKE_PUSH_CHECK_STATE() will set all CMAKE_REQUIRED_* variables to empty values, same +# as CMAKE_RESET_CHECK_STATE() call will do. +# # Usage: -# cmake_push_check_state() -# set(CMAKE_REQUIRED_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} -DSOME_MORE_DEF) +# cmake_push_check_state(RESET) +# set(CMAKE_REQUIRED_DEFINITIONS -DSOME_MORE_DEF) +# check_function_exists(...) +# cmake_reset_check_state() +# set(CMAKE_REQUIRED_DEFINITIONS -DANOTHER_DEF) # check_function_exists(...) # cmake_pop_check_state() @@ -31,6 +40,15 @@ # License text for the above reference.) +macro(CMAKE_RESET_CHECK_STATE) + + set(CMAKE_REQUIRED_INCLUDES) + set(CMAKE_REQUIRED_DEFINITIONS) + set(CMAKE_REQUIRED_LIBRARIES) + set(CMAKE_REQUIRED_FLAGS) + +endmacro() + macro(CMAKE_PUSH_CHECK_STATE) if(NOT DEFINED _CMAKE_PUSH_CHECK_STATE_COUNTER) @@ -43,6 +61,11 @@ macro(CMAKE_PUSH_CHECK_STATE) set(_CMAKE_REQUIRED_DEFINITIONS_SAVE_${_CMAKE_PUSH_CHECK_STATE_COUNTER} ${CMAKE_REQUIRED_DEFINITIONS}) set(_CMAKE_REQUIRED_LIBRARIES_SAVE_${_CMAKE_PUSH_CHECK_STATE_COUNTER} ${CMAKE_REQUIRED_LIBRARIES}) set(_CMAKE_REQUIRED_FLAGS_SAVE_${_CMAKE_PUSH_CHECK_STATE_COUNTER} ${CMAKE_REQUIRED_FLAGS}) + + if (ARGC GREATER 0 AND ARGV0 STREQUAL "RESET") + cmake_reset_check_state() + endif() + endmacro() macro(CMAKE_POP_CHECK_STATE) diff --git a/Modules/CMakeSystem.cmake.in b/Modules/CMakeSystem.cmake.in index 7e2a3584b..70c98d5ca 100644 --- a/Modules/CMakeSystem.cmake.in +++ b/Modules/CMakeSystem.cmake.in @@ -1,3 +1,8 @@ +set(CMAKE_HOST_SYSTEM "@CMAKE_HOST_SYSTEM@") +set(CMAKE_HOST_SYSTEM_NAME "@CMAKE_HOST_SYSTEM_NAME@") +set(CMAKE_HOST_SYSTEM_VERSION "@CMAKE_HOST_SYSTEM_VERSION@") +set(CMAKE_HOST_SYSTEM_PROCESSOR "@CMAKE_HOST_SYSTEM_PROCESSOR@") + @INCLUDE_CMAKE_TOOLCHAIN_FILE_IF_REQUIRED@ set(CMAKE_SYSTEM "@CMAKE_SYSTEM@") @@ -5,11 +10,6 @@ set(CMAKE_SYSTEM_NAME "@CMAKE_SYSTEM_NAME@") set(CMAKE_SYSTEM_VERSION "@CMAKE_SYSTEM_VERSION@") set(CMAKE_SYSTEM_PROCESSOR "@CMAKE_SYSTEM_PROCESSOR@") -set(CMAKE_HOST_SYSTEM "@CMAKE_HOST_SYSTEM@") -set(CMAKE_HOST_SYSTEM_NAME "@CMAKE_HOST_SYSTEM_NAME@") -set(CMAKE_HOST_SYSTEM_VERSION "@CMAKE_HOST_SYSTEM_VERSION@") -set(CMAKE_HOST_SYSTEM_PROCESSOR "@CMAKE_HOST_SYSTEM_PROCESSOR@") - set(CMAKE_CROSSCOMPILING "@CMAKE_CROSSCOMPILING@") set(CMAKE_SYSTEM_LOADED 1) diff --git a/Modules/CMakeTestFortranCompiler.cmake b/Modules/CMakeTestFortranCompiler.cmake index e26334514..b9e77c5f5 100644 --- a/Modules/CMakeTestFortranCompiler.cmake +++ b/Modules/CMakeTestFortranCompiler.cmake @@ -72,7 +72,7 @@ else() message(STATUS "Checking whether ${CMAKE_Fortran_COMPILER} supports Fortran 90") file(WRITE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testFortranCompilerF90.f90 " PROGRAM TESTFortran90 - stop = 1 ; do while ( stop .eq. 0 ) ; end do + integer stop ; stop = 1 ; do while ( stop .eq. 0 ) ; end do END PROGRAM TESTFortran90 ") try_compile(CMAKE_Fortran_COMPILER_SUPPORTS_F90 ${CMAKE_BINARY_DIR} diff --git a/Modules/CMakeUnixFindMake.cmake b/Modules/CMakeUnixFindMake.cmake index c75cf7cbc..371492657 100644 --- a/Modules/CMakeUnixFindMake.cmake +++ b/Modules/CMakeUnixFindMake.cmake @@ -14,3 +14,13 @@ find_program(CMAKE_MAKE_PROGRAM NAMES gmake make smake) mark_as_advanced(CMAKE_MAKE_PROGRAM) + +# Look for a make tool provided by Xcode +if(NOT CMAKE_MAKE_PROGRAM AND CMAKE_HOST_APPLE) + execute_process(COMMAND xcrun --find make + OUTPUT_VARIABLE _xcrun_out OUTPUT_STRIP_TRAILING_WHITESPACE + ERROR_VARIABLE _xcrun_err) + if(_xcrun_out) + set_property(CACHE CMAKE_MAKE_PROGRAM PROPERTY VALUE "${_xcrun_out}") + endif() +endif() diff --git a/Modules/CPack.cmake b/Modules/CPack.cmake index 42d3c0c39..b0260ab16 100644 --- a/Modules/CPack.cmake +++ b/Modules/CPack.cmake @@ -263,8 +263,8 @@ # ##variable # CPACK_PACKAGE_INSTALL_REGISTRY_KEY - Registry key used when -# installing this project. This is only used -# by installer for Windows. +# installing this project. This is only used by installer for Windows. +# The default value is based on the installation directory. ##end ##variable # CPACK_CREATE_DESKTOP_LINKS - List of desktop links to create. diff --git a/Modules/CPackPackageMaker.cmake b/Modules/CPackPackageMaker.cmake index 45ba465cc..98ca9e2d5 100644 --- a/Modules/CPackPackageMaker.cmake +++ b/Modules/CPackPackageMaker.cmake @@ -2,7 +2,7 @@ ##end ##module # - PackageMaker CPack generator (Mac OS X). -# The following variable is specific to installers build on Mac OS X +# The following variable is specific to installers built on Mac OS X # using PackageMaker: ##end # diff --git a/Modules/CPackRPM.cmake b/Modules/CPackRPM.cmake index fa79e1bfc..bf5b5bc62 100644 --- a/Modules/CPackRPM.cmake +++ b/Modules/CPackRPM.cmake @@ -163,6 +163,8 @@ # May be set by the user in order to specify a USER binary spec file # to be used by CPackRPM instead of generating the file. # The specified file will be processed by configure_file( @ONLY). +# One can provide a component specific file by setting +# CPACK_RPM__USER_BINARY_SPECFILE. ##end ##variable # CPACK_RPM_GENERATE_USER_BINARY_SPECFILE_TEMPLATE - Spec file template. @@ -223,6 +225,24 @@ # The refered file will be read and directly put after the %changelog # section. ##end +##variable +# CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST - list of path to be excluded. +# Mandatory : NO +# Default : /etc /etc/init.d /usr /usr/share /usr/share/doc /usr/bin /usr/lib /usr/lib64 /usr/include +# May be used to exclude path (directories or files) from the auto-generated +# list of paths discovered by CPack RPM. The defaut value contains a reasonable +# set of values if the variable is not defined by the user. If the variable +# is defined by the user then CPackRPM will NOT any of the default path. +# If you want to add some path to the default list then you can use +# CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION variable. +##end +##variable +# CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION - additional list of path to be excluded. +# Mandatory : NO +# Default : - +# May be used to add more exclude path (directories or files) from the initial +# default list of excluded paths. See CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST. +##end #============================================================================= # Copyright 2007-2009 Kitware, Inc. @@ -617,7 +637,7 @@ if(CPACK_RPM_CHANGELOG_FILE) message(SEND_ERROR "CPackRPM:Warning: CPACK_RPM_CHANGELOG_FILE <${CPACK_RPM_CHANGELOG_FILE}> does not exists - ignoring") endif() else() - set(CPACK_RPM_SPEC_CHANGELOG "* Sun Jul 4 2010 Erk \n Generated by CPack RPM (no Changelog file were provided)") + set(CPACK_RPM_SPEC_CHANGELOG "* Sun Jul 4 2010 Eric Noulard - ${CPACK_RPM_PACKAGE_VERSION}-${CPACK_RPM_PACKAGE_RELEASE}\n Generated by CPack RPM (no Changelog file were provided)") endif() # CPACK_RPM_SPEC_MORE_DEFINE @@ -666,6 +686,30 @@ if(CPACK_RPM_PACKAGE_RELOCATABLE) endforeach() endif() +if (CPACK_RPM_PACKAGE_DEBUG) + message("CPackRPM:Debug: Initial list of path to OMIT in RPM: ${_RPM_DIRS_TO_OMIT}") +endif() + +if (NOT DEFINED CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST) + set(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST /etc /etc/init.d /usr /usr/share /usr/share/doc /usr/bin /usr/lib /usr/lib64 /usr/include) + if (CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION) + message("CPackRPM:Debug: Adding ${CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION} to builtin omit list.") + list(APPEND CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST "${CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION}") + endif() +endif() + +if(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST) + if (CPACK_RPM_PACKAGE_DEBUG) + message("CPackRPM:Debug: CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST= ${CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST}") + endif() + foreach(_DIR ${CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST}) + list(APPEND _RPM_DIRS_TO_OMIT "-o;-path;.${_DIR}") + endforeach() +endif() +if (CPACK_RPM_PACKAGE_DEBUG) + message("CPackRPM:Debug: Final list of path to OMIT in RPM: ${_RPM_DIRS_TO_OMIT}") +endif() + # Use files tree to construct files command (spec file) # We should not forget to include symlinks (thus -o -type l) # We should include directory as well (thus -type d) @@ -832,11 +876,25 @@ if(CPACK_RPM_PACKAGE_DEBUG) message("CPackRPM:Debug: CPACK_TEMPORARY_PACKAGE_FILE_NAME = ${CPACK_TEMPORARY_PACKAGE_FILE_NAME}") endif() -# USER generated spec file handling. -# We should generate a spec file template: +# protect @ in pathname in order to avoid their +# interpretation during the configure_file step +set(CPACK_RPM_INSTALL_FILES_LIST "${CPACK_RPM_INSTALL_FILES}") +set(PROTECTED_AT "@") +string(REPLACE "@" "\@PROTECTED_AT\@" CPACK_RPM_INSTALL_FILES "${CPACK_RPM_INSTALL_FILES_LIST}") +set(CPACK_RPM_INSTALL_FILES_LIST "") + +# +# USER generated/provided spec file handling. +# + +# We can have a component specific spec file. +if(CPACK_RPM_PACKAGE_COMPONENT AND CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_USER_BINARY_SPECFILE) + set(CPACK_RPM_USER_BINARY_SPECFILE ${CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_USER_BINARY_SPECFILE}) +endif() + +# We should generate a USER spec file template: # - either because the user asked for it : CPACK_RPM_GENERATE_USER_BINARY_SPECFILE_TEMPLATE # - or the user did not provide one : NOT CPACK_RPM_USER_BINARY_SPECFILE -# if(CPACK_RPM_GENERATE_USER_BINARY_SPECFILE_TEMPLATE OR NOT CPACK_RPM_USER_BINARY_SPECFILE) file(WRITE ${CPACK_RPM_BINARY_SPECFILE}.in "# -*- rpm-spec -*- @@ -902,9 +960,9 @@ mv \"\@CPACK_TOPLEVEL_DIRECTORY\@/tmpBBroot\" $RPM_BUILD_ROOT %files %defattr(-,root,root,-) -${CPACK_RPM_INSTALL_FILES} -${CPACK_RPM_ABSOLUTE_INSTALL_FILES} -${CPACK_RPM_USER_INSTALL_FILES} +\@CPACK_RPM_INSTALL_FILES\@ +\@CPACK_RPM_ABSOLUTE_INSTALL_FILES\@ +\@CPACK_RPM_USER_INSTALL_FILES\@ %changelog \@CPACK_RPM_SPEC_CHANGELOG\@ @@ -931,6 +989,9 @@ else() configure_file(${CPACK_RPM_BINARY_SPECFILE}.in ${CPACK_RPM_BINARY_SPECFILE} @ONLY) endif() +# remove AT protection +unset(PROTECTED_AT) + if(RPMBUILD_EXECUTABLE) # Now call rpmbuild using the SPECFILE execute_process( diff --git a/Modules/CPackWIX.cmake b/Modules/CPackWIX.cmake index 0c0a8f19f..fce25f07a 100644 --- a/Modules/CPackWIX.cmake +++ b/Modules/CPackWIX.cmake @@ -76,6 +76,32 @@ # This image must be 493 by 312 pixels. # ##end +# +##variable +# CPACK_WIX_PROGRAM_MENU_FOLDER - Start menu folder name for launcher. +# +# If this variable is not set, it will be initialized with CPACK_PACKAGE_NAME +# +##end +##variable +# CPACK_WIX_CULTURES - Language(s) of the installer +# +# Languages are compiled into the WixUI extension library. To use them, +# simply provide the name of the culture. If you specify more than one +# culture identifier in a comma or semicolon delimited list, the first one +# that is found will be used. You can find a list of supported languages at: +# http://wix.sourceforge.net/manual-wix3/WixUI_localization.htm +# +##end +##variable +# CPACK_WIX_TEMPLATE - Template file for WiX generation +# +# If this variable is set, the specified template will be used to generate the WiX wxs file. +# This should be used if further customization of the output is required. +# +# If this variable is not set, the default MSI template included with CMake will be used. +# +##end #============================================================================= # Copyright 2012 Kitware, Inc. diff --git a/Modules/CTest.cmake b/Modules/CTest.cmake index 562e2486c..5cd62f607 100644 --- a/Modules/CTest.cmake +++ b/Modules/CTest.cmake @@ -84,13 +84,13 @@ if(BUILD_TESTING) endmacro() macro(SET_IF_SET var val) - if(NOT "${val}" MATCHES "^$") + if(NOT "${val}" STREQUAL "") set("${var}" "${val}") endif() endmacro() macro(SET_IF_SET_AND_NOT_SET var val) - if(NOT "${val}" MATCHES "^$") + if(NOT "${val}" STREQUAL "") SET_IF_NOT_SET("${var}" "${val}") endif() endmacro() diff --git a/Modules/CheckCCompilerFlag.cmake b/Modules/CheckCCompilerFlag.cmake index 08e80f756..bc15e9a0b 100644 --- a/Modules/CheckCCompilerFlag.cmake +++ b/Modules/CheckCCompilerFlag.cmake @@ -2,9 +2,13 @@ # CHECK_C_COMPILER_FLAG( ) # - the compiler flag # - variable to store the result -# This internally calls the check_c_source_compiles macro. +# This internally calls the check_c_source_compiles macro and +# sets CMAKE_REQUIRED_DEFINITIONS to . # See help for CheckCSourceCompiles for a listing of variables -# that can modify the build. +# that can otherwise modify the build. +# The result only tells that the compiler does not give an error message when +# it encounters the flag. If the flag has any effect or even a specific one is +# beyond the scope of this module. #============================================================================= # Copyright 2006-2011 Kitware, Inc. @@ -26,6 +30,12 @@ include(CheckCSourceCompiles) macro (CHECK_C_COMPILER_FLAG _FLAG _RESULT) set(SAFE_CMAKE_REQUIRED_DEFINITIONS "${CMAKE_REQUIRED_DEFINITIONS}") set(CMAKE_REQUIRED_DEFINITIONS "${_FLAG}") + # Normalize locale during test compilation. + set(_CheckCCompilerFlag_LOCALE_VARS LC_ALL LC_MESSAGES LANG) + foreach(v ${_CheckCCompilerFlag_LOCALE_VARS}) + set(_CheckCCompilerFlag_SAVED_${v} "$ENV{${v}}") + set(ENV{${v}} C) + endforeach() CHECK_C_SOURCE_COMPILES("int main(void) { return 0; }" ${_RESULT} # Some compilers do not fail with a bad flag FAIL_REGEX "command line option .* is valid for .* but not for C" # GNU @@ -41,5 +51,11 @@ macro (CHECK_C_COMPILER_FLAG _FLAG _RESULT) FAIL_REGEX "command option .* is not recognized" # XL FAIL_REGEX "WARNING: unknown flag:" # Open64 ) + foreach(v ${_CheckCCompilerFlag_LOCALE_VARS}) + set(ENV{${v}} ${_CheckCCompilerFlag_SAVED_${v}}) + unset(_CheckCCompilerFlag_SAVED_${v}) + endforeach() + unset(_CheckCCompilerFlag_LOCALE_VARS) + set (CMAKE_REQUIRED_DEFINITIONS "${SAFE_CMAKE_REQUIRED_DEFINITIONS}") endmacro () diff --git a/Modules/CheckCXXCompilerFlag.cmake b/Modules/CheckCXXCompilerFlag.cmake index 662640340..eee3a701e 100644 --- a/Modules/CheckCXXCompilerFlag.cmake +++ b/Modules/CheckCXXCompilerFlag.cmake @@ -2,9 +2,13 @@ # CHECK_CXX_COMPILER_FLAG( ) # - the compiler flag # - variable to store the result -# This internally calls the check_cxx_source_compiles macro. See help -# for CheckCXXSourceCompiles for a listing of variables that can -# modify the build. +# This internally calls the check_cxx_source_compiles macro and +# sets CMAKE_REQUIRED_DEFINITIONS to . +# See help for CheckCXXSourceCompiles for a listing of variables +# that can otherwise modify the build. +# The result only tells that the compiler does not give an error message when +# it encounters the flag. If the flag has any effect or even a specific one is +# beyond the scope of this module. #============================================================================= # Copyright 2006-2010 Kitware, Inc. @@ -26,6 +30,13 @@ include(CheckCXXSourceCompiles) macro (CHECK_CXX_COMPILER_FLAG _FLAG _RESULT) set(SAFE_CMAKE_REQUIRED_DEFINITIONS "${CMAKE_REQUIRED_DEFINITIONS}") set(CMAKE_REQUIRED_DEFINITIONS "${_FLAG}") + + # Normalize locale during test compilation. + set(_CheckCXXCompilerFlag_LOCALE_VARS LC_ALL LC_MESSAGES LANG) + foreach(v ${_CheckCXXCompilerFlag_LOCALE_VARS}) + set(_CheckCXXCompilerFlag_SAVED_${v} "$ENV{${v}}") + set(ENV{${v}} C) + endforeach() CHECK_CXX_SOURCE_COMPILES("int main() { return 0;}" ${_RESULT} # Some compilers do not fail with a bad flag FAIL_REGEX "command line option .* is valid for .* but not for C\\\\+\\\\+" # GNU @@ -43,6 +54,12 @@ macro (CHECK_CXX_COMPILER_FLAG _FLAG _RESULT) FAIL_REGEX "File with unknown suffix passed to linker" # PGI FAIL_REGEX "WARNING: unknown flag:" # Open64 ) + foreach(v ${_CheckCXXCompilerFlag_LOCALE_VARS}) + set(ENV{${v}} ${_CheckCXXCompilerFlag_SAVED_${v}}) + unset(_CheckCXXCompilerFlag_SAVED_${v}) + endforeach() + unset(_CheckCXXCompilerFlag_LOCALE_VARS) + set (CMAKE_REQUIRED_DEFINITIONS "${SAFE_CMAKE_REQUIRED_DEFINITIONS}") endmacro () diff --git a/Modules/CheckFunctionExists.cmake b/Modules/CheckFunctionExists.cmake index 7aa1748da..ead135441 100644 --- a/Modules/CheckFunctionExists.cmake +++ b/Modules/CheckFunctionExists.cmake @@ -4,7 +4,7 @@ # Check that the is provided by libraries on the system and # store the result in a . This does not verify that any # system header file declares the function, only that it can be found -# at link time (considure using CheckSymbolExists). +# at link time (consider using CheckSymbolExists). # # The following variables may be set before calling this macro to # modify the way the check is run: diff --git a/Modules/CheckSizeOf.cmake b/Modules/CheckSizeOf.cmake index 9f587b5c2..f0707df4e 100644 --- a/Modules/CheckSizeOf.cmake +++ b/Modules/CheckSizeOf.cmake @@ -15,4 +15,4 @@ message(SEND_ERROR "Modules/CheckSizeOf.cmake has been removed. " "Use Modules/CheckTypeSize.cmake instead. This " - "compatability check may be removed before the next release!") + "compatibility check may be removed before the next release!") diff --git a/Modules/Compiler/Clang-CXX.cmake b/Modules/Compiler/Clang-CXX.cmake index 486e2af88..972d889aa 100644 --- a/Modules/Compiler/Clang-CXX.cmake +++ b/Modules/Compiler/Clang-CXX.cmake @@ -1,2 +1,4 @@ include(Compiler/Clang) __compiler_clang(CXX) + +set(CMAKE_CXX_COMPILE_OPTIONS_VISIBILITY_INLINES_HIDDEN "-fvisibility-inlines-hidden") diff --git a/Modules/Compiler/Clang.cmake b/Modules/Compiler/Clang.cmake index c6cd8f8f5..ec4562a3d 100644 --- a/Modules/Compiler/Clang.cmake +++ b/Modules/Compiler/Clang.cmake @@ -24,4 +24,5 @@ macro(__compiler_clang lang) __compiler_gnu(${lang}) set(CMAKE_${lang}_COMPILE_OPTIONS_PIE "-fPIE") set(CMAKE_INCLUDE_SYSTEM_FLAG_${lang} "-isystem ") + set(CMAKE_${lang}_COMPILE_OPTIONS_VISIBILITY "-fvisibility=") endmacro() diff --git a/Modules/Compiler/GNU-CXX.cmake b/Modules/Compiler/GNU-CXX.cmake index 879ab8f80..33d6093a1 100644 --- a/Modules/Compiler/GNU-CXX.cmake +++ b/Modules/Compiler/GNU-CXX.cmake @@ -1,2 +1,12 @@ include(Compiler/GNU) __compiler_gnu(CXX) + +if (WIN32) + if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.6) + set(CMAKE_CXX_COMPILE_OPTIONS_VISIBILITY_INLINES_HIDDEN "-fno-keep-inline-dllexport") + endif() +else() + if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.2) + set(CMAKE_CXX_COMPILE_OPTIONS_VISIBILITY_INLINES_HIDDEN "-fvisibility-inlines-hidden") + endif() +endif() diff --git a/Modules/Compiler/GNU.cmake b/Modules/Compiler/GNU.cmake index faad41672..504704dad 100644 --- a/Modules/Compiler/GNU.cmake +++ b/Modules/Compiler/GNU.cmake @@ -25,6 +25,9 @@ macro(__compiler_gnu lang) if(NOT CMAKE_${lang}_COMPILER_VERSION VERSION_LESS 3.4) set(CMAKE_${lang}_COMPILE_OPTIONS_PIE "-fPIE") endif() + if(NOT CMAKE_${lang}_COMPILER_VERSION VERSION_LESS 4.2) + set(CMAKE_${lang}_COMPILE_OPTIONS_VISIBILITY "-fvisibility=") + endif() set(CMAKE_SHARED_LIBRARY_${lang}_FLAGS "-fPIC") set(CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS "-shared") diff --git a/Modules/Compiler/IAR-ASM.cmake b/Modules/Compiler/IAR-ASM.cmake new file mode 100644 index 000000000..66fb052df --- /dev/null +++ b/Modules/Compiler/IAR-ASM.cmake @@ -0,0 +1,14 @@ +# This file is processed when the IAR compiler is used for an assembler file + +include(Compiler/IAR) + +set(CMAKE_ASM_COMPILE_OBJECT " -o ") + +if("${IAR_TARGET_ARCHITECTURE}" STREQUAL "ARM") + set(CMAKE_ASM_SOURCE_FILE_EXTENSIONS s;asm;msa) +endif() + + +if("${IAR_TARGET_ARCHITECTURE}" STREQUAL "AVR") + set(CMAKE_ASM_SOURCE_FILE_EXTENSIONS s90;asm;msa) +endif() diff --git a/Modules/Compiler/IAR-C.cmake b/Modules/Compiler/IAR-C.cmake new file mode 100644 index 000000000..da29447c4 --- /dev/null +++ b/Modules/Compiler/IAR-C.cmake @@ -0,0 +1,34 @@ +# This file is processed when the IAR compiler is used for a C file + + +include(Compiler/IAR) + +set(CMAKE_C_COMPILE_OBJECT " -o ") +set(CMAKE_C_CREATE_PREPROCESSED_SOURCE " --preprocess=cnl ") +set(CMAKE_C_CREATE_ASSEMBLY_SOURCE " -lAH -o .dummy") + +# The toolchains for ARM and AVR are quite different: +if("${IAR_TARGET_ARCHITECTURE}" STREQUAL "ARM") + + set(CMAKE_C_LINK_EXECUTABLE " -o ") + set(CMAKE_C_CREATE_STATIC_LIBRARY " --create ") + +endif() + + +if("${IAR_TARGET_ARCHITECTURE}" STREQUAL "AVR") + set(CMAKE_C_OUTPUT_EXTENSION ".r90") + + if(NOT CMAKE_C_LINK_FLAGS) + set(CMAKE_C_LINK_FLAGS "-Fmotorola") + endif() + + set(CMAKE_C_LINK_EXECUTABLE " -o ") + set(CMAKE_C_CREATE_STATIC_LIBRARY " -o ") + +endif() + +# add the target specific include directory: +get_filename_component(_compilerDir "${CMAKE_C_COMPILER}" PATH) +get_filename_component(_compilerDir "${_compilerDir}" PATH) +include_directories("${_compilerDir}/inc" ) diff --git a/Modules/Compiler/IAR-CXX.cmake b/Modules/Compiler/IAR-CXX.cmake new file mode 100644 index 000000000..eae9d1b77 --- /dev/null +++ b/Modules/Compiler/IAR-CXX.cmake @@ -0,0 +1,34 @@ +# This file is processed when the IAR compiler is used for a C++ file + +include(Compiler/IAR) + +set(CMAKE_CXX_COMPILE_OBJECT " -o ") + +set(CMAKE_CXX_CREATE_PREPROCESSED_SOURCE " --preprocess=cnl ") +set(CMAKE_CXX_CREATE_ASSEMBLY_SOURCE " -lAH -o .dummy") + + + +if("${IAR_TARGET_ARCHITECTURE}" STREQUAL "ARM") + + set(CMAKE_CXX_LINK_EXECUTABLE " -o ") + set(CMAKE_CXX_CREATE_STATIC_LIBRARY " --create ") + +endif() + + +if("${IAR_TARGET_ARCHITECTURE}" STREQUAL "AVR") + set(CMAKE_CXX_OUTPUT_EXTENSION ".r90") + if(NOT CMAKE_CXX_LINK_FLAGS) + set(CMAKE_CXX_LINK_FLAGS "-Fmotorola") + endif() + + set(CMAKE_CXX_LINK_EXECUTABLE " -o ") + set(CMAKE_CXX_CREATE_STATIC_LIBRARY " -o ") + +endif() + +# add the target specific include directory: +get_filename_component(_compilerDir "${CMAKE_C_COMPILER}" PATH) +get_filename_component(_compilerDir "${_compilerDir}" PATH) +include_directories("${_compilerDir}/inc") diff --git a/Modules/Compiler/IAR.cmake b/Modules/Compiler/IAR.cmake new file mode 100644 index 000000000..00e47133c --- /dev/null +++ b/Modules/Compiler/IAR.cmake @@ -0,0 +1,46 @@ +# This file is processed when the IAR compiler is used for a C or C++ file +# Documentation can be downloaded here: http://www.iar.com/website1/1.0.1.0/675/1/ +# The initial feature request is here: http://www.cmake.org/Bug/view.php?id=10176 +# It also contains additional links and information. + +if(_IAR_CMAKE_LOADED) + return() +endif() +set(_IAR_CMAKE_LOADED TRUE) + + +get_filename_component(_CMAKE_C_TOOLCHAIN_LOCATION "${CMAKE_C_COMPILER}" PATH) +get_filename_component(_CMAKE_CXX_TOOLCHAIN_LOCATION "${CMAKE_CXX_COMPILER}" PATH) +get_filename_component(_CMAKE_ASM_TOOLCHAIN_LOCATION "${CMAKE_ASM_COMPILER}" PATH) + + +if("${CMAKE_C_COMPILER}" MATCHES "arm" OR "${CMAKE_CXX_COMPILER}" MATCHES "arm" OR "${CMAKE_ASM_COMPILER}" MATCHES "arm") + set(CMAKE_EXECUTABLE_SUFFIX ".elf") + + # For arm, IAR uses the "ilinkarm" linker and "iarchive" archiver: + find_program(CMAKE_IAR_LINKER ilinkarm HINTS "${_CMAKE_C_TOOLCHAIN_LOCATION}" "${_CMAKE_CXX_TOOLCHAIN_LOCATION}" "${_CMAKE_ASM_TOOLCHAIN_LOCATION}") + find_program(CMAKE_IAR_AR iarchive HINTS "${_CMAKE_C_TOOLCHAIN_LOCATION}" "${_CMAKE_CXX_TOOLCHAIN_LOCATION}" "${_CMAKE_ASM_TOOLCHAIN_LOCATION}" ) + + set(IAR_TARGET_ARCHITECTURE "ARM" CACHE STRING "IAR compiler target architecture") +endif() + +if("${CMAKE_C_COMPILER}" MATCHES "avr" OR "${CMAKE_CXX_COMPILER}" MATCHES "avr" OR "${CMAKE_ASM_COMPILER}" MATCHES "avr") + set(CMAKE_EXECUTABLE_SUFFIX ".bin") + + # For AVR and AVR32, IAR uses the "xlink" linker and the "xar" archiver: + find_program(CMAKE_IAR_LINKER xlink HINTS "${_CMAKE_C_TOOLCHAIN_LOCATION}" "${_CMAKE_CXX_TOOLCHAIN_LOCATION}" "${_CMAKE_ASM_TOOLCHAIN_LOCATION}" ) + find_program(CMAKE_IAR_AR xar HINTS "${_CMAKE_C_TOOLCHAIN_LOCATION}" "${_CMAKE_CXX_TOOLCHAIN_LOCATION}" "${_CMAKE_ASM_TOOLCHAIN_LOCATION}" ) + + set(IAR_TARGET_ARCHITECTURE "AVR" CACHE STRING "IAR compiler target architecture") + + set(CMAKE_LIBRARY_PATH_FLAG "-I") + +endif() + +if(NOT IAR_TARGET_ARCHITECTURE) + message(FATAL_ERROR "The IAR compiler for this architecture is not yet supported " + " by CMake. Please go to http://www.cmake.org/Bug and enter a feature request there.") +endif() + +set(CMAKE_LINKER "${CMAKE_IAR_LINKER}" CACHE FILEPATH "The IAR linker" FORCE) +set(CMAKE_AR "${CMAKE_IAR_AR}" CACHE FILEPATH "The IAR archiver" FORCE) diff --git a/Modules/Compiler/Intel-C.cmake b/Modules/Compiler/Intel-C.cmake index e23317c14..5b43db9f4 100644 --- a/Modules/Compiler/Intel-C.cmake +++ b/Modules/Compiler/Intel-C.cmake @@ -6,5 +6,9 @@ set(CMAKE_C_FLAGS_MINSIZEREL_INIT "-Os -DNDEBUG") set(CMAKE_C_FLAGS_RELEASE_INIT "-O3 -DNDEBUG") set(CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-O2 -g -DNDEBUG") +if(NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 12.0) + set(CMAKE_C_COMPILE_OPTIONS_VISIBILITY "-fvisibility=") +endif() + set(CMAKE_C_CREATE_PREPROCESSED_SOURCE " -E > ") set(CMAKE_C_CREATE_ASSEMBLY_SOURCE " -S -o ") diff --git a/Modules/Compiler/Intel-CXX.cmake b/Modules/Compiler/Intel-CXX.cmake index ae6021a68..35bb3ec04 100644 --- a/Modules/Compiler/Intel-CXX.cmake +++ b/Modules/Compiler/Intel-CXX.cmake @@ -6,5 +6,9 @@ set(CMAKE_CXX_FLAGS_MINSIZEREL_INIT "-Os -DNDEBUG") set(CMAKE_CXX_FLAGS_RELEASE_INIT "-O3 -DNDEBUG") set(CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-O2 -g -DNDEBUG") +if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 12.0) + set(CMAKE_CXX_COMPILE_OPTIONS_VISIBILITY "-fvisibility=") +endif() + set(CMAKE_CXX_CREATE_PREPROCESSED_SOURCE " -E > ") set(CMAKE_CXX_CREATE_ASSEMBLY_SOURCE " -S -o ") diff --git a/Modules/CompilerId/VS-10.vcxproj.in b/Modules/CompilerId/VS-10.vcxproj.in index ab4705fa3..1a7a53942 100644 --- a/Modules/CompilerId/VS-10.vcxproj.in +++ b/Modules/CompilerId/VS-10.vcxproj.in @@ -1,9 +1,9 @@ - + Debug - @id_arch@ + @id_platform@ @@ -12,7 +12,7 @@ Win32Proj - + Application @id_toolset@ MultiByte @@ -20,11 +20,11 @@ <_ProjectFileVersion>10.0.30319.1 - .\ - $(Configuration)\ - false + .\ + $(Configuration)\ + false - + Disabled %(PreprocessorDefinitions) @@ -40,7 +40,6 @@ false Console - @id_machine_10@ for %%i in (@id_cl@) do %40echo CMAKE_@id_lang@_COMPILER=%%~$PATH:i diff --git a/Modules/CompilerId/VS-6.dsp.in b/Modules/CompilerId/VS-6.dsp.in index 4f7e67613..48c9a236b 100644 --- a/Modules/CompilerId/VS-6.dsp.in +++ b/Modules/CompilerId/VS-6.dsp.in @@ -1,7 +1,7 @@ # Microsoft Developer Studio Project File - Name="CompilerId@id_lang@" - Package Owner=<4> # Microsoft Developer Studio Generated Build File, Format Version 6.00 -# TARGTYPE "Win32 (@id_machine_6@) Application" 0x0101 +# TARGTYPE "Win32 (x86) Application" 0x0101 CFG=CompilerId@id_lang@ - Win32 Debug !MESSAGE This is not a valid makefile. To build this project using NMAKE, @@ -16,7 +16,7 @@ CFG=CompilerId@id_lang@ - Win32 Debug !MESSAGE !MESSAGE Possible choices for configuration are: !MESSAGE -!MESSAGE "CompilerId@id_lang@ - Win32 Debug" (based on "Win32 (@id_machine_6@) Application") +!MESSAGE "CompilerId@id_lang@ - Win32 Debug" (based on "Win32 (x86) Application") !MESSAGE # Begin Project @@ -29,7 +29,7 @@ CPP=cl.exe # PROP Target_Dir "" # ADD CPP /nologo /MDd /c LINK32=link.exe -# ADD LINK32 /nologo /version:0.0 /subsystem:console /machine:@id_machine_6@ /out:"CompilerId@id_lang@.exe" /IGNORE:4089 +# ADD LINK32 /nologo /version:0.0 /subsystem:console /machine:x86 /out:"CompilerId@id_lang@.exe" /IGNORE:4089 # Begin Special Build Tool SOURCE="$(InputPath)" PostBuild_Cmds=for %%i in (@id_cl@) do @echo CMAKE_@id_lang@_COMPILER=%%~$PATH:i diff --git a/Modules/CompilerId/VS-7.vcproj.in b/Modules/CompilerId/VS-7.vcproj.in index fa48cadb3..9e3c3c3ce 100644 --- a/Modules/CompilerId/VS-7.vcproj.in +++ b/Modules/CompilerId/VS-7.vcproj.in @@ -10,12 +10,12 @@ > # with corresponding property values. # +# Any builtin step that specifies a "_COMMAND cmd..." or custom +# step that specifies a "COMMAND cmd..." may specify additional command +# lines using the form "COMMAND cmd...". At build time the commands will +# be executed in order and aborted if any one fails. For example: +# ... BUILD_COMMAND make COMMAND echo done ... +# specifies to run "make" and then "echo done" during the build step. +# Whether the current working directory is preserved between commands +# is not defined. Behavior of shell operators like "&&" is not defined. +# # The 'ExternalProject_Get_Property' function retrieves external project # target properties: # ExternalProject_Get_Property( [prop1 [prop2 [...]]]) @@ -961,7 +970,7 @@ endif() set(sep ";") endif() endforeach() - set(code "set(ENV{VS_UNICODE_OUTPUT} \"\")\n${code}set(command \"${cmd}\")${code_execute_process}") + set(code "${code}set(command \"${cmd}\")${code_execute_process}") file(WRITE ${stamp_dir}/${name}-${step}-impl.cmake "${code}") set(command ${CMAKE_COMMAND} "-Dmake=\${make}" "-Dconfig=\${config}" -P ${stamp_dir}/${name}-${step}-impl.cmake) endif() @@ -971,7 +980,6 @@ endif() set(logbase ${stamp_dir}/${name}-${step}) file(WRITE ${script} " ${code_cygpath_make} -set(ENV{VS_UNICODE_OUTPUT} \"\") set(command \"${command}\") execute_process( COMMAND \${command} @@ -1251,10 +1259,10 @@ function(_ep_add_download_command name) get_filename_component(work_dir "${source_dir}" PATH) set(comment "Performing download step (SVN checkout) for '${name}'") set(svn_user_pw_args "") - if(svn_username) + if(DEFINED svn_username) set(svn_user_pw_args ${svn_user_pw_args} "--username=${svn_username}") endif() - if(svn_password) + if(DEFINED svn_password) set(svn_user_pw_args ${svn_user_pw_args} "--password=${svn_password}") endif() if(svn_trust_cert) @@ -1473,10 +1481,10 @@ function(_ep_add_update_command name) get_property(svn_password TARGET ${name} PROPERTY _EP_SVN_PASSWORD) get_property(svn_trust_cert TARGET ${name} PROPERTY _EP_SVN_TRUST_CERT) set(svn_user_pw_args "") - if(svn_username) + if(DEFINED svn_username) set(svn_user_pw_args ${svn_user_pw_args} "--username=${svn_username}") endif() - if(svn_password) + if(DEFINED svn_password) set(svn_user_pw_args ${svn_user_pw_args} "--password=${svn_password}") endif() if(svn_trust_cert) diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake index f2c2ce37f..914a0a5b5 100644 --- a/Modules/FindBoost.cmake +++ b/Modules/FindBoost.cmake @@ -41,7 +41,7 @@ # Boost_LIBRARY_DIR - Directory containing Boost libraries # Boost__LIBRARY_DEBUG - Component library debug variant # Boost__LIBRARY_RELEASE - Component library release variant -# Users may set the these hints or results as cache entries. Projects should +# Users may set 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 @@ -154,7 +154,7 @@ #------------------------------------------------------------------------------- -# Before we go searching, check whether boost-cmake is avaialble, unless the +# Before we go searching, check whether boost-cmake is available, unless the # user specifically asked NOT to search for boost-cmake. # # If Boost_DIR is set, this behaves as any find_package call would. If not, @@ -247,7 +247,7 @@ macro(_Boost_ADJUST_LIB_VARS basename) endif() endif() - # Make variables changeble to the advanced user + # Make variables changeable to the advanced user mark_as_advanced( Boost_${basename}_LIBRARY_RELEASE Boost_${basename}_LIBRARY_DEBUG @@ -1022,7 +1022,12 @@ if(Boost_FOUND) # 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") + "${Boost_ERROR_REASON}\nCould not find the following") + if(Boost_USE_STATIC_LIBS) + set(Boost_ERROR_REASON "${Boost_ERROR_REASON} static") + endif() + set(Boost_ERROR_REASON + "${Boost_ERROR_REASON} Boost libraries:\n") foreach(COMPONENT ${_Boost_MISSING_COMPONENTS}) set(Boost_ERROR_REASON "${Boost_ERROR_REASON} boost_${COMPONENT}\n") diff --git a/Modules/FindCUDA.cmake b/Modules/FindCUDA.cmake index 423ad3d13..8270ad4d6 100644 --- a/Modules/FindCUDA.cmake +++ b/Modules/FindCUDA.cmake @@ -607,7 +607,11 @@ macro(cuda_find_library_local_first_with_path_ext _var _names _doc _path_ext ) NO_DEFAULT_PATH ) # Search default search paths, after we search our own set of paths. - find_library(${_var} NAMES ${_names} DOC ${_doc}) + find_library(${_var} + NAMES ${_names} + PATHS "/usr/lib/nvidia-current" + DOC ${_doc} + ) endmacro() macro(cuda_find_library_local_first _var _names _doc) @@ -920,7 +924,13 @@ function(CUDA_COMPUTE_BUILD_PATH path build_path) if (IS_ABSOLUTE "${bpath}") # Absolute paths are generally unnessary, especially if something like # file(GLOB_RECURSE) is used to pick up the files. - file(RELATIVE_PATH bpath "${CMAKE_CURRENT_SOURCE_DIR}" "${bpath}") + + string(FIND "${bpath}" "${CMAKE_CURRENT_BINARY_DIR}" _binary_dir_pos) + if (_binary_dir_pos EQUAL 0) + file(RELATIVE_PATH bpath "${CMAKE_CURRENT_BINARY_DIR}" "${bpath}") + else() + file(RELATIVE_PATH bpath "${CMAKE_CURRENT_SOURCE_DIR}" "${bpath}") + endif() endif() # This recipie is from cmLocalGenerator::CreateSafeUniqueObjectFileName in the @@ -1021,7 +1031,10 @@ macro(CUDA_WRAP_SRCS cuda_target format generated_files) # Initialize our list of includes with the user ones followed by the CUDA system ones. set(CUDA_NVCC_INCLUDE_ARGS ${CUDA_NVCC_INCLUDE_ARGS_USER} "-I${CUDA_INCLUDE_DIRS}") # Get the include directories for this directory and use them for our nvcc command. + # Remove duplicate entries which may be present since include_directories + # in CMake >= 2.8.8 does not remove them. get_directory_property(CUDA_NVCC_INCLUDE_DIRECTORIES INCLUDE_DIRECTORIES) + list(REMOVE_DUPLICATES CUDA_NVCC_INCLUDE_DIRECTORIES) if(CUDA_NVCC_INCLUDE_DIRECTORIES) foreach(dir ${CUDA_NVCC_INCLUDE_DIRECTORIES}) list(APPEND CUDA_NVCC_INCLUDE_ARGS -I${dir}) @@ -1279,22 +1292,7 @@ macro(CUDA_WRAP_SRCS cuda_target format generated_files) # Make sure the build system knows the file is generated. set_source_files_properties(${generated_file} PROPERTIES GENERATED TRUE) - # Don't add the object file to the list of generated files if we are using - # visual studio and we are attaching the build rule to the cuda file. VS - # will add our object file to the linker automatically for us. - set(cuda_add_generated_file TRUE) - - if(NOT compile_to_ptx AND CMAKE_GENERATOR MATCHES "Visual Studio" AND CUDA_ATTACH_VS_BUILD_RULE_TO_CUDA_FILE) - # Visual Studio 8 crashes when you close the solution when you don't add the object file. - if(NOT CMAKE_GENERATOR MATCHES "Visual Studio 8") - #message("Not adding ${generated_file}") - set(cuda_add_generated_file FALSE) - endif() - endif() - - if(cuda_add_generated_file) - list(APPEND _cuda_wrap_generated_files ${generated_file}) - endif() + list(APPEND _cuda_wrap_generated_files ${generated_file}) # Add the other files that we want cmake to clean on a cleanup ########## list(APPEND CUDA_ADDITIONAL_CLEAN_FILES "${cmake_dependency_file}") diff --git a/Modules/FindCUDA/make2cmake.cmake b/Modules/FindCUDA/make2cmake.cmake index c2405f44f..1b53d177d 100644 --- a/Modules/FindCUDA/make2cmake.cmake +++ b/Modules/FindCUDA/make2cmake.cmake @@ -63,7 +63,7 @@ if (${depend_text} MATCHES ".+") if (EXISTS "/${file}") set(file "/${file}") else() - message(WARNING " Removing non-existant dependency file: ${file}") + message(WARNING " Removing non-existent dependency file: ${file}") set(file "") endif() endif() diff --git a/Modules/FindFLTK2.cmake b/Modules/FindFLTK2.cmake index 071c318ff..09f6925cc 100644 --- a/Modules/FindFLTK2.cmake +++ b/Modules/FindFLTK2.cmake @@ -45,7 +45,7 @@ if(APPLE) set( FLTK2_PLATFORM_DEPENDENT_LIBS "-framework Carbon -framework Cocoa -framework ApplicationServices -lz") endif() -# If FLTK2_INCLUDE_DIR is already defined we assigne its value to FLTK2_DIR +# If FLTK2_INCLUDE_DIR is already defined we assign its value to FLTK2_DIR if(FLTK2_INCLUDE_DIR) set(FLTK2_DIR ${FLTK2_INCLUDE_DIR}) else() diff --git a/Modules/FindFreetype.cmake b/Modules/FindFreetype.cmake index 1df239904..ccea99165 100644 --- a/Modules/FindFreetype.cmake +++ b/Modules/FindFreetype.cmake @@ -50,6 +50,9 @@ find_path(FREETYPE_INCLUDE_DIR_ft2build ft2build.h /usr/local/X11R6 /usr/local/X11 /usr/freeware + ENV GTKMM_BASEPATH + [HKEY_CURRENT_USER\\SOFTWARE\\gtkmm\\2.4;Path] + [HKEY_LOCAL_MACHINE\\SOFTWARE\\gtkmm\\2.4;Path] PATH_SUFFIXES include/freetype2 include ) @@ -61,6 +64,9 @@ find_path(FREETYPE_INCLUDE_DIR_freetype2 freetype/config/ftheader.h /usr/local/X11R6 /usr/local/X11 /usr/freeware + ENV GTKMM_BASEPATH + [HKEY_CURRENT_USER\\SOFTWARE\\gtkmm\\2.4;Path] + [HKEY_LOCAL_MACHINE\\SOFTWARE\\gtkmm\\2.4;Path] PATH_SUFFIXES include/freetype2 include ) @@ -70,10 +76,13 @@ find_library(FREETYPE_LIBRARY ENV FREETYPE_DIR PATH_SUFFIXES lib PATHS - /usr/X11R6 - /usr/local/X11R6 - /usr/local/X11 - /usr/freeware + /usr/X11R6 + /usr/local/X11R6 + /usr/local/X11 + /usr/freeware + ENV GTKMM_BASEPATH + [HKEY_CURRENT_USER\\SOFTWARE\\gtkmm\\2.4;Path] + [HKEY_LOCAL_MACHINE\\SOFTWARE\\gtkmm\\2.4;Path] ) # set the user variables diff --git a/Modules/FindGTK2.cmake b/Modules/FindGTK2.cmake index 06cf96244..77aac6dae 100644 --- a/Modules/FindGTK2.cmake +++ b/Modules/FindGTK2.cmake @@ -18,6 +18,7 @@ # GTK2_FOUND - Were all of your specified components found? # GTK2_INCLUDE_DIRS - All include directories # GTK2_LIBRARIES - All libraries +# GTK2_DEFINITIONS - Additional compiler flags # # GTK2_VERSION - The version of GTK2 found (x.y.z) # GTK2_MAJOR_VERSION - The major version of GTK2 @@ -27,7 +28,6 @@ # Optional variables you can define prior to calling this module: # # GTK2_DEBUG - Enables verbose debugging of the module -# GTK2_SKIP_MARK_AS_ADVANCED - Disable marking cache variables as advanced # GTK2_ADDITIONAL_SUFFIXES - Allows defining additional directories to # search for include files # @@ -66,6 +66,18 @@ # (To distribute this file outside of CMake, substitute the full # License text for the above reference.) +# Version 1.5 (UNRELEASED) (CMake 2.8.12) +# * 14236: Detect gthread library +# Detect pangocairo on windows +# Detect pangocairo with gtk module instead of with gtkmm +# * 14259: Use vc100 libraries with MSVC11 +# * 14260: Export a GTK2_DEFINITIONS variable to set /vd2 when appropriate +# (i.e. MSVC) +# * Use the optimized/debug syntax for _LIBRARY and _LIBRARIES variables when +# appropriate. A new set of _RELEASE variables was also added. +# * Remove GTK2_SKIP_MARK_AS_ADVANCED option, as now the variables are +# marked as advanced by SelectLibraryConfigurations +# * Detect gmodule, pangoft2 and pangoxft libraries # Version 1.4 (10/4/2012) (CMake 2.8.10) # * 12596: Missing paths for FindGTK2 on NetBSD # * 12049: Fixed detection of GTK include files in the lib folder on @@ -116,6 +128,9 @@ # _OUT_micro = Micro version number # _gtkversion_hdr = Header file to parse #============================================================= + +include(${CMAKE_CURRENT_LIST_DIR}/SelectLibraryConfigurations.cmake) + function(_GTK2_GET_VERSION _OUT_major _OUT_minor _OUT_micro _gtkversion_hdr) file(STRINGS ${_gtkversion_hdr} _contents REGEX "#define GTK_M[A-Z]+_VERSION[ \t]+") if(_contents) @@ -144,7 +159,7 @@ endfunction() #============================================================= # _GTK2_FIND_INCLUDE_DIR # Internal function to find the GTK include directories -# _var = variable to set +# _var = variable to set (_INCLUDE_DIR is appended) # _hdr = header file to look for #============================================================= function(_GTK2_FIND_INCLUDE_DIR _var _hdr) @@ -199,7 +214,7 @@ function(_GTK2_FIND_INCLUDE_DIR _var _hdr) message(STATUS "Adding ${_gtk2_arch_dir} to search path for multiarch support") endif() endif() - find_path(${_var} ${_hdr} + find_path(${_var}_INCLUDE_DIR ${_hdr} PATHS ${_gtk2_arch_dir} /usr/local/lib64 @@ -226,11 +241,8 @@ function(_GTK2_FIND_INCLUDE_DIR _var _hdr) ${_suffixes} ) - if(${_var}) - set(GTK2_INCLUDE_DIRS ${GTK2_INCLUDE_DIRS} ${${_var}} PARENT_SCOPE) - if(NOT GTK2_SKIP_MARK_AS_ADVANCED) - mark_as_advanced(${_var}) - endif() + if(${_var}_INCLUDE_DIR) + set(GTK2_INCLUDE_DIRS ${GTK2_INCLUDE_DIRS} ${${_var}_INCLUDE_DIR} PARENT_SCOPE) endif() endfunction() @@ -238,7 +250,7 @@ endfunction() #============================================================= # _GTK2_FIND_LIBRARY # Internal function to find libraries packaged with GTK2 -# _var = library variable to create +# _var = library variable to create (_LIBRARY is appended) #============================================================= function(_GTK2_FIND_LIBRARY _var _lib _expand_vc _append_version) @@ -268,6 +280,9 @@ function(_GTK2_FIND_LIBRARY _var _lib _expand_vc _append_version) set(_library ${_library}-vc90) elseif(MSVC10) set(_library ${_library}-vc100) + elseif(MSVC11) + # Up to gtkmm-win 2.22.0-2 there are no vc110 libraries but vc100 can be used + set(_library ${_library}-vc100) endif() set(_library_d ${_library}-d) endif() @@ -317,10 +332,10 @@ function(_GTK2_FIND_LIBRARY _var _lib _expand_vc _append_version) if(GTK2_DEBUG) message(STATUS "[FindGTK2.cmake:${CMAKE_CURRENT_LIST_LINE}] " - "While searching for ${_var}, our proposed library list is ${_lib_list}") + "While searching for ${_var}_LIBRARY, our proposed library list is ${_lib_list}") endif() - find_library(${_var} + find_library(${_var}_LIBRARY_RELEASE NAMES ${_lib_list} PATHS /opt/gnome/lib @@ -334,34 +349,34 @@ function(_GTK2_FIND_LIBRARY _var _lib _expand_vc _append_version) if(_expand_vc AND MSVC) if(GTK2_DEBUG) message(STATUS "[FindGTK2.cmake:${CMAKE_CURRENT_LIST_LINE}] " - "While searching for ${_var}_DEBUG our proposed library list is ${_libd_list}") + "While searching for ${_var}_LIBRARY_DEBUG our proposed library list is ${_libd_list}") endif() - find_library(${_var}_DEBUG + find_library(${_var}_LIBRARY_DEBUG NAMES ${_libd_list} PATHS $ENV{GTKMM_BASEPATH}/lib [HKEY_CURRENT_USER\\SOFTWARE\\gtkmm\\2.4;Path]/lib [HKEY_LOCAL_MACHINE\\SOFTWARE\\gtkmm\\2.4;Path]/lib ) + endif() - if(${_var} AND ${_var}_DEBUG) - if(NOT GTK2_SKIP_MARK_AS_ADVANCED) - mark_as_advanced(${_var}_DEBUG) - endif() - set(GTK2_LIBRARIES ${GTK2_LIBRARIES} optimized ${${_var}} debug ${${_var}_DEBUG}) - set(GTK2_LIBRARIES ${GTK2_LIBRARIES} PARENT_SCOPE) - endif() - else() - if(NOT GTK2_SKIP_MARK_AS_ADVANCED) - mark_as_advanced(${_var}) - endif() - set(GTK2_LIBRARIES ${GTK2_LIBRARIES} ${${_var}}) - set(GTK2_LIBRARIES ${GTK2_LIBRARIES} PARENT_SCOPE) - # Set debug to release - set(${_var}_DEBUG ${${_var}}) - set(${_var}_DEBUG ${${_var}} PARENT_SCOPE) + select_library_configurations(${_var}) + + set(${_var}_LIBRARY ${${_var}_LIBRARY} PARENT_SCOPE) + + set(GTK2_LIBRARIES ${GTK2_LIBRARIES} ${${_var}_LIBRARY}) + set(GTK2_LIBRARIES ${GTK2_LIBRARIES} PARENT_SCOPE) + + if(GTK2_DEBUG) + message(STATUS "[FindGTK2.cmake:${CMAKE_CURRENT_LIST_LINE}] " + "${_var}_LIBRARY_RELEASE = \"${${_var}_LIBRARY_RELEASE}\"") + message(STATUS "[FindGTK2.cmake:${CMAKE_CURRENT_LIST_LINE}] " + "${_var}_LIBRARY_DEBUG = \"${${_var}_LIBRARY_DEBUG}\"") + message(STATUS "[FindGTK2.cmake:${CMAKE_CURRENT_LIST_LINE}] " + "${_var}_LIBRARY = \"${${_var}_LIBRARY}\"") endif() + endfunction() #============================================================= @@ -373,6 +388,7 @@ endfunction() set(GTK2_FOUND) set(GTK2_INCLUDE_DIRS) set(GTK2_LIBRARIES) +set(GTK2_DEFINITIONS) if(NOT GTK2_FIND_COMPONENTS) # Assume they only want GTK @@ -389,7 +405,7 @@ if(GTK2_FIND_VERSION) message(STATUS "[FindGTK2.cmake:${CMAKE_CURRENT_LIST_LINE}] " "Searching for version ${GTK2_FIND_VERSION}") endif() - _GTK2_FIND_INCLUDE_DIR(GTK2_GTK_INCLUDE_DIR gtk/gtk.h) + _GTK2_FIND_INCLUDE_DIR(GTK2_GTK gtk/gtk.h) if(GTK2_GTK_INCLUDE_DIR) _GTK2_GET_VERSION(GTK2_MAJOR_VERSION GTK2_MINOR_VERSION @@ -439,88 +455,95 @@ list(APPEND GTK2_LIBRARIES ${FREETYPE_LIBRARIES}) foreach(_GTK2_component ${GTK2_FIND_COMPONENTS}) if(_GTK2_component STREQUAL "gtk") - _GTK2_FIND_INCLUDE_DIR(GTK2_GTK_INCLUDE_DIR gtk/gtk.h) + _GTK2_FIND_INCLUDE_DIR(GTK2_GTK gtk/gtk.h) if(UNIX) - _GTK2_FIND_LIBRARY (GTK2_GTK_LIBRARY gtk-x11 false true) - _GTK2_FIND_LIBRARY (GTK2_GDK_LIBRARY gdk-x11 false true) + _GTK2_FIND_LIBRARY (GTK2_GTK gtk-x11 false true) + _GTK2_FIND_LIBRARY (GTK2_GDK gdk-x11 false true) else() - _GTK2_FIND_LIBRARY (GTK2_GTK_LIBRARY gtk-win32 false true) - _GTK2_FIND_LIBRARY (GTK2_GDK_LIBRARY gdk-win32 false true) + _GTK2_FIND_LIBRARY (GTK2_GTK gtk-win32 false true) + _GTK2_FIND_LIBRARY (GTK2_GDK 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_GDK gdk/gdk.h) + _GTK2_FIND_INCLUDE_DIR(GTK2_GDKCONFIG gdkconfig.h) - _GTK2_FIND_INCLUDE_DIR(GTK2_CAIRO_INCLUDE_DIR cairo.h) - _GTK2_FIND_LIBRARY (GTK2_CAIRO_LIBRARY cairo false false) + _GTK2_FIND_INCLUDE_DIR(GTK2_CAIRO cairo.h) + _GTK2_FIND_LIBRARY (GTK2_CAIRO cairo false false) - _GTK2_FIND_INCLUDE_DIR(GTK2_FONTCONFIG_INCLUDE_DIR fontconfig/fontconfig.h) + _GTK2_FIND_INCLUDE_DIR(GTK2_FONTCONFIG fontconfig/fontconfig.h) - _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_PANGO pango/pango.h) + _GTK2_FIND_LIBRARY (GTK2_PANGO 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_PANGOCAIRO pangocairo false true) - _GTK2_FIND_LIBRARY (GTK2_GIO_LIBRARY gio false true) + _GTK2_FIND_LIBRARY (GTK2_PANGOFT2 pangoft2 false true) - _GTK2_FIND_INCLUDE_DIR(GTK2_ATK_INCLUDE_DIR atk/atk.h) - _GTK2_FIND_LIBRARY (GTK2_ATK_LIBRARY atk false true) + _GTK2_FIND_LIBRARY (GTK2_PANGOXFT pangoxft 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 gdk-pixbuf/gdk-pixbuf.h) + _GTK2_FIND_LIBRARY (GTK2_GDK_PIXBUF gdk_pixbuf false 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_LIBRARY (GTK2_GTHREAD gthread false true) - elseif(_GTK2_component STREQUAL "gtkmm") + _GTK2_FIND_LIBRARY (GTK2_GMODULE gmodule false true) + + _GTK2_FIND_LIBRARY (GTK2_GIO gio false true) + + _GTK2_FIND_INCLUDE_DIR(GTK2_ATK atk/atk.h) + _GTK2_FIND_LIBRARY (GTK2_ATK atk false true) + + _GTK2_FIND_INCLUDE_DIR(GTK2_GOBJECT gobject/gobject.h) + _GTK2_FIND_LIBRARY (GTK2_GOBJECT gobject false true) - _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_GLIB glib.h) + _GTK2_FIND_INCLUDE_DIR(GTK2_GLIBCONFIG glibconfig.h) + _GTK2_FIND_LIBRARY (GTK2_GLIB 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_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_GTKMM gtkmm.h) + _GTK2_FIND_INCLUDE_DIR(GTK2_GTKMMCONFIG gtkmmconfig.h) + _GTK2_FIND_LIBRARY (GTK2_GTKMM gtkmm true true) - _GTK2_FIND_LIBRARY (GTK2_PANGOCAIRO_LIBRARY pangocairo true true) + _GTK2_FIND_INCLUDE_DIR(GTK2_GDKMM gdkmm.h) + _GTK2_FIND_INCLUDE_DIR(GTK2_GDKMMCONFIG gdkmmconfig.h) + _GTK2_FIND_LIBRARY (GTK2_GDKMM gdkmm 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_PANGOMM pangomm.h) + _GTK2_FIND_INCLUDE_DIR(GTK2_PANGOMMCONFIG pangommconfig.h) + _GTK2_FIND_LIBRARY (GTK2_PANGOMM pangomm true true) - _GTK2_FIND_INCLUDE_DIR(GTK2_GIOMM_INCLUDE_DIR giomm.h) - _GTK2_FIND_INCLUDE_DIR(GTK2_GIOMMCONFIG_INCLUDE_DIR giommconfig.h) - _GTK2_FIND_LIBRARY (GTK2_GIOMM_LIBRARY giomm true true) + _GTK2_FIND_INCLUDE_DIR(GTK2_CAIROMM cairomm/cairomm.h) + _GTK2_FIND_INCLUDE_DIR(GTK2_CAIROMMCONFIG cairommconfig.h) + _GTK2_FIND_LIBRARY (GTK2_CAIROMM cairomm true true) - _GTK2_FIND_INCLUDE_DIR(GTK2_ATKMM_INCLUDE_DIR atkmm.h) - _GTK2_FIND_LIBRARY (GTK2_ATKMM_LIBRARY atkmm true true) + _GTK2_FIND_INCLUDE_DIR(GTK2_GIOMM giomm.h) + _GTK2_FIND_INCLUDE_DIR(GTK2_GIOMMCONFIG giommconfig.h) + _GTK2_FIND_LIBRARY (GTK2_GIOMM giomm 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_ATKMM atkmm.h) + _GTK2_FIND_LIBRARY (GTK2_ATKMM atkmm 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_INCLUDE_DIR(GTK2_GLIBMM glibmm.h) + _GTK2_FIND_INCLUDE_DIR(GTK2_GLIBMMCONFIG glibmmconfig.h) + _GTK2_FIND_LIBRARY (GTK2_GLIBMM glibmm true true) + _GTK2_FIND_INCLUDE_DIR(GTK2_SIGC++ sigc++/sigc++.h) + _GTK2_FIND_INCLUDE_DIR(GTK2_SIGC++CONFIG sigc++config.h) + _GTK2_FIND_LIBRARY (GTK2_SIGC++ sigc true true) elseif(_GTK2_component STREQUAL "glade") - _GTK2_FIND_INCLUDE_DIR(GTK2_GLADE_INCLUDE_DIR glade/glade.h) - _GTK2_FIND_LIBRARY (GTK2_GLADE_LIBRARY glade false true) + _GTK2_FIND_INCLUDE_DIR(GTK2_GLADE glade/glade.h) + _GTK2_FIND_LIBRARY (GTK2_GLADE glade false true) elseif(_GTK2_component STREQUAL "glademm") - _GTK2_FIND_INCLUDE_DIR(GTK2_GLADEMM_INCLUDE_DIR libglademm.h) - _GTK2_FIND_INCLUDE_DIR(GTK2_GLADEMMCONFIG_INCLUDE_DIR libglademmconfig.h) - _GTK2_FIND_LIBRARY (GTK2_GLADEMM_LIBRARY glademm true true) + _GTK2_FIND_INCLUDE_DIR(GTK2_GLADEMM libglademm.h) + _GTK2_FIND_INCLUDE_DIR(GTK2_GLADEMMCONFIG libglademmconfig.h) + _GTK2_FIND_LIBRARY (GTK2_GLADEMM glademm true true) else() message(FATAL_ERROR "Unknown GTK2 component ${_component}") @@ -538,6 +561,20 @@ if(NOT GTK2_FIND_VERSION AND GTK2_GTK_INCLUDE_DIR) set(GTK2_VERSION ${GTK2_MAJOR_VERSION}.${GTK2_MINOR_VERSION}.${GTK2_PATCH_VERSION}) endif() +# +# On MSVC, according to https://wiki.gnome.org/gtkmm/MSWindows, the /vd2 flag needs to be +# passed to the compiler in order to use gtkmm +# +if(MSVC) + foreach(_GTK2_component ${GTK2_FIND_COMPONENTS}) + if(_GTK2_component STREQUAL "gtkmm") + set(GTK2_DEFINITIONS "/vd2") + elseif(_GTK2_component STREQUAL "glademm") + set(GTK2_DEFINITIONS "/vd2") + endif() + endforeach() +endif() + # # Try to enforce components # @@ -606,6 +643,7 @@ else() set(GTK2_VERSION_PATCH) set(GTK2_INCLUDE_DIRS) set(GTK2_LIBRARIES) + set(GTK2_DEFINITIONS) endif() if(GTK2_INCLUDE_DIRS) diff --git a/Modules/FindHDF5.cmake b/Modules/FindHDF5.cmake index 851416439..0c246a1df 100644 --- a/Modules/FindHDF5.cmake +++ b/Modules/FindHDF5.cmake @@ -289,27 +289,13 @@ if( NOT HDF5_FOUND ) ENV HDF5_ROOT PATH_SUFFIXES lib Lib ) select_library_configurations( HDF5_${LIB} ) - # even though we adjusted the individual library names in - # select_library_configurations, we still need to distinguish - # between debug and release variants because HDF5_LIBRARIES will - # need to specify different lists for debug and optimized builds. - # We can't just use the HDF5_${LIB}_LIBRARY variable (which was set - # up by the selection macro above) because it may specify debug and - # optimized variants for a particular library, but a list of - # libraries is allowed to specify debug and optimized only once. - list( APPEND HDF5_${LANGUAGE}_LIBRARIES_DEBUG - ${HDF5_${LIB}_LIBRARY_DEBUG} ) - list( APPEND HDF5_${LANGUAGE}_LIBRARIES_RELEASE - ${HDF5_${LIB}_LIBRARY_RELEASE} ) + list(APPEND HDF5_${LANGUAGE}_LIBRARIES ${HDF5_${LIB}_LIBRARY}) endforeach() list( APPEND HDF5_LIBRARY_DIRS ${HDF5_${LANGUAGE}_LIBRARY_DIRS} ) # Append the libraries for this language binding to the list of all # required libraries. - list( APPEND HDF5_LIBRARIES_DEBUG - ${HDF5_${LANGUAGE}_LIBRARIES_DEBUG} ) - list( APPEND HDF5_LIBRARIES_RELEASE - ${HDF5_${LANGUAGE}_LIBRARIES_RELEASE} ) + list(APPEND HDF5_LIBRARIES ${HDF5_${LANGUAGE}_LIBRARIES}) endforeach() # We may have picked up some duplicates in various lists during the above @@ -329,30 +315,10 @@ if( NOT HDF5_FOUND ) if( HDF5_INCLUDE_DIRS ) _remove_duplicates_from_beginning( HDF5_INCLUDE_DIRS ) endif() - if( HDF5_LIBRARIES_DEBUG ) - _remove_duplicates_from_beginning( HDF5_LIBRARIES_DEBUG ) - endif() - if( HDF5_LIBRARIES_RELEASE ) - _remove_duplicates_from_beginning( HDF5_LIBRARIES_RELEASE ) - endif() if( HDF5_LIBRARY_DIRS ) _remove_duplicates_from_beginning( HDF5_LIBRARY_DIRS ) endif() - # Construct the complete list of HDF5 libraries with debug and optimized - # variants when the generator supports them. - if( CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE ) - set( HDF5_LIBRARIES ) - foreach( _lib ${HDF5_LIBRARIES_DEBUG} ) - list( APPEND HDF5_LIBRARIES debug ${_lib} ) - endforeach() - foreach( _lib ${HDF5_LIBRARIES_RELEASE} ) - list( APPEND HDF5_LIBRARIES optimized ${_lib} ) - endforeach() - else() - set( HDF5_LIBRARIES ${HDF5_LIBRARIES_RELEASE} ) - endif() - # If the HDF5 include directory was found, open H5pubconf.h to determine if # HDF5 was compiled with parallel IO support set( HDF5_IS_PARALLEL FALSE ) diff --git a/Modules/FindITK.cmake b/Modules/FindITK.cmake index b0b3f03f0..2929a764c 100644 --- a/Modules/FindITK.cmake +++ b/Modules/FindITK.cmake @@ -17,7 +17,7 @@ # # USE_ITK_FILE - The full path to the UseITK.cmake file. # This is provided for backward -# compatability. Use ITK_USE_FILE +# compatibility. Use ITK_USE_FILE # instead. #============================================================================= @@ -52,6 +52,6 @@ if(NOT ITK_FOUND) endif() if(ITK_FOUND) - # Set USE_ITK_FILE for backward-compatability. + # Set USE_ITK_FILE for backward-compatibility. set(USE_ITK_FILE ${ITK_USE_FILE}) endif() diff --git a/Modules/FindImageMagick.cmake b/Modules/FindImageMagick.cmake index cd97b3845..7c6cce786 100644 --- a/Modules/FindImageMagick.cmake +++ b/Modules/FindImageMagick.cmake @@ -81,7 +81,7 @@ function(FIND_IMAGEMAGICK_API component header) ${ImageMagick_INCLUDE_DIRS} "[HKEY_LOCAL_MACHINE\\SOFTWARE\\ImageMagick\\Current;BinPath]/include" PATH_SUFFIXES - ImageMagick + ImageMagick ImageMagick-6 DOC "Path to the ImageMagick include dir." ) find_library(ImageMagick_${component}_LIBRARY @@ -147,17 +147,17 @@ foreach(component ${ImageMagick_FIND_COMPONENTS} ) if(component STREQUAL "Magick++") FIND_IMAGEMAGICK_API(Magick++ Magick++.h - Magick++ CORE_RL_Magick++_ Magick++-6.Q16 Magick++-Q16 Magick++-6.Q8 Magick++-Q8 + Magick++ CORE_RL_Magick++_ Magick++-6.Q16 Magick++-Q16 Magick++-6.Q8 Magick++-Q8 Magick++-6.Q16HDRI Magick++-Q16HDRI Magick++-6.Q8HDRI Magick++-Q8HDRI ) list(APPEND ImageMagick_REQUIRED_VARS ImageMagick_Magick++_LIBRARY) elseif(component STREQUAL "MagickWand") FIND_IMAGEMAGICK_API(MagickWand wand/MagickWand.h - Wand MagickWand CORE_RL_wand_ MagickWand-6.Q16 MagickWand-Q16 MagickWand-6.Q8 MagickWand-Q8 + Wand MagickWand CORE_RL_wand_ MagickWand-6.Q16 MagickWand-Q16 MagickWand-6.Q8 MagickWand-Q8 MagickWand-6.Q16HDRI MagickWand-Q16HDRI MagickWand-6.Q8HDRI MagickWand-Q8HDRI ) list(APPEND ImageMagick_REQUIRED_VARS ImageMagick_MagickWand_LIBRARY) elseif(component STREQUAL "MagickCore") FIND_IMAGEMAGICK_API(MagickCore magick/MagickCore.h - Magick MagickCore CORE_RL_magick_ MagickCore-6.Q16 MagickCore-Q16 MagickCore-6.Q8 MagickCore-Q8 + Magick MagickCore CORE_RL_magick_ MagickCore-6.Q16 MagickCore-Q16 MagickCore-6.Q8 MagickCore-Q8 MagickCore-6.Q16HDRI MagickCore-Q16HDRI MagickCore-6.Q8HDRI MagickCore-Q8HDRI ) list(APPEND ImageMagick_REQUIRED_VARS ImageMagick_MagickCore_LIBRARY) else() diff --git a/Modules/FindMPI.cmake b/Modules/FindMPI.cmake index 143d10af0..0eb86a80a 100644 --- a/Modules/FindMPI.cmake +++ b/Modules/FindMPI.cmake @@ -86,7 +86,7 @@ include(${CMAKE_CURRENT_LIST_DIR}/GetPrerequisites.cmake) # # The compilers are detected in this order: # -# 1. Try to find the most generic availble MPI compiler, as this is usually set up by +# 1. Try to find the most generic available MPI compiler, as this is usually set up by # cluster admins. e.g., if plain old mpicc is available, we'll use it and assume it's # the right compiler. # diff --git a/Modules/FindOpenGL.cmake b/Modules/FindOpenGL.cmake index 96c4d8db5..83fcc3dc7 100644 --- a/Modules/FindOpenGL.cmake +++ b/Modules/FindOpenGL.cmake @@ -28,111 +28,107 @@ # (To distribute this file outside of CMake, substitute the full # License text for the above reference.) -if (WIN32) - if (CYGWIN) +set(_OpenGL_REQUIRED_VARS OPENGL_gl_LIBRARY) - find_path(OPENGL_INCLUDE_DIR GL/gl.h ) +if (CYGWIN) - find_library(OPENGL_gl_LIBRARY opengl32 ) + find_path(OPENGL_INCLUDE_DIR GL/gl.h ) + list(APPEND _OpenGL_REQUIRED_VARS OPENGL_INCLUDE_DIR) - find_library(OPENGL_glu_LIBRARY glu32 ) + find_library(OPENGL_gl_LIBRARY opengl32 ) - else () + find_library(OPENGL_glu_LIBRARY glu32 ) - if(BORLAND) - set (OPENGL_gl_LIBRARY import32 CACHE STRING "OpenGL library for win32") - set (OPENGL_glu_LIBRARY import32 CACHE STRING "GLU library for win32") - else() - set (OPENGL_gl_LIBRARY opengl32 CACHE STRING "OpenGL library for win32") - set (OPENGL_glu_LIBRARY glu32 CACHE STRING "GLU library for win32") - endif() - - endif () +elseif (WIN32) -else () + if(BORLAND) + set (OPENGL_gl_LIBRARY import32 CACHE STRING "OpenGL library for win32") + set (OPENGL_glu_LIBRARY import32 CACHE STRING "GLU library for win32") + else() + set (OPENGL_gl_LIBRARY opengl32 CACHE STRING "OpenGL library for win32") + set (OPENGL_glu_LIBRARY glu32 CACHE STRING "GLU library for win32") + endif() - if (APPLE) +elseif (APPLE) - find_library(OPENGL_gl_LIBRARY OpenGL DOC "OpenGL lib for OSX") - find_library(OPENGL_glu_LIBRARY AGL DOC "AGL lib for OSX") - find_path(OPENGL_INCLUDE_DIR OpenGL/gl.h DOC "Include for OpenGL on OSX") + find_library(OPENGL_gl_LIBRARY OpenGL DOC "OpenGL lib for OSX") + find_library(OPENGL_glu_LIBRARY AGL DOC "AGL lib for OSX") + find_path(OPENGL_INCLUDE_DIR OpenGL/gl.h DOC "Include for OpenGL on OSX") + list(APPEND _OpenGL_REQUIRED_VARS OPENGL_INCLUDE_DIR) - else() - 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) +else() + 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 - /boot/develop/lib/x86) - set(_OPENGL_INCLUDE_PATH - /boot/develop/headers/os/opengl) + /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 - # are used on a Linux machine with the NVidia drivers installed. - # They replace Mesa with NVidia's own library but normally do not - # install headers and that causes the linking to - # fail since the compiler finds the Mesa headers but NVidia's library. - # Make sure the NVIDIA directory comes BEFORE the others. - # - Atanas Georgiev - - find_path(OPENGL_INCLUDE_DIR GL/gl.h - /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 - /usr/share/doc/NVIDIA_GLX-1.0/include - /usr/openwin/share/include - /opt/graphics/OpenGL/include /usr/X11R6/include - ) - - find_library(OPENGL_gl_LIBRARY - NAMES GL MesaGL - PATHS /opt/graphics/OpenGL/lib - /usr/openwin/lib - /usr/shlib /usr/X11R6/lib - ${_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. - # It's not true on OSX. - - if (OPENGL_gl_LIBRARY) - if(NOT X11_FOUND) - include(${CMAKE_CURRENT_LIST_DIR}/FindX11.cmake) - endif() - if (X11_FOUND) - if (NOT APPLE) - set (OPENGL_LIBRARIES ${X11_LIBRARIES}) - endif () - endif () + # The first line below is to make sure that the proper headers + # are used on a Linux machine with the NVidia drivers installed. + # They replace Mesa with NVidia's own library but normally do not + # install headers and that causes the linking to + # fail since the compiler finds the Mesa headers but NVidia's library. + # Make sure the NVIDIA directory comes BEFORE the others. + # - Atanas Georgiev + + find_path(OPENGL_INCLUDE_DIR GL/gl.h + /usr/share/doc/NVIDIA_GLX-1.0/include + /usr/openwin/share/include + /opt/graphics/OpenGL/include /usr/X11R6/include + ${_OPENGL_INCLUDE_PATH} + ) + list(APPEND _OpenGL_REQUIRED_VARS OPENGL_INCLUDE_DIR) + + find_path(OPENGL_xmesa_INCLUDE_DIR GL/xmesa.h + /usr/share/doc/NVIDIA_GLX-1.0/include + /usr/openwin/share/include + /opt/graphics/OpenGL/include /usr/X11R6/include + ) + + find_library(OPENGL_gl_LIBRARY + NAMES GL MesaGL + PATHS /opt/graphics/OpenGL/lib + /usr/openwin/lib + /usr/shlib /usr/X11R6/lib + ${_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. + + if (OPENGL_gl_LIBRARY) + if(NOT X11_FOUND) + include(${CMAKE_CURRENT_LIST_DIR}/FindX11.cmake) + endif() + if (X11_FOUND) + set (OPENGL_LIBRARIES ${X11_LIBRARIES}) endif () + endif () - find_library(OPENGL_glu_LIBRARY - NAMES GLU MesaGLU - PATHS ${OPENGL_gl_LIBRARY} - /opt/graphics/OpenGL/lib - /usr/openwin/lib - /usr/shlib /usr/X11R6/lib - ) + find_library(OPENGL_glu_LIBRARY + NAMES GLU MesaGLU + PATHS ${OPENGL_gl_LIBRARY} + /opt/graphics/OpenGL/lib + /usr/openwin/lib + /usr/shlib /usr/X11R6/lib + ) - endif() endif () if(OPENGL_gl_LIBRARY) @@ -162,7 +158,8 @@ set(OPENGL_INCLUDE_PATH ${OPENGL_INCLUDE_DIR}) # handle the QUIETLY and REQUIRED arguments and set OPENGL_FOUND to TRUE if # all listed variables are TRUE include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenGL DEFAULT_MSG OPENGL_gl_LIBRARY) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenGL REQUIRED_VARS ${_OpenGL_REQUIRED_VARS}) +unset(_OpenGL_REQUIRED_VARS) mark_as_advanced( OPENGL_INCLUDE_DIR diff --git a/Modules/FindOpenSSL.cmake b/Modules/FindOpenSSL.cmake index 224c88e0e..9851f67ad 100644 --- a/Modules/FindOpenSSL.cmake +++ b/Modules/FindOpenSSL.cmake @@ -140,10 +140,10 @@ if(WIN32 AND NOT CYGWIN) set( OPENSSL_LIBRARIES ${SSL_EAY_LIBRARY} ${LIB_EAY_LIBRARY} ) elseif(MINGW) - # same player, for MingW + # same player, for MinGW set(LIB_EAY_NAMES libeay32) set(SSL_EAY_NAMES ssleay32) - if(CMAKE_CROSS_COMPILING) + if(CMAKE_CROSSCOMPILING) list(APPEND LIB_EAY_NAMES crypto) list(APPEND SSL_EAY_NAMES ssl) endif() diff --git a/Modules/FindPNG.cmake b/Modules/FindPNG.cmake index d96d2ccf9..a2577d26b 100644 --- a/Modules/FindPNG.cmake +++ b/Modules/FindPNG.cmake @@ -38,8 +38,42 @@ if(ZLIB_FOUND) /usr/local/include/libpng # OpenBSD ) - set(PNG_NAMES ${PNG_NAMES} png libpng png15 libpng15 png15d libpng15d png14 libpng14 png14d libpng14d png12 libpng12 png12d libpng12d) - find_library(PNG_LIBRARY NAMES ${PNG_NAMES} ) + list(APPEND PNG_NAMES png libpng) + unset(PNG_NAMES_DEBUG) + set(_PNG_VERSION_SUFFIXES 17 16 15 14 12) + if (PNG_FIND_VERSION MATCHES "^[0-9]+\\.[0-9]+(\\..*)?$") + string(REGEX REPLACE + "^([0-9]+)\\.([0-9]+).*" "\\1\\2" + _PNG_VERSION_SUFFIX_MIN "${PNG_FIND_VERSION}") + if (PNG_FIND_VERSION_EXACT) + set(_PNG_VERSION_SUFFIXES ${_PNG_VERSION_SUFFIX_MIN}) + else () + string(REGEX REPLACE + "${_PNG_VERSION_SUFFIX_MIN}.*" "${_PNG_VERSION_SUFFIX_MIN}" + _PNG_VERSION_SUFFIXES "${_PNG_VERSION_SUFFIXES}") + endif () + unset(_PNG_VERSION_SUFFIX_MIN) + endif () + foreach(v IN LISTS _PNG_VERSION_SUFFIXES) + list(APPEND PNG_NAMES png${v} libpng${v}) + list(APPEND PNG_NAMES_DEBUG png${v}d libpng${v}d) + endforeach() + unset(_PNG_VERSION_SUFFIXES) + # For compatiblity with versions prior to this multi-config search, honor + # any PNG_LIBRARY that is already specified and skip the search. + if(NOT PNG_LIBRARY) + find_library(PNG_LIBRARY_RELEASE NAMES ${PNG_NAMES}) + find_library(PNG_LIBRARY_DEBUG NAMES ${PNG_NAMES_DEBUG}) + include(${CMAKE_CURRENT_LIST_DIR}/SelectLibraryConfigurations.cmake) + select_library_configurations(PNG) + mark_as_advanced(PNG_LIBRARY_RELEASE PNG_LIBRARY_DEBUG) + endif() + unset(PNG_NAMES) + unset(PNG_NAMES_DEBUG) + + # Set by select_library_configurations(), but we want the one from + # find_package_handle_standard_args() below. + unset(PNG_FOUND) if (PNG_LIBRARY AND PNG_PNG_INCLUDE_DIR) # png.h includes zlib.h. Sigh. diff --git a/Modules/FindProtobuf.cmake b/Modules/FindProtobuf.cmake index af0c2ddf0..2972198b3 100644 --- a/Modules/FindProtobuf.cmake +++ b/Modules/FindProtobuf.cmake @@ -156,6 +156,16 @@ function(_protobuf_find_libraries name filename) endif() endfunction() +# Internal function: find threads library +function(_protobuf_find_threads) + set(CMAKE_THREAD_PREFER_PTHREAD TRUE) + find_package(Threads) + if(Threads_FOUND) + list(APPEND PROTOBUF_LIBRARIES ${CMAKE_THREAD_LIBS_INIT}) + set(PROTOBUF_LIBRARIES "${PROTOBUF_LIBRARIES}" PARENT_SCOPE) + endif() +endfunction() + # # Main. # @@ -190,6 +200,9 @@ if(MSVC) set(CMAKE_FIND_LIBRARY_PREFIXES "${PROTOBUF_ORIG_FIND_LIBRARY_PREFIXES}") endif() +if(UNIX) + _protobuf_find_threads() +endif() # Find the include directory find_path(PROTOBUF_INCLUDE_DIR diff --git a/Modules/FindQt4.cmake b/Modules/FindQt4.cmake index 4c05cc03f..1d17ba3ae 100644 --- a/Modules/FindQt4.cmake +++ b/Modules/FindQt4.cmake @@ -100,6 +100,7 @@ # because you need a custom filename for the moc file or something similar. # # macro QT4_AUTOMOC(sourcefile1 sourcefile2 ... ) +# The qt4_automoc macro is obsolete. Use the CMAKE_AUTOMOC feature instead. # This macro is still experimental. # It can be used to have moc automatically handled. # So if you have the files foo.h and foo.cpp, and in foo.h a @@ -115,7 +116,7 @@ # You should have a look on the AUTOMOC property for targets to achieve the same results. # # macro QT4_ADD_DBUS_INTERFACE(outfiles interface basename) -# Create a the interface header and implementation files with the +# Create the interface header and implementation files with the # given basename from the given interface xml file and add it to # the list of sources. # @@ -171,9 +172,10 @@ # in: ts_files # generates commands to create .qm from .ts - files. The generated # filenames can be found in qm_files. The ts_files -# must exists and are not updated in any way. +# must exist and are not updated in any way. # # function QT4_USE_MODULES( target [link_type] modules...) +# This function is obsolete. Use target_link_libraries with IMPORTED targets instead. # Make use the from Qt. Using a Qt module means # to link to the library, add the relevant include directories for the module, # and add the relevant compiler defines for using the module. @@ -495,7 +497,7 @@ macro (_QT4_ADJUST_LIB_VARS _camelCaseBasename) set(QT_INCLUDES "${QT_${basename}_INCLUDE_DIR}" ${QT_INCLUDES}) endif () - # Make variables changeble to the advanced user + # Make variables changeable to the advanced user mark_as_advanced(QT_${basename}_LIBRARY QT_${basename}_LIBRARY_RELEASE QT_${basename}_LIBRARY_DEBUG QT_${basename}_INCLUDE_DIR) endmacro () @@ -635,10 +637,10 @@ if (QT_QMAKE_EXECUTABLE AND QTVERSION) ) endif() - # try dropping a hint if trying to use Visual Studio with Qt built by mingw + # try dropping a hint if trying to use Visual Studio with Qt built by MinGW if(NOT QT_QTCORE_LIBRARY_RELEASE AND MSVC) if(EXISTS ${QT_LIBRARY_DIR_TMP}/libqtmain.a) - message( FATAL_ERROR "It appears you're trying to use Visual Studio with Qt built by mingw. Those compilers do not produce code compatible with each other.") + message( FATAL_ERROR "It appears you're trying to use Visual Studio with Qt built by MinGW. Those compilers do not produce code compatible with each other.") endif() endif() @@ -657,8 +659,11 @@ if (QT_QMAKE_EXECUTABLE AND QTVERSION) message(WARNING "${QT_QMAKE_EXECUTABLE} reported QT_INSTALL_LIBS as \"${QT_LIBRARY_DIR_TMP}\" " "but QtCore could not be found there. " "Qt is NOT installed correctly for the target build environment.") + set(Qt4_FOUND FALSE) if(Qt4_FIND_REQUIRED) message( FATAL_ERROR "Could NOT find QtCore. Check ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log for more details.") + else() + return() endif() endif() @@ -771,7 +776,7 @@ if (QT_QMAKE_EXECUTABLE AND QTVERSION) endif() endif () - # Make variables changeble to the advanced user + # Make variables changeable to the advanced user mark_as_advanced( QT_LIBRARY_DIR QT_DOC_DIR QT_MKSPECS_DIR QT_PLUGINS_DIR QT_TRANSLATIONS_DIR) @@ -881,20 +886,16 @@ if (QT_QMAKE_EXECUTABLE AND QTVERSION) endforeach() if(Q_WS_WIN) - 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() + 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 + ) endif() # Set QT_QTDESIGNERCOMPONENTS_INCLUDE_DIR @@ -1011,6 +1012,7 @@ if (QT_QMAKE_EXECUTABLE AND QTVERSION) macro(_qt4_add_target_depends _QT_MODULE) get_target_property(_configs Qt4::${_QT_MODULE} IMPORTED_CONFIGURATIONS) + _qt4_add_target_depends_internal(${_QT_MODULE} INTERFACE_LINK_LIBRARIES ${ARGN}) foreach(_config ${_configs}) _qt4_add_target_depends_internal(${_QT_MODULE} IMPORTED_LINK_INTERFACE_LIBRARIES_${_config} ${ARGN}) endforeach() @@ -1055,8 +1057,8 @@ if (QT_QMAKE_EXECUTABLE AND QTVERSION) if(Q_WS_WIN) _QT4_ADJUST_LIB_VARS(qtmain) + _QT4_ADJUST_LIB_VARS(QAxServer) if(QT_QAXSERVER_FOUND) - _QT4_ADJUST_LIB_VARS(QAxServer) set_property(TARGET Qt4::QAxServer PROPERTY INTERFACE_QT4_NO_LINK_QTMAIN ON ) @@ -1064,9 +1066,7 @@ if (QT_QMAKE_EXECUTABLE AND QTVERSION) COMPATIBLE_INTERFACE_BOOL QT4_NO_LINK_QTMAIN) endif() - if(QT_QAXCONTAINER_FOUND) - _QT4_ADJUST_LIB_VARS(QAxContainer) - endif() + _QT4_ADJUST_LIB_VARS(QAxContainer) endif() # Only public dependencies are listed here. @@ -1117,6 +1117,10 @@ if (QT_QMAKE_EXECUTABLE AND QTVERSION) set(_isNotExcluded $>>) set(_isPolicyNEW $) get_target_property(_configs Qt4::QtCore IMPORTED_CONFIGURATIONS) + set_property(TARGET Qt4::QtCore APPEND PROPERTY + INTERFACE_LINK_LIBRARIES + $<$:Qt4::qtmain> + ) foreach(_config ${_configs}) set_property(TARGET Qt4::QtCore APPEND PROPERTY IMPORTED_LINK_INTERFACE_LIBRARIES_${_config} diff --git a/Modules/FindTCL.cmake b/Modules/FindTCL.cmake index f649ddc56..37e43d05a 100644 --- a/Modules/FindTCL.cmake +++ b/Modules/FindTCL.cmake @@ -172,6 +172,8 @@ set(TCLTK_POSSIBLE_INCLUDE_PATHS /usr/include/tcl8.3 /usr/include/tcl8.2 /usr/include/tcl8.0 + /usr/local/include/tcl8.6 + /usr/local/include/tk8.6 /usr/local/include/tcl8.5 /usr/local/include/tk8.5 /usr/local/include/tcl8.4 diff --git a/Modules/FindThreads.cmake b/Modules/FindThreads.cmake index 5d7677791..f03908ea0 100644 --- a/Modules/FindThreads.cmake +++ b/Modules/FindThreads.cmake @@ -93,7 +93,7 @@ else() COMPILE_OUTPUT_VARIABLE OUTPUT) if(THREADS_HAVE_PTHREAD_ARG) - if(THREADS_PTHREAD_ARG MATCHES "^2$") + if(THREADS_PTHREAD_ARG STREQUAL "2") set(Threads_FOUND TRUE) message(STATUS "Check if compiler accepts -pthread - yes") else() diff --git a/Modules/FindVTK.cmake b/Modules/FindVTK.cmake index 0dede2d8b..085d60d04 100644 --- a/Modules/FindVTK.cmake +++ b/Modules/FindVTK.cmake @@ -51,7 +51,7 @@ if("${VTK_FIND_VERSION}" VERSION_LESS 4.1) endif() endif() -# Construct consitent error messages for use below. +# Construct consistent error messages for use below. set(VTK_DIR_DESCRIPTION "directory containing VTKConfig.cmake. This is either the root of the build tree, or PREFIX/lib/vtk for an installation.") if(_VTK_40_ALLOW) set(VTK_DIR_DESCRIPTION "${VTK_DIR_DESCRIPTION} For VTK 4.0, this is the location of UseVTK.cmake. This is either the root of the build tree or PREFIX/include/vtk for an installation.") @@ -127,7 +127,7 @@ endif() #----------------------------------------------------------------------------- if(VTK_FOUND) - # Set USE_VTK_FILE for backward-compatability. + # Set USE_VTK_FILE for backward-compatibility. set(USE_VTK_FILE ${VTK_USE_FILE}) else() # VTK not found, explain to the user how to specify its location. diff --git a/Modules/FindX11.cmake b/Modules/FindX11.cmake index 3cd3cefeb..131d97994 100644 --- a/Modules/FindX11.cmake +++ b/Modules/FindX11.cmake @@ -68,6 +68,7 @@ if (UNIX) /usr/openwin/include /usr/openwin/share/include /opt/graphics/OpenGL/include + /opt/X11/include ) set(X11_LIB_SEARCH_PATH @@ -75,6 +76,7 @@ if (UNIX) /usr/X11R6/lib /usr/X11R7/lib /usr/openwin/lib + /opt/X11/lib ) find_path(X11_X11_INCLUDE_PATH X11/X.h ${X11_INC_SEARCH_PATH}) diff --git a/Modules/FindXMLRPC.cmake b/Modules/FindXMLRPC.cmake index 6bb578b46..c80249b56 100644 --- a/Modules/FindXMLRPC.cmake +++ b/Modules/FindXMLRPC.cmake @@ -53,7 +53,7 @@ if(XMLRPC_FOUND) endif() # Parse the include flags. - if("${XMLRPC_C_CONFIG_RESULT}" MATCHES "^0$") + if("${XMLRPC_C_CONFIG_RESULT}" STREQUAL "0") # Convert the compile flags to a CMake list. string(REGEX REPLACE " +" ";" XMLRPC_C_CONFIG_CFLAGS "${XMLRPC_C_CONFIG_CFLAGS}") @@ -91,7 +91,7 @@ if(XMLRPC_FOUND) endif() # Parse the library names and directories. - if("${XMLRPC_C_CONFIG_RESULT}" MATCHES "^0$") + if("${XMLRPC_C_CONFIG_RESULT}" STREQUAL "0") string(REGEX REPLACE " +" ";" XMLRPC_C_CONFIG_LIBS "${XMLRPC_C_CONFIG_LIBS}") diff --git a/Modules/FindwxWidgets.cmake b/Modules/FindwxWidgets.cmake index 218d47613..37a894c4d 100644 --- a/Modules/FindwxWidgets.cmake +++ b/Modules/FindwxWidgets.cmake @@ -458,7 +458,7 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32") wxWidgets-2.5.2 wxWidgets-2.5.1 wxWidgets - DOC "wxWidgets base/installation directory?" + DOC "wxWidgets base/installation directory" ) # If wxWidgets_ROOT_DIR changed, clear lib dir. @@ -492,7 +492,7 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32") PATHS ${WX_ROOT_DIR}/lib/${WX_LIB_DIR_PREFIX}_dll # prefer shared ${WX_ROOT_DIR}/lib/${WX_LIB_DIR_PREFIX}_lib - DOC "Path to wxWidgets libraries?" + DOC "Path to wxWidgets libraries" NO_DEFAULT_PATH ) else() @@ -509,7 +509,7 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32") PATHS ${WX_ROOT_DIR}/lib/${WX_LIB_DIR_PREFIX}_lib # prefer static ${WX_ROOT_DIR}/lib/${WX_LIB_DIR_PREFIX}_dll - DOC "Path to wxWidgets libraries?" + DOC "Path to wxWidgets libraries" NO_DEFAULT_PATH ) endif() @@ -703,6 +703,7 @@ else() #----------------------------------------------------------------- # Support cross-compiling, only search in the target platform. find_program(wxWidgets_CONFIG_EXECUTABLE wx-config + DOC "Location of wxWidgets library configuration provider binary (wx-config)." ONLY_CMAKE_FIND_ROOT_PATH ) @@ -843,6 +844,7 @@ set(wxWidgets_FOUND ${WXWIDGETS_FOUND}) # Resource file compiler. find_program(wxWidgets_wxrc_EXECUTABLE wxrc ${wxWidgets_ROOT_DIR}/utils/wxrc/vc_msw + DOC "Location of wxWidgets resource file compiler binary (wxrc)" ) # diff --git a/Modules/FindwxWindows.cmake b/Modules/FindwxWindows.cmake index 4179f7bb2..868d20c73 100644 --- a/Modules/FindwxWindows.cmake +++ b/Modules/FindwxWindows.cmake @@ -321,7 +321,7 @@ if(WIN32_STYLE_FIND) rpcrt4 wsock32 ) - ## HACK: feed in to optimized / debug libaries if both were FOUND. + ## HACK: feed in to optimized / debug libraries if both were FOUND. set(WXWINDOWS_STATIC_DEBUG_LIBS ${WXWINDOWS_STATIC_DEBUG_LIBS} wxbase26d wxbase26d_net @@ -354,7 +354,7 @@ if(WIN32_STYLE_FIND) ## ## if there is at least one shared lib available - ## let user choose wether to use shared or static wxwindows libs + ## let user choose whether to use shared or static wxwindows libs if(WXWINDOWS_SHARED_LIBRARY OR WXWINDOWS_SHARED_DEBUG_LIBRARY) ## default value OFF because wxWindows MSVS default build is static option(WXWINDOWS_USE_SHARED_LIBS @@ -606,7 +606,7 @@ else() ../wx/bin ../../wx/bin ) - # check wether wx-config was found: + # check whether wx-config was found: if(CMAKE_WXWINDOWS_WXCONFIG_EXECUTABLE) # use shared/static wx lib? diff --git a/Modules/GenerateExportHeader.cmake b/Modules/GenerateExportHeader.cmake index 892ebc6dd..4ef14ac28 100644 --- a/Modules/GenerateExportHeader.cmake +++ b/Modules/GenerateExportHeader.cmake @@ -267,6 +267,7 @@ macro(_DO_GENERATE_EXPORT_HEADER TARGET_LIBRARY) if(_GEH_EXPORT_MACRO_NAME) set(EXPORT_MACRO_NAME ${_GEH_PREFIX_NAME}${_GEH_EXPORT_MACRO_NAME}) endif() + string(MAKE_C_IDENTIFIER ${EXPORT_MACRO_NAME} EXPORT_MACRO_NAME) if(_GEH_EXPORT_FILE_NAME) if(IS_ABSOLUTE ${_GEH_EXPORT_FILE_NAME}) set(EXPORT_FILE_NAME ${_GEH_EXPORT_FILE_NAME}) @@ -277,12 +278,15 @@ macro(_DO_GENERATE_EXPORT_HEADER TARGET_LIBRARY) if(_GEH_DEPRECATED_MACRO_NAME) set(DEPRECATED_MACRO_NAME ${_GEH_PREFIX_NAME}${_GEH_DEPRECATED_MACRO_NAME}) endif() + string(MAKE_C_IDENTIFIER ${DEPRECATED_MACRO_NAME} DEPRECATED_MACRO_NAME) if(_GEH_NO_EXPORT_MACRO_NAME) set(NO_EXPORT_MACRO_NAME ${_GEH_PREFIX_NAME}${_GEH_NO_EXPORT_MACRO_NAME}) endif() + string(MAKE_C_IDENTIFIER ${NO_EXPORT_MACRO_NAME} NO_EXPORT_MACRO_NAME) if(_GEH_STATIC_DEFINE) set(STATIC_DEFINE ${_GEH_PREFIX_NAME}${_GEH_STATIC_DEFINE}) endif() + string(MAKE_C_IDENTIFIER ${STATIC_DEFINE} STATIC_DEFINE) if(_GEH_DEFINE_NO_DEPRECATED) set(DEFINE_NO_DEPRECATED TRUE) @@ -292,6 +296,7 @@ macro(_DO_GENERATE_EXPORT_HEADER TARGET_LIBRARY) set(NO_DEPRECATED_MACRO_NAME ${_GEH_PREFIX_NAME}${_GEH_NO_DEPRECATED_MACRO_NAME}) endif() + string(MAKE_C_IDENTIFIER ${NO_DEPRECATED_MACRO_NAME} NO_DEPRECATED_MACRO_NAME) set(INCLUDE_GUARD_NAME "${EXPORT_MACRO_NAME}_H") @@ -300,6 +305,7 @@ macro(_DO_GENERATE_EXPORT_HEADER TARGET_LIBRARY) if(NOT EXPORT_IMPORT_CONDITION) set(EXPORT_IMPORT_CONDITION ${TARGET_LIBRARY}_EXPORTS) endif() + string(MAKE_C_IDENTIFIER ${EXPORT_IMPORT_CONDITION} EXPORT_IMPORT_CONDITION) configure_file("${_GENERATE_EXPORT_HEADER_MODULE_DIR}/exportheader.cmake.in" "${EXPORT_FILE_NAME}" @ONLY) @@ -307,11 +313,9 @@ endmacro() function(GENERATE_EXPORT_HEADER TARGET_LIBRARY) get_property(type TARGET ${TARGET_LIBRARY} PROPERTY TYPE) - if(${type} STREQUAL "MODULE") - message(WARNING "This macro should not be used with libraries of type MODULE") - return() - endif() - if(NOT ${type} STREQUAL "STATIC_LIBRARY" AND NOT ${type} STREQUAL "SHARED_LIBRARY") + if(NOT ${type} STREQUAL "STATIC_LIBRARY" + AND NOT ${type} STREQUAL "SHARED_LIBRARY" + AND NOT ${type} STREQUAL "MODULE_LIBRARY") message(WARNING "This macro can only be used with libraries") return() endif() diff --git a/Modules/GetPrerequisites.cmake b/Modules/GetPrerequisites.cmake index 18f449dda..9e89788fe 100644 --- a/Modules/GetPrerequisites.cmake +++ b/Modules/GetPrerequisites.cmake @@ -635,7 +635,6 @@ function(get_prerequisites target prerequisites_var exclude_system recurse exepa set(gp_regex_fallback "") set(gp_regex_cmp_count 1) set(gp_tool_known 1) - set(ENV{VS_UNICODE_OUTPUT} "") # Block extra output from inside VS IDE. endif() if("${gp_tool}" STREQUAL "objdump") diff --git a/Modules/NSIS.template.in b/Modules/NSIS.template.in index 59a444bde..76310af31 100644 --- a/Modules/NSIS.template.in +++ b/Modules/NSIS.template.in @@ -916,7 +916,9 @@ Function .onInit ;Run the uninstaller uninst: ClearErrors - ExecWait '$0 _?=$INSTDIR' ;Do not copy the uninstaller to a temp file + StrLen $2 "\Uninstall.exe" + StrCpy $3 $0 -$2 # remove "\Uninstall.exe" from UninstallString to get path + ExecWait '$0 _?=$3' ;Do not copy the uninstaller to a temp file IfErrors uninst_failed inst uninst_failed: diff --git a/Modules/Platform/Darwin-Absoft-Fortran.cmake b/Modules/Platform/Darwin-Absoft-Fortran.cmake index beb41a3b8..dc62b0dce 100644 --- a/Modules/Platform/Darwin-Absoft-Fortran.cmake +++ b/Modules/Platform/Darwin-Absoft-Fortran.cmake @@ -1 +1,18 @@ +#============================================================================= +# Copyright 2011 Kitware, Inc. +# Copyright 2013 OpenGamma Ltd. +# +# 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.) + set(CMAKE_Fortran_VERBOSE_FLAG "-X -v") # Runs gcc under the hood. + +set(CMAKE_Fortran_OSX_COMPATIBILITY_VERSION_FLAG "-compatibility_version ") +set(CMAKE_Fortran_OSX_CURRENT_VERSION_FLAG "-current_version ") diff --git a/Modules/Platform/Darwin-GNU-Fortran.cmake b/Modules/Platform/Darwin-GNU-Fortran.cmake index 8e8acc377..f4b509a13 100644 --- a/Modules/Platform/Darwin-GNU-Fortran.cmake +++ b/Modules/Platform/Darwin-GNU-Fortran.cmake @@ -1,2 +1,19 @@ +#============================================================================= +# Copyright 2009 Kitware, Inc. +# Copyright 2013 OpenGamma Ltd. +# +# 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.) + include(Platform/Darwin-GNU) __darwin_compiler_gnu(Fortran) + +set(CMAKE_Fortran_OSX_COMPATIBILITY_VERSION_FLAG "-compatibility_version ") +set(CMAKE_Fortran_OSX_CURRENT_VERSION_FLAG "-current_version ") diff --git a/Modules/Platform/Darwin-Intel-Fortran.cmake b/Modules/Platform/Darwin-Intel-Fortran.cmake new file mode 100644 index 000000000..6bd45f15c --- /dev/null +++ b/Modules/Platform/Darwin-Intel-Fortran.cmake @@ -0,0 +1,15 @@ +#============================================================================= +# Copyright 2013 OpenGamma Ltd. +# +# 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.) + +set(CMAKE_Fortran_OSX_COMPATIBILITY_VERSION_FLAG "-compatibility_version ") +set(CMAKE_Fortran_OSX_CURRENT_VERSION_FLAG "-current_version ") diff --git a/Modules/Platform/Darwin-NAG-Fortran.cmake b/Modules/Platform/Darwin-NAG-Fortran.cmake index 933f9e1a2..4c28e625c 100644 --- a/Modules/Platform/Darwin-NAG-Fortran.cmake +++ b/Modules/Platform/Darwin-NAG-Fortran.cmake @@ -1,5 +1,26 @@ +#============================================================================= +# Copyright 2010 Kitware, Inc. +# Copyright 2013 OpenGamma Ltd. +# +# 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.) + set(CMAKE_Fortran_VERBOSE_FLAG "-Wl,-v") # Runs gcc under the hood. # Need -fpp explicitly on case-insensitive filesystem. set(CMAKE_Fortran_COMPILE_OBJECT " -fpp -o -c ") + +set(CMAKE_Fortran_OSX_COMPATIBILITY_VERSION_FLAG "-Wl,-compatibility_version -Wl,") +set(CMAKE_Fortran_OSX_CURRENT_VERSION_FLAG "-Wl,-current_version -Wl,") +set(CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS "-Wl,-shared") +set(CMAKE_SHARED_LIBRARY_SONAME_Fortran_FLAG "-Wl,-install_name -Wl,") +set(CMAKE_Fortran_CREATE_SHARED_LIBRARY + " -o ") diff --git a/Modules/Platform/Darwin.cmake b/Modules/Platform/Darwin.cmake index 2e6b71e36..72844b531 100644 --- a/Modules/Platform/Darwin.cmake +++ b/Modules/Platform/Darwin.cmake @@ -30,6 +30,11 @@ set(CMAKE_SHARED_MODULE_SUFFIX ".so") set(CMAKE_MODULE_EXISTS 1) set(CMAKE_DL_LIBS "") +# Enable rpath support for 10.5 and greater where it is known to work. +if("${DARWIN_MAJOR_VERSION}" GREATER 8) + set(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-Wl,-rpath,") +endif() + set(CMAKE_C_OSX_COMPATIBILITY_VERSION_FLAG "-compatibility_version ") set(CMAKE_C_OSX_CURRENT_VERSION_FLAG "-current_version ") set(CMAKE_CXX_OSX_COMPATIBILITY_VERSION_FLAG "${CMAKE_C_OSX_COMPATIBILITY_VERSION_FLAG}") @@ -127,9 +132,25 @@ elseif("${CMAKE_GENERATOR}" MATCHES Xcode # specially named SDKs. set(_CMAKE_OSX_SDKS_VER_SUFFIX_10.4 "u") set(_CMAKE_OSX_SDKS_VER_SUFFIX_10.3 ".9") - set(_CMAKE_OSX_SDKS_VER ${_CURRENT_OSX_VERSION}${_CMAKE_OSX_SDKS_VER_SUFFIX_${_CURRENT_OSX_VERSION}}) - set(_CMAKE_OSX_SYSROOT_DEFAULT - "${_CMAKE_OSX_SDKS_DIR}/MacOSX${_CMAKE_OSX_SDKS_VER}.sdk") + if(CMAKE_OSX_DEPLOYMENT_TARGET) + set(_CMAKE_OSX_SDKS_VER ${CMAKE_OSX_DEPLOYMENT_TARGET}${_CMAKE_OSX_SDKS_VER_SUFFIX_${CMAKE_OSX_DEPLOYMENT_TARGET}}) + set(_CMAKE_OSX_SYSROOT_CHECK "${_CMAKE_OSX_SDKS_DIR}/MacOSX${_CMAKE_OSX_SDKS_VER}.sdk") + if(IS_DIRECTORY "${_CMAKE_OSX_SYSROOT_CHECK}") + set(_CMAKE_OSX_SYSROOT_DEFAULT "${_CMAKE_OSX_SYSROOT_CHECK}") + else() + set(_CMAKE_OSX_SDKS_VER ${_CURRENT_OSX_VERSION}${_CMAKE_OSX_SDKS_VER_SUFFIX_${_CURRENT_OSX_VERSION}}) + set(_CMAKE_OSX_SYSROOT_DEFAULT "${_CMAKE_OSX_SDKS_DIR}/MacOSX${_CMAKE_OSX_SDKS_VER}.sdk") + message(WARNING + "CMAKE_OSX_DEPLOYMENT_TARGET is '${CMAKE_OSX_DEPLOYMENT_TARGET}' " + "but the matching SDK does not exist at:\n \"${_CMAKE_OSX_SYSROOT_CHECK}\"\n" + "Instead using SDK:\n \"${_CMAKE_OSX_SYSROOT_DEFAULT}\"\n" + "matching the host OS X version." + ) + endif() + else() + set(_CMAKE_OSX_SDKS_VER ${_CURRENT_OSX_VERSION}${_CMAKE_OSX_SDKS_VER_SUFFIX_${_CURRENT_OSX_VERSION}}) + set(_CMAKE_OSX_SYSROOT_DEFAULT "${_CMAKE_OSX_SDKS_DIR}/MacOSX${_CMAKE_OSX_SDKS_VER}.sdk") + endif() else() # Assume developer files are in root (such as Xcode 4.5 command-line tools). set(_CMAKE_OSX_SYSROOT_DEFAULT "") @@ -207,12 +228,8 @@ if("${CMAKE_BACKWARDS_COMPATIBILITY}" MATCHES "^1\\.[0-6]$") "${CMAKE_SHARED_MODULE_CREATE_C_FLAGS} -flat_namespace -undefined suppress") endif() -if(NOT XCODE) - # Enable shared library versioning. This flag is not actually referenced - # but the fact that the setting exists will cause the generators to support - # soname computation. - set(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-install_name") -endif() +# Enable shared library versioning. +set(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-install_name") # Xcode does not support -isystem yet. if(XCODE) @@ -277,6 +294,15 @@ endif() # set up the default search directories for frameworks set(CMAKE_SYSTEM_FRAMEWORK_PATH ~/Library/Frameworks + ) +if(_CMAKE_OSX_SYSROOT_PATH) + list(APPEND CMAKE_SYSTEM_FRAMEWORK_PATH + ${_CMAKE_OSX_SYSROOT_PATH}/Library/Frameworks + ${_CMAKE_OSX_SYSROOT_PATH}/Network/Library/Frameworks + ${_CMAKE_OSX_SYSROOT_PATH}/System/Library/Frameworks + ) +endif() +list(APPEND CMAKE_SYSTEM_FRAMEWORK_PATH /Library/Frameworks /Network/Library/Frameworks /System/Library/Frameworks) @@ -321,6 +347,12 @@ set(CMAKE_SYSTEM_APPBUNDLE_PATH unset(_apps_paths) include(Platform/UnixPaths) +if(_CMAKE_OSX_SYSROOT_PATH AND EXISTS ${_CMAKE_OSX_SYSROOT_PATH}/usr/include) + list(APPEND CMAKE_SYSTEM_PREFIX_PATH ${_CMAKE_OSX_SYSROOT_PATH}/usr) + foreach(lang C CXX) + list(APPEND CMAKE_${lang}_IMPLICIT_INCLUDE_DIRECTORIES ${_CMAKE_OSX_SYSROOT_PATH}/usr/include) + endforeach() +endif() list(APPEND CMAKE_SYSTEM_PREFIX_PATH /sw # Fink /opt/local # MacPorts diff --git a/Modules/Platform/Windows-Embarcadero.cmake b/Modules/Platform/Windows-Embarcadero.cmake index 307230e34..26b3c0cab 100644 --- a/Modules/Platform/Windows-Embarcadero.cmake +++ b/Modules/Platform/Windows-Embarcadero.cmake @@ -78,23 +78,24 @@ set (CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO_INIT ${CMAKE_SHARED_LINKER_FLAGS_R macro(__embarcadero_language lang) set(CMAKE_${lang}_COMPILE_OPTIONS_DLL "${_tD}") # Note: This variable is a ';' separated list set(CMAKE_SHARED_LIBRARY_${lang}_FLAGS "${_tD}") # ... while this is a space separated string. + set(CMAKE_${lang}_USE_RESPONSE_FILE_FOR_INCLUDES 1) # compile a source file into an object file # place outside the response file because Borland refuses # to parse quotes from the response file. set(CMAKE_${lang}_COMPILE_OBJECT - " ${_tR} ${CMAKE_START_TEMP_FILE}-DWIN32 -o ${_COMPILE_${lang}} ${CMAKE_END_TEMP_FILE}" + " ${_tR} -DWIN32 -o ${_COMPILE_${lang}} " ) set(CMAKE_${lang}_LINK_EXECUTABLE - " ${_tR} -e ${CMAKE_START_TEMP_FILE} ${CMAKE_END_TEMP_FILE}" + " ${_tR} -e ${CMAKE_START_TEMP_FILE} ${CMAKE_END_TEMP_FILE}" # "implib -c -w " ) # place outside the response file because Borland refuses # to parse quotes from the response file. set(CMAKE_${lang}_CREATE_PREPROCESSED_SOURCE - "cpp32 ${CMAKE_START_TEMP_FILE}-DWIN32 -o ${_COMPILE_${lang}} ${CMAKE_END_TEMP_FILE}" + "cpp32 -DWIN32 -o ${_COMPILE_${lang}} " ) # Borland >= 5.6 allows -P option for cpp32, <= 5.5 does not diff --git a/Modules/Platform/Windows-Intel.cmake b/Modules/Platform/Windows-Intel.cmake index 8a9d630f6..69a7f2ff0 100644 --- a/Modules/Platform/Windows-Intel.cmake +++ b/Modules/Platform/Windows-Intel.cmake @@ -81,7 +81,7 @@ endif() macro(__windows_compiler_intel lang) set(CMAKE_${lang}_COMPILE_OBJECT - " ${CMAKE_START_TEMP_FILE} ${CMAKE_CL_NOLOGO}${_COMPILE_${lang}} /Fo -c ${CMAKE_END_TEMP_FILE}") + " ${CMAKE_START_TEMP_FILE} ${CMAKE_CL_NOLOGO}${_COMPILE_${lang}} /Fo /Fd/ -c ${CMAKE_END_TEMP_FILE}") set(CMAKE_${lang}_CREATE_PREPROCESSED_SOURCE " > ${CMAKE_START_TEMP_FILE} ${CMAKE_CL_NOLOGO}${_COMPILE_${lang}} -E ${CMAKE_END_TEMP_FILE}") set(CMAKE_${lang}_USE_RESPONSE_FILE_FOR_OBJECTS 1) @@ -91,7 +91,7 @@ macro(__windows_compiler_intel lang) set(CMAKE_${lang}_CREATE_SHARED_MODULE "${CMAKE_${lang}_CREATE_SHARED_LIBRARY}") set(CMAKE_${lang}_COMPILER_LINKER_OPTION_FLAG_EXECUTABLE "/link") set(CMAKE_${lang}_LINK_EXECUTABLE - " ${CMAKE_CL_NOLOGO} ${CMAKE_START_TEMP_FILE} /Fe /link /implib: ${CMAKE_END_TEMP_FILE}") + " ${CMAKE_CL_NOLOGO} ${CMAKE_START_TEMP_FILE} /Fe /link /implib: /pdb: ${CMAKE_END_TEMP_FILE}") set(CMAKE_${lang}_FLAGS_INIT "/DWIN32 /D_WINDOWS /W3 /Zm1000${_FLAGS_${lang}}") set(CMAKE_${lang}_FLAGS_DEBUG_INIT "/D_DEBUG /MDd /Zi /Od /RTC1") set(CMAKE_${lang}_FLAGS_MINSIZEREL_INIT "/DNDEBUG /MD /O1") diff --git a/Modules/Platform/Windows-MSVC.cmake b/Modules/Platform/Windows-MSVC.cmake index e03b60115..7036ba0bd 100644 --- a/Modules/Platform/Windows-MSVC.cmake +++ b/Modules/Platform/Windows-MSVC.cmake @@ -22,7 +22,7 @@ set(CMAKE_LIBRARY_PATH_FLAG "-LIBPATH:") set(CMAKE_LINK_LIBRARY_FLAG "") set(MSVC 1) -# hack: if a new cmake (which uses CMAKE__LINKER) runs on an old build tree +# hack: if a new cmake (which uses CMAKE_LINKER) runs on an old build tree # (where link was hardcoded) and where CMAKE_LINKER isn't in the cache # and still cmake didn't fail in CMakeFindBinUtils.cmake (because it isn't rerun) # hardcode CMAKE_LINKER here to link, so it behaves as it did before, Alex @@ -52,9 +52,6 @@ if(CMAKE_GENERATOR MATCHES "Visual Studio 6") endif() if(NOT CMAKE_NO_BUILD_TYPE AND CMAKE_GENERATOR MATCHES "Visual Studio") set (CMAKE_NO_BUILD_TYPE 1) - set (CMAKE_CONFIGURATION_TYPES "Debug;Release;MinSizeRel;RelWithDebInfo" CACHE STRING - "Semicolon separated list of supported configuration types, only supports Debug, Release, MinSizeRel, and RelWithDebInfo, anything else will be ignored.") - mark_as_advanced(CMAKE_CONFIGURATION_TYPES) endif() # make sure to enable languages after setting configuration types @@ -127,8 +124,15 @@ endif() set(CMAKE_BUILD_TYPE_INIT Debug) if(WINCE) - string(TOUPPER "${MSVC_C_ARCHITECTURE_ID}" _MSVC_C_ARCHITECTURE_ID_UPPER) - string(TOUPPER "${MSVC_CXX_ARCHITECTURE_ID}" _MSVC_CXX_ARCHITECTURE_ID_UPPER) + foreach(lang C CXX) + set(_MSVC_${lang}_ARCHITECTURE_FAMILY "${MSVC_${lang}_ARCHITECTURE_ID}") + if(_MSVC_${lang}_ARCHITECTURE_FAMILY STREQUAL "THUMB") + set(_MSVC_${lang}_ARCHITECTURE_FAMILY "ARM") + elseif(_MSVC_${lang}_ARCHITECTURE_FAMILY MATCHES "^SH") + set(_MSVC_${lang}_ARCHITECTURE_FAMILY "SHx") + endif() + string(TOUPPER "${_MSVC_${lang}_ARCHITECTURE_FAMILY}" _MSVC_${lang}_ARCHITECTURE_FAMILY_UPPER) + endforeach() if("${CMAKE_SYSTEM_VERSION}" MATCHES "^([0-9]+)\\.([0-9]+)") math(EXPR _CE_VERSION "${CMAKE_MATCH_1}*100 + ${CMAKE_MATCH_2}") @@ -139,13 +143,17 @@ if(WINCE) endif() set(_PLATFORM_DEFINES "/D_WIN32_WCE=0x${_CE_VERSION} /DUNDER_CE") - set(_PLATFORM_DEFINES_C " /D${MSVC_C_ARCHITECTURE_ID} /D_${_MSVC_C_ARCHITECTURE_ID_UPPER}_") - set(_PLATFORM_DEFINES_CXX " /D${MSVC_CXX_ARCHITECTURE_ID} /D_${_MSVC_CXX_ARCHITECTURE_ID_UPPER}_") + set(_PLATFORM_DEFINES_C " /D${_MSVC_C_ARCHITECTURE_FAMILY} /D_${_MSVC_C_ARCHITECTURE_FAMILY_UPPER}_") + set(_PLATFORM_DEFINES_CXX " /D${_MSVC_CXX_ARCHITECTURE_FAMILY} /D_${_MSVC_CXX_ARCHITECTURE_FAMILY_UPPER}_") set(_RTC1 "") set(_FLAGS_CXX " /GR /EHsc") - set(CMAKE_C_STANDARD_LIBRARIES_INIT "coredll.lib corelibc.lib ole32.lib oleaut32.lib uuid.lib commctrl.lib") + set(CMAKE_C_STANDARD_LIBRARIES_INIT "coredll.lib ole32.lib oleaut32.lib uuid.lib commctrl.lib") set(CMAKE_EXE_LINKER_FLAGS_INIT "${CMAKE_EXE_LINKER_FLAGS_INIT} /NODEFAULTLIB:libc.lib /NODEFAULTLIB:oldnames.lib") + + if (MSVC_VERSION LESS 1600) + set(CMAKE_C_STANDARD_LIBRARIES_INIT "${CMAKE_C_STANDARD_LIBRARIES_INIT} corelibc.lib") + endif () else() set(_PLATFORM_DEFINES "/DWIN32") @@ -174,13 +182,6 @@ set(_MACHINE_ARCH_FLAG ${MSVC_C_ARCHITECTURE_ID}) if(NOT _MACHINE_ARCH_FLAG) set(_MACHINE_ARCH_FLAG ${MSVC_CXX_ARCHITECTURE_ID}) endif() -if(WINCE) - if(_MACHINE_ARCH_FLAG MATCHES "ARM") - set(_MACHINE_ARCH_FLAG "THUMB") - elseif(_MACHINE_ARCH_FLAG MATCHES "SH") - set(_MACHINE_ARCH_FLAG "SH4") - endif() -endif() set (CMAKE_EXE_LINKER_FLAGS_INIT "${CMAKE_EXE_LINKER_FLAGS_INIT} /machine:${_MACHINE_ARCH_FLAG}") @@ -231,16 +232,15 @@ macro(__windows_compiler_msvc lang) set(CMAKE_${lang}_CREATE_STATIC_LIBRARY " /lib ${CMAKE_CL_NOLOGO} /out: ") set(CMAKE_${lang}_COMPILE_OBJECT - " ${CMAKE_START_TEMP_FILE} ${CMAKE_CL_NOLOGO}${_COMPILE_${lang}} /Fo /Fd -c ${CMAKE_END_TEMP_FILE}") + " ${CMAKE_START_TEMP_FILE} ${CMAKE_CL_NOLOGO}${_COMPILE_${lang}} /Fo /Fd/ -c ${CMAKE_END_TEMP_FILE}") set(CMAKE_${lang}_CREATE_PREPROCESSED_SOURCE " > ${CMAKE_START_TEMP_FILE} ${CMAKE_CL_NOLOGO}${_COMPILE_${lang}} -E ${CMAKE_END_TEMP_FILE}") set(CMAKE_${lang}_CREATE_ASSEMBLY_SOURCE " ${CMAKE_START_TEMP_FILE} ${CMAKE_CL_NOLOGO}${_COMPILE_${lang}} /FoNUL /FAs /Fa /c ${CMAKE_END_TEMP_FILE}") - set(CMAKE_${lang}_COMPILER_LINKER_OPTION_FLAG_EXECUTABLE "/link") set(CMAKE_${lang}_USE_RESPONSE_FILE_FOR_OBJECTS 1) set(CMAKE_${lang}_LINK_EXECUTABLE - "${_CMAKE_VS_LINK_EXE} ${CMAKE_CL_NOLOGO} ${CMAKE_START_TEMP_FILE} /Fe /Fd /link /implib: /version:. ${CMAKE_END_TEMP_FILE}") + "${_CMAKE_VS_LINK_EXE} ${CMAKE_CL_NOLOGO} ${CMAKE_START_TEMP_FILE} /out: /implib: /pdb: /version:. ${CMAKE_END_TEMP_FILE}") set(CMAKE_${lang}_FLAGS_INIT "${_PLATFORM_DEFINES}${_PLATFORM_DEFINES_${lang}} /D_WINDOWS /W3${_FLAGS_${lang}}") set(CMAKE_${lang}_FLAGS_DEBUG_INIT "/D_DEBUG /MDd /Zi /Ob0 /Od ${_RTC1}") diff --git a/Modules/Platform/Windows-df.cmake b/Modules/Platform/Windows-df.cmake index 7e2ac9fe4..8dfb61057 100644 --- a/Modules/Platform/Windows-df.cmake +++ b/Modules/Platform/Windows-df.cmake @@ -38,8 +38,6 @@ if(CMAKE_GENERATOR MATCHES "Visual Studio 6") endif() if(CMAKE_GENERATOR MATCHES "Visual Studio 7" OR CMAKE_GENERATOR MATCHES "Visual Studio 8") set (CMAKE_NO_BUILD_TYPE 1) - set (CMAKE_CONFIGURATION_TYPES "Debug;Release;MinSizeRel;RelWithDebInfo" CACHE STRING - "Semicolon separated list of supported configuration types, only supports Debug, Release, MinSizeRel, and RelWithDebInfo, anything else will be ignored.") endif() # does the compiler support pdbtype and is it the newer compiler diff --git a/Modules/Platform/WindowsPaths.cmake b/Modules/Platform/WindowsPaths.cmake index bd31da021..fc921d793 100644 --- a/Modules/Platform/WindowsPaths.cmake +++ b/Modules/Platform/WindowsPaths.cmake @@ -77,10 +77,12 @@ list(APPEND CMAKE_SYSTEM_PREFIX_PATH "${_CMAKE_INSTALL_DIR}") list(APPEND CMAKE_SYSTEM_PREFIX_PATH # Project install destination. "${CMAKE_INSTALL_PREFIX}" + ) +if(CMAKE_CROSSCOMPILING AND NOT CMAKE_HOST_SYSTEM_NAME MATCHES "Windows") # MinGW (useful when cross compiling from linux with CMAKE_FIND_ROOT_PATH set) - / - ) + list(APPEND CMAKE_SYSTEM_PREFIX_PATH /) +endif() list(APPEND CMAKE_SYSTEM_INCLUDE_PATH ) diff --git a/Modules/Qt4Macros.cmake b/Modules/Qt4Macros.cmake index f6c8476a5..f1aedd743 100644 --- a/Modules/Qt4Macros.cmake +++ b/Modules/Qt4Macros.cmake @@ -21,15 +21,20 @@ ###################################### -macro (QT4_EXTRACT_OPTIONS _qt4_files _qt4_options) +macro (QT4_EXTRACT_OPTIONS _qt4_files _qt4_options _qt4_target) set(${_qt4_files}) set(${_qt4_options}) set(_QT4_DOING_OPTIONS FALSE) + set(_QT4_DOING_TARGET FALSE) foreach(_currentArg ${ARGN}) - if ("${_currentArg}" STREQUAL "OPTIONS") + if ("x${_currentArg}" STREQUAL "xOPTIONS") set(_QT4_DOING_OPTIONS TRUE) + elseif ("x${_currentArg}" STREQUAL "xTARGET") + set(_QT4_DOING_TARGET TRUE) else () - if(_QT4_DOING_OPTIONS) + if(_QT4_DOING_TARGET) + set(${_qt4_target} "${_currentArg}") + elseif(_QT4_DOING_OPTIONS) list(APPEND ${_qt4_options} "${_currentArg}") else() list(APPEND ${_qt4_files} "${_currentArg}") @@ -92,34 +97,46 @@ endmacro() # helper macro to set up a moc rule -macro (QT4_CREATE_MOC_COMMAND infile outfile moc_flags moc_options) +macro (QT4_CREATE_MOC_COMMAND infile outfile moc_flags moc_options moc_target) # For Windows, create a parameters file to work around command line length limit - if (WIN32) - # Pass the parameters in a file. Set the working directory to - # be that containing the parameters file and reference it by - # just the file name. This is necessary because the moc tool on - # MinGW builds does not seem to handle spaces in the path to the - # file given with the @ syntax. - get_filename_component(_moc_outfile_name "${outfile}" NAME) - get_filename_component(_moc_outfile_dir "${outfile}" PATH) - if(_moc_outfile_dir) - set(_moc_working_dir WORKING_DIRECTORY ${_moc_outfile_dir}) - endif() - set (_moc_parameters_file ${outfile}_parameters) - set (_moc_parameters ${moc_flags} ${moc_options} -o "${outfile}" "${infile}") - string (REPLACE ";" "\n" _moc_parameters "${_moc_parameters}") - file (WRITE ${_moc_parameters_file} "${_moc_parameters}") - add_custom_command(OUTPUT ${outfile} - COMMAND ${QT_MOC_EXECUTABLE} @${_moc_outfile_name}_parameters - DEPENDS ${infile} - ${_moc_working_dir} - VERBATIM) - else () - add_custom_command(OUTPUT ${outfile} - COMMAND ${QT_MOC_EXECUTABLE} - ARGS ${moc_flags} ${moc_options} -o ${outfile} ${infile} - DEPENDS ${infile} VERBATIM) - endif () + # Pass the parameters in a file. Set the working directory to + # be that containing the parameters file and reference it by + # just the file name. This is necessary because the moc tool on + # MinGW builds does not seem to handle spaces in the path to the + # file given with the @ syntax. + get_filename_component(_moc_outfile_name "${outfile}" NAME) + get_filename_component(_moc_outfile_dir "${outfile}" PATH) + if(_moc_outfile_dir) + set(_moc_working_dir WORKING_DIRECTORY ${_moc_outfile_dir}) + endif() + set (_moc_parameters_file ${outfile}_parameters) + set (_moc_parameters ${moc_flags} ${moc_options} -o "${outfile}" "${infile}") + string (REPLACE ";" "\n" _moc_parameters "${_moc_parameters}") + + if(moc_target) + set(targetincludes "$") + set(targetdefines "$") + + set(targetincludes "$<$:-I$\n>") + set(targetdefines "$<$:-D$\n>") + + file (GENERATE + OUTPUT ${_moc_parameters_file} + CONTENT "${targetdefines}${targetincludes}${_moc_parameters}\n" + ) + + set(targetincludes) + set(targetdefines) + else() + file(WRITE ${_moc_parameters_file} "${_moc_parameters}\n") + endif() + + set(_moc_extra_parameters_file @${_moc_parameters_file}) + add_custom_command(OUTPUT ${outfile} + COMMAND ${QT_MOC_EXECUTABLE} ${_moc_extra_parameters_file} + DEPENDS ${infile} + ${_moc_working_dir} + VERBATIM) endmacro () @@ -131,7 +148,11 @@ macro (QT4_GENERATE_MOC infile outfile ) if(NOT IS_ABSOLUTE "${outfile}") set(_outfile "${CMAKE_CURRENT_BINARY_DIR}/${outfile}") endif() - QT4_CREATE_MOC_COMMAND(${abs_infile} ${_outfile} "${moc_flags}" "") + + if ("x${ARGV2}" STREQUAL "xTARGET") + set(moc_target ${ARGV3}) + endif() + QT4_CREATE_MOC_COMMAND(${abs_infile} ${_outfile} "${moc_flags}" "" "${moc_target}") set_source_files_properties(${outfile} PROPERTIES SKIP_AUTOMOC TRUE) # dont run automoc on this file endmacro () @@ -141,12 +162,12 @@ endmacro () macro (QT4_WRAP_CPP outfiles ) # get include dirs QT4_GET_MOC_FLAGS(moc_flags) - QT4_EXTRACT_OPTIONS(moc_files moc_options ${ARGN}) + QT4_EXTRACT_OPTIONS(moc_files moc_options moc_target ${ARGN}) foreach (it ${moc_files}) get_filename_component(it ${it} ABSOLUTE) QT4_MAKE_OUTPUT_FILE(${it} moc_ cxx outfile) - QT4_CREATE_MOC_COMMAND(${it} ${outfile} "${moc_flags}" "${moc_options}") + QT4_CREATE_MOC_COMMAND(${it} ${outfile} "${moc_flags}" "${moc_options}" "${moc_target}") set(${outfiles} ${${outfiles}} ${outfile}) endforeach() @@ -156,7 +177,7 @@ endmacro () # QT4_WRAP_UI(outfiles inputfile ... ) macro (QT4_WRAP_UI outfiles ) - QT4_EXTRACT_OPTIONS(ui_files ui_options ${ARGN}) + QT4_EXTRACT_OPTIONS(ui_files ui_options ui_target ${ARGN}) foreach (it ${ui_files}) get_filename_component(outfile ${it} NAME_WE) @@ -175,7 +196,7 @@ endmacro () # QT4_ADD_RESOURCES(outfiles inputfile ... ) macro (QT4_ADD_RESOURCES outfiles ) - QT4_EXTRACT_OPTIONS(rcc_files rcc_options ${ARGN}) + QT4_EXTRACT_OPTIONS(rcc_files rcc_options rcc_target ${ARGN}) foreach (it ${rcc_files}) get_filename_component(outfilename ${it} NAME_WE) @@ -270,7 +291,7 @@ endmacro() macro(QT4_GENERATE_DBUS_INTERFACE _header) # _customName OPTIONS -some -options ) - QT4_EXTRACT_OPTIONS(_customName _qt4_dbus_options ${ARGN}) + QT4_EXTRACT_OPTIONS(_customName _qt4_dbus_options _qt4_dbus_target ${ARGN}) get_filename_component(_in_file ${_header} ABSOLUTE) get_filename_component(_basename ${_header} NAME_WE) @@ -333,6 +354,17 @@ endmacro() macro(QT4_AUTOMOC) + if(NOT CMAKE_MINIMUM_REQUIRED_VERSION VERSION_LESS 2.8.11) + if(CMAKE_WARN_DEPRECATED) + set(messageType WARNING) + endif() + if(CMAKE_ERROR_DEPRECATED) + set(messageType FATAL_ERROR) + endif() + if(messageType) + message(${messageType} "The qt4_automoc macro is obsolete. Use the CMAKE_AUTOMOC feature instead.") + endif() + endif() QT4_GET_MOC_FLAGS(_moc_INCS) set(_matching_FILES ) @@ -366,7 +398,7 @@ macro(QT4_AUTOMOC) set(_header ${_abs_PATH}/${_basename}.h) endif() set(_moc ${CMAKE_CURRENT_BINARY_DIR}/${_current_MOC}) - QT4_CREATE_MOC_COMMAND(${_header} ${_moc} "${_moc_INCS}" "") + QT4_CREATE_MOC_COMMAND(${_header} ${_moc} "${_moc_INCS}" "" "") MACRO_ADD_FILE_DEPENDENCIES(${_abs_FILE} ${_moc}) endforeach () endif() @@ -376,7 +408,7 @@ endmacro() macro(QT4_CREATE_TRANSLATION _qm_files) - QT4_EXTRACT_OPTIONS(_lupdate_files _lupdate_options ${ARGN}) + QT4_EXTRACT_OPTIONS(_lupdate_files _lupdate_options _lupdate_target ${ARGN}) set(_my_sources) set(_my_dirs) set(_my_tsfiles) @@ -443,6 +475,17 @@ macro(QT4_ADD_TRANSLATION _qm_files) endmacro() function(qt4_use_modules _target _link_type) + if(NOT CMAKE_MINIMUM_REQUIRED_VERSION VERSION_LESS 2.8.11) + if(CMAKE_WARN_DEPRECATED) + set(messageType WARNING) + endif() + if(CMAKE_ERROR_DEPRECATED) + set(messageType FATAL_ERROR) + endif() + if(messageType) + message(${messageType} "The qt4_use_modules function is obsolete. Use target_link_libraries with IMPORTED targets instead.") + endif() + endif() if ("${_link_type}" STREQUAL "LINK_PUBLIC" OR "${_link_type}" STREQUAL "LINK_PRIVATE") set(modules ${ARGN}) set(link_type ${_link_type}) diff --git a/Modules/SelectLibraryConfigurations.cmake b/Modules/SelectLibraryConfigurations.cmake index 5bca064f5..297e1d3bd 100644 --- a/Modules/SelectLibraryConfigurations.cmake +++ b/Modules/SelectLibraryConfigurations.cmake @@ -3,16 +3,18 @@ # This macro takes a library base name as an argument, and will choose good # values for basename_LIBRARY, basename_LIBRARIES, basename_LIBRARY_DEBUG, and # basename_LIBRARY_RELEASE depending on what has been found and set. If only -# basename_LIBRARY_RELEASE is defined, basename_LIBRARY, basename_LIBRARY_DEBUG, -# and basename_LIBRARY_RELEASE will be set to the release value. If only -# basename_LIBRARY_DEBUG is defined, then basename_LIBRARY, -# basename_LIBRARY_DEBUG and basename_LIBRARY_RELEASE will take the debug value. +# basename_LIBRARY_RELEASE is defined, basename_LIBRARY will be set to the +# release value, and basename_LIBRARY_DEBUG will be set to +# basename_LIBRARY_DEBUG-NOTFOUND. If only basename_LIBRARY_DEBUG is defined, +# then basename_LIBRARY will take the debug value, and basename_LIBRARY_RELEASE +# will be set to basename_LIBRARY_RELEASE-NOTFOUND. # # If the generator supports configuration types, then basename_LIBRARY and # basename_LIBRARIES will be set with debug and optimized flags specifying the # library to be used for the given configuration. If no build type has been set # or the generator in use does not support configuration types, then -# basename_LIBRARY and basename_LIBRARIES will take only the release values. +# basename_LIBRARY and basename_LIBRARIES will take only the release value, or +# the debug value if the release one is not set. #============================================================================= # Copyright 2009 Will Dicharry @@ -31,57 +33,41 @@ # This macro was adapted from the FindQt4 CMake module and is maintained by Will # Dicharry . -# Utility macro to check if one variable exists while another doesn't, and set -# one that doesn't exist to the one that exists. -macro( _set_library_name basename GOOD BAD ) - if( ${basename}_LIBRARY_${GOOD} AND NOT ${basename}_LIBRARY_${BAD} ) - set( ${basename}_LIBRARY_${BAD} ${${basename}_LIBRARY_${GOOD}} ) - set( ${basename}_LIBRARY ${${basename}_LIBRARY_${GOOD}} ) - set( ${basename}_LIBRARIES ${${basename}_LIBRARY_${GOOD}} ) - endif() -endmacro() - macro( select_library_configurations basename ) - # if only the release version was found, set the debug to be the release - # version. - _set_library_name( ${basename} RELEASE DEBUG ) - # if only the debug version was found, set the release value to be the - # debug value. - _set_library_name( ${basename} DEBUG RELEASE ) - - # Set a default case, which will come into effect if - # -no build type is set and the generator only supports one build type - # at a time (i.e. CMAKE_CONFIGURATION_TYPES is false) - # -${basename}_LIBRARY_DEBUG and ${basename}_LIBRARY_RELEASE are the same - # -${basename}_LIBRARY_DEBUG and ${basename}_LIBRARY_RELEASE are both empty - set( ${basename}_LIBRARY ${${basename}_LIBRARY_RELEASE} ) - set( ${basename}_LIBRARIES ${${basename}_LIBRARY_RELEASE} ) + if(NOT ${basename}_LIBRARY_RELEASE) + set(${basename}_LIBRARY_RELEASE "${basename}_LIBRARY_RELEASE-NOTFOUND" CACHE FILEPATH "Path to a library.") + endif() + if(NOT ${basename}_LIBRARY_DEBUG) + set(${basename}_LIBRARY_DEBUG "${basename}_LIBRARY_DEBUG-NOTFOUND" CACHE FILEPATH "Path to a library.") + endif() if( ${basename}_LIBRARY_DEBUG AND ${basename}_LIBRARY_RELEASE AND - NOT ${basename}_LIBRARY_DEBUG STREQUAL ${basename}_LIBRARY_RELEASE ) + NOT ${basename}_LIBRARY_DEBUG STREQUAL ${basename}_LIBRARY_RELEASE AND + ( CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE ) ) # if the generator supports configuration types or CMAKE_BUILD_TYPE # is set, then set optimized and debug options. - if( CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE ) - set( ${basename}_LIBRARY "" ) - foreach( _libname IN LISTS ${basename}_LIBRARY_RELEASE ) - list( APPEND ${basename}_LIBRARY optimized "${_libname}" ) - endforeach() - foreach( _libname IN LISTS ${basename}_LIBRARY_DEBUG ) - list( APPEND ${basename}_LIBRARY debug "${_libname}" ) - endforeach() - set( ${basename}_LIBRARIES "${${basename}_LIBRARY}" ) - endif() + set( ${basename}_LIBRARY "" ) + foreach( _libname IN LISTS ${basename}_LIBRARY_RELEASE ) + list( APPEND ${basename}_LIBRARY optimized "${_libname}" ) + endforeach() + foreach( _libname IN LISTS ${basename}_LIBRARY_DEBUG ) + list( APPEND ${basename}_LIBRARY debug "${_libname}" ) + endforeach() + elseif( ${basename}_LIBRARY_RELEASE ) + set( ${basename}_LIBRARY ${${basename}_LIBRARY_RELEASE} ) + elseif( ${basename}_LIBRARY_DEBUG ) + set( ${basename}_LIBRARY ${${basename}_LIBRARY_DEBUG} ) + else() + set( ${basename}_LIBRARY "${basename}_LIBRARY-NOTFOUND") endif() - set( ${basename}_LIBRARY ${${basename}_LIBRARY} CACHE FILEPATH - "The ${basename} library" ) + set( ${basename}_LIBRARIES "${${basename}_LIBRARY}" ) if( ${basename}_LIBRARY ) set( ${basename}_FOUND TRUE ) endif() - mark_as_advanced( ${basename}_LIBRARY - ${basename}_LIBRARY_RELEASE + mark_as_advanced( ${basename}_LIBRARY_RELEASE ${basename}_LIBRARY_DEBUG ) endmacro() diff --git a/Modules/UseEcos.cmake b/Modules/UseEcos.cmake index 028df8202..0c4fee4e1 100644 --- a/Modules/UseEcos.cmake +++ b/Modules/UseEcos.cmake @@ -132,10 +132,10 @@ macro(ECOS_ADJUST_DIRECTORY _target_FILES ) endmacro() # the default ecos config file name -# maybe in the future also out-of-source builds may be possible +# maybe in future also out-of-source builds may be possible set(ECOS_CONFIG_FILE ecos.ecc) -#creates the dependancy from all source files on the ecos target.ld, +#creates the dependency from all source files on the ecos target.ld, #adds the command for compiling ecos macro(ECOS_ADD_TARGET_LIB) # when building out-of-source, create the ecos/ subdir diff --git a/Modules/UseJava.cmake b/Modules/UseJava.cmake index 043869519..c0fd07cbd 100644 --- a/Modules/UseJava.cmake +++ b/Modules/UseJava.cmake @@ -6,6 +6,10 @@ # add_jar(target_name # [SOURCES] source1 [source2 ...] [resource1 ...] # [INCLUDE_JARS jar1 [jar2 ...]] +# [ENTRY_POINT entry] +# [VERSION version] +# [OUTPUT_NAME name] +# [OUTPUT_DIR dir] # ) # # This command creates a .jar. It compiles the given source files @@ -17,6 +21,9 @@ # listed as sources are ignored (as they have been since the first version of # this module). # +# The default OUTPUT_DIR can also be changed by setting the variable +# CMAKE_JAVA_TARGET_OUTPUT_DIR. +# # Additional instructions: # To add compile flags to the target you can set these flags with # the following variable: @@ -30,32 +37,30 @@ # # To use a different output name for the target you can set it with: # -# set(CMAKE_JAVA_TARGET_OUTPUT_NAME shibboleet.jar) -# add_jar(foobar foobar.java) +# add_jar(foobar foobar.java OUTPUT_NAME shibboleet.jar) # # To use a different output directory than CMAKE_CURRENT_BINARY_DIR # you can set it with: # -# set(CMAKE_JAVA_TARGET_OUTPUT_DIR ${PROJECT_BINARY_DIR}/bin) +# add_jar(foobar foobar.java OUTPUT_DIR ${PROJECT_BINARY_DIR}/bin) # -# To define an entry point in your jar you can set it with: +# To define an entry point in your jar you can set it with the ENTRY_POINT +# named argument: # -# set(CMAKE_JAVA_JAR_ENTRY_POINT com/examples/MyProject/Main) +# add_jar(example ENTRY_POINT com/examples/MyProject/Main) # # To add a VERSION to the target output name you can set it using -# CMAKE_JAVA_TARGET_VERSION. This will create a jar file with the name -# shibboleet-1.0.0.jar and will create a symlink shibboleet.jar +# the VERSION named argument to add_jar. This will create a jar file with the +# name shibboleet-1.0.0.jar and will create a symlink shibboleet.jar # pointing to the jar with the version information. # -# set(CMAKE_JAVA_TARGET_VERSION 1.2.0) -# add_jar(shibboleet shibbotleet.java) +# add_jar(shibboleet shibbotleet.java VERSION 1.2.0) # # If the target is a JNI library, utilize the following commands to # create a JNI symbolic link: # # set(CMAKE_JNI_TARGET TRUE) -# set(CMAKE_JAVA_TARGET_VERSION 1.2.0) -# add_jar(shibboleet shibbotleet.java) +# add_jar(shibboleet shibbotleet.java VERSION 1.2.0) # install_jar(shibboleet ${LIB_INSTALL_DIR}/shibboleet) # install_jni_symlink(shibboleet ${JAVA_LIB_INSTALL_DIR}) # @@ -185,8 +190,9 @@ # #============================================================================= +# Copyright 2013 OpenGamma Ltd. # Copyright 2010-2011 Andreas schneider -# Copyright 2010 Ben Boeckel +# Copyright 2010-2013 Kitware, Inc. # # Distributed under the OSI-approved BSD License (the "License"); # see accompanying file Copyright.txt for details. @@ -216,23 +222,50 @@ set(_JAVA_SYMLINK_SCRIPT ${CMAKE_CURRENT_LIST_DIR}/UseJavaSymlinks.cmake) function(add_jar _TARGET_NAME) - cmake_parse_arguments(_add_jar "" "" "SOURCES;INCLUDE_JARS" ${ARGN}) + # In CMake < 2.8.12, add_jar used variables which were set prior to calling + # add_jar for customizing the behavior of add_jar. In order to be backwards + # compatible, check if any of those variables are set, and use them to + # initialize values of the named arguments. (Giving the corresponding named + # argument will override the value set here.) + # + # New features should use named arguments only. + if(DEFINED CMAKE_JAVA_TARGET_VERSION) + set(_add_jar_VERSION "${CMAKE_JAVA_TARGET_VERSION}") + endif() + if(DEFINED CMAKE_JAVA_TARGET_OUTPUT_DIR) + set(_add_jar_OUTPUT_DIR "${CMAKE_JAVA_TARGET_OUTPUT_DIR}") + endif() + if(DEFINED CMAKE_JAVA_TARGET_OUTPUT_NAME) + set(_add_jar_OUTPUT_NAME "${CMAKE_JAVA_TARGET_OUTPUT_NAME}") + # reset + set(CMAKE_JAVA_TARGET_OUTPUT_NAME) + endif() + if(DEFINED CMAKE_JAVA_JAR_ENTRY_POINT) + set(_add_jar_ENTRY_POINT "${CMAKE_JAVA_JAR_ENTRY_POINT}") + endif() + + cmake_parse_arguments(_add_jar + "" + "VERSION;OUTPUT_DIR;OUTPUT_NAME;ENTRY_POINT" + "SOURCES;INCLUDE_JARS" + ${ARGN} + ) set(_JAVA_SOURCE_FILES ${_add_jar_SOURCES} ${_add_jar_UNPARSED_ARGUMENTS}) - if (NOT DEFINED CMAKE_JAVA_TARGET_OUTPUT_DIR) - set(CMAKE_JAVA_TARGET_OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR}) + if (NOT DEFINED _add_jar_OUTPUT_DIR) + set(_add_jar_OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR}) endif() - if (CMAKE_JAVA_JAR_ENTRY_POINT) - set(_ENTRY_POINT_OPTION e) - set(_ENTRY_POINT_VALUE ${CMAKE_JAVA_JAR_ENTRY_POINT}) + if (_add_jar_ENTRY_POINT) + set(_ENTRY_POINT_OPTION e) + set(_ENTRY_POINT_VALUE ${_add_jar_ENTRY_POINT}) endif () if (LIBRARY_OUTPUT_PATH) set(CMAKE_JAVA_LIBRARY_OUTPUT_PATH ${LIBRARY_OUTPUT_PATH}) else () - set(CMAKE_JAVA_LIBRARY_OUTPUT_PATH ${CMAKE_JAVA_TARGET_OUTPUT_DIR}) + set(CMAKE_JAVA_LIBRARY_OUTPUT_PATH ${_add_jar_OUTPUT_DIR}) endif () set(CMAKE_JAVA_INCLUDE_PATH @@ -242,7 +275,7 @@ function(add_jar _TARGET_NAME) ${CMAKE_JAVA_LIBRARY_OUTPUT_PATH} ) - if (WIN32 AND NOT CYGWIN) + if (WIN32 AND NOT CYGWIN AND CMAKE_HOST_SYSTEM_NAME MATCHES "Windows") set(CMAKE_JAVA_INCLUDE_FLAG_SEP ";") else () set(CMAKE_JAVA_INCLUDE_FLAG_SEP ":") @@ -252,20 +285,18 @@ function(add_jar _TARGET_NAME) set(CMAKE_JAVA_INCLUDE_PATH_FINAL "${CMAKE_JAVA_INCLUDE_PATH_FINAL}${CMAKE_JAVA_INCLUDE_FLAG_SEP}${JAVA_INCLUDE_DIR}") endforeach() - set(CMAKE_JAVA_CLASS_OUTPUT_PATH "${CMAKE_JAVA_TARGET_OUTPUT_DIR}${CMAKE_FILES_DIRECTORY}/${_TARGET_NAME}.dir") + set(CMAKE_JAVA_CLASS_OUTPUT_PATH "${_add_jar_OUTPUT_DIR}${CMAKE_FILES_DIRECTORY}/${_TARGET_NAME}.dir") set(_JAVA_TARGET_OUTPUT_NAME "${_TARGET_NAME}.jar") - if (CMAKE_JAVA_TARGET_OUTPUT_NAME AND CMAKE_JAVA_TARGET_VERSION) - set(_JAVA_TARGET_OUTPUT_NAME "${CMAKE_JAVA_TARGET_OUTPUT_NAME}-${CMAKE_JAVA_TARGET_VERSION}.jar") - set(_JAVA_TARGET_OUTPUT_LINK "${CMAKE_JAVA_TARGET_OUTPUT_NAME}.jar") - elseif (CMAKE_JAVA_TARGET_VERSION) - set(_JAVA_TARGET_OUTPUT_NAME "${_TARGET_NAME}-${CMAKE_JAVA_TARGET_VERSION}.jar") + if (_add_jar_OUTPUT_NAME AND _add_jar_VERSION) + set(_JAVA_TARGET_OUTPUT_NAME "${_add_jar_OUTPUT_NAME}-${_add_jar_VERSION}.jar") + set(_JAVA_TARGET_OUTPUT_LINK "${_add_jar_OUTPUT_NAME}.jar") + elseif (_add_jar_VERSION) + set(_JAVA_TARGET_OUTPUT_NAME "${_TARGET_NAME}-${_add_jar_VERSION}.jar") set(_JAVA_TARGET_OUTPUT_LINK "${_TARGET_NAME}.jar") - elseif (CMAKE_JAVA_TARGET_OUTPUT_NAME) - set(_JAVA_TARGET_OUTPUT_NAME "${CMAKE_JAVA_TARGET_OUTPUT_NAME}.jar") + elseif (_add_jar_OUTPUT_NAME) + set(_JAVA_TARGET_OUTPUT_NAME "${_add_jar_OUTPUT_NAME}.jar") endif () - # reset - set(CMAKE_JAVA_TARGET_OUTPUT_NAME) set(_JAVA_CLASS_FILES) set(_JAVA_COMPILE_FILES) @@ -279,7 +310,7 @@ function(add_jar _TARGET_NAME) get_filename_component(_JAVA_FULL ${_JAVA_SOURCE_FILE} ABSOLUTE) if (_JAVA_EXT MATCHES ".java") - file(RELATIVE_PATH _JAVA_REL_BINARY_PATH ${CMAKE_JAVA_TARGET_OUTPUT_DIR} ${_JAVA_FULL}) + file(RELATIVE_PATH _JAVA_REL_BINARY_PATH ${_add_jar_OUTPUT_DIR} ${_JAVA_FULL}) file(RELATIVE_PATH _JAVA_REL_SOURCE_PATH ${CMAKE_CURRENT_SOURCE_DIR} ${_JAVA_FULL}) string(LENGTH ${_JAVA_REL_BINARY_PATH} _BIN_LEN) string(LENGTH ${_JAVA_REL_SOURCE_PATH} _SRC_LEN) @@ -337,6 +368,11 @@ function(add_jar _TARGET_NAME) endif() if (_JAVA_COMPILE_FILES) + # Create the list of files to compile. + set(_JAVA_SOURCES_FILE ${CMAKE_JAVA_CLASS_OUTPUT_PATH}/java_sources) + string(REPLACE ";" "\"\n\"" _JAVA_COMPILE_STRING "\"${_JAVA_COMPILE_FILES}\"") + file(WRITE ${_JAVA_SOURCES_FILE} ${_JAVA_COMPILE_STRING}) + # Compile the java files and create a list of class files add_custom_command( # NOTE: this command generates an artificial dependency file @@ -345,7 +381,7 @@ function(add_jar _TARGET_NAME) ${CMAKE_JAVA_COMPILE_FLAGS} -classpath "${CMAKE_JAVA_INCLUDE_PATH_FINAL}" -d ${CMAKE_JAVA_CLASS_OUTPUT_PATH} - ${_JAVA_COMPILE_FILES} + @${_JAVA_SOURCES_FILE} COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_JAVA_CLASS_OUTPUT_PATH}/java_compiled_${_TARGET_NAME} DEPENDS ${_JAVA_COMPILE_FILES} ${_JAVA_COMPILE_DEPENDS} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} @@ -364,7 +400,7 @@ function(add_jar _TARGET_NAME) # create the jar file set(_JAVA_JAR_OUTPUT_PATH - ${CMAKE_JAVA_TARGET_OUTPUT_DIR}/${_JAVA_TARGET_OUTPUT_NAME}) + ${_add_jar_OUTPUT_DIR}/${_JAVA_TARGET_OUTPUT_NAME}) if (CMAKE_JNI_TARGET) add_custom_command( OUTPUT ${_JAVA_JAR_OUTPUT_PATH} @@ -372,12 +408,12 @@ function(add_jar _TARGET_NAME) -cf${_ENTRY_POINT_OPTION} ${_JAVA_JAR_OUTPUT_PATH} ${_ENTRY_POINT_VALUE} ${_JAVA_RESOURCE_FILES} @java_class_filelist COMMAND ${CMAKE_COMMAND} - -D_JAVA_TARGET_DIR=${CMAKE_JAVA_TARGET_OUTPUT_DIR} + -D_JAVA_TARGET_DIR=${_add_jar_OUTPUT_DIR} -D_JAVA_TARGET_OUTPUT_NAME=${_JAVA_TARGET_OUTPUT_NAME} -D_JAVA_TARGET_OUTPUT_LINK=${_JAVA_TARGET_OUTPUT_LINK} -P ${_JAVA_SYMLINK_SCRIPT} COMMAND ${CMAKE_COMMAND} - -D_JAVA_TARGET_DIR=${CMAKE_JAVA_TARGET_OUTPUT_DIR} + -D_JAVA_TARGET_DIR=${_add_jar_OUTPUT_DIR} -D_JAVA_TARGET_OUTPUT_NAME=${_JAVA_JAR_OUTPUT_PATH} -D_JAVA_TARGET_OUTPUT_LINK=${_JAVA_TARGET_OUTPUT_LINK} -P ${_JAVA_SYMLINK_SCRIPT} @@ -392,7 +428,7 @@ function(add_jar _TARGET_NAME) -cf${_ENTRY_POINT_OPTION} ${_JAVA_JAR_OUTPUT_PATH} ${_ENTRY_POINT_VALUE} ${_JAVA_RESOURCE_FILES} @java_class_filelist COMMAND ${CMAKE_COMMAND} - -D_JAVA_TARGET_DIR=${CMAKE_JAVA_TARGET_OUTPUT_DIR} + -D_JAVA_TARGET_DIR=${_add_jar_OUTPUT_DIR} -D_JAVA_TARGET_OUTPUT_NAME=${_JAVA_TARGET_OUTPUT_NAME} -D_JAVA_TARGET_OUTPUT_LINK=${_JAVA_TARGET_OUTPUT_LINK} -P ${_JAVA_SYMLINK_SCRIPT} @@ -420,7 +456,7 @@ function(add_jar _TARGET_NAME) PROPERTY INSTALL_FILES ${_JAVA_JAR_OUTPUT_PATH} - ${CMAKE_JAVA_TARGET_OUTPUT_DIR}/${_JAVA_TARGET_OUTPUT_LINK} + ${_add_jar_OUTPUT_DIR}/${_JAVA_TARGET_OUTPUT_LINK} ) if (CMAKE_JNI_TARGET) @@ -429,7 +465,7 @@ function(add_jar _TARGET_NAME) ${_TARGET_NAME} PROPERTY JNI_SYMLINK - ${CMAKE_JAVA_TARGET_OUTPUT_DIR}/${_JAVA_TARGET_OUTPUT_LINK} + ${_add_jar_OUTPUT_DIR}/${_JAVA_TARGET_OUTPUT_LINK} ) endif () endif () diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index f0519fe7c..8412e3e86 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -11,7 +11,11 @@ #============================================================================= include(CheckIncludeFile) # Check if we can build support for ELF parsing. -CHECK_INCLUDE_FILE("elf.h" HAVE_ELF_H) +if(CMAKE_CXX_PLATFORM_ID MATCHES "OpenBSD") + CHECK_INCLUDE_FILES("stdint.h;elf_abi.h" HAVE_ELF_H) +else() + CHECK_INCLUDE_FILE("elf.h" HAVE_ELF_H) +endif() if(HAVE_ELF_H) set(CMAKE_USE_ELF_PARSER 1) else() @@ -113,7 +117,8 @@ endif() set(SRCS cmStandardIncludes.cxx cmArchiveWrite.cxx - cmBootstrapCommands.cxx + cmBootstrapCommands1.cxx + cmBootstrapCommands2.cxx cmCacheManager.cxx cmCacheManager.h cmCommands.cxx @@ -359,6 +364,10 @@ if (WIN32) cmLocalVisualStudio7Generator.h cmLocalVisualStudioGenerator.cxx cmLocalVisualStudioGenerator.h + cmVisualStudioSlnData.h + cmVisualStudioSlnData.cxx + cmVisualStudioSlnParser.h + cmVisualStudioSlnParser.cxx cmVisualStudioWCEPlatformParser.h cmVisualStudioWCEPlatformParser.cxx cmWin32ProcessExecution.cxx @@ -385,7 +394,7 @@ if(WIN32 AND NOT CYGWIN AND NOT BORLAND) set_source_files_properties(cmcldeps.cxx PROPERTIES COMPILE_DEFINITIONS _WIN32_WINNT=0x0501) add_executable(cmcldeps cmcldeps.cxx) target_link_libraries(cmcldeps CMakeLib) - install_targets(/bin cmcldeps) + install(TARGETS cmcldeps DESTINATION bin) endif() # create a library used by the command line and the GUI @@ -539,12 +548,13 @@ endif() add_executable(cmake cmakemain.cxx) target_link_libraries(cmake CMakeLib) -# Build special executable for running programs on Windows 98 +# Build special executable for running programs on Windows 98. +# Included on any Windows (unconditional packaging required!). if(WIN32) if(NOT UNIX) add_executable(cmw9xcom cmw9xcom.cxx) target_link_libraries(cmw9xcom CMakeLib) - install_targets(/bin cmw9xcom) + install(TARGETS cmw9xcom DESTINATION bin) endif() endif() @@ -570,11 +580,9 @@ endif() include (${CMake_BINARY_DIR}/Source/LocalUserOptions.cmake OPTIONAL) include (${CMake_SOURCE_DIR}/Source/LocalUserOptions.cmake OPTIONAL) -install_targets(/bin cmake) -install_targets(/bin ctest) -install_targets(/bin cpack) +install(TARGETS cmake ctest cpack DESTINATION bin) if(APPLE) - install_targets(/bin cmakexbuild) + install(TARGETS cmakexbuild DESTINATION bin) endif() -install_files(${CMAKE_DATA_DIR}/include cmCPluginAPI.h) +install(FILES cmCPluginAPI.h DESTINATION ${CMAKE_DATA_DIR}/include) diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index a8b890775..63751fb89 100644 --- a/Source/CMakeVersion.cmake +++ b/Source/CMakeVersion.cmake @@ -1,6 +1,6 @@ # CMake version number components. set(CMake_VERSION_MAJOR 2) set(CMake_VERSION_MINOR 8) -set(CMake_VERSION_PATCH 11) -set(CMake_VERSION_TWEAK 2) +set(CMake_VERSION_PATCH 12) +set(CMake_VERSION_TWEAK 0) #set(CMake_VERSION_RC 0) diff --git a/Source/CPack/WiX/cmCPackWIXGenerator.cxx b/Source/CPack/WiX/cmCPackWIXGenerator.cxx index e8b0ea971..cc9dec7b8 100644 --- a/Source/CPack/WiX/cmCPackWIXGenerator.cxx +++ b/Source/CPack/WiX/cmCPackWIXGenerator.cxx @@ -100,6 +100,11 @@ bool cmCPackWIXGenerator::RunLightCommand(const std::string& objectFiles) command << " -nologo"; command << " -out " << QuotePath(packageFileNames.at(0)); command << " -ext WixUIExtension"; + const char* const cultures = GetOption("CPACK_WIX_CULTURES"); + if(cultures) + { + command << " -cultures:" << cultures; + } command << " " << objectFiles; return RunWiXCommand(command.str()); @@ -224,6 +229,9 @@ bool cmCPackWIXGenerator::CreateWiXVariablesIncludeFile() CopyDefinition(includeFile, "CPACK_WIX_PRODUCT_ICON"); CopyDefinition(includeFile, "CPACK_WIX_UI_BANNER"); CopyDefinition(includeFile, "CPACK_WIX_UI_DIALOG"); + SetOptionIfNotSet("CPACK_WIX_PROGRAM_MENU_FOLDER", + GetOption("CPACK_PACKAGE_NAME")); + CopyDefinition(includeFile, "CPACK_WIX_PROGRAM_MENU_FOLDER"); return true; } @@ -339,25 +347,114 @@ bool cmCPackWIXGenerator::CreateWiXSourceFiles() featureDefinitions.BeginElement("FeatureRef"); featureDefinitions.AddAttribute("Id", "ProductFeature"); + const char *cpackPackageExecutables = GetOption("CPACK_PACKAGE_EXECUTABLES"); + std::vector cpackPkgExecutables; + std::string regKey; + if ( cpackPackageExecutables ) + { + cmSystemTools::ExpandListArgument(cpackPackageExecutables, + cpackPkgExecutables); + if ( cpackPkgExecutables.size() % 2 != 0 ) + { + cmCPackLogger(cmCPackLog::LOG_ERROR, + "CPACK_PACKAGE_EXECUTABLES should contain pairs of and " + "." << std::endl); + cpackPkgExecutables.clear(); + } + + const char *cpackVendor = GetOption("CPACK_PACKAGE_VENDOR"); + const char *cpackPkgName = GetOption("CPACK_PACKAGE_NAME"); + if (!cpackVendor || !cpackPkgName) + { + cmCPackLogger(cmCPackLog::LOG_WARNING, "CPACK_PACKAGE_VENDOR and " + "CPACK_PACKAGE_NAME must be defined for shortcut creation" << std::endl); + cpackPkgExecutables.clear(); + } + else + { + regKey = std::string("Software/") + cpackVendor + "/" + cpackPkgName; + } + } + + std::vector dirIdExecutables; AddDirectoryAndFileDefinitons( toplevel, "INSTALL_ROOT", directoryDefinitions, fileDefinitions, featureDefinitions, - directoryCounter, fileCounter); + directoryCounter, fileCounter, cpackPkgExecutables, dirIdExecutables); - featureDefinitions.EndElement(); - featureDefinitions.EndElement(); - fileDefinitions.EndElement(); + directoryDefinitions.EndElement(); + directoryDefinitions.EndElement(); - for(size_t i = 1; i < install_root.size(); ++i) + if (dirIdExecutables.size() > 0 && dirIdExecutables.size() % 3 == 0) { - directoryDefinitions.EndElement(); - } + fileDefinitions.BeginElement("DirectoryRef"); + fileDefinitions.AddAttribute("Id", "PROGRAM_MENU_FOLDER"); + fileDefinitions.BeginElement("Component"); + fileDefinitions.AddAttribute("Id", "SHORTCUT"); + fileDefinitions.AddAttribute("Guid", "*"); - directoryDefinitions.EndElement(); - directoryDefinitions.EndElement(); + std::vector::iterator it; + for ( it = dirIdExecutables.begin() ; + it != dirIdExecutables.end(); + ++it) + { + std::string fileName = *it++; + std::string iconName = *it++; + std::string directoryId = *it; + + fileDefinitions.BeginElement("Shortcut"); + std::string shortcutName = fileName; // the iconName is mor likely to contain blanks early on + std::string::size_type const dotPos = shortcutName.find('.'); + if(std::string::npos == dotPos) + { shortcutName = shortcutName.substr(0, dotPos); } + fileDefinitions.AddAttribute("Id", "SHORTCUT_" + shortcutName); + fileDefinitions.AddAttribute("Name", iconName); + std::string target = "[" + directoryId + "]" + fileName; + fileDefinitions.AddAttribute("Target", target); + fileDefinitions.AddAttribute("WorkingDirectory", directoryId); + fileDefinitions.EndElement(); + } + fileDefinitions.BeginElement("Shortcut"); + fileDefinitions.AddAttribute("Id", "UNINSTALL"); + std::string pkgName = GetOption("CPACK_PACKAGE_NAME"); + fileDefinitions.AddAttribute("Name", "Uninstall " + pkgName); + fileDefinitions.AddAttribute("Description", "Uninstalls " + pkgName); + fileDefinitions.AddAttribute("Target", "[SystemFolder]msiexec.exe"); + fileDefinitions.AddAttribute("Arguments", "/x [ProductCode]"); + fileDefinitions.EndElement(); + fileDefinitions.BeginElement("RemoveFolder"); + fileDefinitions.AddAttribute("Id", "PROGRAM_MENU_FOLDER"); + fileDefinitions.AddAttribute("On", "uninstall"); + fileDefinitions.EndElement(); + fileDefinitions.BeginElement("RegistryValue"); + fileDefinitions.AddAttribute("Root", "HKCU"); + fileDefinitions.AddAttribute("Key", regKey); + fileDefinitions.AddAttribute("Name", "installed"); + fileDefinitions.AddAttribute("Type", "integer"); + fileDefinitions.AddAttribute("Value", "1"); + fileDefinitions.AddAttribute("KeyPath", "yes"); + + featureDefinitions.BeginElement("ComponentRef"); + featureDefinitions.AddAttribute("Id", "SHORTCUT"); + featureDefinitions.EndElement(); + directoryDefinitions.BeginElement("Directory"); + directoryDefinitions.AddAttribute("Id", "ProgramMenuFolder"); + directoryDefinitions.BeginElement("Directory"); + directoryDefinitions.AddAttribute("Id", "PROGRAM_MENU_FOLDER"); + const char *startMenuFolder = GetOption("CPACK_WIX_PROGRAM_MENU_FOLDER"); + directoryDefinitions.AddAttribute("Name", startMenuFolder); + } + + featureDefinitions.EndElement(); + featureDefinitions.EndElement(); + fileDefinitions.EndElement(); directoryDefinitions.EndElement(); std::string wixTemplate = FindTemplate("WIX.template.in"); + if(GetOption("CPACK_WIX_TEMPLATE") != 0) + { + wixTemplate = GetOption("CPACK_WIX_TEMPLATE"); + } if(wixTemplate.empty()) { cmCPackLogger(cmCPackLog::LOG_ERROR, @@ -435,7 +532,9 @@ void cmCPackWIXGenerator::AddDirectoryAndFileDefinitons( cmWIXSourceWriter& fileDefinitions, cmWIXSourceWriter& featureDefinitions, size_t& directoryCounter, - size_t& fileCounter) + size_t& fileCounter, + const std::vector& pkgExecutables, + std::vector& dirIdExecutables) { cmsys::Directory dir; dir.Load(topdir.c_str()); @@ -467,8 +566,9 @@ void cmCPackWIXGenerator::AddDirectoryAndFileDefinitons( fileDefinitions, featureDefinitions, directoryCounter, - fileCounter); - + fileCounter, + pkgExecutables, + dirIdExecutables); directoryDefinitions.EndElement(); } else @@ -499,6 +599,23 @@ void cmCPackWIXGenerator::AddDirectoryAndFileDefinitons( featureDefinitions.BeginElement("ComponentRef"); featureDefinitions.AddAttribute("Id", componentId); featureDefinitions.EndElement(); + + std::vector::const_iterator it; + for (it = pkgExecutables.begin() ; + it != pkgExecutables.end() ; + ++it) + { + std::string execName = *it++; + std::string iconName = *it; + + if (cmSystemTools::LowerCase(fileName) == + cmSystemTools::LowerCase(execName) + ".exe") + { + dirIdExecutables.push_back(fileName); + dirIdExecutables.push_back(iconName); + dirIdExecutables.push_back(directoryId); + } + } } } } diff --git a/Source/CPack/WiX/cmCPackWIXGenerator.h b/Source/CPack/WiX/cmCPackWIXGenerator.h index 0e95d70f6..aaccf9d46 100644 --- a/Source/CPack/WiX/cmCPackWIXGenerator.h +++ b/Source/CPack/WiX/cmCPackWIXGenerator.h @@ -83,7 +83,11 @@ private: cmWIXSourceWriter& fileDefinitions, cmWIXSourceWriter& featureDefinitions, size_t& directoryCounter, - size_t& fileCounter); + size_t& fileCounter, + const std::vector& pkgExecutables, + std::vector& dirIdExecutables + ); + bool RequireOption(const std::string& name, std::string& value) const; diff --git a/Source/CPack/cmCPackDocumentVariables.cxx b/Source/CPack/cmCPackDocumentVariables.cxx index 6a841fa8d..8b16ae985 100644 --- a/Source/CPack/cmCPackDocumentVariables.cxx +++ b/Source/CPack/cmCPackDocumentVariables.cxx @@ -28,7 +28,7 @@ void cmCPackDocumentVariables::DefineVariables(cmake* cm) " the so-called top level directory. The purpose of" " is to include (set to 1 or ON or TRUE) the top level directory" " in the package or not (set to 0 or OFF or FALSE).\n" - "Each CPack generator as a built-in default value for this" + "Each CPack generator has a built-in default value for this" " variable. E.g. Archive generators (ZIP, TGZ, ...) includes" " the top level whereas RPM or DEB don't. The user may override" " the default value by setting this variable.\n" @@ -60,7 +60,7 @@ void cmCPackDocumentVariables::DefineVariables(cmake* cm) "It is usually invoked like this:\n" " make DESTDIR=/home/john install\n" "which will install the concerned software using the" - " installation prefix, e.g. \"/usr/local\" pre-pended with " + " installation prefix, e.g. \"/usr/local\" prepended with " "the DESTDIR value which finally gives \"/home/john/usr/local\"." " When preparing a package, CPack first installs the items to be " "packaged in a local (to the build tree) directory by using the " diff --git a/Source/CPack/cmCPackGenerator.cxx b/Source/CPack/cmCPackGenerator.cxx index 7cc152269..3c685bd9d 100644 --- a/Source/CPack/cmCPackGenerator.cxx +++ b/Source/CPack/cmCPackGenerator.cxx @@ -638,7 +638,7 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects( = this->MakefileMap->GetDefinition("CMAKE_MAKE_PROGRAM"); std::string buildCommand = globalGenerator->GenerateBuildCommand(cmakeMakeProgram, - installProjectName.c_str(), 0, + installProjectName.c_str(), 0, 0, globalGenerator->GetPreinstallTargetName(), buildConfig, false, false); cmCPackLogger(cmCPackLog::LOG_DEBUG, diff --git a/Source/CTest/cmCTestBatchTestHandler.cxx b/Source/CTest/cmCTestBatchTestHandler.cxx index a22c7be41..934481b88 100644 --- a/Source/CTest/cmCTestBatchTestHandler.cxx +++ b/Source/CTest/cmCTestBatchTestHandler.cxx @@ -89,7 +89,7 @@ void cmCTestBatchTestHandler::WriteTestCommand(int test, std::fstream& fout) command = cmSystemTools::ConvertToOutputPath(command.c_str()); //Prepends memcheck args to our command string if this is a memcheck - this->TestHandler->GenerateTestCommand(processArgs); + this->TestHandler->GenerateTestCommand(processArgs, test); processArgs.push_back(command); for(std::vector::iterator arg = processArgs.begin(); diff --git a/Source/CTest/cmCTestBuildCommand.cxx b/Source/CTest/cmCTestBuildCommand.cxx index f4d38cef1..1f63185c1 100644 --- a/Source/CTest/cmCTestBuildCommand.cxx +++ b/Source/CTest/cmCTestBuildCommand.cxx @@ -130,10 +130,11 @@ cmCTestGenericHandler* cmCTestBuildCommand::InitializeHandler() cmakeBuildConfiguration = config; } + std::string dir = this->CTest->GetCTestConfiguration("BuildDirectory"); std::string buildCommand = this->GlobalGenerator-> GenerateBuildCommand(cmakeMakeProgram, - cmakeProjectName, + cmakeProjectName, dir.c_str(), cmakeBuildAdditionalFlags, cmakeBuildTarget, cmakeBuildConfiguration, true, false); cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, diff --git a/Source/CTest/cmCTestConfigureCommand.cxx b/Source/CTest/cmCTestConfigureCommand.cxx index d6d39a98f..db33cb68e 100644 --- a/Source/CTest/cmCTestConfigureCommand.cxx +++ b/Source/CTest/cmCTestConfigureCommand.cxx @@ -31,32 +31,6 @@ cmCTestGenericHandler* cmCTestConfigureCommand::InitializeHandler() cmSystemTools::ExpandListArgument(this->Values[ctc_OPTIONS], options); } - if ( this->Values[ct_BUILD] ) - { - this->CTest->SetCTestConfiguration("BuildDirectory", - cmSystemTools::CollapseFullPath( - this->Values[ct_BUILD]).c_str()); - } - else - { - this->CTest->SetCTestConfiguration("BuildDirectory", - cmSystemTools::CollapseFullPath( - this->Makefile->GetSafeDefinition("CTEST_BINARY_DIRECTORY")).c_str()); - } - - if ( this->Values[ct_SOURCE] ) - { - this->CTest->SetCTestConfiguration("SourceDirectory", - cmSystemTools::CollapseFullPath( - this->Values[ct_SOURCE]).c_str()); - } - else - { - this->CTest->SetCTestConfiguration("SourceDirectory", - cmSystemTools::CollapseFullPath( - this->Makefile->GetSafeDefinition("CTEST_SOURCE_DIRECTORY")).c_str()); - } - if ( this->CTest->GetCTestConfiguration("BuildDirectory").empty() ) { this->SetError("Build directory not specified. Either use BUILD " diff --git a/Source/CTest/cmCTestHandlerCommand.cxx b/Source/CTest/cmCTestHandlerCommand.cxx index 453e32ce2..2e2feb047 100644 --- a/Source/CTest/cmCTestHandlerCommand.cxx +++ b/Source/CTest/cmCTestHandlerCommand.cxx @@ -70,19 +70,6 @@ bool cmCTestHandlerCommand this->CTest->SetConfigType(ctestConfigType); } - cmCTestLog(this->CTest, DEBUG, "Initialize handler" << std::endl;); - cmCTestGenericHandler* handler = this->InitializeHandler(); - if ( !handler ) - { - cmCTestLog(this->CTest, ERROR_MESSAGE, - "Cannot instantiate test handler " << this->GetName() - << std::endl); - return false; - } - - handler->SetAppendXML(this->AppendXML); - - handler->PopulateCustomVectors(this->Makefile); if ( this->Values[ct_BUILD] ) { this->CTest->SetCTestConfiguration("BuildDirectory", @@ -119,6 +106,20 @@ bool cmCTestHandlerCommand cmSystemTools::CollapseFullPath( this->Makefile->GetSafeDefinition("CTEST_SOURCE_DIRECTORY")).c_str()); } + + cmCTestLog(this->CTest, DEBUG, "Initialize handler" << std::endl;); + cmCTestGenericHandler* handler = this->InitializeHandler(); + if ( !handler ) + { + cmCTestLog(this->CTest, ERROR_MESSAGE, + "Cannot instantiate test handler " << this->GetName() + << std::endl); + return false; + } + + handler->SetAppendXML(this->AppendXML); + + handler->PopulateCustomVectors(this->Makefile); if ( this->Values[ct_SUBMIT_INDEX] ) { if(!this->CTest->GetDropSiteCDash() && this->CTest->GetDartVersion() <= 1) diff --git a/Source/CTest/cmCTestMemCheckHandler.cxx b/Source/CTest/cmCTestMemCheckHandler.cxx index 80218ad38..3ae2ac6a7 100644 --- a/Source/CTest/cmCTestMemCheckHandler.cxx +++ b/Source/CTest/cmCTestMemCheckHandler.cxx @@ -43,8 +43,7 @@ static CatToErrorType cmCTestMemCheckBoundsChecker[] = { {0,0} }; -// parse the xml file storing the installed version of Xcode on -// the machine +// parse the xml file containing the results of last BoundsChecker run class cmBoundsCheckerParser : public cmXMLParser { public: @@ -201,6 +200,7 @@ void cmCTestMemCheckHandler::Initialize() this->CustomMaximumPassedTestOutputSize = 0; this->CustomMaximumFailedTestOutputSize = 0; this->MemoryTester = ""; + this->MemoryTesterDynamicOptions.clear(); this->MemoryTesterOptions.clear(); this->MemoryTesterStyle = UNKNOWN; this->MemoryTesterOutputFile = ""; @@ -243,12 +243,28 @@ int cmCTestMemCheckHandler::PostProcessHandler() //---------------------------------------------------------------------- void cmCTestMemCheckHandler::GenerateTestCommand( - std::vector& args) + std::vector& args, int test) { std::vector::size_type pp; - std::string memcheckcommand = ""; - memcheckcommand + cmStdString index; + cmOStringStream stream; + std::string memcheckcommand = cmSystemTools::ConvertToOutputPath(this->MemoryTester.c_str()); + stream << test; + index = stream.str(); + for ( pp = 0; pp < this->MemoryTesterDynamicOptions.size(); pp ++ ) + { + cmStdString arg = this->MemoryTesterDynamicOptions[pp]; + cmStdString::size_type pos = arg.find("??"); + if (pos != cmStdString::npos) + { + arg.replace(pos, 2, index); + } + args.push_back(arg); + memcheckcommand += " \""; + memcheckcommand += arg; + memcheckcommand += "\""; + } for ( pp = 0; pp < this->MemoryTesterOptions.size(); pp ++ ) { args.push_back(this->MemoryTesterOptions[pp]); @@ -461,13 +477,6 @@ bool cmCTestMemCheckHandler::InitializeMemoryChecking() return false; } - if ( this->MemoryTester[0] == '\"' && - this->MemoryTester[this->MemoryTester.size()-1] == '\"' ) - { - this->MemoryTester - = this->MemoryTester.substr(1, this->MemoryTester.size()-2); - } - // Setup the options std::string memoryTesterOptions; if ( this->CTest->GetCTestConfiguration( @@ -486,18 +495,19 @@ bool cmCTestMemCheckHandler::InitializeMemoryChecking() = cmSystemTools::ParseArguments(memoryTesterOptions.c_str()); this->MemoryTesterOutputFile - = this->CTest->GetBinaryDir() + "/Testing/Temporary/MemoryChecker.log"; + = this->CTest->GetBinaryDir() + + "/Testing/Temporary/MemoryChecker.??.log"; switch ( this->MemoryTesterStyle ) { case cmCTestMemCheckHandler::VALGRIND: + { if ( this->MemoryTesterOptions.empty() ) { this->MemoryTesterOptions.push_back("-q"); this->MemoryTesterOptions.push_back("--tool=memcheck"); this->MemoryTesterOptions.push_back("--leak-check=yes"); this->MemoryTesterOptions.push_back("--show-reachable=yes"); - this->MemoryTesterOptions.push_back("--workaround-gcc296-bugs=yes"); this->MemoryTesterOptions.push_back("--num-callers=50"); } if ( this->CTest->GetCTestConfiguration( @@ -516,7 +526,11 @@ bool cmCTestMemCheckHandler::InitializeMemoryChecking() + this->CTest->GetCTestConfiguration("MemoryCheckSuppressionFile"); this->MemoryTesterOptions.push_back(suppressions); } + std::string outputFile = "--log-file=" + + this->MemoryTesterOutputFile; + this->MemoryTesterDynamicOptions.push_back(outputFile); break; + } case cmCTestMemCheckHandler::PURIFY: { std::string outputFile; @@ -542,19 +556,19 @@ bool cmCTestMemCheckHandler::InitializeMemoryChecking() outputFile = "-log-file="; #endif outputFile += this->MemoryTesterOutputFile; - this->MemoryTesterOptions.push_back(outputFile); + this->MemoryTesterDynamicOptions.push_back(outputFile); break; } case cmCTestMemCheckHandler::BOUNDS_CHECKER: { this->BoundsCheckerXMLFile = this->MemoryTesterOutputFile; std::string dpbdFile = this->CTest->GetBinaryDir() - + "/Testing/Temporary/MemoryChecker.DPbd"; + + "/Testing/Temporary/MemoryChecker.??.DPbd"; this->BoundsCheckerDPBDFile = dpbdFile; - this->MemoryTesterOptions.push_back("/B"); - this->MemoryTesterOptions.push_back(dpbdFile); - this->MemoryTesterOptions.push_back("/X"); - this->MemoryTesterOptions.push_back(this->MemoryTesterOutputFile); + this->MemoryTesterDynamicOptions.push_back("/B"); + this->MemoryTesterDynamicOptions.push_back(dpbdFile); + this->MemoryTesterDynamicOptions.push_back("/X"); + this->MemoryTesterDynamicOptions.push_back(this->MemoryTesterOutputFile); this->MemoryTesterOptions.push_back("/M"); break; } @@ -902,25 +916,23 @@ bool cmCTestMemCheckHandler::ProcessMemCheckBoundsCheckerOutput( // This method puts the bounds checker output file into the output // for the test void -cmCTestMemCheckHandler::PostProcessBoundsCheckerTest(cmCTestTestResult& res) +cmCTestMemCheckHandler::PostProcessBoundsCheckerTest(cmCTestTestResult& res, + int test) { cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "PostProcessBoundsCheckerTest for : " << res.Name.c_str() << std::endl); - if ( !cmSystemTools::FileExists(this->MemoryTesterOutputFile.c_str()) ) + cmStdString ofile = testOutputFileName(test); + if ( ofile.empty() ) { - std::string log = "Cannot find memory tester output file: " - + this->MemoryTesterOutputFile; - cmCTestLog(this->CTest, ERROR_MESSAGE, log.c_str() << std::endl); return; } // put a scope around this to close ifs so the file can be removed { - std::ifstream ifs(this->MemoryTesterOutputFile.c_str()); + std::ifstream ifs(ofile.c_str()); if ( !ifs ) { - std::string log = "Cannot read memory tester output file: " - + this->MemoryTesterOutputFile; + std::string log = "Cannot read memory tester output file: " + ofile; cmCTestLog(this->CTest, ERROR_MESSAGE, log.c_str() << std::endl); return; } @@ -943,23 +955,39 @@ cmCTestMemCheckHandler::PostProcessBoundsCheckerTest(cmCTestTestResult& res) } void -cmCTestMemCheckHandler::PostProcessPurifyTest(cmCTestTestResult& res) +cmCTestMemCheckHandler::PostProcessPurifyTest(cmCTestTestResult& res, + int test) { cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "PostProcessPurifyTest for : " << res.Name.c_str() << std::endl); - if ( !cmSystemTools::FileExists(this->MemoryTesterOutputFile.c_str()) ) + appendMemTesterOutput(res, test); +} + +void +cmCTestMemCheckHandler::PostProcessValgrindTest(cmCTestTestResult& res, + int test) +{ + cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, + "PostProcessValgrindTest for : " + << res.Name.c_str() << std::endl); + appendMemTesterOutput(res, test); +} + +void +cmCTestMemCheckHandler::appendMemTesterOutput(cmCTestTestResult& res, + int test) +{ + cmStdString ofile = testOutputFileName(test); + + if ( ofile.empty() ) { - std::string log = "Cannot find memory tester output file: " - + this->MemoryTesterOutputFile; - cmCTestLog(this->CTest, ERROR_MESSAGE, log.c_str() << std::endl); return; } - std::ifstream ifs(this->MemoryTesterOutputFile.c_str()); + std::ifstream ifs(ofile.c_str()); if ( !ifs ) { - std::string log = "Cannot read memory tester output file: " - + this->MemoryTesterOutputFile; + std::string log = "Cannot read memory tester output file: " + ofile; cmCTestLog(this->CTest, ERROR_MESSAGE, log.c_str() << std::endl); return; } @@ -970,3 +998,25 @@ cmCTestMemCheckHandler::PostProcessPurifyTest(cmCTestTestResult& res) res.Output += "\n"; } } + +cmStdString +cmCTestMemCheckHandler::testOutputFileName(int test) +{ + cmStdString index; + cmOStringStream stream; + stream << test; + index = stream.str(); + cmStdString ofile = this->MemoryTesterOutputFile; + cmStdString::size_type pos = ofile.find("??"); + ofile.replace(pos, 2, index); + + if ( !cmSystemTools::FileExists(ofile.c_str()) ) + { + std::string log = "Cannot find memory tester output file: " + + ofile; + cmCTestLog(this->CTest, ERROR_MESSAGE, log.c_str() << std::endl); + ofile = ""; + } + + return ofile; +} diff --git a/Source/CTest/cmCTestMemCheckHandler.h b/Source/CTest/cmCTestMemCheckHandler.h index 1e81c893b..040d2e092 100644 --- a/Source/CTest/cmCTestMemCheckHandler.h +++ b/Source/CTest/cmCTestMemCheckHandler.h @@ -37,7 +37,7 @@ public: protected: virtual int PreProcessHandler(); virtual int PostProcessHandler(); - virtual void GenerateTestCommand(std::vector& args); + virtual void GenerateTestCommand(std::vector& args, int test); private: @@ -89,6 +89,7 @@ private: std::string BoundsCheckerDPBDFile; std::string BoundsCheckerXMLFile; std::string MemoryTester; + std::vector MemoryTesterDynamicOptions; std::vector MemoryTesterOptions; int MemoryTesterStyle; std::string MemoryTesterOutputFile; @@ -117,8 +118,16 @@ private: bool ProcessMemCheckBoundsCheckerOutput(const std::string& str, std::string& log, int* results); - void PostProcessPurifyTest(cmCTestTestResult& res); - void PostProcessBoundsCheckerTest(cmCTestTestResult& res); + void PostProcessPurifyTest(cmCTestTestResult& res, int test); + void PostProcessBoundsCheckerTest(cmCTestTestResult& res, int test); + void PostProcessValgrindTest(cmCTestTestResult& res, int test); + + ///! append MemoryTesterOutputFile to the test log + void appendMemTesterOutput(cmCTestTestHandler::cmCTestTestResult& res, + int test); + + ///! generate the output filename for the given test index + cmStdString testOutputFileName(int test); }; #endif diff --git a/Source/CTest/cmCTestRunTest.cxx b/Source/CTest/cmCTestRunTest.cxx index 5eabf3fbe..0e2fa41b9 100644 --- a/Source/CTest/cmCTestRunTest.cxx +++ b/Source/CTest/cmCTestRunTest.cxx @@ -166,6 +166,7 @@ bool cmCTestRunTest::EndTest(size_t completed, size_t total, bool started) { found = true; reason = "Required regular expression found."; + break; } } if ( !found ) @@ -196,6 +197,7 @@ bool cmCTestRunTest::EndTest(size_t completed, size_t total, bool started) reason += passIt->second; reason += "]"; forceFail = true; + break; } } } @@ -384,13 +386,19 @@ void cmCTestRunTest::MemCheckPostProcess() << this->TestResult.Name.c_str() << std::endl); cmCTestMemCheckHandler * handler = static_cast (this->TestHandler); - if(handler->MemoryTesterStyle == cmCTestMemCheckHandler::BOUNDS_CHECKER) - { - handler->PostProcessBoundsCheckerTest(this->TestResult); - } - else if(handler->MemoryTesterStyle == cmCTestMemCheckHandler::PURIFY) + switch ( handler->MemoryTesterStyle ) { - handler->PostProcessPurifyTest(this->TestResult); + case cmCTestMemCheckHandler::VALGRIND: + handler->PostProcessValgrindTest(this->TestResult, this->Index); + break; + case cmCTestMemCheckHandler::PURIFY: + handler->PostProcessPurifyTest(this->TestResult, this->Index); + break; + case cmCTestMemCheckHandler::BOUNDS_CHECKER: + handler->PostProcessBoundsCheckerTest(this->TestResult, this->Index); + break; + default: + break; } } @@ -516,7 +524,7 @@ void cmCTestRunTest::ComputeArguments() = cmSystemTools::ConvertToOutputPath(this->ActualCommand.c_str()); //Prepends memcheck args to our command string - this->TestHandler->GenerateTestCommand(this->Arguments); + this->TestHandler->GenerateTestCommand(this->Arguments, this->Index); for(std::vector::iterator i = this->Arguments.begin(); i != this->Arguments.end(); ++i) { diff --git a/Source/CTest/cmCTestSubmitHandler.cxx b/Source/CTest/cmCTestSubmitHandler.cxx index 142bb4613..941d34877 100644 --- a/Source/CTest/cmCTestSubmitHandler.cxx +++ b/Source/CTest/cmCTestSubmitHandler.cxx @@ -120,7 +120,7 @@ static size_t cmCTestSubmitHandlerWriteMemoryCallback(void *ptr, size_t size, size_t nmemb, void *data) { - register int realsize = (int)(size * nmemb); + int realsize = (int)(size * nmemb); cmCTestSubmitHandlerVectorOfChar *vec = static_cast(data); diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx index e7491bba3..497774d1b 100644 --- a/Source/CTest/cmCTestTestHandler.cxx +++ b/Source/CTest/cmCTestTestHandler.cxx @@ -82,7 +82,6 @@ bool cmCTestSubdirCommand std::string cwd = cmSystemTools::GetCurrentWorkingDirectory(); for ( it = args.begin(); it != args.end(); ++ it ) { - cmSystemTools::ChangeDirectory(cwd.c_str()); std::string fname; if(cmSystemTools::FileIsFullPath(it->c_str())) @@ -116,7 +115,6 @@ bool cmCTestSubdirCommand else { // No CTestTestfile? Who cares... - cmSystemTools::ChangeDirectory(cwd.c_str()); continue; } fname += "/"; @@ -133,6 +131,7 @@ bool cmCTestSubdirCommand return false; } } + cmSystemTools::ChangeDirectory(cwd.c_str()); return true; } @@ -1108,7 +1107,7 @@ void cmCTestTestHandler::ProcessDirectory(std::vector &passed, } //---------------------------------------------------------------------- -void cmCTestTestHandler::GenerateTestCommand(std::vector&) +void cmCTestTestHandler::GenerateTestCommand(std::vector&, int) { } @@ -1303,10 +1302,9 @@ int cmCTestTestHandler::ExecuteCommands(std::vector& vec) for ( it = vec.begin(); it != vec.end(); ++it ) { int retVal = 0; - std::string cmd = cmSystemTools::ConvertToOutputPath(it->c_str()); - cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Run command: " << cmd + cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Run command: " << *it << std::endl); - if ( !cmSystemTools::RunSingleCommand(cmd.c_str(), 0, &retVal, 0, + if ( !cmSystemTools::RunSingleCommand(it->c_str(), 0, &retVal, 0, cmSystemTools::OUTPUT_MERGE /*this->Verbose*/) || retVal != 0 ) { @@ -1363,7 +1361,7 @@ void cmCTestTestHandler tempPath += filename; attempted.push_back(tempPath); attemptedConfigs.push_back(ctest->GetConfigType()); - // If the file is an OSX bundle then the configtyp + // If the file is an OSX bundle then the configtype // will be at the start of the path tempPath = ctest->GetConfigType(); tempPath += "/"; @@ -1374,7 +1372,7 @@ void cmCTestTestHandler } else { - // no config specified to try some options + // no config specified - try some options... tempPath = filepath; tempPath += "Release/"; tempPath += filename; diff --git a/Source/CTest/cmCTestTestHandler.h b/Source/CTest/cmCTestTestHandler.h index 8e59e5915..93b793b20 100644 --- a/Source/CTest/cmCTestTestHandler.h +++ b/Source/CTest/cmCTestTestHandler.h @@ -153,7 +153,7 @@ protected: // compute a final test list virtual int PreProcessHandler(); virtual int PostProcessHandler(); - virtual void GenerateTestCommand(std::vector& args); + virtual void GenerateTestCommand(std::vector& args, int test); int ExecuteCommands(std::vector& vec); void WriteTestResultHeader(std::ostream& os, cmCTestTestResult* result); diff --git a/Source/CTest/cmParseGTMCoverage.cxx b/Source/CTest/cmParseGTMCoverage.cxx index 5dfcfe50a..6b4adb4bd 100644 --- a/Source/CTest/cmParseGTMCoverage.cxx +++ b/Source/CTest/cmParseGTMCoverage.cxx @@ -98,7 +98,7 @@ bool cmParseGTMCoverage::ReadMCovFile(const char* file) bool found = this->FindMumpsFile(routine, filepath); if(found) { - int lineoffset; + int lineoffset = 0; if(this->FindFunctionInMumpsFile(filepath, function, lineoffset)) @@ -106,8 +106,8 @@ bool cmParseGTMCoverage::ReadMCovFile(const char* file) cmCTestCoverageHandlerContainer::SingleFileCoverageVector& coverageVector = this->Coverage.TotalCoverage[filepath]; coverageVector[lineoffset + linenumber] += count; + lastoffset = lineoffset; } - lastoffset = lineoffset; } else { diff --git a/Source/CTest/cmProcess.cxx b/Source/CTest/cmProcess.cxx index 000bc8503..167b992c9 100644 --- a/Source/CTest/cmProcess.cxx +++ b/Source/CTest/cmProcess.cxx @@ -175,6 +175,14 @@ int cmProcess::GetNextOutputLine(std::string& line, double timeout) // Record exit information. this->ExitValue = cmsysProcess_GetExitValue(this->Process); this->TotalTime = cmSystemTools::GetTime() - this->StartTime; + // Because of a processor clock scew the runtime may become slightly + // negative. If someone changed the system clock while the process was + // running this may be even more. Make sure not to report a negative + // duration here. + if (this->TotalTime <= 0.0) + { + this->TotalTime = 0.0; + } // std::cerr << "Time to run: " << this->TotalTime << "\n"; return cmsysProcess_Pipe_None; } diff --git a/Source/CursesDialog/CMakeLists.txt b/Source/CursesDialog/CMakeLists.txt index 96e28b491..5efc2fb1a 100644 --- a/Source/CursesDialog/CMakeLists.txt +++ b/Source/CursesDialog/CMakeLists.txt @@ -34,4 +34,4 @@ add_executable(ccmake ${CURSES_SRCS} ) target_link_libraries(ccmake CMakeLib) target_link_libraries(ccmake cmForm) -install_targets(/bin ccmake) +install(TARGETS ccmake DESTINATION bin) diff --git a/Source/CursesDialog/form/frm_driver.c b/Source/CursesDialog/form/frm_driver.c index f234722f3..b9611bf10 100644 --- a/Source/CursesDialog/form/frm_driver.c +++ b/Source/CursesDialog/form/frm_driver.c @@ -176,7 +176,7 @@ static int FE_Delete_Previous(FORM *); #define Address_Of_Current_Position_In_Buffer(form) \ Address_Of_Current_Position_In_Nth_Buffer(form,0) -/* Logic to decide wether or not a field is actually a field with +/* Logic to decide whether or not a field is actually a field with vertical or horizontal scrolling */ #define Is_Scroll_Field(field) \ (((field)->drows > (field)->rows) || \ @@ -2100,7 +2100,7 @@ static int Insert_String(FORM *form, int row, char *txt, int len) | the wrapping. | | Return Values : E_OK - no wrapping required or wrapping -| was successfull +| was successful | E_REQUEST_DENIED - | E_SYSTEM_ERROR - some system error +--------------------------------------------------------------------------*/ @@ -3825,7 +3825,7 @@ int set_field_buffer(FIELD * field, int buffer, const char * value) (int)(1 + (vlen-len)/((field->rows+field->nrow)*field->cols)))) RETURN(E_SYSTEM_ERROR); - /* in this case we also have to check, wether or not the remaining + /* in this case we also have to check, whether or not the remaining characters in value are also printable for buffer 0. */ if (buffer==0) { diff --git a/Source/CursesDialog/form/fty_enum.c b/Source/CursesDialog/form/fty_enum.c index 8fc4cd7b6..59058a98c 100644 --- a/Source/CursesDialog/form/fty_enum.c +++ b/Source/CursesDialog/form/fty_enum.c @@ -101,7 +101,7 @@ static void Free_Enum_Type(void * argp) | const unsigned char * buf, | bool ccase ) | -| Description : Check wether or not the text in 'buf' matches the +| Description : Check whether or not the text in 'buf' matches the | text in 's', at least partial. | | Return Values : NOMATCH - buffer doesn't match diff --git a/Source/CursesDialog/form/fty_ipv4.c b/Source/CursesDialog/form/fty_ipv4.c index 4ac8a50ec..c855af655 100644 --- a/Source/CursesDialog/form/fty_ipv4.c +++ b/Source/CursesDialog/form/fty_ipv4.c @@ -30,7 +30,7 @@ static bool Check_IPV4_Field(FIELD * field, const void * argp) { char *bp = field_buffer(field,0); int num = 0, len; - unsigned int d1, d2, d3, d4; + unsigned int d1=256, d2=256, d3=256, d4=256; argp=0; /* Silence unused parameter warning. */ diff --git a/Source/CursesDialog/form/fty_regex.c b/Source/CursesDialog/form/fty_regex.c index 0af1cef17..f90e0c108 100644 --- a/Source/CursesDialog/form/fty_regex.c +++ b/Source/CursesDialog/form/fty_regex.c @@ -40,7 +40,7 @@ static char *RegEx_Error(int code) return 0; } -#define INIT register char *sp = RegEx_Init(instring); +#define INIT char *sp = RegEx_Init(instring); #define GETC() (*sp++) #define PEEKC() (*sp) #define UNGETC(c) (--sp) diff --git a/Source/QtDialog/CMakeLists.txt b/Source/QtDialog/CMakeLists.txt index 1684fb229..ef252944e 100644 --- a/Source/QtDialog/CMakeLists.txt +++ b/Source/QtDialog/CMakeLists.txt @@ -11,6 +11,9 @@ #============================================================================= project(QtDialog) +if(POLICY CMP0020) + cmake_policy(SET CMP0020 NEW) # Drop when CMake >= 2.8.11 required +endif() find_package(Qt5Widgets QUIET) if (Qt5Widgets_FOUND) include_directories(${Qt5Widgets_INCLUDE_DIRS}) @@ -29,6 +32,11 @@ if (Qt5Widgets_FOUND) add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Qt5Widgets_EXECUTABLE_COMPILE_FLAGS}") + + if(WIN32 AND TARGET Qt5::Core) + get_property(_Qt5_Core_LOCATION TARGET Qt5::Core PROPERTY LOCATION) + get_filename_component(Qt_BIN_DIR "${_Qt5_Core_LOCATION}" PATH) + endif() else() set(QT_MIN_VERSION "4.4.0") find_package(Qt4 REQUIRED) @@ -38,6 +46,13 @@ else() endif() include(${QT_USE_FILE}) + + if(WIN32 AND EXISTS "${QT_QMAKE_EXECUTABLE}") + get_filename_component(_Qt_BIN_DIR "${QT_QMAKE_EXECUTABLE}" PATH) + if(EXISTS "${_Qt_BIN_DIR}/QtCore4.dll") + set(Qt_BIN_DIR ${_Qt_BIN_DIR}) + endif() + endif() endif() set(SRCS @@ -91,6 +106,9 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON) add_executable(cmake-gui WIN32 MACOSX_BUNDLE ${SRCS}) target_link_libraries(cmake-gui CMakeLib ${QT_QTMAIN_LIBRARY} ${QT_LIBRARIES}) +if(Qt_BIN_DIR) + set_property(TARGET cmake-gui PROPERTY Qt_BIN_DIR ${Qt_BIN_DIR}) +endif() if(APPLE) set_target_properties(cmake-gui PROPERTIES diff --git a/Source/QtDialog/CMakeSetupDialog.cxx b/Source/QtDialog/CMakeSetupDialog.cxx index c0dde1c2c..4d62f7263 100644 --- a/Source/QtDialog/CMakeSetupDialog.cxx +++ b/Source/QtDialog/CMakeSetupDialog.cxx @@ -28,6 +28,7 @@ #include #include #include +#include #include "QCMake.h" #include "QCMakeCacheView.h" @@ -122,6 +123,22 @@ CMakeSetupDialog::CMakeSetupDialog() QObject::connect(this->InstallForCommandLineAction, SIGNAL(triggered(bool)), this, SLOT(doInstallForCommandLine())); #endif + ToolsMenu->addSeparator(); + ToolsMenu->addAction(tr("&Find in Output..."), + this, SLOT(doOutputFindDialog()), + QKeySequence::Find); + ToolsMenu->addAction(tr("Find Next"), + this, SLOT(doOutputFindNext()), + QKeySequence::FindNext); + ToolsMenu->addAction(tr("Find Previous"), + this, SLOT(doOutputFindPrev()), + QKeySequence::FindPrevious); + ToolsMenu->addAction(tr("Goto Next Error"), + this, SLOT(doOutputErrorNext()), + QKeySequence(Qt::Key_F8)); // in Visual Studio + new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_Period), + this, SLOT(doOutputErrorNext())); // in Eclipse + QMenu* OptionsMenu = this->menuBar()->addMenu(tr("&Options")); this->SuppressDevWarningsAction = OptionsMenu->addAction(tr("&Suppress dev Warnings (-Wno-dev)")); @@ -154,10 +171,6 @@ CMakeSetupDialog::CMakeSetupDialog() QObject::connect(a, SIGNAL(triggered(bool)), this, SLOT(doHelp())); - QShortcut* filterShortcut = new QShortcut(QKeySequence::Find, this); - QObject::connect(filterShortcut, SIGNAL(activated()), - this, SLOT(startSearch())); - this->setAcceptDrops(true); // get the saved binary directories @@ -172,6 +185,10 @@ CMakeSetupDialog::CMakeSetupDialog() this->Output->setFont(outputFont); this->ErrorFormat.setForeground(QBrush(Qt::red)); + this->Output->setContextMenuPolicy(Qt::CustomContextMenu); + connect(this->Output, SIGNAL(customContextMenuRequested(const QPoint&)), + this, SLOT(doOutputContextMenu(const QPoint &))); + // start the cmake worker thread this->CMakeThread = new QCMakeThread(this); QObject::connect(this->CMakeThread, SIGNAL(cmakeInitialized()), @@ -637,7 +654,13 @@ void CMakeSetupDialog::showProgress(const QString& /*msg*/, float percent) void CMakeSetupDialog::error(const QString& msg) { this->Output->setCurrentCharFormat(this->ErrorFormat); - this->Output->append(msg); + //QTextEdit will terminate the msg with a ParagraphSeparator, but it also replaces + //all newlines with ParagraphSeparators. By replacing the newlines by ourself, one + //error msg will be one paragraph. + QString paragraph(msg); + paragraph.replace(QLatin1Char('\n'), QChar::LineSeparator); + this->Output->append(paragraph); + } void CMakeSetupDialog::message(const QString& msg) @@ -1149,4 +1172,134 @@ void CMakeSetupDialog::setSearchFilter(const QString& str) this->CacheValues->setSearchFilter(str); } +void CMakeSetupDialog::doOutputContextMenu(const QPoint &pt) +{ + QMenu *menu = this->Output->createStandardContextMenu(); + + menu->addSeparator(); + menu->addAction(tr("Find..."), + this, SLOT(doOutputFindDialog()), QKeySequence::Find); + menu->addAction(tr("Find Next"), + this, SLOT(doOutputFindNext()), QKeySequence::FindNext); + menu->addAction(tr("Find Previous"), + this, SLOT(doOutputFindPrev()), QKeySequence::FindPrevious); + menu->addSeparator(); + menu->addAction(tr("Goto Next Error"), + this, SLOT(doOutputErrorNext()), QKeySequence(Qt::Key_F8)); + + menu->exec(this->Output->mapToGlobal(pt)); + delete menu; +} + +void CMakeSetupDialog::doOutputFindDialog() +{ + QStringList strings(this->FindHistory); + + QString selection = this->Output->textCursor().selectedText(); + if (!selection.isEmpty() && + !selection.contains(QChar::ParagraphSeparator) && + !selection.contains(QChar::LineSeparator)) + { + strings.push_front(selection); + } + + bool ok; + QString search = QInputDialog::getItem(this, tr("Find in Output"), + tr("Find:"), strings, 0, true, &ok); + if (ok && !search.isEmpty()) + { + if (!this->FindHistory.contains(search)) + { + this->FindHistory.push_front(search); + } + doOutputFindNext(); + } +} + +void CMakeSetupDialog::doOutputFindPrev() +{ + doOutputFindNext(false); +} + +void CMakeSetupDialog::doOutputFindNext(bool directionForward) +{ + if (this->FindHistory.isEmpty()) + { + doOutputFindDialog(); //will re-call this function again + return; + } + + QString search = this->FindHistory.front(); + + QTextCursor cursor = this->Output->textCursor(); + QTextDocument* document = this->Output->document(); + QTextDocument::FindFlags flags; + if (!directionForward) + { + flags |= QTextDocument::FindBackward; + } + + cursor = document->find(search, cursor, flags); + + if (cursor.isNull()) + { + // first search found nothing, wrap around and search again + cursor = this->Output->textCursor(); + cursor.movePosition(directionForward ? QTextCursor::Start + : QTextCursor::End); + cursor = document->find(search, cursor, flags); + } + + if (cursor.hasSelection()) + { + this->Output->setTextCursor(cursor); + } +} + +void CMakeSetupDialog::doOutputErrorNext() +{ + QTextCursor cursor = this->Output->textCursor(); + bool atEnd = false; + // move cursor out of current error-block + if (cursor.blockCharFormat() == this->ErrorFormat) + { + atEnd = !cursor.movePosition(QTextCursor::NextBlock); + } + + // move cursor to next error-block + while (cursor.blockCharFormat() != this->ErrorFormat && !atEnd) + { + atEnd = !cursor.movePosition(QTextCursor::NextBlock); + } + + if (atEnd) + { + // first search found nothing, wrap around and search again + atEnd = !cursor.movePosition(QTextCursor::Start); + + // move cursor to next error-block + while (cursor.blockCharFormat() != this->ErrorFormat && !atEnd) + { + atEnd = !cursor.movePosition(QTextCursor::NextBlock); + } + } + + if (!atEnd) + { + cursor.movePosition(QTextCursor::EndOfBlock, QTextCursor::KeepAnchor); + + QTextCharFormat selectionFormat; + selectionFormat.setBackground(Qt::yellow); + QTextEdit::ExtraSelection extraSelection = {cursor, selectionFormat}; + this->Output->setExtraSelections(QList() + << extraSelection); + + // make the whole error-block visible + this->Output->setTextCursor(cursor); + + // remove the selection to see the extraSelection + cursor.setPosition(cursor.anchor()); + this->Output->setTextCursor(cursor); + } +} diff --git a/Source/QtDialog/CMakeSetupDialog.h b/Source/QtDialog/CMakeSetupDialog.h index 259967580..963c7d12e 100644 --- a/Source/QtDialog/CMakeSetupDialog.h +++ b/Source/QtDialog/CMakeSetupDialog.h @@ -77,6 +77,11 @@ protected slots: bool doConfigureInternal(); bool doGenerateInternal(); void exitLoop(int); + void doOutputContextMenu(const QPoint &); + void doOutputFindDialog(); + void doOutputFindNext(bool directionForward = true); + void doOutputFindPrev(); + void doOutputErrorNext(); protected: @@ -106,6 +111,7 @@ protected: QTextCharFormat MessageFormat; QStringList AddVariableCompletions; + QStringList FindHistory; QEventLoop LocalLoop; diff --git a/Source/QtDialog/CMakeSetupDialog.ui b/Source/QtDialog/CMakeSetupDialog.ui index dc8ee3fbd..98da249d5 100644 --- a/Source/QtDialog/CMakeSetupDialog.ui +++ b/Source/QtDialog/CMakeSetupDialog.ui @@ -107,7 +107,10 @@ - Search: + S&earch: + + + Search diff --git a/Source/QtDialog/QCMakeCacheView.cxx b/Source/QtDialog/QCMakeCacheView.cxx index 6006758c7..bae6a30a7 100644 --- a/Source/QtDialog/QCMakeCacheView.cxx +++ b/Source/QtDialog/QCMakeCacheView.cxx @@ -177,7 +177,7 @@ QModelIndex QCMakeCacheView::moveCursor(CursorAction act, void QCMakeCacheView::setShowAdvanced(bool s) { #if QT_VERSION >= 040300 - // new 4.3 api that needs to be called. what about an older Qt? + // new 4.3 API that needs to be called. what about an older Qt? this->SearchFilter->invalidate(); #endif diff --git a/Source/cmAddCompileOptionsCommand.cxx b/Source/cmAddCompileOptionsCommand.cxx new file mode 100644 index 000000000..a6c3c005c --- /dev/null +++ b/Source/cmAddCompileOptionsCommand.cxx @@ -0,0 +1,28 @@ +/*============================================================================ + CMake - Cross Platform Makefile Generator + Copyright 2013 Stephen Kelly + + 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. +============================================================================*/ +#include "cmAddCompileOptionsCommand.h" + +bool cmAddCompileOptionsCommand +::InitialPass(std::vector const& args, cmExecutionStatus &) +{ + if(args.size() < 1 ) + { + return true; + } + + for(std::vector::const_iterator i = args.begin(); + i != args.end(); ++i) + { + this->Makefile->AddCompileOption(i->c_str()); + } + return true; +} diff --git a/Source/cmAddCompileOptionsCommand.h b/Source/cmAddCompileOptionsCommand.h new file mode 100644 index 000000000..e9bbf2816 --- /dev/null +++ b/Source/cmAddCompileOptionsCommand.h @@ -0,0 +1,71 @@ +/*============================================================================ + CMake - Cross Platform Makefile Generator + Copyright 2013 Stephen Kelly + + Distributed under the OSI-approved BSD License (the "License"); + see accompanying file Copyright.txt for details. + + This software is distributed WITHOUT ANY WARRANTY; without even the + implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the License for more information. +============================================================================*/ +#ifndef cmAddCompileOptionsCommand_h +#define cmAddCompileOptionsCommand_h + +#include "cmCommand.h" +#include "cmDocumentGeneratorExpressions.h" + +class cmAddCompileOptionsCommand : public cmCommand +{ +public: + /** + * This is a virtual constructor for the command. + */ + virtual cmCommand* Clone() + { + return new cmAddCompileOptionsCommand; + } + + /** + * This is called when the command is first encountered in + * the CMakeLists.txt file. + */ + virtual bool InitialPass(std::vector const& args, + cmExecutionStatus &status); + + /** + * The name of the command as specified in CMakeList.txt. + */ + virtual const char* GetName() const {return "add_compile_options";} + + /** + * Succinct documentation. + */ + virtual const char* GetTerseDocumentation() const + { + return "Adds options to the compilation of source files."; + } + + /** + * More documentation. + */ + virtual const char* GetFullDocumentation() const + { + return + " add_compile_options(