summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Modules/CMakeCCompilerABI.c4
-rw-r--r--Modules/CMakeCUDACompilerABI.cu2
-rw-r--r--Modules/CMakeCXXCompilerABI.cpp2
-rw-r--r--Modules/CMakeCompilerABI.h16
-rw-r--r--Modules/CheckFunctionExists.c12
-rw-r--r--Modules/CheckVariableExists.c8
-rw-r--r--Modules/FindMPI/libver_mpi.c4
-rw-r--r--Modules/FindMPI/test_mpi.c10
-rw-r--r--Source/CPack/IFW/cmCPackIFWGenerator.cxx35
-rw-r--r--Source/CPack/IFW/cmCPackIFWGenerator.h4
-rw-r--r--Source/CPack/IFW/cmCPackIFWInstaller.cxx9
-rw-r--r--Source/CPack/IFW/cmCPackIFWPackage.cxx6
-rw-r--r--Source/CPack/WiX/cmCMakeToWixPath.cxx2
-rw-r--r--Source/CPack/WiX/cmCPackWIXGenerator.cxx48
-rw-r--r--Source/CPack/WiX/cmWIXAccessControlList.cxx5
-rw-r--r--Source/CPack/WiX/cmWIXPatch.cxx5
-rw-r--r--Source/CPack/WiX/cmWIXSourceWriter.cxx6
-rw-r--r--Source/CPack/cmCPackArchiveGenerator.cxx14
-rw-r--r--Source/CPack/cmCPackBundleGenerator.cxx20
-rw-r--r--Source/CPack/cmCPackCygwinSourceGenerator.cxx16
-rw-r--r--Source/CPack/cmCPackDebGenerator.cxx57
-rw-r--r--Source/CPack/cmCPackDragNDropGenerator.cxx70
-rw-r--r--Source/CPack/cmCPackGenerator.cxx213
-rw-r--r--Source/CPack/cmCPackGeneratorFactory.cxx20
-rw-r--r--Source/CPack/cmCPackNSISGenerator.cxx115
-rw-r--r--Source/CPack/cmCPackNuGetGenerator.cxx3
-rw-r--r--Source/CPack/cmCPackOSXX11Generator.cxx33
-rw-r--r--Source/CPack/cmCPackPKGGenerator.cxx35
-rw-r--r--Source/CPack/cmCPackPackageMakerGenerator.cxx42
-rw-r--r--Source/CPack/cmCPackProductBuildGenerator.cxx17
-rw-r--r--Source/CPack/cmCPackRPMGenerator.cxx36
-rw-r--r--Source/CPack/cmCPackSTGZGenerator.cxx6
-rw-r--r--Source/CPack/cpack.cxx16
-rw-r--r--Source/CTest/cmCTestBZR.cxx15
-rw-r--r--Source/CTest/cmCTestBuildHandler.cxx61
-rw-r--r--Source/CTest/cmCTestCVS.cxx5
-rw-r--r--Source/CTest/cmCTestConfigureHandler.cxx4
-rw-r--r--Source/CTest/cmCTestCoverageHandler.cxx109
-rw-r--r--Source/CTest/cmCTestCurl.cxx6
-rw-r--r--Source/CTest/cmCTestGIT.cxx10
-rw-r--r--Source/CTest/cmCTestGenericHandler.cxx5
-rw-r--r--Source/CTest/cmCTestHG.cxx16
-rw-r--r--Source/CTest/cmCTestHandlerCommand.cxx22
-rw-r--r--Source/CTest/cmCTestLaunch.cxx6
-rw-r--r--Source/CTest/cmCTestMemCheckHandler.cxx40
-rw-r--r--Source/CTest/cmCTestMultiProcessHandler.cxx20
-rw-r--r--Source/CTest/cmCTestMultiProcessHandler.h1
-rw-r--r--Source/CTest/cmCTestP4.cxx13
-rw-r--r--Source/CTest/cmCTestRunTest.cxx64
-rw-r--r--Source/CTest/cmCTestSVN.cxx20
-rw-r--r--Source/CTest/cmCTestScriptHandler.cxx33
-rw-r--r--Source/CTest/cmCTestStartCommand.cxx8
-rw-r--r--Source/CTest/cmCTestSubmitHandler.cxx174
-rw-r--r--Source/CTest/cmCTestTestCommand.cxx8
-rw-r--r--Source/CTest/cmCTestTestHandler.cxx109
-rw-r--r--Source/CTest/cmCTestUpdateHandler.cxx24
-rw-r--r--Source/CTest/cmCTestUploadHandler.cxx7
-rw-r--r--Source/CTest/cmCTestVC.cxx4
-rw-r--r--Source/CTest/cmParseCacheCoverage.cxx19
-rw-r--r--Source/CTest/cmParseDelphiCoverage.cxx5
-rw-r--r--Source/CTest/cmParseGTMCoverage.cxx20
-rw-r--r--Source/CTest/cmParseJacocoCoverage.cxx5
-rw-r--r--Source/CTest/cmParsePHPCoverage.cxx7
-rw-r--r--Source/CTest/cmProcess.cxx185
-rw-r--r--Source/Checks/Curses/CheckCurses.c8
-rw-r--r--Source/CursesDialog/ccmake.cxx19
-rw-r--r--Source/CursesDialog/cmCursesMainForm.cxx21
-rw-r--r--Source/CursesDialog/cmCursesStandardIncludes.h8
-rw-r--r--Source/QtDialog/AddCacheEntry.h4
-rw-r--r--Source/QtDialog/CMakeSetup.cxx15
-rw-r--r--Source/QtDialog/CMakeSetupDialog.cxx7
-rw-r--r--Source/QtDialog/CMakeSetupDialog.h4
-rw-r--r--Source/QtDialog/Compilers.h4
-rw-r--r--Source/QtDialog/FirstConfigure.h8
-rw-r--r--Source/QtDialog/QCMake.cxx2
-rw-r--r--Source/QtDialog/QCMake.h4
-rw-r--r--Source/QtDialog/RegexExplorer.h4
-rw-r--r--Source/QtDialog/WarningMessagesDialog.h4
-rw-r--r--Source/bindexplib.cxx121
-rw-r--r--Source/cmAddLibraryCommand.cxx5
-rw-r--r--Source/cmAffinity.cxx38
-rw-r--r--Source/cmAlgorithms.h20
-rw-r--r--Source/cmArchiveWrite.cxx2
-rw-r--r--Source/cmArchiveWrite.h4
-rw-r--r--Source/cmCMakeHostSystemInformationCommand.cxx12
-rw-r--r--Source/cmCPluginAPI.cxx9
-rw-r--r--Source/cmCPluginAPI.h8
-rw-r--r--Source/cmCTest.cxx243
-rw-r--r--Source/cmCacheManager.cxx3
-rw-r--r--Source/cmCallVisualStudioMacro.cxx54
-rw-r--r--Source/cmCommandArgumentsHelper.h4
-rw-r--r--Source/cmCommands.cxx95
-rw-r--r--Source/cmCommonTargetGenerator.cxx3
-rw-r--r--Source/cmComputeLinkDepends.cxx5
-rw-r--r--Source/cmComputeLinkInformation.cxx13
-rw-r--r--Source/cmComputeLinkInformation.h1
-rw-r--r--Source/cmCoreTryCompile.cxx28
-rw-r--r--Source/cmCurl.cxx18
-rw-r--r--Source/cmELF.cxx41
-rw-r--r--Source/cmELF.h2
-rw-r--r--Source/cmExecProgramCommand.cxx4
-rw-r--r--Source/cmExportCommand.cxx12
-rw-r--r--Source/cmExportFileGenerator.cxx10
-rw-r--r--Source/cmExportTryCompileFileGenerator.h1
-rw-r--r--Source/cmExtraCodeBlocksGenerator.cxx20
-rw-r--r--Source/cmExtraEclipseCDT4Generator.cxx12
-rw-r--r--Source/cmExtraKateGenerator.cxx5
-rw-r--r--Source/cmExtraSublimeTextGenerator.cxx5
-rw-r--r--Source/cmFileCommand.cxx37
-rw-r--r--Source/cmFileLock.cxx4
-rw-r--r--Source/cmFileLock.h30
-rw-r--r--Source/cmFileLockPool.h18
-rw-r--r--Source/cmFileLockResult.h32
-rw-r--r--Source/cmFileTimeComparison.cxx26
-rw-r--r--Source/cmFindPackageCommand.cxx43
-rw-r--r--Source/cmFindPackageCommand.h2
-rw-r--r--Source/cmFindProgramCommand.cxx2
-rw-r--r--Source/cmFortranParser.h26
-rw-r--r--Source/cmGeneratedFileStream.cxx4
-rw-r--r--Source/cmGeneratedFileStream.h5
-rw-r--r--Source/cmGeneratorExpressionEvaluator.cxx14
-rw-r--r--Source/cmGeneratorExpressionNode.cxx19
-rw-r--r--Source/cmGeneratorExpressionParser.cxx6
-rw-r--r--Source/cmGeneratorTarget.cxx25
-rw-r--r--Source/cmGeneratorTarget.h10
-rw-r--r--Source/cmGhsMultiTargetGenerator.cxx38
-rw-r--r--Source/cmGlobalBorlandMakefileGenerator.h13
-rw-r--r--Source/cmGlobalGenerator.cxx48
-rw-r--r--Source/cmGlobalGenerator.h19
-rw-r--r--Source/cmGlobalGhsMultiGenerator.cxx8
-rw-r--r--Source/cmGlobalGhsMultiGenerator.h10
-rw-r--r--Source/cmGlobalJOMMakefileGenerator.h13
-rw-r--r--Source/cmGlobalNMakeMakefileGenerator.h13
-rw-r--r--Source/cmGlobalNinjaGenerator.cxx7
-rw-r--r--Source/cmGlobalNinjaGenerator.h13
-rw-r--r--Source/cmGlobalUnixMakefileGenerator3.cxx18
-rw-r--r--Source/cmGlobalUnixMakefileGenerator3.h13
-rw-r--r--Source/cmGlobalVisualStudio10Generator.h13
-rw-r--r--Source/cmGlobalVisualStudio12Generator.cxx10
-rw-r--r--Source/cmGlobalVisualStudio12Generator.h2
-rw-r--r--Source/cmGlobalVisualStudio14Generator.cxx5
-rw-r--r--Source/cmGlobalVisualStudio14Generator.h1
-rw-r--r--Source/cmGlobalVisualStudio7Generator.h13
-rw-r--r--Source/cmGlobalVisualStudio9Generator.h1
-rw-r--r--Source/cmGlobalVisualStudioGenerator.cxx6
-rw-r--r--Source/cmGlobalWatcomWMakeGenerator.h13
-rw-r--r--Source/cmGlobalXCodeGenerator.cxx6
-rw-r--r--Source/cmGlobalXCodeGenerator.h13
-rw-r--r--Source/cmGraphAdjacencyList.h1
-rw-r--r--Source/cmIncludeCommand.cxx5
-rw-r--r--Source/cmIncludeExternalMSProjectCommand.cxx10
-rw-r--r--Source/cmInstallCommand.cxx12
-rw-r--r--Source/cmInstallExportGenerator.cxx2
-rw-r--r--Source/cmListCommand.cxx4
-rw-r--r--Source/cmListFileLexer.h3
-rw-r--r--Source/cmLoadCommandCommand.cxx2
-rw-r--r--Source/cmLocalGenerator.cxx13
-rw-r--r--Source/cmLocalNinjaGenerator.cxx6
-rw-r--r--Source/cmLocalUnixMakefileGenerator3.cxx26
-rw-r--r--Source/cmLocalVisualStudio10Generator.cxx5
-rw-r--r--Source/cmMSVC60LinkLineComputer.cxx2
-rw-r--r--Source/cmMachO.h2
-rw-r--r--Source/cmMakefile.cxx44
-rw-r--r--Source/cmMakefile.h9
-rw-r--r--Source/cmMakefileTargetGenerator.cxx14
-rw-r--r--Source/cmMessenger.cxx2
-rw-r--r--Source/cmNinjaNormalTargetGenerator.cxx26
-rw-r--r--Source/cmNinjaTargetGenerator.cxx29
-rw-r--r--Source/cmParseArgumentsCommand.cxx4
-rw-r--r--Source/cmPolicies.cxx36
-rw-r--r--Source/cmPolicies.h5
-rw-r--r--Source/cmProcessOutput.cxx2
-rw-r--r--Source/cmProcessOutput.h8
-rw-r--r--Source/cmProcessTools.h1
-rw-r--r--Source/cmQtAutoGen.cxx5
-rw-r--r--Source/cmQtAutoGenInitializer.cxx40
-rw-r--r--Source/cmQtAutoGenerator.cxx2
-rw-r--r--Source/cmQtAutoGeneratorMocUic.cxx9
-rw-r--r--Source/cmQtAutoGeneratorRcc.cxx2
-rw-r--r--Source/cmRST.cxx5
-rw-r--r--Source/cmServerConnection.cxx4
-rw-r--r--Source/cmServerProtocol.cxx36
-rw-r--r--Source/cmSourceFileLocation.h1
-rw-r--r--Source/cmStandardLexer.h46
-rw-r--r--Source/cmStateSnapshot.cxx4
-rw-r--r--Source/cmStringCommand.cxx8
-rw-r--r--Source/cmSystemTools.cxx134
-rw-r--r--Source/cmTarget.cxx19
-rw-r--r--Source/cmTarget.h5
-rw-r--r--Source/cmTargetLinkLibrariesCommand.cxx5
-rw-r--r--Source/cmTestGenerator.cxx5
-rw-r--r--Source/cmUVHandlePtr.cxx20
-rw-r--r--Source/cmUVHandlePtr.h25
-rw-r--r--Source/cmUVSignalHackRAII.h5
-rw-r--r--Source/cmUtilitySourceCommand.cxx10
-rw-r--r--Source/cmVS10LibFlagTable.h8
-rw-r--r--Source/cmVS10LinkFlagTable.h16
-rw-r--r--Source/cmVS11LibFlagTable.h8
-rw-r--r--Source/cmVS11LinkFlagTable.h16
-rw-r--r--Source/cmVS12LibFlagTable.h8
-rw-r--r--Source/cmVS12LinkFlagTable.h16
-rw-r--r--Source/cmVS140LinkFlagTable.h16
-rw-r--r--Source/cmVS141LinkFlagTable.h16
-rw-r--r--Source/cmVS14LibFlagTable.h8
-rw-r--r--Source/cmVSSetupHelper.cxx2
-rw-r--r--Source/cmVSSetupHelper.h3
-rw-r--r--Source/cmVersionMacros.h2
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx67
-rw-r--r--Source/cmVisualStudioGeneratorOptions.cxx3
-rw-r--r--Source/cmWriteFileCommand.cxx2
-rw-r--r--Source/cmXMLWriter.h1
-rw-r--r--Source/cm_codecvt.cxx10
-rw-r--r--Source/cm_codecvt.hxx4
-rw-r--r--Source/cmake.cxx74
-rw-r--r--Source/cmake.h12
-rw-r--r--Source/cmakemain.cxx67
-rw-r--r--Source/cmcmd.cxx15
-rw-r--r--Source/ctest.cxx97
-rw-r--r--Tests/AliasTarget/bat.cpp8
-rw-r--r--Tests/BundleTest/BundleLib.cxx2
-rw-r--r--Tests/BundleUtilities/framework.h12
-rw-r--r--Tests/BundleUtilities/shared.h12
-rw-r--r--Tests/BundleUtilities/shared2.h12
-rw-r--r--Tests/BundleUtilities/testbundleutils1.cpp4
-rw-r--r--Tests/BundleUtilities/testbundleutils2.cpp4
-rw-r--r--Tests/BundleUtilities/testbundleutils3.cpp4
-rw-r--r--Tests/CMakeCommands/add_compile_definitions/main.cpp6
-rw-r--r--Tests/CMakeCommands/add_compile_options/main.cpp6
-rw-r--r--Tests/CMakeCommands/target_compile_definitions/consumer.c48
-rw-r--r--Tests/CMakeCommands/target_compile_definitions/consumer.cpp16
-rw-r--r--Tests/CMakeCommands/target_compile_definitions/main.cpp6
-rw-r--r--Tests/CMakeCommands/target_compile_options/consumer.c48
-rw-r--r--Tests/CMakeCommands/target_compile_options/consumer.cpp26
-rw-r--r--Tests/CMakeCommands/target_compile_options/main.cpp18
-rw-r--r--Tests/CMakeCommands/target_include_directories/consumer.c16
-rw-r--r--Tests/CMakeCommands/target_include_directories/consumer.cpp14
-rw-r--r--Tests/CMakeCommands/target_include_directories/main.cpp8
-rw-r--r--Tests/CMakeCommands/target_link_libraries/libgenex.h2
-rw-r--r--Tests/CMakeCommands/target_link_libraries/targetC.cpp2
-rw-r--r--Tests/CMakeLib/testEncoding.cxx2
-rw-r--r--Tests/CMakeLib/testUVRAII.cxx3
-rw-r--r--Tests/CMakeLib/testVisualStudioSlnParser.cxx60
-rw-r--r--Tests/COnly/libc2.h12
-rw-r--r--Tests/COnly/testCModule.c4
-rw-r--r--Tests/CTestTestCostSerial/sleep.c4
-rw-r--r--Tests/CTestTestFdSetSize/sleep.c4
-rw-r--r--Tests/CTestTestScheduler/sleep.c4
-rw-r--r--Tests/CTestTestStopTime/sleep.c4
-rw-r--r--Tests/CTestTestTimeout/sleep.c4
-rw-r--r--Tests/CTestTestUpload/sleep.c4
-rw-r--r--Tests/CTestTestZeroTimeout/sleep.c4
-rw-r--r--Tests/CompatibleInterface/main.cpp12
-rw-r--r--Tests/CompileCommandOutput/relative.h12
-rw-r--r--Tests/CompileDefinitions/compiletest.c10
-rw-r--r--Tests/CompileDefinitions/compiletest.cpp102
-rw-r--r--Tests/CompileDefinitions/compiletest_mixed_c.c10
-rw-r--r--Tests/CompileDefinitions/compiletest_mixed_cxx.cpp10
-rw-r--r--Tests/CompileDefinitions/runtest.c2
-rw-r--r--Tests/CompileDefinitions/target_prop/usetgt.c6
-rw-r--r--Tests/CompileFeatures/cxx_attribute_deprecated.cpp5
-rw-r--r--Tests/CompileFeatures/cxx_contextual_conversions.cpp1
-rw-r--r--Tests/CompileFeatures/cxx_generalized_initializers.cpp2
-rw-r--r--Tests/CompileFeatures/cxx_lambda_init_captures.cpp3
-rw-r--r--Tests/CompileFeatures/cxx_variadic_templates.cpp2
-rw-r--r--Tests/CompileFeatures/default_dialect.c26
-rw-r--r--Tests/CompileFeatures/default_dialect.cpp31
-rw-r--r--Tests/CompileFeatures/genex_test.c42
-rw-r--r--Tests/CompileFeatures/genex_test.cpp76
-rw-r--r--Tests/CompileOptions/main.cpp40
-rw-r--r--Tests/Complex/Executable/complex.cxx52
-rw-r--r--Tests/Complex/Executable/complex.file.cxx2
-rw-r--r--Tests/Complex/Executable/notInAllExe.cxx2
-rw-r--r--Tests/Complex/Library/notInAllLib.cxx2
-rw-r--r--Tests/Complex/Library/sharedFile.h12
-rw-r--r--Tests/Complex/Library/testConly.h12
-rw-r--r--Tests/ComplexOneConfig/Executable/complex.cxx52
-rw-r--r--Tests/ComplexOneConfig/Executable/complex.file.cxx2
-rw-r--r--Tests/ComplexOneConfig/Executable/notInAllExe.cxx2
-rw-r--r--Tests/ComplexOneConfig/Library/notInAllLib.cxx2
-rw-r--r--Tests/ComplexOneConfig/Library/sharedFile.h12
-rw-r--r--Tests/ComplexOneConfig/Library/testConly.h12
-rw-r--r--Tests/Cuda/Complex/dynamic.cpp4
-rw-r--r--Tests/Cuda/Complex/dynamic.cu4
-rw-r--r--Tests/Cuda/Complex/main.cpp4
-rw-r--r--Tests/Cuda/Complex/mixed.cpp8
-rw-r--r--Tests/Cuda/Complex/mixed.cu8
-rw-r--r--Tests/Cuda/WithC/main.c2
-rw-r--r--Tests/CudaOnly/EnableStandard/main.cu4
-rw-r--r--Tests/CudaOnly/EnableStandard/shared.cu4
-rw-r--r--Tests/CudaOnly/WithDefs/main.notcu28
-rw-r--r--Tests/CustComDepend/bar.h12
-rw-r--r--Tests/CustomCommand/wrapper.cxx7
-rw-r--r--Tests/CxxOnly/libcxx2.h12
-rw-r--r--Tests/CxxOnly/testCxxModule.cxx4
-rw-r--r--Tests/ExportImport/Export/Interface/source_target.cpp4
-rw-r--r--Tests/ExportImport/Export/Interface/source_target_for_install.cpp4
-rw-r--r--Tests/ExportImport/Export/systemlib.h4
-rw-r--r--Tests/ExportImport/Export/testExe2.c4
-rw-r--r--Tests/ExportImport/Export/testExe2lib.c8
-rw-r--r--Tests/ExportImport/Export/testExe2libImp.c4
-rw-r--r--Tests/ExportImport/Export/testLib3.c8
-rw-r--r--Tests/ExportImport/Export/testLib3Imp.c8
-rw-r--r--Tests/ExportImport/Export/testLib3ImpDep.c4
-rw-r--r--Tests/ExportImport/Export/testLib4.c4
-rw-r--r--Tests/ExportImport/Export/testLib5.c4
-rw-r--r--Tests/ExportImport/Export/testLib9.c6
-rw-r--r--Tests/ExportImport/Export/testLibDepends.c6
-rw-r--r--Tests/ExportImport/Export/testLibNoSONAME.c4
-rw-r--r--Tests/ExportImport/Import/A/cmp0022NEW_test.cpp4
-rw-r--r--Tests/ExportImport/Import/A/cmp0022OLD_test.cpp4
-rw-r--r--Tests/ExportImport/Import/A/deps_iface.c6
-rw-r--r--Tests/ExportImport/Import/A/deps_shared_iface.cpp22
-rw-r--r--Tests/ExportImport/Import/A/framework_interface/framework_test.cpp2
-rw-r--r--Tests/ExportImport/Import/A/iface_test.cpp2
-rw-r--r--Tests/ExportImport/Import/A/imp_mod1.c4
-rw-r--r--Tests/ExportImport/Import/A/imp_testExe1.c4
-rw-r--r--Tests/ExportImport/Import/A/imp_testExeAbs1.c4
-rw-r--r--Tests/ExportImport/Import/A/imp_testLib9.c6
-rw-r--r--Tests/ExportImport/Import/Interface/headeronlytest.cpp4
-rw-r--r--Tests/ExportImport/Import/Interface/interfacetest.cpp6
-rw-r--r--Tests/FindGTK2/cairomm/main.cpp2
-rw-r--r--Tests/FindLTTngUST/Test/main.c4
-rw-r--r--Tests/FindODBC/Test/main.c2
-rw-r--r--Tests/FindOpenCL/Test/main.c4
-rw-r--r--Tests/FindOpenGL/Test/main.c6
-rw-r--r--Tests/FindOpenMP/Test/scaltest.c4
-rw-r--r--Tests/ForceInclude/foo.c4
-rw-r--r--Tests/Framework/foo.cxx4
-rw-r--r--Tests/GeneratorExpression/CMP0044/cmp0044-check.cpp20
-rw-r--r--Tests/GeneratorExpression/pwd.c8
-rw-r--r--Tests/IncludeDirectories/CMP0021/main.cpp2
-rw-r--r--Tests/InterfaceLibrary/definetestexe.cpp6
-rw-r--r--Tests/InterfaceLibrary/map_config.cpp12
-rw-r--r--Tests/InterfaceLibrary/sharedlibtestexe.cpp6
-rw-r--r--Tests/InterfaceLinkLibraries/bang.cpp4
-rw-r--r--Tests/InterfaceLinkLibraries/bar.cpp16
-rw-r--r--Tests/InterfaceLinkLibraries/foo.cpp4
-rw-r--r--Tests/InterfaceLinkLibraries/main.cpp8
-rw-r--r--Tests/Jump/Executable/jumpExecutable.cxx4
-rw-r--r--Tests/Jump/Library/Shared/jumpShared.cxx4
-rw-r--r--Tests/LinkFlags/LinkFlagsExe.c2
-rw-r--r--Tests/LinkFlags/LinkFlagsLib.c2
-rw-r--r--Tests/MFC/mfc1/ChildFrm.cpp2
-rw-r--r--Tests/MFC/mfc1/MainFrm.cpp13
-rw-r--r--Tests/MFC/mfc1/Resource.h12
-rw-r--r--Tests/MFC/mfc1/mfc1.cpp2
-rw-r--r--Tests/MFC/mfc1/mfc1.h2
-rw-r--r--Tests/MFC/mfc1/mfc1Doc.cpp2
-rw-r--r--Tests/MFC/mfc1/mfc1View.cpp2
-rw-r--r--Tests/MFC/mfc1/stdafx.h52
-rw-r--r--Tests/MacRuntimePath/A/framework.h12
-rw-r--r--Tests/MacRuntimePath/A/framework2.h12
-rw-r--r--Tests/MacRuntimePath/A/shared.h12
-rw-r--r--Tests/Module/CheckTypeSize/CheckTypeSize.c30
-rw-r--r--Tests/Module/CheckTypeSize/CheckTypeSize.cxx34
-rw-r--r--Tests/Module/FindDependency/main.cpp12
-rw-r--r--Tests/Module/WriteCompilerDetectionHeader/compile_tests.h10
-rw-r--r--Tests/Module/WriteCompilerDetectionHeader/main.c18
-rw-r--r--Tests/Module/WriteCompilerDetectionHeader/main.cpp2
-rw-r--r--Tests/Module/WriteCompilerDetectionHeader/main_multi.c18
-rw-r--r--Tests/Module/WriteCompilerDetectionHeader/multi_files.cpp2
-rw-r--r--Tests/ModuleDefinition/example_mod_1.c4
-rw-r--r--Tests/NewlineArgs/libcxx1.cxx4
-rw-r--r--Tests/NewlineArgs/libcxx1.h4
-rw-r--r--Tests/ObjectLibrary/A/a.h4
-rw-r--r--Tests/ObjectLibrary/B/b.h12
-rw-r--r--Tests/ObjectLibrary/c.c4
-rw-r--r--Tests/ObjectLibrary/main.c4
-rw-r--r--Tests/OutOfSource/OutOfSourceSubdir/testlib.h12
-rw-r--r--Tests/PerConfig/pcShared.h12
-rw-r--r--Tests/Plugin/include/example.h12
-rw-r--r--Tests/Plugin/src/example_exe.cxx4
-rw-r--r--Tests/Plugin/src/example_mod_1.c8
-rw-r--r--Tests/PrecompiledHeader/foo1.c2
-rw-r--r--Tests/PrecompiledHeader/foo2.c4
-rw-r--r--Tests/Preprocess/preprocess.c80
-rw-r--r--Tests/Preprocess/preprocess.cxx80
-rw-r--r--Tests/Properties/subdirtest.cxx2
-rw-r--r--Tests/Qt4Targets/activeqtexe.cpp2
-rw-r--r--Tests/Qt4Targets/main.cpp4
-rw-r--r--Tests/Qt4Targets/main_gen_test.cpp4
-rw-r--r--Tests/Qt4Targets/mywrapobject.h4
-rw-r--r--Tests/QtAutogen/Complex/calwidget.cpp2
-rw-r--r--Tests/QtAutogen/Complex/generated.h5
-rw-r--r--Tests/QtAutogen/Complex/main.cpp4
-rw-r--r--Tests/QtAutogen/DefinesTest/defines_test.cpp2
-rw-r--r--Tests/QtAutogen/UicInterface/libwidget.h2
-rw-r--r--Tests/QtAutogen/UicInterface/mywidget.h2
-rw-r--r--Tests/RunCMake/Android/android.cxx38
-rw-r--r--Tests/RunCMake/Android/android.h120
-rw-r--r--Tests/RunCMake/Android/android_sysinc.c2
-rw-r--r--Tests/RunCMake/Android/android_sysinc.cxx2
-rw-r--r--Tests/RunCMake/AutoExportDll/foo.c4
-rw-r--r--Tests/RunCMake/AutoExportDll/hello.h12
-rw-r--r--Tests/RunCMake/AutoExportDll/say.cxx4
-rw-r--r--Tests/RunCMake/CSharpReferenceImport/ImportLibMixedNative.h4
-rw-r--r--Tests/RunCMake/CSharpReferenceImport/ImportLibNative.h4
-rw-r--r--Tests/RunCMake/GenerateExportHeader/lib_shared_and_static/libshared_and_static.cpp2
-rw-r--r--Tests/RunCMake/GoogleTest/timeout_test.cpp4
-rw-r--r--Tests/RunCMake/ObjectLibrary/a.c4
-rw-r--r--Tests/RunCMake/ObjectLibrary/b.c6
-rw-r--r--Tests/RunCMake/ObjectLibrary/exe.c6
-rw-r--r--Tests/RunCMake/ObjectLibrary/requires.c2
-rw-r--r--Tests/RunCMake/XcodeProject/DeploymentTarget.c26
-rw-r--r--Tests/RunCMake/pseudo_cppcheck.c24
-rw-r--r--Tests/RunCMake/try_compile/CStandardGNU.c4
-rw-r--r--Tests/RunCMake/try_compile/CxxStandardGNU.cxx4
-rw-r--r--Tests/RunCMake/try_compile/src.c2
-rw-r--r--Tests/SimpleInstall/inst.cxx14
-rw-r--r--Tests/SimpleInstall/lib2.h12
-rw-r--r--Tests/SimpleInstall/lib3.h12
-rw-r--r--Tests/SimpleInstall/lib4.h12
-rw-r--r--Tests/SimpleInstallS2/inst.cxx14
-rw-r--r--Tests/SimpleInstallS2/lib2.h12
-rw-r--r--Tests/SimpleInstallS2/lib3.h12
-rw-r--r--Tests/SimpleInstallS2/lib4.h12
-rw-r--r--Tests/SubDir/Executable/test.cxx8
-rw-r--r--Tests/SubDirSpaces/Executable Sources/test.cxx8
-rw-r--r--Tests/SubDirSpaces/Executable/test.cxx8
-rw-r--r--Tests/TestsWorkingDirectory/main.c23
-rw-r--r--Tests/TryCompile/testdef.c2
-rw-r--r--Tests/Tutorial/Step2/tutorial.cxx2
-rw-r--r--Tests/Tutorial/Step3/tutorial.cxx2
-rw-r--r--Tests/Tutorial/Step4/tutorial.cxx2
-rw-r--r--Tests/Tutorial/Step5/tutorial.cxx2
-rw-r--r--Tests/Tutorial/Step6/tutorial.cxx2
-rw-r--r--Tests/Tutorial/Step7/tutorial.cxx2
-rw-r--r--Tests/VSWinStorePhone/Direct3DApp1/Direct3DBase.cpp6
-rw-r--r--Tests/Wrapping/fakefluid.cxx7
-rw-r--r--Tests/Wrapping/qtwrappingmain.cxx4
-rw-r--r--Tests/X11/HelloWorldX11.cxx12
-rw-r--r--Tests/X11/X11.c4
-rw-r--r--Utilities/cm_bzlib.h4
-rw-r--r--Utilities/cm_curl.h4
-rw-r--r--Utilities/cm_expat.h4
-rw-r--r--Utilities/cm_jsoncpp_reader.h4
-rw-r--r--Utilities/cm_jsoncpp_value.h4
-rw-r--r--Utilities/cm_jsoncpp_writer.h4
-rw-r--r--Utilities/cm_kwiml.h8
-rw-r--r--Utilities/cm_libarchive.h8
-rw-r--r--Utilities/cm_lzma.h4
-rw-r--r--Utilities/cm_rhash.h4
-rw-r--r--Utilities/cm_uv.h4
-rw-r--r--Utilities/cm_xmlrpc.h4
-rw-r--r--Utilities/cm_zlib.h4
445 files changed, 3740 insertions, 3187 deletions
diff --git a/Modules/CMakeCCompilerABI.c b/Modules/CMakeCCompilerABI.c
index 55f9a9b..08cf39b 100644
--- a/Modules/CMakeCCompilerABI.c
+++ b/Modules/CMakeCCompilerABI.c
@@ -1,9 +1,9 @@
#ifdef __cplusplus
-#error "A C++ compiler has been selected for C."
+# error "A C++ compiler has been selected for C."
#endif
#ifdef __CLASSIC_C__
-#define const
+# define const
#endif
#include "CMakeCompilerABI.h"
diff --git a/Modules/CMakeCUDACompilerABI.cu b/Modules/CMakeCUDACompilerABI.cu
index 99bacef..702a7c5 100644
--- a/Modules/CMakeCUDACompilerABI.cu
+++ b/Modules/CMakeCUDACompilerABI.cu
@@ -1,5 +1,5 @@
#ifndef __CUDACC__
-#error "A C or C++ compiler has been selected for CUDA"
+# error "A C or C++ compiler has been selected for CUDA"
#endif
#include "CMakeCompilerABI.h"
diff --git a/Modules/CMakeCXXCompilerABI.cpp b/Modules/CMakeCXXCompilerABI.cpp
index 2dee883..2360534 100644
--- a/Modules/CMakeCXXCompilerABI.cpp
+++ b/Modules/CMakeCXXCompilerABI.cpp
@@ -1,5 +1,5 @@
#ifndef __cplusplus
-#error "A C compiler has been selected for C++."
+# error "A C compiler has been selected for C++."
#endif
#include "CMakeCompilerABI.h"
diff --git a/Modules/CMakeCompilerABI.h b/Modules/CMakeCompilerABI.h
index 1f9abb1..6f36b03 100644
--- a/Modules/CMakeCompilerABI.h
+++ b/Modules/CMakeCompilerABI.h
@@ -11,27 +11,27 @@ const char info_sizeof_dptr[] = {
/* Application Binary Interface. */
#if defined(__sgi) && defined(_ABIO32)
-#define ABI_ID "ELF O32"
+# define ABI_ID "ELF O32"
#elif defined(__sgi) && defined(_ABIN32)
-#define ABI_ID "ELF N32"
+# define ABI_ID "ELF N32"
#elif defined(__sgi) && defined(_ABI64)
-#define ABI_ID "ELF 64"
+# define ABI_ID "ELF 64"
/* Check for (some) ARM ABIs.
* See e.g. http://wiki.debian.org/ArmEabiPort for some information on this. */
#elif defined(__GNU__) && defined(__ELF__) && defined(__ARM_EABI__)
-#define ABI_ID "ELF ARMEABI"
+# define ABI_ID "ELF ARMEABI"
#elif defined(__GNU__) && defined(__ELF__) && defined(__ARMEB__)
-#define ABI_ID "ELF ARM"
+# define ABI_ID "ELF ARM"
#elif defined(__GNU__) && defined(__ELF__) && defined(__ARMEL__)
-#define ABI_ID "ELF ARM"
+# define ABI_ID "ELF ARM"
#elif defined(__linux__) && defined(__ELF__) && defined(__amd64__) && \
defined(__ILP32__)
-#define ABI_ID "ELF X32"
+# define ABI_ID "ELF X32"
#elif defined(__ELF__)
-#define ABI_ID "ELF"
+# define ABI_ID "ELF"
#endif
#if defined(ABI_ID)
diff --git a/Modules/CheckFunctionExists.c b/Modules/CheckFunctionExists.c
index 224e340..13435e0 100644
--- a/Modules/CheckFunctionExists.c
+++ b/Modules/CheckFunctionExists.c
@@ -1,19 +1,19 @@
#ifdef CHECK_FUNCTION_EXISTS
-#ifdef __cplusplus
+# ifdef __cplusplus
extern "C"
-#endif
+# endif
char
CHECK_FUNCTION_EXISTS(void);
-#ifdef __CLASSIC_C__
+# ifdef __CLASSIC_C__
int main()
{
int ac;
char* av[];
-#else
+# else
int main(int ac, char* av[])
{
-#endif
+# endif
CHECK_FUNCTION_EXISTS();
if (ac > 1000) {
return *av[0];
@@ -23,6 +23,6 @@ int main(int ac, char* av[])
#else /* CHECK_FUNCTION_EXISTS */
-#error "CHECK_FUNCTION_EXISTS has to specify the function"
+# error "CHECK_FUNCTION_EXISTS has to specify the function"
#endif /* CHECK_FUNCTION_EXISTS */
diff --git a/Modules/CheckVariableExists.c b/Modules/CheckVariableExists.c
index 6e94877..d68afb4 100644
--- a/Modules/CheckVariableExists.c
+++ b/Modules/CheckVariableExists.c
@@ -2,15 +2,15 @@
extern int CHECK_VARIABLE_EXISTS;
-#ifdef __CLASSIC_C__
+# ifdef __CLASSIC_C__
int main()
{
int ac;
char* av[];
-#else
+# else
int main(int ac, char* av[])
{
-#endif
+# endif
if (ac > 1000) {
return *av[0];
}
@@ -19,6 +19,6 @@ int main(int ac, char* av[])
#else /* CHECK_VARIABLE_EXISTS */
-#error "CHECK_VARIABLE_EXISTS has to specify the variable"
+# error "CHECK_VARIABLE_EXISTS has to specify the variable"
#endif /* CHECK_VARIABLE_EXISTS */
diff --git a/Modules/FindMPI/libver_mpi.c b/Modules/FindMPI/libver_mpi.c
index be9d19d..18d4a60 100644
--- a/Modules/FindMPI/libver_mpi.c
+++ b/Modules/FindMPI/libver_mpi.c
@@ -1,9 +1,9 @@
#include <mpi.h>
#ifdef __cplusplus
-#include <cstdio>
+# include <cstdio>
#else
-#include <stdio.h>
+# include <stdio.h>
#endif
int main(int argc, char* argv[])
diff --git a/Modules/FindMPI/test_mpi.c b/Modules/FindMPI/test_mpi.c
index b8a308a..05cec89 100644
--- a/Modules/FindMPI/test_mpi.c
+++ b/Modules/FindMPI/test_mpi.c
@@ -1,9 +1,9 @@
#include <mpi.h>
#ifdef __cplusplus
-#include <cstdio>
+# include <cstdio>
#else
-#include <stdio.h>
+# include <stdio.h>
#endif
#if defined(MPI_VERSION) && defined(MPI_SUBVERSION)
@@ -21,11 +21,11 @@ const char mpiver_str[] = { 'I', 'N',
int main(int argc, char* argv[])
{
#if defined(MPI_VERSION) && defined(MPI_SUBVERSION)
-#ifdef __cplusplus
+# ifdef __cplusplus
std::puts(mpiver_str);
-#else
+# else
puts(mpiver_str);
-#endif
+# endif
#endif
#ifdef TEST_MPI_MPICXX
MPI::MPI_Init(&argc, &argv);
diff --git a/Source/CPack/IFW/cmCPackIFWGenerator.cxx b/Source/CPack/IFW/cmCPackIFWGenerator.cxx
index 9f1a15e..cf8334a 100644
--- a/Source/CPack/IFW/cmCPackIFWGenerator.cxx
+++ b/Source/CPack/IFW/cmCPackIFWGenerator.cxx
@@ -61,7 +61,8 @@ int cmCPackIFWGenerator::PackageFiles()
ifwCmd += " --repository " + rd;
}
} else {
- cmCPackIFWLogger(WARNING, "The \"CPACK_IFW_REPOSITORIES_DIRECTORIES\" "
+ cmCPackIFWLogger(WARNING,
+ "The \"CPACK_IFW_REPOSITORIES_DIRECTORIES\" "
<< "variable is set, but content will be skipped, "
<< "because this feature available only since "
<< "QtIFW 3.1. Please update your QtIFW instance."
@@ -93,7 +94,8 @@ int cmCPackIFWGenerator::PackageFiles()
ofs << "# Run command: " << ifwCmd << std::endl
<< "# Output:" << std::endl
<< output << std::endl;
- cmCPackIFWLogger(ERROR, "Problem running IFW command: "
+ cmCPackIFWLogger(ERROR,
+ "Problem running IFW command: "
<< ifwCmd << std::endl
<< "Please check " << ifwTmpFile << " for errors"
<< std::endl);
@@ -102,15 +104,16 @@ int cmCPackIFWGenerator::PackageFiles()
if (!this->Repository.RepositoryUpdate.empty() &&
!this->Repository.PatchUpdatesXml()) {
- cmCPackIFWLogger(WARNING, "Problem patch IFW \"Updates\" "
+ cmCPackIFWLogger(WARNING,
+ "Problem patch IFW \"Updates\" "
<< "file: "
<< this->toplevel + "/repository/Updates.xml"
<< std::endl);
}
- cmCPackIFWLogger(OUTPUT, "- repository: " << this->toplevel
- << "/repository generated"
- << std::endl);
+ cmCPackIFWLogger(OUTPUT,
+ "- repository: " << this->toplevel
+ << "/repository generated" << std::endl);
}
// Run binary creator
@@ -145,7 +148,8 @@ int cmCPackIFWGenerator::PackageFiles()
ifwCmd += " --repository " + rd;
}
} else {
- cmCPackIFWLogger(WARNING, "The \"CPACK_IFW_REPOSITORIES_DIRECTORIES\" "
+ cmCPackIFWLogger(WARNING,
+ "The \"CPACK_IFW_REPOSITORIES_DIRECTORIES\" "
<< "variable is set, but content will be skipped, "
<< "because this feature available only since "
<< "QtIFW 3.1. Please update your QtIFW instance."
@@ -203,7 +207,8 @@ int cmCPackIFWGenerator::PackageFiles()
ofs << "# Run command: " << ifwCmd << std::endl
<< "# Output:" << std::endl
<< output << std::endl;
- cmCPackIFWLogger(ERROR, "Problem running IFW command: "
+ cmCPackIFWLogger(ERROR,
+ "Problem running IFW command: "
<< ifwCmd << std::endl
<< "Please check " << ifwTmpFile << " for errors"
<< std::endl);
@@ -257,8 +262,9 @@ int cmCPackIFWGenerator::InitializeInternal()
}
if (this->BinCreator.empty()) {
- cmCPackIFWLogger(ERROR, "Cannot find QtIFW compiler \"binarycreator\": "
- "likely it is not installed, or not in your PATH"
+ cmCPackIFWLogger(ERROR,
+ "Cannot find QtIFW compiler \"binarycreator\": "
+ "likely it is not installed, or not in your PATH"
<< std::endl);
return 0;
}
@@ -415,7 +421,8 @@ cmCPackComponent* cmCPackIFWGenerator::GetComponent(
}
} else {
this->Packages.erase(name);
- cmCPackIFWLogger(ERROR, "Cannot configure package \""
+ cmCPackIFWLogger(ERROR,
+ "Cannot configure package \""
<< name << "\" for component \"" << component->Name
<< "\"" << std::endl);
}
@@ -450,7 +457,8 @@ cmCPackComponentGroup* cmCPackIFWGenerator::GetComponentGroup(
this->BinaryPackages.insert(package);
} else {
this->Packages.erase(name);
- cmCPackIFWLogger(ERROR, "Cannot configure package \""
+ cmCPackIFWLogger(ERROR,
+ "Cannot configure package \""
<< name << "\" for component group \"" << group->Name
<< "\"" << std::endl);
}
@@ -596,7 +604,8 @@ cmCPackIFWRepository* cmCPackIFWGenerator::GetRepository(
} else {
this->Repositories.erase(repositoryName);
repository = nullptr;
- cmCPackIFWLogger(WARNING, "Invalid repository \""
+ cmCPackIFWLogger(WARNING,
+ "Invalid repository \""
<< repositoryName << "\""
<< " configuration. Repository will be skipped."
<< std::endl);
diff --git a/Source/CPack/IFW/cmCPackIFWGenerator.h b/Source/CPack/IFW/cmCPackIFWGenerator.h
index 919dd46..0430122 100644
--- a/Source/CPack/IFW/cmCPackIFWGenerator.h
+++ b/Source/CPack/IFW/cmCPackIFWGenerator.h
@@ -22,7 +22,9 @@
*
* http://qt-project.org/doc/qtinstallerframework/index.html
*/
-class cmCPackIFWGenerator : public cmCPackGenerator, public cmCPackIFWCommon
+class cmCPackIFWGenerator
+ : public cmCPackGenerator
+ , public cmCPackIFWCommon
{
public:
cmCPackTypeMacro(cmCPackIFWGenerator, cmCPackGenerator);
diff --git a/Source/CPack/IFW/cmCPackIFWInstaller.cxx b/Source/CPack/IFW/cmCPackIFWInstaller.cxx
index 05a852d..36cf08c 100644
--- a/Source/CPack/IFW/cmCPackIFWInstaller.cxx
+++ b/Source/CPack/IFW/cmCPackIFWInstaller.cxx
@@ -24,7 +24,8 @@ void cmCPackIFWInstaller::printSkippedOptionWarning(
const std::string& optionName, const std::string& optionValue)
{
cmCPackIFWLogger(
- WARNING, "Option "
+ WARNING,
+ "Option "
<< optionName << " is set to \"" << optionValue
<< "\" but will be skipped because the specified file does not exist."
<< std::endl);
@@ -146,7 +147,8 @@ void cmCPackIFWInstaller::ConfigureFromOptions()
if (this->WizardStyle != "Modern" && this->WizardStyle != "Aero" &&
this->WizardStyle != "Mac" && this->WizardStyle != "Classic") {
cmCPackIFWLogger(
- WARNING, "Option CPACK_IFW_PACKAGE_WIZARD_STYLE has unknown value \""
+ WARNING,
+ "Option CPACK_IFW_PACKAGE_WIZARD_STYLE has unknown value \""
<< option << "\". Expected values are: Modern, Aero, Mac, Classic."
<< std::endl);
}
@@ -469,7 +471,8 @@ void cmCPackIFWInstaller::GenerateInstallerFile()
cmsys::SystemTools::CopyFileIfDifferent(this->Resources[i], path);
resources.push_back(std::move(name));
} else {
- cmCPackIFWLogger(WARNING, "Can't copy resources from \""
+ cmCPackIFWLogger(WARNING,
+ "Can't copy resources from \""
<< this->Resources[i]
<< "\". Resource will be skipped." << std::endl);
}
diff --git a/Source/CPack/IFW/cmCPackIFWPackage.cxx b/Source/CPack/IFW/cmCPackIFWPackage.cxx
index d3ce15c..4c84612 100644
--- a/Source/CPack/IFW/cmCPackIFWPackage.cxx
+++ b/Source/CPack/IFW/cmCPackIFWPackage.cxx
@@ -226,7 +226,8 @@ int cmCPackIFWPackage::ConfigureFromComponent(cmCPackComponent* component)
if (const char* option = this->GetOption(prefix + "PRIORITY")) {
this->SortingPriority = option;
cmCPackIFWLogger(
- WARNING, "The \"PRIORITY\" option is set "
+ WARNING,
+ "The \"PRIORITY\" option is set "
<< "for component \"" << component->Name << "\", but there option is "
<< "deprecated. Please use \"SORTING_PRIORITY\" option instead."
<< std::endl);
@@ -303,7 +304,8 @@ int cmCPackIFWPackage::ConfigureFromGroup(cmCPackComponentGroup* group)
if (const char* option = this->GetOption(prefix + "PRIORITY")) {
this->SortingPriority = option;
cmCPackIFWLogger(
- WARNING, "The \"PRIORITY\" option is set "
+ WARNING,
+ "The \"PRIORITY\" option is set "
<< "for component group \"" << group->Name
<< "\", but there option is "
<< "deprecated. Please use \"SORTING_PRIORITY\" option instead."
diff --git a/Source/CPack/WiX/cmCMakeToWixPath.cxx b/Source/CPack/WiX/cmCMakeToWixPath.cxx
index 0b0e42a..b3889cf 100644
--- a/Source/CPack/WiX/cmCMakeToWixPath.cxx
+++ b/Source/CPack/WiX/cmCMakeToWixPath.cxx
@@ -8,7 +8,7 @@
#include <vector>
#ifdef __CYGWIN__
-#include <sys/cygwin.h>
+# include <sys/cygwin.h>
std::string CMakeToWixPath(const std::string& cygpath)
{
std::vector<char> winpath_chars;
diff --git a/Source/CPack/WiX/cmCPackWIXGenerator.cxx b/Source/CPack/WiX/cmCPackWIXGenerator.cxx
index a0bc0ea..e06efda 100644
--- a/Source/CPack/WiX/cmCPackWIXGenerator.cxx
+++ b/Source/CPack/WiX/cmCPackWIXGenerator.cxx
@@ -23,9 +23,9 @@
#include "cmsys/SystemTools.hxx"
#ifdef _WIN32
-#include <rpc.h> // for GUID generation (windows only)
+# include <rpc.h> // for GUID generation (windows only)
#else
-#include <uuid/uuid.h> // for GUID generation (libuuid)
+# include <uuid/uuid.h> // for GUID generation (libuuid)
#endif
#include "cmCMakeToWixPath.h"
@@ -55,8 +55,8 @@ bool cmCPackWIXGenerator::RunWiXCommand(std::string const& command)
{
std::string logFileName = this->CPackTopLevel + "/wix.log";
- cmCPackLogger(cmCPackLog::LOG_DEBUG, "Running WiX command: " << command
- << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_DEBUG,
+ "Running WiX command: " << command << std::endl);
std::string output;
@@ -71,8 +71,9 @@ bool cmCPackWIXGenerator::RunWiXCommand(std::string const& command)
logFile.close();
if (!status || returnValue) {
- cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem running WiX candle. "
- "Please check '"
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "Problem running WiX candle. "
+ "Please check '"
<< logFileName << "' for errors." << std::endl);
return false;
@@ -137,8 +138,8 @@ bool cmCPackWIXGenerator::RunLightCommand(std::string const& objectFiles)
int cmCPackWIXGenerator::PackageFiles()
{
if (!PackageFilesImpl() || cmSystemTools::GetErrorOccuredFlag()) {
- cmCPackLogger(cmCPackLog::LOG_ERROR, "Fatal WiX Generator Error"
- << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "Fatal WiX Generator Error" << std::endl);
return false;
}
@@ -148,8 +149,8 @@ int cmCPackWIXGenerator::PackageFiles()
bool cmCPackWIXGenerator::InitializeWiXConfiguration()
{
if (!ReadListFile("CPackWIX.cmake")) {
- cmCPackLogger(cmCPackLog::LOG_ERROR, "Error while executing CPackWIX.cmake"
- << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "Error while executing CPackWIX.cmake" << std::endl);
return false;
}
@@ -166,12 +167,13 @@ bool cmCPackWIXGenerator::InitializeWiXConfiguration()
std::string guid = GenerateGUID();
SetOption("CPACK_WIX_UPGRADE_GUID", guid.c_str());
- cmCPackLogger(
- cmCPackLog::LOG_WARNING, "CPACK_WIX_UPGRADE_GUID implicitly set to "
- << guid << " . "
- "Please refer to the documentation on how and why "
- "you might want to set this explicitly."
- << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_WARNING,
+ "CPACK_WIX_UPGRADE_GUID implicitly set to "
+ << guid
+ << " . "
+ "Please refer to the documentation on how and why "
+ "you might want to set this explicitly."
+ << std::endl);
}
if (!RequireOption("CPACK_TOPLEVEL_DIRECTORY", this->CPackTopLevel)) {
@@ -370,8 +372,9 @@ void cmCPackWIXGenerator::CreateWiXPropertiesIncludeFile()
includeFile.AddAttribute("Id", "FindInstallLocation");
includeFile.AddAttribute("Root", "HKLM");
includeFile.AddAttribute(
- "Key", "Software\\Microsoft\\Windows\\"
- "CurrentVersion\\Uninstall\\[WIX_UPGRADE_DETECTED]");
+ "Key",
+ "Software\\Microsoft\\Windows\\"
+ "CurrentVersion\\Uninstall\\[WIX_UPGRADE_DETECTED]");
includeFile.AddAttribute("Name", "InstallLocation");
includeFile.AddAttribute("Type", "raw");
includeFile.EndElement("RegistrySearch");
@@ -613,8 +616,9 @@ bool cmCPackWIXGenerator::GenerateMainSourceFileFromTemplate()
std::string mainSourceFilePath = this->CPackTopLevel + "/main.wxs";
if (!ConfigureFile(wixTemplate.c_str(), mainSourceFilePath.c_str())) {
- cmCPackLogger(cmCPackLog::LOG_ERROR, "Failed creating '"
- << mainSourceFilePath << "'' from template." << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "Failed creating '" << mainSourceFilePath
+ << "'' from template." << std::endl);
return false;
}
@@ -957,8 +961,8 @@ bool cmCPackWIXGenerator::RequireOption(std::string const& name,
return true;
} else {
- cmCPackLogger(cmCPackLog::LOG_ERROR, "Required variable "
- << name << " not set" << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "Required variable " << name << " not set" << std::endl);
return false;
}
diff --git a/Source/CPack/WiX/cmWIXAccessControlList.cxx b/Source/CPack/WiX/cmWIXAccessControlList.cxx
index 1603bf8..563de02 100644
--- a/Source/CPack/WiX/cmWIXAccessControlList.cxx
+++ b/Source/CPack/WiX/cmWIXAccessControlList.cxx
@@ -66,8 +66,9 @@ void cmWIXAccessControlList::CreatePermissionElement(std::string const& entry)
void cmWIXAccessControlList::ReportError(std::string const& entry,
std::string const& message)
{
- cmCPackLogger(cmCPackLog::LOG_ERROR, "Failed processing ACL entry '"
- << entry << "': " << message << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "Failed processing ACL entry '" << entry << "': " << message
+ << std::endl);
}
bool cmWIXAccessControlList::IsBooleanAttribute(std::string const& name)
diff --git a/Source/CPack/WiX/cmWIXPatch.cxx b/Source/CPack/WiX/cmWIXPatch.cxx
index dec95fb..ca232f9 100644
--- a/Source/CPack/WiX/cmWIXPatch.cxx
+++ b/Source/CPack/WiX/cmWIXPatch.cxx
@@ -13,8 +13,9 @@ bool cmWIXPatch::LoadFragments(std::string const& patchFilePath)
{
cmWIXPatchParser parser(Fragments, Logger);
if (!parser.ParseFile(patchFilePath.c_str())) {
- cmCPackLogger(cmCPackLog::LOG_ERROR, "Failed parsing XML patch file: '"
- << patchFilePath << "'" << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "Failed parsing XML patch file: '" << patchFilePath << "'"
+ << std::endl);
return false;
}
diff --git a/Source/CPack/WiX/cmWIXSourceWriter.cxx b/Source/CPack/WiX/cmWIXSourceWriter.cxx
index dc730e0..6adf80b 100644
--- a/Source/CPack/WiX/cmWIXSourceWriter.cxx
+++ b/Source/CPack/WiX/cmWIXSourceWriter.cxx
@@ -32,7 +32,8 @@ cmWIXSourceWriter::cmWIXSourceWriter(cmCPackLog* logger,
cmWIXSourceWriter::~cmWIXSourceWriter()
{
if (Elements.size() > 1) {
- cmCPackLogger(cmCPackLog::LOG_ERROR, Elements.size() - 1
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ Elements.size() - 1
<< " WiX elements were still open when closing '"
<< SourceFilename << "'" << std::endl);
return;
@@ -65,7 +66,8 @@ void cmWIXSourceWriter::EndElement(std::string const& name)
}
if (Elements.back() != name) {
- cmCPackLogger(cmCPackLog::LOG_ERROR, "WiX element <"
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "WiX element <"
<< Elements.back() << "> can not be closed by </" << name
<< "> in '" << SourceFilename << "'" << std::endl);
return;
diff --git a/Source/CPack/cmCPackArchiveGenerator.cxx b/Source/CPack/cmCPackArchiveGenerator.cxx
index 00fbdab..b734bb4 100644
--- a/Source/CPack/cmCPackArchiveGenerator.cxx
+++ b/Source/CPack/cmCPackArchiveGenerator.cxx
@@ -87,8 +87,9 @@ int cmCPackArchiveGenerator::addOneComponentToArchive(
cmCPackLogger(cmCPackLog::LOG_DEBUG, "Adding file: " << rp << std::endl);
archive.Add(rp, 0, nullptr, false);
if (!archive) {
- cmCPackLogger(cmCPackLog::LOG_ERROR, "ERROR while packaging files: "
- << archive.GetError() << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "ERROR while packaging files: " << archive.GetError()
+ << std::endl);
return 0;
}
}
@@ -111,7 +112,8 @@ int cmCPackArchiveGenerator::addOneComponentToArchive(
} \
cmArchiveWrite archive(gf, this->Compress, this->ArchiveFormat); \
if (!(archive)) { \
- cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem to create archive < " \
+ cmCPackLogger(cmCPackLog::LOG_ERROR, \
+ "Problem to create archive < " \
<< (filename) << ">. ERROR =" << (archive).GetError() \
<< std::endl); \
return 0; \
@@ -148,7 +150,8 @@ int cmCPackArchiveGenerator::PackageComponents(bool ignoreGroup)
// Does the component belong to a group?
if (comp.second.Group == nullptr) {
cmCPackLogger(
- cmCPackLog::LOG_VERBOSE, "Component <"
+ cmCPackLog::LOG_VERBOSE,
+ "Component <"
<< comp.second.Name
<< "> does not belong to any group, package it separately."
<< std::endl);
@@ -258,7 +261,8 @@ int cmCPackArchiveGenerator::PackageFiles()
std::string rp = cmSystemTools::RelativePath(toplevel, file);
archive.Add(rp, 0, nullptr, false);
if (!archive) {
- cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem while adding file< "
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "Problem while adding file< "
<< file << "> to archive <" << packageFileNames[0]
<< "> .ERROR =" << archive.GetError() << std::endl);
return 0;
diff --git a/Source/CPack/cmCPackBundleGenerator.cxx b/Source/CPack/cmCPackBundleGenerator.cxx
index f47ca7a..f8fd108 100644
--- a/Source/CPack/cmCPackBundleGenerator.cxx
+++ b/Source/CPack/cmCPackBundleGenerator.cxx
@@ -32,8 +32,8 @@ int cmCPackBundleGenerator::InitializeInternal()
"codesign", std::vector<std::string>(), false);
if (codesign_path.empty()) {
- cmCPackLogger(cmCPackLog::LOG_ERROR, "Cannot locate codesign command"
- << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "Cannot locate codesign command" << std::endl);
return 0;
}
this->SetOptionIfNotSet("CPACK_COMMAND_CODESIGN", codesign_path.c_str());
@@ -59,8 +59,8 @@ int cmCPackBundleGenerator::ConstructBundle()
? this->GetOption("CPACK_BUNDLE_NAME")
: "";
if (cpack_bundle_name.empty()) {
- cmCPackLogger(cmCPackLog::LOG_ERROR, "CPACK_BUNDLE_NAME must be set."
- << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "CPACK_BUNDLE_NAME must be set." << std::endl);
return 0;
}
@@ -69,8 +69,8 @@ int cmCPackBundleGenerator::ConstructBundle()
? this->GetOption("CPACK_BUNDLE_PLIST")
: "";
if (cpack_bundle_plist.empty()) {
- cmCPackLogger(cmCPackLog::LOG_ERROR, "CPACK_BUNDLE_PLIST must be set."
- << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "CPACK_BUNDLE_PLIST must be set." << std::endl);
return 0;
}
@@ -79,8 +79,8 @@ int cmCPackBundleGenerator::ConstructBundle()
? this->GetOption("CPACK_BUNDLE_ICON")
: "";
if (cpack_bundle_icon.empty()) {
- cmCPackLogger(cmCPackLog::LOG_ERROR, "CPACK_BUNDLE_ICON must be set."
- << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "CPACK_BUNDLE_ICON must be set." << std::endl);
return 0;
}
@@ -269,8 +269,8 @@ int cmCPackBundleGenerator::SignBundle(const std::string& src_dir)
return 0;
}
- cmCPackLogger(cmCPackLog::LOG_OUTPUT, "- Application has been codesigned"
- << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_OUTPUT,
+ "- Application has been codesigned" << std::endl);
cmCPackLogger(cmCPackLog::LOG_VERBOSE,
(this->GetOption("CPACK_BUNDLE_APPLE_ENTITLEMENTS")
? "with entitlement sandboxing"
diff --git a/Source/CPack/cmCPackCygwinSourceGenerator.cxx b/Source/CPack/cmCPackCygwinSourceGenerator.cxx
index 2c289f6..889f29a 100644
--- a/Source/CPack/cmCPackCygwinSourceGenerator.cxx
+++ b/Source/CPack/cmCPackCygwinSourceGenerator.cxx
@@ -15,8 +15,8 @@
// system tools because it is not implemented robustly enough to move
// files across directories.
#ifdef _WIN32
-#include "cm_sys_stat.h"
-#include <windows.h>
+# include "cm_sys_stat.h"
+# include <windows.h>
#endif
cmCPackCygwinSourceGenerator::cmCPackCygwinSourceGenerator()
@@ -73,7 +73,8 @@ int cmCPackCygwinSourceGenerator::PackageFiles()
if (!cmSystemTools::CopyFileAlways(
this->GetOption("CPACK_CYGWIN_PATCH_FILE"),
this->GetOption("CPACK_TOPLEVEL_DIRECTORY"))) {
- cmCPackLogger(cmCPackLog::LOG_ERROR, "problem copying: ["
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "problem copying: ["
<< this->GetOption("CPACK_CYGWIN_PATCH_FILE") << "]\nto\n["
<< this->GetOption("CPACK_TOPLEVEL_DIRECTORY") << "]\n");
return 0;
@@ -87,7 +88,8 @@ int cmCPackCygwinSourceGenerator::PackageFiles()
if (!cmSystemTools::CopyFileAlways(
this->GetOption("CPACK_CYGWIN_BUILD_SCRIPT"),
this->GetOption("CPACK_TOPLEVEL_DIRECTORY"))) {
- cmCPackLogger(cmCPackLog::LOG_ERROR, "problem copying: "
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "problem copying: "
<< this->GetOption("CPACK_CYGWIN_BUILD_SCRIPT") << "\nto\n"
<< this->GetOption("CPACK_TOPLEVEL_DIRECTORY") << "]\n");
return 0;
@@ -96,7 +98,8 @@ int cmCPackCygwinSourceGenerator::PackageFiles()
outerTarFile += "-";
const char* patch = this->GetOption("CPACK_CYGWIN_PATCH_NUMBER");
if (!patch) {
- cmCPackLogger(cmCPackLog::LOG_WARNING, "CPACK_CYGWIN_PATCH_NUMBER"
+ cmCPackLogger(cmCPackLog::LOG_WARNING,
+ "CPACK_CYGWIN_PATCH_NUMBER"
<< " not specified, defaulting to 1\n");
patch = "1";
}
@@ -147,7 +150,8 @@ const char* cmCPackCygwinSourceGenerator::GetOutputExtension()
this->OutputExtension = "-";
const char* patch = this->GetOption("CPACK_CYGWIN_PATCH_NUMBER");
if (!patch) {
- cmCPackLogger(cmCPackLog::LOG_WARNING, "CPACK_CYGWIN_PATCH_NUMBER"
+ cmCPackLogger(cmCPackLog::LOG_WARNING,
+ "CPACK_CYGWIN_PATCH_NUMBER"
<< " not specified, defaulting to 1\n");
patch = "1";
}
diff --git a/Source/CPack/cmCPackDebGenerator.cxx b/Source/CPack/cmCPackDebGenerator.cxx
index 8ec54f8..93cdf41 100644
--- a/Source/CPack/cmCPackDebGenerator.cxx
+++ b/Source/CPack/cmCPackDebGenerator.cxx
@@ -62,8 +62,8 @@ int cmCPackDebGenerator::PackageOnePack(std::string const& initialTopLevel,
this->SetOption("CPACK_DEB_PACKAGE_COMPONENT_PART_PATH",
component_path.c_str());
if (!this->ReadListFile("CPackDeb.cmake")) {
- cmCPackLogger(cmCPackLog::LOG_ERROR, "Error while execution CPackDeb.cmake"
- << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "Error while execution CPackDeb.cmake" << std::endl);
retval = 0;
return retval;
}
@@ -115,7 +115,8 @@ int cmCPackDebGenerator::PackageComponents(bool ignoreGroup)
// Does the component belong to a group?
if (comp.second.Group == nullptr) {
cmCPackLogger(
- cmCPackLog::LOG_VERBOSE, "Component <"
+ cmCPackLog::LOG_VERBOSE,
+ "Component <"
<< comp.second.Name
<< "> does not belong to any group, package it separately."
<< std::endl);
@@ -179,8 +180,8 @@ int cmCPackDebGenerator::PackageComponentsAllInOne(
component_path.c_str());
}
if (!this->ReadListFile("CPackDeb.cmake")) {
- cmCPackLogger(cmCPackLog::LOG_ERROR, "Error while execution CPackDeb.cmake"
- << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "Error while execution CPackDeb.cmake" << std::endl);
retval = 0;
return retval;
}
@@ -413,7 +414,8 @@ int cmCPackDebGenerator::createDeb()
cmGeneratedFileStream fileStream_data_tar;
fileStream_data_tar.Open(filename_data_tar.c_str(), false, true);
if (!fileStream_data_tar) {
- cmCPackLogger(cmCPackLog::LOG_ERROR, "Error opening the file \""
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "Error opening the file \""
<< filename_data_tar << "\" for writing" << std::endl);
return 0;
}
@@ -430,9 +432,9 @@ int cmCPackDebGenerator::createDeb()
// e.g. /opt/bin/foo, /usr/bin/bar and /usr/bin/baz would
// give /usr and /opt
size_t topLevelLength = strGenWDIR.length();
- cmCPackLogger(cmCPackLog::LOG_DEBUG, "WDIR: \""
- << strGenWDIR << "\", length = " << topLevelLength
- << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_DEBUG,
+ "WDIR: \"" << strGenWDIR << "\", length = " << topLevelLength
+ << std::endl);
std::set<std::string> orderedFiles;
// we have to reconstruct the parent folders as well
@@ -448,13 +450,13 @@ int cmCPackDebGenerator::createDeb()
}
for (std::string const& file : orderedFiles) {
- cmCPackLogger(cmCPackLog::LOG_DEBUG, "FILEIT: \"" << file << "\""
- << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_DEBUG,
+ "FILEIT: \"" << file << "\"" << std::endl);
std::string::size_type slashPos = file.find('/', topLevelLength + 1);
std::string relativeDir =
file.substr(topLevelLength, slashPos - topLevelLength);
- cmCPackLogger(cmCPackLog::LOG_DEBUG, "RELATIVEDIR: \""
- << relativeDir << "\"" << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_DEBUG,
+ "RELATIVEDIR: \"" << relativeDir << "\"" << std::endl);
#ifdef WIN32
std::string mode_t_adt_filename = file + ":cmake_mode_t";
@@ -477,7 +479,8 @@ int cmCPackDebGenerator::createDeb()
// do not recurse because the loop will do it
if (!data_tar.Add(file, topLevelLength, ".", false)) {
- cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem adding file to tar:"
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "Problem adding file to tar:"
<< std::endl
<< "#top level directory: " << strGenWDIR << std::endl
<< "#file: " << file << std::endl
@@ -505,8 +508,8 @@ int cmCPackDebGenerator::createDeb()
std::string output =
cmSystemTools::ComputeFileHash(file, cmCryptoHash::AlgoMD5);
if (output.empty()) {
- cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem computing the md5 of "
- << file << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "Problem computing the md5 of " << file << std::endl);
}
output += " " + file + "\n";
@@ -527,9 +530,10 @@ int cmCPackDebGenerator::createDeb()
cmGeneratedFileStream fileStream_control_tar;
fileStream_control_tar.Open(filename_control_tar.c_str(), false, true);
if (!fileStream_control_tar) {
- cmCPackLogger(cmCPackLog::LOG_ERROR, "Error opening the file \""
- << filename_control_tar << "\" for writing"
- << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "Error opening the file \"" << filename_control_tar
+ << "\" for writing"
+ << std::endl);
return 0;
}
cmArchiveWrite control_tar(fileStream_control_tar,
@@ -557,7 +561,8 @@ int cmCPackDebGenerator::createDeb()
// adds control and md5sums
if (!control_tar.Add(md5filename, strGenWDIR.length(), ".") ||
!control_tar.Add(strGenWDIR + "/control", strGenWDIR.length(), ".")) {
- cmCPackLogger(cmCPackLog::LOG_ERROR, "Error adding file to tar:"
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "Error adding file to tar:"
<< std::endl
<< "#top level directory: " << strGenWDIR << std::endl
<< "#file: \"control\" or \"md5sums\"" << std::endl
@@ -568,7 +573,8 @@ int cmCPackDebGenerator::createDeb()
// adds generated shlibs file
if (gen_shibs) {
if (!control_tar.Add(shlibsfilename, strGenWDIR.length(), ".")) {
- cmCPackLogger(cmCPackLog::LOG_ERROR, "Error adding file to tar:"
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "Error adding file to tar:"
<< std::endl
<< "#top level directory: " << strGenWDIR << std::endl
<< "#file: \"shlibs\"" << std::endl
@@ -581,7 +587,8 @@ int cmCPackDebGenerator::createDeb()
if (this->IsOn("GEN_CPACK_DEBIAN_GENERATE_POSTINST")) {
control_tar.SetPermissions(permission755);
if (!control_tar.Add(postinst, strGenWDIR.length(), ".")) {
- cmCPackLogger(cmCPackLog::LOG_ERROR, "Error adding file to tar:"
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "Error adding file to tar:"
<< std::endl
<< "#top level directory: " << strGenWDIR << std::endl
<< "#file: \"postinst\"" << std::endl
@@ -594,7 +601,8 @@ int cmCPackDebGenerator::createDeb()
if (this->IsOn("GEN_CPACK_DEBIAN_GENERATE_POSTRM")) {
control_tar.SetPermissions(permission755);
if (!control_tar.Add(postrm, strGenWDIR.length(), ".")) {
- cmCPackLogger(cmCPackLog::LOG_ERROR, "Error adding file to tar:"
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "Error adding file to tar:"
<< std::endl
<< "#top level directory: " << strGenWDIR << std::endl
<< "#file: \"postinst\"" << std::endl
@@ -659,7 +667,8 @@ int cmCPackDebGenerator::createDeb()
if (!deb.Add(tlDir + "debian-binary", tlDir.length()) ||
!deb.Add(tlDir + "control.tar.gz", tlDir.length()) ||
!deb.Add(tlDir + "data.tar" + compression_suffix, tlDir.length())) {
- cmCPackLogger(cmCPackLog::LOG_ERROR, "Error creating debian package:"
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "Error creating debian package:"
<< std::endl
<< "#top level directory: " << outputDir << std::endl
<< "#file: " << outputName << std::endl
diff --git a/Source/CPack/cmCPackDragNDropGenerator.cxx b/Source/CPack/cmCPackDragNDropGenerator.cxx
index e95b96df..5616523 100644
--- a/Source/CPack/cmCPackDragNDropGenerator.cxx
+++ b/Source/CPack/cmCPackDragNDropGenerator.cxx
@@ -21,7 +21,7 @@
// For the old LocaleStringToLangAndRegionCodes() function, to convert
// to the old Script Manager RegionCode values needed for the 'LPic' data
// structure used for generating multi-lingual SLAs.
-#include <CoreServices/CoreServices.h>
+# include <CoreServices/CoreServices.h>
#endif
static const char* SLAHeader =
@@ -77,8 +77,8 @@ int cmCPackDragNDropGenerator::InitializeInternal()
const std::string hdiutil_path =
cmSystemTools::FindProgram("hdiutil", std::vector<std::string>(), false);
if (hdiutil_path.empty()) {
- cmCPackLogger(cmCPackLog::LOG_ERROR, "Cannot locate hdiutil command"
- << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "Cannot locate hdiutil command" << std::endl);
return 0;
}
this->SetOptionIfNotSet("CPACK_COMMAND_HDIUTIL", hdiutil_path.c_str());
@@ -86,16 +86,16 @@ int cmCPackDragNDropGenerator::InitializeInternal()
const std::string setfile_path =
cmSystemTools::FindProgram("SetFile", paths, false);
if (setfile_path.empty()) {
- cmCPackLogger(cmCPackLog::LOG_ERROR, "Cannot locate SetFile command"
- << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "Cannot locate SetFile command" << std::endl);
return 0;
}
this->SetOptionIfNotSet("CPACK_COMMAND_SETFILE", setfile_path.c_str());
const std::string rez_path = cmSystemTools::FindProgram("Rez", paths, false);
if (rez_path.empty()) {
- cmCPackLogger(cmCPackLog::LOG_ERROR, "Cannot locate Rez command"
- << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "Cannot locate Rez command" << std::endl);
return 0;
}
this->SetOptionIfNotSet("CPACK_COMMAND_REZ", rez_path.c_str());
@@ -124,8 +124,8 @@ int cmCPackDragNDropGenerator::InitializeInternal()
return 0;
}
if (!cmSystemTools::FileExists(slaDirectory, false)) {
- cmCPackLogger(cmCPackLog::LOG_ERROR, "CPACK_DMG_SLA_DIR does not exist"
- << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "CPACK_DMG_SLA_DIR does not exist" << std::endl);
return 0;
}
@@ -140,14 +140,16 @@ int cmCPackDragNDropGenerator::InitializeInternal()
for (auto const& language : languages) {
std::string license = slaDirectory + "/" + language + ".license.txt";
if (!singleLicense && !cmSystemTools::FileExists(license)) {
- cmCPackLogger(cmCPackLog::LOG_ERROR, "Missing license file "
- << language << ".license.txt" << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "Missing license file " << language << ".license.txt"
+ << std::endl);
return 0;
}
std::string menu = slaDirectory + "/" + language + ".menu.txt";
if (!cmSystemTools::FileExists(menu)) {
- cmCPackLogger(cmCPackLog::LOG_ERROR, "Missing menu file "
- << language << ".menu.txt" << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "Missing menu file " << language << ".menu.txt"
+ << std::endl);
return 0;
}
}
@@ -212,8 +214,9 @@ bool cmCPackDragNDropGenerator::CopyFile(std::ostringstream& source,
{
if (!cmSystemTools::CopyFileIfDifferent(source.str().c_str(),
target.str().c_str())) {
- cmCPackLogger(cmCPackLog::LOG_ERROR, "Error copying "
- << source.str() << " to " << target.str() << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "Error copying " << source.str() << " to " << target.str()
+ << std::endl);
return false;
}
@@ -248,8 +251,8 @@ bool cmCPackDragNDropGenerator::RunCommand(std::ostringstream& command,
this->GeneratorVerbose, cmDuration::zero());
if (!result || exit_code) {
- cmCPackLogger(cmCPackLog::LOG_ERROR, "Error executing: " << command.str()
- << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "Error executing: " << command.str() << std::endl);
return false;
}
@@ -400,8 +403,8 @@ int cmCPackDragNDropGenerator::CreateDMG(const std::string& src_dir,
std::ostringstream dummy_padding;
dummy_padding << staging.str() << "/.dummy-padding-file";
if (!this->CreateEmptyFile(dummy_padding, 1048576)) {
- cmCPackLogger(cmCPackLog::LOG_ERROR, "Error creating dummy padding file."
- << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "Error creating dummy padding file." << std::endl);
return 0;
}
@@ -460,8 +463,8 @@ int cmCPackDragNDropGenerator::CreateDMG(const std::string& src_dir,
std::ostringstream dummy_padding;
dummy_padding << temp_mount << "/.dummy-padding-file";
if (!cmSystemTools::RemoveFile(dummy_padding.str())) {
- cmCPackLogger(cmCPackLog::LOG_ERROR, "Error removing dummy padding file."
- << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "Error removing dummy padding file." << std::endl);
had_error = true;
}
@@ -565,8 +568,9 @@ int cmCPackDragNDropGenerator::CreateDMG(const std::string& src_dir,
CFLocaleCreateCanonicalLanguageIdentifierFromString(
nullptr, language_cfstring);
if (!iso_language) {
- cmCPackLogger(cmCPackLog::LOG_ERROR, languages[i]
- << " is not a recognized language" << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ languages[i] << " is not a recognized language"
+ << std::endl);
}
char iso_language_cstr[65];
CFStringGetCString(iso_language, iso_language_cstr,
@@ -638,9 +642,10 @@ int cmCPackDragNDropGenerator::CreateDMG(const std::string& src_dir,
ofs.Close();
if (have_write_license_error) {
- cmCPackLogger(cmCPackLog::LOG_ERROR, "Error writing license file to SLA."
- << std::endl
- << error << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "Error writing license file to SLA." << std::endl
+ << error
+ << std::endl);
return 0;
}
@@ -692,9 +697,9 @@ int cmCPackDragNDropGenerator::CreateDMG(const std::string& src_dir,
embed_sla_command << "\"" << temp_image << "\"";
if (!this->RunCommand(embed_sla_command, &error)) {
- cmCPackLogger(cmCPackLog::LOG_ERROR, "Error adding SLA." << std::endl
- << error
- << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "Error adding SLA." << std::endl
+ << error << std::endl);
return 0;
}
@@ -726,9 +731,10 @@ int cmCPackDragNDropGenerator::CreateDMG(const std::string& src_dir,
std::string convert_error;
if (!this->RunCommand(final_image_command, &convert_error)) {
- cmCPackLogger(cmCPackLog::LOG_ERROR, "Error compressing disk image."
- << std::endl
- << convert_error << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "Error compressing disk image." << std::endl
+ << convert_error
+ << std::endl);
return 0;
}
diff --git a/Source/CPack/cmCPackGenerator.cxx b/Source/CPack/cmCPackGenerator.cxx
index 64aba10..f15445b 100644
--- a/Source/CPack/cmCPackGenerator.cxx
+++ b/Source/CPack/cmCPackGenerator.cxx
@@ -25,8 +25,8 @@
#include "cmake.h"
#if defined(__HAIKU__)
-#include <FindDirectory.h>
-#include <StorageDefs.h>
+# include <FindDirectory.h>
+# include <StorageDefs.h>
#endif
cmCPackGenerator::cmCPackGenerator()
@@ -61,9 +61,10 @@ int cmCPackGenerator::PrepareNames()
// checks CPACK_SET_DESTDIR support
if (IsOn("CPACK_SET_DESTDIR")) {
if (SETDESTDIR_UNSUPPORTED == SupportsSetDestdir()) {
- cmCPackLogger(
- cmCPackLog::LOG_ERROR, "CPACK_SET_DESTDIR is set to ON but the '"
- << Name << "' generator does NOT support it." << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "CPACK_SET_DESTDIR is set to ON but the '"
+ << Name << "' generator does NOT support it."
+ << std::endl);
return 0;
}
if (SETDESTDIR_SHOULD_NOT_BE_USED == SupportsSetDestdir()) {
@@ -92,8 +93,8 @@ int cmCPackGenerator::PrepareNames()
std::string outName = pfname;
tempDirectory += "/" + outName;
if (!this->GetOutputExtension()) {
- cmCPackLogger(cmCPackLog::LOG_ERROR, "No output extension specified"
- << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "No output extension specified" << std::endl);
return 0;
}
outName += this->GetOutputExtension();
@@ -125,8 +126,8 @@ int cmCPackGenerator::PrepareNames()
"Look for: CPACK_PACKAGE_DESCRIPTION_FILE" << std::endl);
const char* descFileName = this->GetOption("CPACK_PACKAGE_DESCRIPTION_FILE");
if (descFileName) {
- cmCPackLogger(cmCPackLog::LOG_DEBUG, "Look for: " << descFileName
- << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_DEBUG,
+ "Look for: " << descFileName << std::endl);
if (!cmSystemTools::FileExists(descFileName)) {
cmCPackLogger(cmCPackLog::LOG_ERROR,
"Cannot find description file name: ["
@@ -161,8 +162,9 @@ int cmCPackGenerator::PrepareNames()
const char* algoSignature = this->GetOption("CPACK_PACKAGE_CHECKSUM");
if (algoSignature) {
if (!cmCryptoHash::New(algoSignature)) {
- cmCPackLogger(cmCPackLog::LOG_ERROR, "Cannot recognize algorithm: "
- << algoSignature << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "Cannot recognize algorithm: " << algoSignature
+ << std::endl);
return 0;
}
}
@@ -215,7 +217,8 @@ int cmCPackGenerator::InstallProject()
cmSystemTools::ExpandListArgument(default_dir_install_permissions, items);
for (const auto& arg : items) {
if (!cmFSPermissions::stringToModeT(arg, default_dir_mode_v)) {
- cmCPackLogger(cmCPackLog::LOG_ERROR, "Invalid permission value '"
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "Invalid permission value '"
<< arg
<< "'."
" CPACK_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS "
@@ -289,10 +292,11 @@ int cmCPackGenerator::InstallProjectViaInstallCommands(
ofs << "# Run command: " << ic << std::endl
<< "# Output:" << std::endl
<< output << std::endl;
- cmCPackLogger(
- cmCPackLog::LOG_ERROR, "Problem running install command: "
- << ic << std::endl
- << "Please check " << tmpFile << " for errors" << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "Problem running install command: "
+ << ic << std::endl
+ << "Please check " << tmpFile << " for errors"
+ << std::endl);
return 0;
}
}
@@ -376,8 +380,9 @@ int cmCPackGenerator::InstallProjectViaInstalledDirectories(
}
std::string filePath = tempDir;
filePath += "/" + subdir + "/" + cmSystemTools::RelativePath(top, gf);
- cmCPackLogger(cmCPackLog::LOG_DEBUG, "Copy file: "
- << inFile << " -> " << filePath << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_DEBUG,
+ "Copy file: " << inFile << " -> " << filePath
+ << std::endl);
/* If the file is a symlink we will have to re-create it */
if (cmSystemTools::FileIsSymlink(inFile)) {
std::string targetFile;
@@ -392,8 +397,9 @@ int cmCPackGenerator::InstallProjectViaInstalledDirectories(
filePath.c_str()) &&
cmSystemTools::CopyFileTime(inFile.c_str(),
filePath.c_str()))) {
- cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem copying file: "
- << inFile << " -> " << filePath << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "Problem copying file: " << inFile << " -> "
+ << filePath << std::endl);
return 0;
}
}
@@ -402,40 +408,44 @@ int cmCPackGenerator::InstallProjectViaInstalledDirectories(
std::string curDir = cmSystemTools::GetCurrentWorkingDirectory();
std::string goToDir = tempDir;
goToDir += "/" + subdir;
- cmCPackLogger(cmCPackLog::LOG_DEBUG, "Change dir to: " << goToDir
- << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_DEBUG,
+ "Change dir to: " << goToDir << std::endl);
cmWorkingDirectory workdir(goToDir);
if (workdir.Failed()) {
- cmCPackLogger(
- cmCPackLog::LOG_ERROR, "Failed to change working directory to "
- << goToDir << " : " << std::strerror(workdir.GetLastResult())
- << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "Failed to change working directory to "
+ << goToDir << " : "
+ << std::strerror(workdir.GetLastResult())
+ << std::endl);
return 0;
}
for (auto const& symlinked : symlinkedFiles) {
- cmCPackLogger(cmCPackLog::LOG_DEBUG, "Will create a symlink: "
- << symlinked.second << "--> " << symlinked.first
- << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_DEBUG,
+ "Will create a symlink: " << symlinked.second << "--> "
+ << symlinked.first
+ << std::endl);
// make sure directory exists for symlink
std::string destDir =
cmSystemTools::GetFilenamePath(symlinked.second);
if (!destDir.empty() &&
!cmSystemTools::MakeDirectory(destDir, default_dir_mode)) {
- cmCPackLogger(cmCPackLog::LOG_ERROR, "Cannot create dir: "
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "Cannot create dir: "
<< destDir << "\nTrying to create symlink: "
<< symlinked.second << "--> " << symlinked.first
<< std::endl);
}
if (!cmSystemTools::CreateSymlink(symlinked.first,
symlinked.second)) {
- cmCPackLogger(cmCPackLog::LOG_ERROR, "Cannot create symlink: "
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "Cannot create symlink: "
<< symlinked.second << "--> " << symlinked.first
<< std::endl);
return 0;
}
}
- cmCPackLogger(cmCPackLog::LOG_DEBUG, "Going back to: " << curDir
- << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_DEBUG,
+ "Going back to: " << curDir << std::endl);
}
}
}
@@ -447,8 +457,8 @@ int cmCPackGenerator::InstallProjectViaInstallScript(
{
const char* cmakeScripts = this->GetOption("CPACK_INSTALL_SCRIPT");
if (cmakeScripts && *cmakeScripts) {
- cmCPackLogger(cmCPackLog::LOG_OUTPUT, "- Install scripts: " << cmakeScripts
- << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_OUTPUT,
+ "- Install scripts: " << cmakeScripts << std::endl);
std::vector<std::string> cmakeScriptsVector;
cmSystemTools::ExpandListArgument(cmakeScripts, cmakeScriptsVector);
for (std::string const& installScript : cmakeScriptsVector) {
@@ -603,8 +613,9 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects(
preinstall, buildConfig, "", false);
cmCPackLogger(cmCPackLog::LOG_DEBUG,
"- Install command: " << buildCommand << std::endl);
- cmCPackLogger(cmCPackLog::LOG_OUTPUT, "- Run preinstall target for: "
- << installProjectName << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_OUTPUT,
+ "- Run preinstall target for: " << installProjectName
+ << std::endl);
std::string output;
int retVal = 1;
bool resB = cmSystemTools::RunSingleCommand(
@@ -619,10 +630,11 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects(
<< "# Directory: " << installDirectory << std::endl
<< "# Output:" << std::endl
<< output << std::endl;
- cmCPackLogger(
- cmCPackLog::LOG_ERROR, "Problem running install command: "
- << buildCommand << std::endl
- << "Please check " << tmpFile << " for errors" << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "Problem running install command: "
+ << buildCommand << std::endl
+ << "Please check " << tmpFile << " for errors"
+ << std::endl);
return 0;
}
}
@@ -636,8 +648,9 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects(
std::string tempInstallDirectory = baseTempInstallDirectory;
installComponent = component;
if (componentInstall) {
- cmCPackLogger(cmCPackLog::LOG_OUTPUT, "- Install component: "
- << installComponent << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_OUTPUT,
+ "- Install component: " << installComponent
+ << std::endl);
}
cmake cm(cmake::RoleScript);
@@ -733,8 +746,8 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects(
*/
cmSystemTools::PutEnv(std::string("DESTDIR=") +
tempInstallDirectory);
- cmCPackLogger(cmCPackLog::LOG_DEBUG, "- Creating directory: '"
- << dir << "'" << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_DEBUG,
+ "- Creating directory: '" << dir << "'" << std::endl);
if (!cmsys::SystemTools::MakeDirectory(dir, default_dir_mode)) {
cmCPackLogger(
@@ -840,7 +853,8 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects(
localFileName =
localFileName.substr(localFileName.find_first_not_of('/'));
Components[installComponent].Files.push_back(localFileName);
- cmCPackLogger(cmCPackLog::LOG_DEBUG, "Adding file <"
+ cmCPackLogger(cmCPackLog::LOG_DEBUG,
+ "Adding file <"
<< localFileName << "> to component <"
<< installComponent << ">" << std::endl);
}
@@ -912,16 +926,16 @@ void cmCPackGenerator::SetOption(const std::string& op, const char* value)
this->MakefileMap->RemoveDefinition(op);
return;
}
- cmCPackLogger(cmCPackLog::LOG_DEBUG, this->GetNameOfClass()
- << "::SetOption(" << op << ", " << value << ")"
- << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_DEBUG,
+ this->GetNameOfClass() << "::SetOption(" << op << ", " << value
+ << ")" << std::endl);
this->MakefileMap->AddDefinition(op, value);
}
int cmCPackGenerator::DoPackage()
{
- cmCPackLogger(cmCPackLog::LOG_OUTPUT, "Create package using " << this->Name
- << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_OUTPUT,
+ "Create package using " << this->Name << std::endl);
// Prepare CPack internal name and check
// values for many CPACK_xxx vars
@@ -939,8 +953,9 @@ int cmCPackGenerator::DoPackage()
const char* toplevelDirectory =
this->GetOption("CPACK_TOPLEVEL_DIRECTORY");
if (cmSystemTools::FileExists(toplevelDirectory)) {
- cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Remove toplevel directory: "
- << toplevelDirectory << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_VERBOSE,
+ "Remove toplevel directory: " << toplevelDirectory
+ << std::endl);
if (!cmSystemTools::RepeatedRemoveDirectory(toplevelDirectory)) {
cmCPackLogger(cmCPackLog::LOG_ERROR,
"Problem removing toplevel directory: "
@@ -949,8 +964,8 @@ int cmCPackGenerator::DoPackage()
}
}
}
- cmCPackLogger(cmCPackLog::LOG_DEBUG, "About to install project "
- << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_DEBUG,
+ "About to install project " << std::endl);
if (!this->InstallProject()) {
return 0;
@@ -975,12 +990,13 @@ int cmCPackGenerator::DoPackage()
}
cmCPackLogger(cmCPackLog::LOG_OUTPUT, "Create package" << std::endl);
- cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Package files to: "
+ cmCPackLogger(cmCPackLog::LOG_VERBOSE,
+ "Package files to: "
<< (tempPackageFileName ? tempPackageFileName : "(NULL)")
<< std::endl);
if (cmSystemTools::FileExists(tempPackageFileName)) {
- cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Remove old package file"
- << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_VERBOSE,
+ "Remove old package file" << std::endl);
cmSystemTools::RemoveFile(tempPackageFileName);
}
if (cmSystemTools::IsOn(
@@ -1006,8 +1022,8 @@ int cmCPackGenerator::DoPackage()
std::string());
if (!this->PackageFiles() || cmSystemTools::GetErrorOccuredFlag()) {
- cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem compressing the directory"
- << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "Problem compressing the directory" << std::endl);
return 0;
}
}
@@ -1022,8 +1038,9 @@ int cmCPackGenerator::DoPackage()
* - the initially provided name may have changed
* (because the specific generator did 'normalize' it)
*/
- cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Copying final package(s) ["
- << packageFileNames.size() << "]:" << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_VERBOSE,
+ "Copying final package(s) [" << packageFileNames.size()
+ << "]:" << std::endl);
/* now copy package one by one */
for (std::string const& pkgFileName : packageFileNames) {
std::string tmpPF(this->GetOption("CPACK_OUTPUT_FILE_PREFIX"));
@@ -1031,20 +1048,23 @@ int cmCPackGenerator::DoPackage()
tempPackageFileName = pkgFileName.c_str();
tmpPF += "/" + filename;
const char* packageFileName = tmpPF.c_str();
- cmCPackLogger(cmCPackLog::LOG_DEBUG, "Copy final package(s): "
+ cmCPackLogger(cmCPackLog::LOG_DEBUG,
+ "Copy final package(s): "
<< (tempPackageFileName ? tempPackageFileName : "(NULL)")
<< " to " << (packageFileName ? packageFileName : "(NULL)")
<< std::endl);
if (!cmSystemTools::CopyFileIfDifferent(tempPackageFileName,
packageFileName)) {
cmCPackLogger(
- cmCPackLog::LOG_ERROR, "Problem copying the package: "
+ cmCPackLog::LOG_ERROR,
+ "Problem copying the package: "
<< (tempPackageFileName ? tempPackageFileName : "(NULL)") << " to "
<< (packageFileName ? packageFileName : "(NULL)") << std::endl);
return 0;
}
- cmCPackLogger(cmCPackLog::LOG_OUTPUT, "- package: "
- << packageFileName << " generated." << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_OUTPUT,
+ "- package: " << packageFileName << " generated."
+ << std::endl);
/* Generate checksum file */
if (crypto) {
@@ -1053,13 +1073,15 @@ int cmCPackGenerator::DoPackage()
hashFile += "." + cmSystemTools::LowerCase(algo);
cmsys::ofstream outF(hashFile.c_str());
if (!outF) {
- cmCPackLogger(cmCPackLog::LOG_ERROR, "Cannot create checksum file: "
- << hashFile << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "Cannot create checksum file: " << hashFile
+ << std::endl);
return 0;
}
outF << crypto->HashFile(packageFileName) << " " << filename << "\n";
- cmCPackLogger(cmCPackLog::LOG_OUTPUT, "- checksum file: "
- << hashFile << " generated." << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_OUTPUT,
+ "- checksum file: " << hashFile << " generated."
+ << std::endl);
}
}
@@ -1179,7 +1201,8 @@ const char* cmCPackGenerator::GetInstallPath()
const char* cmCPackGenerator::GetPackagingInstallPrefix()
{
- cmCPackLogger(cmCPackLog::LOG_DEBUG, "GetPackagingInstallPrefix: '"
+ cmCPackLogger(cmCPackLog::LOG_DEBUG,
+ "GetPackagingInstallPrefix: '"
<< this->GetOption("CPACK_PACKAGING_INSTALL_PREFIX") << "'"
<< std::endl);
@@ -1188,11 +1211,12 @@ const char* cmCPackGenerator::GetPackagingInstallPrefix()
std::string cmCPackGenerator::FindTemplate(const char* name)
{
- cmCPackLogger(cmCPackLog::LOG_DEBUG, "Look for template: "
- << (name ? name : "(NULL)") << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_DEBUG,
+ "Look for template: " << (name ? name : "(NULL)")
+ << std::endl);
std::string ffile = this->MakefileMap->GetModulesFile(name);
- cmCPackLogger(cmCPackLog::LOG_DEBUG, "Found template: " << ffile
- << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_DEBUG,
+ "Found template: " << ffile << std::endl);
return ffile;
}
@@ -1260,10 +1284,10 @@ int cmCPackGenerator::PrepareGroupingKind()
}
if (!groupingType.empty()) {
- cmCPackLogger(cmCPackLog::LOG_VERBOSE, "["
- << this->Name << "]"
- << " requested component grouping = " << groupingType
- << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_VERBOSE,
+ "[" << this->Name << "]"
+ << " requested component grouping = " << groupingType
+ << std::endl);
if (groupingType == "ALL_COMPONENTS_IN_ONE") {
method = ONE_PACKAGE;
} else if (groupingType == "IGNORE") {
@@ -1272,11 +1296,11 @@ int cmCPackGenerator::PrepareGroupingKind()
method = ONE_PACKAGE_PER_GROUP;
} else {
cmCPackLogger(
- cmCPackLog::LOG_WARNING, "["
- << this->Name << "]"
- << " requested component grouping type <" << groupingType
- << "> UNKNOWN not in (ALL_COMPONENTS_IN_ONE,IGNORE,ONE_PER_GROUP)"
- << std::endl);
+ cmCPackLog::LOG_WARNING,
+ "[" << this->Name << "]"
+ << " requested component grouping type <" << groupingType
+ << "> UNKNOWN not in (ALL_COMPONENTS_IN_ONE,IGNORE,ONE_PER_GROUP)"
+ << std::endl);
}
}
@@ -1290,11 +1314,11 @@ int cmCPackGenerator::PrepareGroupingKind()
method = ONE_PACKAGE_PER_COMPONENT;
}
cmCPackLogger(
- cmCPackLog::LOG_WARNING, "["
- << this->Name << "]"
- << " One package per component group requested, "
- << "but NO component groups exist: Ignoring component group."
- << std::endl);
+ cmCPackLog::LOG_WARNING,
+ "[" << this->Name << "]"
+ << " One package per component group requested, "
+ << "but NO component groups exist: Ignoring component group."
+ << std::endl);
}
// if user specified packaging method, override the default packaging method
@@ -1305,10 +1329,10 @@ int cmCPackGenerator::PrepareGroupingKind()
const char* method_names[] = { "ALL_COMPONENTS_IN_ONE", "IGNORE_GROUPS",
"ONE_PER_GROUP" };
- cmCPackLogger(cmCPackLog::LOG_VERBOSE, "["
- << this->Name << "]"
- << " requested component grouping = "
- << method_names[componentPackageMethod] << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_VERBOSE,
+ "[" << this->Name << "]"
+ << " requested component grouping = "
+ << method_names[componentPackageMethod] << std::endl);
return 1;
}
@@ -1371,7 +1395,8 @@ bool cmCPackGenerator::SupportsComponentInstallation() const
bool cmCPackGenerator::WantsComponentInstallation() const
{
- return (!IsOn("CPACK_MONOLITHIC_INSTALL") && SupportsComponentInstallation()
+ return (!IsOn("CPACK_MONOLITHIC_INSTALL") &&
+ SupportsComponentInstallation()
// check that we have at least one group or component
&& (!this->ComponentGroups.empty() || !this->Components.empty()));
}
diff --git a/Source/CPack/cmCPackGeneratorFactory.cxx b/Source/CPack/cmCPackGeneratorFactory.cxx
index a395a8f..d47e5ed 100644
--- a/Source/CPack/cmCPackGeneratorFactory.cxx
+++ b/Source/CPack/cmCPackGeneratorFactory.cxx
@@ -9,7 +9,7 @@
#include "cmAlgorithms.h"
#include "cmCPack7zGenerator.h"
#ifdef HAVE_FREEBSD_PKG
-#include "cmCPackFreeBSDGenerator.h"
+# include "cmCPackFreeBSDGenerator.h"
#endif
#include "cmCPackDebGenerator.h"
#include "cmCPackGenerator.h"
@@ -24,25 +24,25 @@
#include "cmCPackZIPGenerator.h"
#ifdef __APPLE__
-#include "cmCPackBundleGenerator.h"
-#include "cmCPackDragNDropGenerator.h"
-#include "cmCPackOSXX11Generator.h"
-#include "cmCPackPackageMakerGenerator.h"
-#include "cmCPackProductBuildGenerator.h"
+# include "cmCPackBundleGenerator.h"
+# include "cmCPackDragNDropGenerator.h"
+# include "cmCPackOSXX11Generator.h"
+# include "cmCPackPackageMakerGenerator.h"
+# include "cmCPackProductBuildGenerator.h"
#endif
#ifdef __CYGWIN__
-#include "cmCPackCygwinBinaryGenerator.h"
-#include "cmCPackCygwinSourceGenerator.h"
+# include "cmCPackCygwinBinaryGenerator.h"
+# include "cmCPackCygwinSourceGenerator.h"
#endif
#if !defined(_WIN32) && !defined(__QNXNTO__) && !defined(__BEOS__) && \
!defined(__HAIKU__)
-#include "cmCPackRPMGenerator.h"
+# include "cmCPackRPMGenerator.h"
#endif
#if defined(_WIN32) || (defined(__CYGWIN__) && defined(HAVE_LIBUUID))
-#include "WiX/cmCPackWIXGenerator.h"
+# include "WiX/cmCPackWIXGenerator.h"
#endif
cmCPackGeneratorFactory::cmCPackGeneratorFactory()
diff --git a/Source/CPack/cmCPackNSISGenerator.cxx b/Source/CPack/cmCPackNSISGenerator.cxx
index 3f7164a..a893a0f 100644
--- a/Source/CPack/cmCPackNSISGenerator.cxx
+++ b/Source/CPack/cmCPackNSISGenerator.cxx
@@ -20,9 +20,9 @@
/* NSIS uses different command line syntax on Windows and others */
#ifdef _WIN32
-#define NSIS_OPT "/"
+# define NSIS_OPT "/"
#else
-#define NSIS_OPT "-"
+# define NSIS_OPT "-"
#endif
cmCPackNSISGenerator::cmCPackNSISGenerator(bool nsis64)
@@ -81,8 +81,8 @@ int cmCPackNSISGenerator::PackageFiles()
str << " Delete \"" << outputDir << "\\" << fileN << "\"" << std::endl;
}
- cmCPackLogger(cmCPackLog::LOG_DEBUG, "Uninstall Files: " << str.str()
- << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_DEBUG,
+ "Uninstall Files: " << str.str() << std::endl);
this->SetOptionIfNotSet("CPACK_NSIS_DELETE_FILES", str.str().c_str());
std::vector<std::string> dirs;
this->GetListOfSubdirectories(toplevel.c_str(), dirs);
@@ -117,12 +117,13 @@ int cmCPackNSISGenerator::PackageFiles()
this->Components[componentName].Directories.push_back(std::move(fileN));
}
}
- cmCPackLogger(cmCPackLog::LOG_DEBUG, "Uninstall Dirs: " << dstr.str()
- << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_DEBUG,
+ "Uninstall Dirs: " << dstr.str() << std::endl);
this->SetOptionIfNotSet("CPACK_NSIS_DELETE_DIRECTORIES", dstr.str().c_str());
- cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Configure file: "
- << nsisInFileName << " to " << nsisFileName << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_VERBOSE,
+ "Configure file: " << nsisInFileName << " to " << nsisFileName
+ << std::endl);
if (this->IsSet("CPACK_NSIS_MUI_ICON") ||
this->IsSet("CPACK_NSIS_MUI_UNIICON")) {
std::string installerIconCode;
@@ -308,10 +309,11 @@ int cmCPackNSISGenerator::PackageFiles()
ofs << "# Run command: " << nsisCmd << std::endl
<< "# Output:" << std::endl
<< output << std::endl;
- cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem running NSIS command: "
- << nsisCmd << std::endl
- << "Please check " << tmpFile << " for errors"
- << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "Problem running NSIS command: " << nsisCmd << std::endl
+ << "Please check "
+ << tmpFile << " for errors"
+ << std::endl);
return 0;
}
return 1;
@@ -329,28 +331,31 @@ int cmCPackNSISGenerator::InitializeInternal()
this->SetOption("CPACK_INCLUDE_TOPLEVEL_DIRECTORY", nullptr);
}
- cmCPackLogger(cmCPackLog::LOG_DEBUG, "cmCPackNSISGenerator::Initialize()"
- << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_DEBUG,
+ "cmCPackNSISGenerator::Initialize()" << std::endl);
std::vector<std::string> path;
std::string nsisPath;
bool gotRegValue = false;
#ifdef _WIN32
if (Nsis64) {
- if (!gotRegValue && cmsys::SystemTools::ReadRegistryValue(
- "HKEY_LOCAL_MACHINE\\SOFTWARE\\NSIS\\Unicode",
- nsisPath, cmsys::SystemTools::KeyWOW64_64)) {
+ if (!gotRegValue &&
+ cmsys::SystemTools::ReadRegistryValue(
+ "HKEY_LOCAL_MACHINE\\SOFTWARE\\NSIS\\Unicode", nsisPath,
+ cmsys::SystemTools::KeyWOW64_64)) {
gotRegValue = true;
}
- if (!gotRegValue && cmsys::SystemTools::ReadRegistryValue(
- "HKEY_LOCAL_MACHINE\\SOFTWARE\\NSIS", nsisPath,
- cmsys::SystemTools::KeyWOW64_64)) {
+ if (!gotRegValue &&
+ cmsys::SystemTools::ReadRegistryValue(
+ "HKEY_LOCAL_MACHINE\\SOFTWARE\\NSIS", nsisPath,
+ cmsys::SystemTools::KeyWOW64_64)) {
gotRegValue = true;
}
}
- if (!gotRegValue && cmsys::SystemTools::ReadRegistryValue(
- "HKEY_LOCAL_MACHINE\\SOFTWARE\\NSIS\\Unicode",
- nsisPath, cmsys::SystemTools::KeyWOW64_32)) {
+ if (!gotRegValue &&
+ cmsys::SystemTools::ReadRegistryValue(
+ "HKEY_LOCAL_MACHINE\\SOFTWARE\\NSIS\\Unicode", nsisPath,
+ cmsys::SystemTools::KeyWOW64_32)) {
gotRegValue = true;
}
if (!gotRegValue &&
@@ -358,13 +363,15 @@ int cmCPackNSISGenerator::InitializeInternal()
"HKEY_LOCAL_MACHINE\\SOFTWARE\\NSIS\\Unicode", nsisPath)) {
gotRegValue = true;
}
- if (!gotRegValue && cmsys::SystemTools::ReadRegistryValue(
- "HKEY_LOCAL_MACHINE\\SOFTWARE\\NSIS", nsisPath,
- cmsys::SystemTools::KeyWOW64_32)) {
+ if (!gotRegValue &&
+ cmsys::SystemTools::ReadRegistryValue(
+ "HKEY_LOCAL_MACHINE\\SOFTWARE\\NSIS", nsisPath,
+ cmsys::SystemTools::KeyWOW64_32)) {
gotRegValue = true;
}
- if (!gotRegValue && cmsys::SystemTools::ReadRegistryValue(
- "HKEY_LOCAL_MACHINE\\SOFTWARE\\NSIS", nsisPath)) {
+ if (!gotRegValue &&
+ cmsys::SystemTools::ReadRegistryValue(
+ "HKEY_LOCAL_MACHINE\\SOFTWARE\\NSIS", nsisPath)) {
gotRegValue = true;
}
@@ -395,8 +402,8 @@ int cmCPackNSISGenerator::InitializeInternal()
}
std::string nsisCmd = "\"" + nsisPath + "\" " NSIS_OPT "VERSION";
- cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Test NSIS version: " << nsisCmd
- << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_VERBOSE,
+ "Test NSIS version: " << nsisCmd << std::endl);
std::string output;
int retVal = 1;
bool resS = cmSystemTools::RunSingleCommand(
@@ -413,17 +420,18 @@ int cmCPackNSISGenerator::InitializeInternal()
ofs << "# Run command: " << nsisCmd << std::endl
<< "# Output:" << std::endl
<< output << std::endl;
- cmCPackLogger(
- cmCPackLog::LOG_ERROR, "Problem checking NSIS version with command: "
- << nsisCmd << std::endl
- << "Please check " << tmpFile << " for errors" << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "Problem checking NSIS version with command: "
+ << nsisCmd << std::endl
+ << "Please check " << tmpFile << " for errors"
+ << std::endl);
return 0;
}
if (versionRex.find(output)) {
double nsisVersion = atof(versionRex.match(1).c_str());
double minNSISVersion = 2.09;
- cmCPackLogger(cmCPackLog::LOG_DEBUG, "NSIS Version: " << nsisVersion
- << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_DEBUG,
+ "NSIS Version: " << nsisVersion << std::endl);
if (nsisVersion < minNSISVersion) {
cmCPackLogger(cmCPackLog::LOG_ERROR,
"CPack requires NSIS Version 2.09 or greater. "
@@ -434,8 +442,8 @@ int cmCPackNSISGenerator::InitializeInternal()
}
if (versionRexCVS.find(output)) {
// No version check for NSIS cvs build
- cmCPackLogger(cmCPackLog::LOG_DEBUG, "NSIS Version: CVS "
- << versionRexCVS.match(1) << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_DEBUG,
+ "NSIS Version: CVS " << versionRexCVS.match(1) << std::endl);
}
this->SetOptionIfNotSet("CPACK_INSTALLER_PROGRAM", nsisPath.c_str());
this->SetOptionIfNotSet("CPACK_NSIS_EXECUTABLES_DIRECTORY", "bin");
@@ -447,8 +455,9 @@ int cmCPackNSISGenerator::InitializeInternal()
this->GetOption("CPACK_NSIS_EXECUTABLES_DIRECTORY");
std::vector<std::string> cpackPackageDesktopLinksVector;
if (cpackPackageDeskTopLinks) {
- cmCPackLogger(cmCPackLog::LOG_DEBUG, "CPACK_CREATE_DESKTOP_LINKS: "
- << cpackPackageDeskTopLinks << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_DEBUG,
+ "CPACK_CREATE_DESKTOP_LINKS: " << cpackPackageDeskTopLinks
+ << std::endl);
cmSystemTools::ExpandListArgument(cpackPackageDeskTopLinks,
cpackPackageDesktopLinksVector);
@@ -457,7 +466,8 @@ int cmCPackNSISGenerator::InitializeInternal()
"CPACK_CREATE_DESKTOP_LINKS: " << cpdl << std::endl);
}
} else {
- cmCPackLogger(cmCPackLog::LOG_DEBUG, "CPACK_CREATE_DESKTOP_LINKS: "
+ cmCPackLogger(cmCPackLog::LOG_DEBUG,
+ "CPACK_CREATE_DESKTOP_LINKS: "
<< "not set" << std::endl);
}
@@ -465,8 +475,9 @@ int cmCPackNSISGenerator::InitializeInternal()
std::ostringstream deleteStr;
if (cpackPackageExecutables) {
- cmCPackLogger(cmCPackLog::LOG_DEBUG, "The cpackPackageExecutables: "
- << cpackPackageExecutables << "." << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_DEBUG,
+ "The cpackPackageExecutables: " << cpackPackageExecutables
+ << "." << std::endl);
std::vector<std::string> cpackPackageExecutablesVector;
cmSystemTools::ExpandListArgument(cpackPackageExecutables,
cpackPackageExecutablesVector);
@@ -683,8 +694,9 @@ std::string cmCPackNSISGenerator::CreateComponentDescription(
<< std::endl);
if (cmSystemTools::FileExists(archiveFile, true)) {
if (!cmSystemTools::RemoveFile(archiveFile)) {
- cmCPackLogger(cmCPackLog::LOG_ERROR, "Unable to remove archive file "
- << archiveFile << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "Unable to remove archive file " << archiveFile
+ << std::endl);
return "";
}
}
@@ -694,8 +706,8 @@ std::string cmCPackNSISGenerator::CreateComponentDescription(
this->ReadListFile("CPackZIP.cmake");
if (!this->IsSet("ZIP_EXECUTABLE")) {
- cmCPackLogger(cmCPackLog::LOG_ERROR, "Unable to find ZIP program"
- << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "Unable to find ZIP program" << std::endl);
return "";
}
}
@@ -746,10 +758,11 @@ std::string cmCPackNSISGenerator::CreateComponentDescription(
ofs << "# Run command: " << cmd << std::endl
<< "# Output:" << std::endl
<< output << std::endl;
- cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem running zip command: "
- << cmd << std::endl
- << "Please check " << tmpFile << " for errors"
- << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "Problem running zip command: " << cmd << std::endl
+ << "Please check "
+ << tmpFile << " for errors"
+ << std::endl);
return "";
}
diff --git a/Source/CPack/cmCPackNuGetGenerator.cxx b/Source/CPack/cmCPackNuGetGenerator.cxx
index 2ebfb3d..2ae8cba 100644
--- a/Source/CPack/cmCPackNuGetGenerator.cxx
+++ b/Source/CPack/cmCPackNuGetGenerator.cxx
@@ -92,7 +92,8 @@ void cmCPackNuGetGenerator::SetupGroupComponentVariables(bool ignoreGroup)
// Does the component belong to a group?
if (comp.second.Group == nullptr) {
cmCPackLogger(
- cmCPackLog::LOG_VERBOSE, "Component <"
+ cmCPackLog::LOG_VERBOSE,
+ "Component <"
<< comp.second.Name
<< "> does not belong to any group, package it separately."
<< std::endl);
diff --git a/Source/CPack/cmCPackOSXX11Generator.cxx b/Source/CPack/cmCPackOSXX11Generator.cxx
index e750de3..dab7283 100644
--- a/Source/CPack/cmCPackOSXX11Generator.cxx
+++ b/Source/CPack/cmCPackOSXX11Generator.cxx
@@ -27,8 +27,9 @@ int cmCPackOSXX11Generator::PackageFiles()
const char* cpackPackageExecutables =
this->GetOption("CPACK_PACKAGE_EXECUTABLES");
if (cpackPackageExecutables) {
- cmCPackLogger(cmCPackLog::LOG_DEBUG, "The cpackPackageExecutables: "
- << cpackPackageExecutables << "." << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_DEBUG,
+ "The cpackPackageExecutables: " << cpackPackageExecutables
+ << "." << std::endl);
std::ostringstream str;
std::ostringstream deleteStr;
std::vector<std::string> cpackPackageExecutablesVector;
@@ -78,7 +79,8 @@ int cmCPackOSXX11Generator::PackageFiles()
if (iconFile) {
std::string iconFileName = cmsys::SystemTools::GetFilenameName(iconFile);
if (!cmSystemTools::FileExists(iconFile)) {
- cmCPackLogger(cmCPackLog::LOG_ERROR, "Cannot find icon file: "
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "Cannot find icon file: "
<< iconFile
<< ". Please check CPACK_PACKAGE_ICON setting."
<< std::endl);
@@ -109,8 +111,8 @@ int cmCPackOSXX11Generator::PackageFiles()
!this->CopyResourcePlistFile("OSXScriptLauncher", appdir,
this->GetOption("CPACK_PACKAGE_FILE_NAME"),
true)) {
- cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem copying the resource files"
- << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "Problem copying the resource files" << std::endl);
return 0;
}
@@ -147,8 +149,9 @@ int cmCPackOSXX11Generator::PackageFiles()
dmgCmd << "\"" << this->GetOption("CPACK_INSTALLER_PROGRAM_DISK_IMAGE")
<< "\" create -ov -fs HFS+ -format UDZO -srcfolder \""
<< diskImageDirectory << "\" \"" << packageFileNames[0] << "\"";
- cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Compress disk image using command: "
- << dmgCmd.str() << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_VERBOSE,
+ "Compress disk image using command: " << dmgCmd.str()
+ << std::endl);
// since we get random dashboard failures with this one
// try running it more than once
int retVal = 1;
@@ -170,7 +173,8 @@ int cmCPackOSXX11Generator::PackageFiles()
ofs << "# Run command: " << dmgCmd.str() << std::endl
<< "# Output:" << std::endl
<< output << std::endl;
- cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem running hdiutil command: "
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "Problem running hdiutil command: "
<< dmgCmd.str() << std::endl
<< "Please check " << tmpFile << " for errors"
<< std::endl);
@@ -182,13 +186,13 @@ int cmCPackOSXX11Generator::PackageFiles()
int cmCPackOSXX11Generator::InitializeInternal()
{
- cmCPackLogger(cmCPackLog::LOG_DEBUG, "cmCPackOSXX11Generator::Initialize()"
- << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_DEBUG,
+ "cmCPackOSXX11Generator::Initialize()" << std::endl);
std::vector<std::string> path;
std::string pkgPath = cmSystemTools::FindProgram("hdiutil", path, false);
if (pkgPath.empty()) {
- cmCPackLogger(cmCPackLog::LOG_ERROR, "Cannot find hdiutil compiler"
- << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "Cannot find hdiutil compiler" << std::endl);
return 0;
}
this->SetOptionIfNotSet("CPACK_INSTALLER_PROGRAM_DISK_IMAGE",
@@ -263,8 +267,9 @@ bool cmCPackOSXX11Generator::CopyResourcePlistFile(
destFileName += "/";
destFileName += outputFileName;
- cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Configure file: "
- << inFileName << " to " << destFileName << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_VERBOSE,
+ "Configure file: " << inFileName << " to " << destFileName
+ << std::endl);
this->ConfigureFile(inFileName.c_str(), destFileName.c_str(), copyOnly);
return true;
}
diff --git a/Source/CPack/cmCPackPKGGenerator.cxx b/Source/CPack/cmCPackPKGGenerator.cxx
index 9ea8540..bdda386 100644
--- a/Source/CPack/cmCPackPKGGenerator.cxx
+++ b/Source/CPack/cmCPackPKGGenerator.cxx
@@ -26,8 +26,8 @@ bool cmCPackPKGGenerator::SupportsComponentInstallation() const
int cmCPackPKGGenerator::InitializeInternal()
{
- cmCPackLogger(cmCPackLog::LOG_DEBUG, "cmCPackPKGGenerator::Initialize()"
- << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_DEBUG,
+ "cmCPackPKGGenerator::Initialize()" << std::endl);
return this->Superclass::InitializeInternal();
}
@@ -52,8 +52,9 @@ void cmCPackPKGGenerator::WriteDistributionFile(const char* metapackageFile)
std::string distributionTemplate =
this->FindTemplate("CPack.distribution.dist.in");
if (distributionTemplate.empty()) {
- cmCPackLogger(cmCPackLog::LOG_ERROR, "Cannot find input file: "
- << distributionTemplate << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "Cannot find input file: " << distributionTemplate
+ << std::endl);
return;
}
@@ -270,23 +271,26 @@ bool cmCPackPKGGenerator::CopyCreateResourceFile(const std::string& name,
std::string cpackVar = "CPACK_RESOURCE_FILE_" + uname;
const char* inFileName = this->GetOption(cpackVar);
if (!inFileName) {
- cmCPackLogger(cmCPackLog::LOG_ERROR, "CPack option: "
- << cpackVar.c_str()
- << " not specified. It should point to "
- << (!name.empty() ? name : "<empty>") << ".rtf, " << name
- << ".html, or " << name << ".txt file" << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "CPack option: " << cpackVar.c_str()
+ << " not specified. It should point to "
+ << (!name.empty() ? name : "<empty>")
+ << ".rtf, " << name << ".html, or " << name
+ << ".txt file" << std::endl);
return false;
}
if (!cmSystemTools::FileExists(inFileName)) {
- cmCPackLogger(cmCPackLog::LOG_ERROR, "Cannot find "
- << (!name.empty() ? name : "<empty>")
- << " resource file: " << inFileName << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "Cannot find " << (!name.empty() ? name : "<empty>")
+ << " resource file: " << inFileName
+ << std::endl);
return false;
}
std::string ext = cmSystemTools::GetFilenameLastExtension(inFileName);
if (ext != ".rtfd" && ext != ".rtf" && ext != ".html" && ext != ".txt") {
cmCPackLogger(
- cmCPackLog::LOG_ERROR, "Bad file extension specified: "
+ cmCPackLog::LOG_ERROR,
+ "Bad file extension specified: "
<< ext
<< ". Currently only .rtfd, .rtf, .html, and .txt files allowed."
<< std::endl);
@@ -330,8 +334,9 @@ bool cmCPackPKGGenerator::CopyResourcePlistFile(const std::string& name,
destFileName += "/";
destFileName += outName;
- cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Configure file: "
- << inFileName << " to " << destFileName << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_VERBOSE,
+ "Configure file: " << inFileName << " to " << destFileName
+ << std::endl);
this->ConfigureFile(inFileName.c_str(), destFileName.c_str());
return true;
}
diff --git a/Source/CPack/cmCPackPackageMakerGenerator.cxx b/Source/CPack/cmCPackPackageMakerGenerator.cxx
index c515b85..5b1a641 100644
--- a/Source/CPack/cmCPackPackageMakerGenerator.cxx
+++ b/Source/CPack/cmCPackPackageMakerGenerator.cxx
@@ -251,8 +251,8 @@ int cmCPackPackageMakerGenerator::PackageFiles()
!this->CopyCreateResourceFile("Welcome", resDir) ||
!this->CopyResourcePlistFile("Info.plist") ||
!this->CopyResourcePlistFile("Description.plist")) {
- cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem copying the resource files"
- << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "Problem copying the resource files" << std::endl);
return 0;
}
@@ -311,7 +311,8 @@ int cmCPackPackageMakerGenerator::PackageFiles()
ofs << "# Run command: " << dmgCmd.str() << std::endl
<< "# Output:" << std::endl
<< output << std::endl;
- cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem running hdiutil command: "
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "Problem running hdiutil command: "
<< dmgCmd.str() << std::endl
<< "Please check " << tmpFile << " for errors"
<< std::endl);
@@ -357,8 +358,8 @@ int cmCPackPackageMakerGenerator::InitializeInternal()
} else {
pkgPath = cmSystemTools::FindProgram("PackageMaker", paths, false);
if (pkgPath.empty()) {
- cmCPackLogger(cmCPackLog::LOG_ERROR, "Cannot find PackageMaker compiler"
- << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "Cannot find PackageMaker compiler" << std::endl);
return 0;
}
this->SetOptionIfNotSet("CPACK_INSTALLER_PROGRAM", pkgPath.c_str());
@@ -415,12 +416,13 @@ int cmCPackPackageMakerGenerator::InitializeInternal()
}
this->PackageMakerVersion = atof(rexVersion.match(1).c_str());
if (this->PackageMakerVersion < 1.0) {
- cmCPackLogger(cmCPackLog::LOG_ERROR, "Require PackageMaker 1.0 or higher"
- << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "Require PackageMaker 1.0 or higher" << std::endl);
return 0;
}
- cmCPackLogger(cmCPackLog::LOG_DEBUG, "PackageMaker version is: "
- << this->PackageMakerVersion << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_DEBUG,
+ "PackageMaker version is: " << this->PackageMakerVersion
+ << std::endl);
// Determine the package compatibility version. If it wasn't
// specified by the user, we define it based on which features the
@@ -448,8 +450,8 @@ int cmCPackPackageMakerGenerator::InitializeInternal()
std::vector<std::string> no_paths;
pkgPath = cmSystemTools::FindProgram("hdiutil", no_paths, false);
if (pkgPath.empty()) {
- cmCPackLogger(cmCPackLog::LOG_ERROR, "Cannot find hdiutil compiler"
- << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "Cannot find hdiutil compiler" << std::endl);
return 0;
}
this->SetOptionIfNotSet("CPACK_INSTALLER_PROGRAM_DISK_IMAGE",
@@ -470,17 +472,18 @@ bool cmCPackPackageMakerGenerator::RunPackageMaker(const char* command,
bool res = cmSystemTools::RunSingleCommand(
command, &output, &output, &retVal, nullptr, this->GeneratorVerbose,
cmDuration::zero());
- cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Done running package maker"
- << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_VERBOSE,
+ "Done running package maker" << std::endl);
if (!res || retVal) {
cmGeneratedFileStream ofs(tmpFile.c_str());
ofs << "# Run command: " << command << std::endl
<< "# Output:" << std::endl
<< output << std::endl;
- cmCPackLogger(
- cmCPackLog::LOG_ERROR, "Problem running PackageMaker command: "
- << command << std::endl
- << "Please check " << tmpFile << " for errors" << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "Problem running PackageMaker command: "
+ << command << std::endl
+ << "Please check " << tmpFile << " for errors"
+ << std::endl);
return false;
}
// sometimes the command finishes but the directory is not yet
@@ -505,8 +508,9 @@ bool cmCPackPackageMakerGenerator::GenerateComponentPackage(
const char* packageFile, const char* packageDir,
const cmCPackComponent& component)
{
- cmCPackLogger(cmCPackLog::LOG_OUTPUT, "- Building component package: "
- << packageFile << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_OUTPUT,
+ "- Building component package: " << packageFile
+ << std::endl);
// The command that will be used to run PackageMaker
std::ostringstream pkgCmd;
diff --git a/Source/CPack/cmCPackProductBuildGenerator.cxx b/Source/CPack/cmCPackProductBuildGenerator.cxx
index 57cf7ea..4ca0fa8 100644
--- a/Source/CPack/cmCPackProductBuildGenerator.cxx
+++ b/Source/CPack/cmCPackProductBuildGenerator.cxx
@@ -67,8 +67,8 @@ int cmCPackProductBuildGenerator::PackageFiles()
this->GetOption("CPACK_PRODUCTBUILD_RESOURCES_DIR");
if (!cmSystemTools::CopyADirectory(userResDir, resDir)) {
- cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem copying the resource files"
- << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "Problem copying the resource files" << std::endl);
return 0;
}
}
@@ -121,16 +121,16 @@ int cmCPackProductBuildGenerator::InitializeInternal()
std::string program =
cmSystemTools::FindProgram("pkgbuild", no_paths, false);
if (program.empty()) {
- cmCPackLogger(cmCPackLog::LOG_ERROR, "Cannot find pkgbuild executable"
- << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "Cannot find pkgbuild executable" << std::endl);
return 0;
}
this->SetOptionIfNotSet("CPACK_COMMAND_PKGBUILD", program.c_str());
program = cmSystemTools::FindProgram("productbuild", no_paths, false);
if (program.empty()) {
- cmCPackLogger(cmCPackLog::LOG_ERROR, "Cannot find productbuild executable"
- << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "Cannot find productbuild executable" << std::endl);
return 0;
}
this->SetOptionIfNotSet("CPACK_COMMAND_PRODUCTBUILD", program.c_str());
@@ -172,8 +172,9 @@ bool cmCPackProductBuildGenerator::GenerateComponentPackage(
packageFile += '/';
packageFile += packageFileName;
- cmCPackLogger(cmCPackLog::LOG_OUTPUT, "- Building component package: "
- << packageFile << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_OUTPUT,
+ "- Building component package: " << packageFile
+ << std::endl);
const char* comp_name = component ? component->Name.c_str() : nullptr;
diff --git a/Source/CPack/cmCPackRPMGenerator.cxx b/Source/CPack/cmCPackRPMGenerator.cxx
index e40b74d..c389884 100644
--- a/Source/CPack/cmCPackRPMGenerator.cxx
+++ b/Source/CPack/cmCPackRPMGenerator.cxx
@@ -90,8 +90,8 @@ int cmCPackRPMGenerator::PackageOnePack(std::string const& initialToplevel,
this->SetOption("CPACK_RPM_PACKAGE_COMPONENT_PART_PATH",
component_path.c_str());
if (!this->ReadListFile("CPackRPM.cmake")) {
- cmCPackLogger(cmCPackLog::LOG_ERROR, "Error while execution CPackRPM.cmake"
- << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "Error while execution CPackRPM.cmake" << std::endl);
retval = 0;
}
@@ -165,7 +165,8 @@ int cmCPackRPMGenerator::PackageComponents(bool ignoreGroup)
}
if (shouldSet) {
- cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Setting "
+ cmCPackLogger(cmCPackLog::LOG_VERBOSE,
+ "Setting "
<< "CPACK_RPM_DEBUGINFO_PACKAGE because "
<< "CPACK_RPM_DEBUGINFO_SINGLE_PACKAGE is set but "
<< " none of the "
@@ -203,8 +204,9 @@ int cmCPackRPMGenerator::PackageComponents(bool ignoreGroup)
continue;
}
- cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Packaging component group: "
- << compGIt->first << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_VERBOSE,
+ "Packaging component group: " << compGIt->first
+ << std::endl);
retval &= PackageOnePack(initialTopLevel, compGIt->first);
}
// Handle Orphan components (components not belonging to any groups)
@@ -226,7 +228,8 @@ int cmCPackRPMGenerator::PackageComponents(bool ignoreGroup)
}
cmCPackLogger(
- cmCPackLog::LOG_VERBOSE, "Component <"
+ cmCPackLog::LOG_VERBOSE,
+ "Component <"
<< compIt->second.Name
<< "> does not belong to any group, package it separately."
<< std::endl);
@@ -242,7 +245,8 @@ int cmCPackRPMGenerator::PackageComponents(bool ignoreGroup)
} else if (mainCompIt != this->Components.end()) {
retval &= PackageOnePack(initialTopLevel, mainCompIt->first);
} else {
- cmCPackLogger(cmCPackLog::LOG_ERROR, "CPACK_RPM_MAIN_COMPONENT set"
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "CPACK_RPM_MAIN_COMPONENT set"
<< " to non existing component.\n");
retval = 0;
}
@@ -276,7 +280,8 @@ int cmCPackRPMGenerator::PackageComponents(bool ignoreGroup)
if (mainCompIt != this->Components.end()) {
retval &= PackageOnePack(initialTopLevel, mainCompIt->first);
} else {
- cmCPackLogger(cmCPackLog::LOG_ERROR, "CPACK_RPM_MAIN_COMPONENT set"
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "CPACK_RPM_MAIN_COMPONENT set"
<< " to non existing component.\n");
retval = 0;
}
@@ -290,8 +295,9 @@ int cmCPackRPMGenerator::PackageComponents(bool ignoreGroup)
std::map<std::string, cmCPackComponentGroup>::iterator compGIt;
for (compGIt = this->ComponentGroups.begin();
compGIt != this->ComponentGroups.end(); ++compGIt) {
- cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Packaging component group: "
- << compGIt->first << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_VERBOSE,
+ "Packaging component group: " << compGIt->first
+ << std::endl);
retval &= PackageOnePack(initialTopLevel, compGIt->first);
}
// Handle Orphan components (components not belonging to any groups)
@@ -301,7 +307,8 @@ int cmCPackRPMGenerator::PackageComponents(bool ignoreGroup)
// Does the component belong to a group?
if (compIt->second.Group == nullptr) {
cmCPackLogger(
- cmCPackLog::LOG_VERBOSE, "Component <"
+ cmCPackLog::LOG_VERBOSE,
+ "Component <"
<< compIt->second.Name
<< "> does not belong to any group, package it separately."
<< std::endl);
@@ -320,7 +327,8 @@ int cmCPackRPMGenerator::PackageComponents(bool ignoreGroup)
}
} else {
cmCPackLogger(
- cmCPackLog::LOG_ERROR, "CPACK_RPM_MAIN_COMPONENT not set but"
+ cmCPackLog::LOG_ERROR,
+ "CPACK_RPM_MAIN_COMPONENT not set but"
<< " it is mandatory with CPACK_RPM_DEBUGINFO_SINGLE_PACKAGE"
<< " being set.\n");
retval = 0;
@@ -380,8 +388,8 @@ int cmCPackRPMGenerator::PackageComponentsAllInOne(
if (this->ReadListFile("CPackRPM.cmake")) {
AddGeneratedPackageNames();
} else {
- cmCPackLogger(cmCPackLog::LOG_ERROR, "Error while execution CPackRPM.cmake"
- << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "Error while execution CPackRPM.cmake" << std::endl);
retval = 0;
}
diff --git a/Source/CPack/cmCPackSTGZGenerator.cxx b/Source/CPack/cmCPackSTGZGenerator.cxx
index 3d7fd3c..ef0d118 100644
--- a/Source/CPack/cmCPackSTGZGenerator.cxx
+++ b/Source/CPack/cmCPackSTGZGenerator.cxx
@@ -56,7 +56,7 @@ int cmCPackSTGZGenerator::PackageFiles()
S_IRGRP | S_IWGRP | S_IXGRP |
S_IROTH | S_IWOTH | S_IXOTH
#endif
- );
+ );
}
return retval;
}
@@ -100,8 +100,8 @@ int cmCPackSTGZGenerator::GenerateHeader(std::ostream* os)
++ptr;
}
counter++;
- cmCPackLogger(cmCPackLog::LOG_DEBUG, "Number of lines: " << counter
- << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_DEBUG,
+ "Number of lines: " << counter << std::endl);
char buffer[1024];
sprintf(buffer, "%d", counter);
cmSystemTools::ReplaceString(res, headerLengthTag, buffer);
diff --git a/Source/CPack/cpack.cxx b/Source/CPack/cpack.cxx
index 87ef5b6..c083945 100644
--- a/Source/CPack/cpack.cxx
+++ b/Source/CPack/cpack.cxx
@@ -13,7 +13,7 @@
#include <vector>
#if defined(_WIN32) && defined(CMAKE_BUILD_WITH_CMAKE)
-#include "cmsys/ConsoleBuf.hxx"
+# include "cmsys/ConsoleBuf.hxx"
#endif
#include "cmCPackGenerator.h"
@@ -82,8 +82,9 @@ int cpackDefinitionArgument(const char* argument, const char* cValue,
std::string key = value.substr(0, pos);
value = value.c_str() + pos + 1;
def->Map[key] = value;
- cmCPack_Log(def->Log, cmCPackLog::LOG_DEBUG, "Set CPack variable: "
- << key << " to \"" << value << "\"" << std::endl);
+ cmCPack_Log(def->Log, cmCPackLog::LOG_DEBUG,
+ "Set CPack variable: " << key << " to \"" << value << "\""
+ << std::endl);
return 1;
}
@@ -320,8 +321,8 @@ int main(int argc, char const* const* argv)
}
const char* genList = globalMF.GetDefinition("CPACK_GENERATOR");
if (!genList) {
- cmCPack_Log(&log, cmCPackLog::LOG_ERROR, "CPack generator not specified"
- << std::endl);
+ cmCPack_Log(&log, cmCPackLog::LOG_ERROR,
+ "CPack generator not specified" << std::endl);
} else {
std::vector<std::string> generatorsVector;
cmSystemTools::ExpandListArgument(genList, generatorsVector);
@@ -384,8 +385,9 @@ int main(int argc, char const* const* argv)
}
if (parsed) {
const char* projName = mf->GetDefinition("CPACK_PACKAGE_NAME");
- cmCPack_Log(&log, cmCPackLog::LOG_VERBOSE, "Use generator: "
- << cpackGenerator->GetNameOfClass() << std::endl);
+ cmCPack_Log(&log, cmCPackLog::LOG_VERBOSE,
+ "Use generator: " << cpackGenerator->GetNameOfClass()
+ << std::endl);
cmCPack_Log(&log, cmCPackLog::LOG_VERBOSE,
"For project: " << projName << std::endl);
diff --git a/Source/CTest/cmCTestBZR.cxx b/Source/CTest/cmCTestBZR.cxx
index 0152200..365f267 100644
--- a/Source/CTest/cmCTestBZR.cxx
+++ b/Source/CTest/cmCTestBZR.cxx
@@ -155,8 +155,9 @@ bool cmCTestBZR::NoteOldRevision()
{
this->OldRevision = this->LoadInfo();
this->Log << "Revision before update: " << this->OldRevision << "\n";
- cmCTestLog(this->CTest, HANDLER_OUTPUT, " Old revision of repository is: "
- << this->OldRevision << "\n");
+ cmCTestLog(this->CTest, HANDLER_OUTPUT,
+ " Old revision of repository is: " << this->OldRevision
+ << "\n");
this->PriorRev.Rev = this->OldRevision;
return true;
}
@@ -165,14 +166,16 @@ bool cmCTestBZR::NoteNewRevision()
{
this->NewRevision = this->LoadInfo();
this->Log << "Revision after update: " << this->NewRevision << "\n";
- cmCTestLog(this->CTest, HANDLER_OUTPUT, " New revision of repository is: "
- << this->NewRevision << "\n");
+ cmCTestLog(this->CTest, HANDLER_OUTPUT,
+ " New revision of repository is: " << this->NewRevision
+ << "\n");
this->Log << "URL = " << this->URL << "\n";
return true;
}
-class cmCTestBZR::LogParser : public cmCTestVC::OutputLogger,
- private cmXMLParser
+class cmCTestBZR::LogParser
+ : public cmCTestVC::OutputLogger
+ , private cmXMLParser
{
public:
LogParser(cmCTestBZR* bzr, const char* prefix)
diff --git a/Source/CTest/cmCTestBuildHandler.cxx b/Source/CTest/cmCTestBuildHandler.cxx
index ce6fbc7..8527d54 100644
--- a/Source/CTest/cmCTestBuildHandler.cxx
+++ b/Source/CTest/cmCTestBuildHandler.cxx
@@ -299,7 +299,8 @@ int cmCTestBuildHandler::ProcessHandler()
this->ErrorWarningFileLineRegex.push_back(std::move(r));
} else {
cmCTestLog(
- this->CTest, ERROR_MESSAGE, "Problem Compiling regular expression: "
+ this->CTest, ERROR_MESSAGE,
+ "Problem Compiling regular expression: "
<< cmCTestWarningErrorFileLine[entry].RegularExpressionString
<< std::endl);
}
@@ -331,8 +332,8 @@ int cmCTestBuildHandler::ProcessHandler()
cmGeneratedFileStream ofs;
auto elapsed_time_start = std::chrono::steady_clock::now();
if (!this->StartLogFile("Build", ofs)) {
- cmCTestLog(this->CTest, ERROR_MESSAGE, "Cannot create build log file"
- << std::endl);
+ cmCTestLog(this->CTest, ERROR_MESSAGE,
+ "Cannot create build log file" << std::endl);
}
// Create lists of regular expression strings for errors, error exceptions,
@@ -352,7 +353,7 @@ int cmCTestBuildHandler::ProcessHandler()
this->CustomWarningExceptions.push_back(cmCTestWarningExceptions[cc]);
}
-// Pre-compile regular expressions objects for all regular expressions
+ // Pre-compile regular expressions objects for all regular expressions
#define cmCTestBuildHandlerPopulateRegexVector(strings, regexes) \
regexes.clear(); \
@@ -452,8 +453,8 @@ int cmCTestBuildHandler::ProcessHandler()
// Generate XML output
cmGeneratedFileStream xofs;
if (!this->StartResultingXML(cmCTest::PartBuild, "Build", xofs)) {
- cmCTestLog(this->CTest, ERROR_MESSAGE, "Cannot create build XML file"
- << std::endl);
+ cmCTestLog(this->CTest, ERROR_MESSAGE,
+ "Cannot create build XML file" << std::endl);
return -1;
}
cmXMLWriter xml(xofs);
@@ -466,19 +467,20 @@ int cmCTestBuildHandler::ProcessHandler()
this->GenerateXMLFooter(xml, elapsed_build_time);
if (res != cmsysProcess_State_Exited || retVal || this->TotalErrors > 0) {
- cmCTestLog(this->CTest, ERROR_MESSAGE, "Error(s) when building project"
- << std::endl);
+ cmCTestLog(this->CTest, ERROR_MESSAGE,
+ "Error(s) when building project" << std::endl);
}
// Display message about number of errors and warnings
- cmCTestLog(this->CTest, HANDLER_OUTPUT, " "
- << this->TotalErrors
- << (this->TotalErrors >= this->MaxErrors ? " or more" : "")
- << " Compiler errors" << std::endl);
- cmCTestLog(this->CTest, HANDLER_OUTPUT, " "
- << this->TotalWarnings
- << (this->TotalWarnings >= this->MaxWarnings ? " or more" : "")
- << " Compiler warnings" << std::endl);
+ cmCTestLog(this->CTest, HANDLER_OUTPUT,
+ " " << this->TotalErrors
+ << (this->TotalErrors >= this->MaxErrors ? " or more" : "")
+ << " Compiler errors" << std::endl);
+ cmCTestLog(
+ this->CTest, HANDLER_OUTPUT,
+ " " << this->TotalWarnings
+ << (this->TotalWarnings >= this->MaxWarnings ? " or more" : "")
+ << " Compiler warnings" << std::endl);
return retVal;
}
@@ -779,8 +781,8 @@ int cmCTestBuildHandler::RunMakeCommand(const char* command, int* retVal,
}
argv.push_back(nullptr);
- cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Run command:",
- this->Quiet);
+ cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
+ "Run command:", this->Quiet);
for (char const* arg : argv) {
if (!arg) {
break;
@@ -812,7 +814,8 @@ int cmCTestBuildHandler::RunMakeCommand(const char* command, int* retVal,
cmProcessOutput processOutput(encoding);
std::string strdata;
cmCTestOptionalLog(
- this->CTest, HANDLER_PROGRESS_OUTPUT, " Each symbol represents "
+ this->CTest, HANDLER_PROGRESS_OUTPUT,
+ " Each symbol represents "
<< tick_len << " bytes of output." << std::endl
<< (this->UseCTestLaunch
? ""
@@ -868,7 +871,8 @@ int cmCTestBuildHandler::RunMakeCommand(const char* command, int* retVal,
&this->BuildProcessingQueue);
this->ProcessBuffer(nullptr, 0, tick, tick_len, ofs,
&this->BuildProcessingErrorQueue);
- cmCTestOptionalLog(this->CTest, HANDLER_PROGRESS_OUTPUT, " Size of output: "
+ cmCTestOptionalLog(this->CTest, HANDLER_PROGRESS_OUTPUT,
+ " Size of output: "
<< ((this->BuildOutputLogSize + 512) / 1024) << "K"
<< std::endl,
this->Quiet);
@@ -921,8 +925,9 @@ int cmCTestBuildHandler::RunMakeCommand(const char* command, int* retVal,
errorwarning.Error = true;
this->ErrorsAndWarnings.push_back(std::move(errorwarning));
this->TotalErrors++;
- cmCTestLog(this->CTest, ERROR_MESSAGE, "There was an error: "
- << cmsysProcess_GetErrorString(cp) << std::endl);
+ cmCTestLog(this->CTest, ERROR_MESSAGE,
+ "There was an error: " << cmsysProcess_GetErrorString(cp)
+ << std::endl);
}
cmsysProcess_Delete(cp);
@@ -1049,7 +1054,8 @@ void cmCTestBuildHandler::ProcessBuffer(const char* data, size_t length,
this->LastTickChar, this->Quiet);
tickDisplayed = true;
if (tick % tick_line_len == 0 && tick > 0) {
- cmCTestOptionalLog(this->CTest, HANDLER_PROGRESS_OUTPUT, " Size: "
+ cmCTestOptionalLog(this->CTest, HANDLER_PROGRESS_OUTPUT,
+ " Size: "
<< ((this->BuildOutputLogSize + 512) / 1024) << "K"
<< std::endl
<< " ",
@@ -1103,7 +1109,8 @@ int cmCTestBuildHandler::ProcessSingleLine(const char* data)
for (cmsys::RegularExpression& rx : this->ErrorExceptionRegex) {
if (rx.find(data)) {
errorLine = 0;
- cmCTestOptionalLog(this->CTest, DEBUG, " Not an error Line: "
+ cmCTestOptionalLog(this->CTest, DEBUG,
+ " Not an error Line: "
<< data << " (matches: "
<< this->CustomErrorExceptions[wrxCnt] << ")"
<< std::endl,
@@ -1119,7 +1126,8 @@ int cmCTestBuildHandler::ProcessSingleLine(const char* data)
for (cmsys::RegularExpression& rx : this->WarningMatchRegex) {
if (rx.find(data)) {
warningLine = 1;
- cmCTestOptionalLog(this->CTest, DEBUG, " Warning Line: "
+ cmCTestOptionalLog(this->CTest, DEBUG,
+ " Warning Line: "
<< data << " (matches: "
<< this->CustomWarningMatches[wrxCnt] << ")"
<< std::endl,
@@ -1134,7 +1142,8 @@ int cmCTestBuildHandler::ProcessSingleLine(const char* data)
for (cmsys::RegularExpression& rx : this->WarningExceptionRegex) {
if (rx.find(data)) {
warningLine = 0;
- cmCTestOptionalLog(this->CTest, DEBUG, " Not a warning Line: "
+ cmCTestOptionalLog(this->CTest, DEBUG,
+ " Not a warning Line: "
<< data << " (matches: "
<< this->CustomWarningExceptions[wrxCnt] << ")"
<< std::endl,
diff --git a/Source/CTest/cmCTestCVS.cxx b/Source/CTest/cmCTestCVS.cxx
index 5779935..4fb3273 100644
--- a/Source/CTest/cmCTestCVS.cxx
+++ b/Source/CTest/cmCTestCVS.cxx
@@ -134,8 +134,9 @@ private:
bool ProcessLine() override
{
- if (this->Line == ("======================================="
- "======================================")) {
+ if (this->Line ==
+ ("======================================="
+ "======================================")) {
// This line ends the revision list.
if (this->Section == SectionRevisions) {
this->FinishRevision();
diff --git a/Source/CTest/cmCTestConfigureHandler.cxx b/Source/CTest/cmCTestConfigureHandler.cxx
index 821a94a..5967b74 100644
--- a/Source/CTest/cmCTestConfigureHandler.cxx
+++ b/Source/CTest/cmCTestConfigureHandler.cxx
@@ -51,8 +51,8 @@ int cmCTestConfigureHandler::ProcessHandler()
if (!this->CTest->GetShowOnly()) {
cmGeneratedFileStream os;
if (!this->StartResultingXML(cmCTest::PartConfigure, "Configure", os)) {
- cmCTestLog(this->CTest, ERROR_MESSAGE, "Cannot open configure file"
- << std::endl);
+ cmCTestLog(this->CTest, ERROR_MESSAGE,
+ "Cannot open configure file" << std::endl);
return 1;
}
std::string start_time = this->CTest->CurrentTime();
diff --git a/Source/CTest/cmCTestCoverageHandler.cxx b/Source/CTest/cmCTestCoverageHandler.cxx
index bafbe9a..43a2bae 100644
--- a/Source/CTest/cmCTestCoverageHandler.cxx
+++ b/Source/CTest/cmCTestCoverageHandler.cxx
@@ -197,10 +197,10 @@ bool cmCTestCoverageHandler::ShouldIDoCoverage(std::string const& file,
for (cmsys::RegularExpression& rx : this->CustomCoverageExcludeRegex) {
if (rx.find(file)) {
- cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT, " File "
- << file << " is excluded in CTestCustom.ctest"
- << std::endl;
- , this->Quiet);
+ cmCTestOptionalLog(
+ this->CTest, HANDLER_VERBOSE_OUTPUT,
+ " File " << file << " is excluded in CTestCustom.ctest" << std::endl;
+ , this->Quiet);
return false;
}
}
@@ -391,8 +391,8 @@ int cmCTestCoverageHandler::ProcessHandler()
if (!this->StartResultingXML(cmCTest::PartCoverage, "Coverage",
covSumFile)) {
- cmCTestLog(this->CTest, ERROR_MESSAGE, "Cannot open coverage summary file."
- << std::endl);
+ cmCTestLog(this->CTest, ERROR_MESSAGE,
+ "Cannot open coverage summary file." << std::endl);
return -1;
}
covSumFile.setf(std::ios::fixed, std::ios::floatfield);
@@ -429,9 +429,10 @@ int cmCTestCoverageHandler::ProcessHandler()
this->Quiet);
file_count++;
if (file_count % 50 == 0) {
- cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, " processed: "
- << file_count << " out of "
- << cont.TotalCoverage.size() << std::endl,
+ cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT,
+ " processed: " << file_count << " out of "
+ << cont.TotalCoverage.size()
+ << std::endl,
this->Quiet);
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, " ", this->Quiet);
}
@@ -524,8 +525,9 @@ int cmCTestCoverageHandler::ProcessHandler()
float cper = 0;
float cmet = 0;
if (tested + untested > 0) {
- cper = (100 * SAFEDIV(static_cast<float>(tested),
- static_cast<float>(tested + untested)));
+ cper = (100 *
+ SAFEDIV(static_cast<float>(tested),
+ static_cast<float>(tested + untested)));
cmet = (SAFEDIV(static_cast<float>(tested + 10),
static_cast<float>(tested + untested + 10)));
}
@@ -629,14 +631,14 @@ int cmCTestCoverageHandler::ProcessHandler()
covSumXML.EndElement(); // Coverage
this->CTest->EndXML(covSumXML);
- cmCTestLog(this->CTest, HANDLER_OUTPUT, ""
- << std::endl
- << "\tCovered LOC: " << total_tested << std::endl
- << "\tNot covered LOC: " << total_untested << std::endl
- << "\tTotal LOC: " << total_lines << std::endl
- << "\tPercentage Coverage: "
- << std::setiosflags(std::ios::fixed) << std::setprecision(2)
- << (percent_coverage) << "%" << std::endl);
+ cmCTestLog(this->CTest, HANDLER_OUTPUT,
+ "" << std::endl
+ << "\tCovered LOC: " << total_tested << std::endl
+ << "\tNot covered LOC: " << total_untested << std::endl
+ << "\tTotal LOC: " << total_lines << std::endl
+ << "\tPercentage Coverage: "
+ << std::setiosflags(std::ios::fixed) << std::setprecision(2)
+ << (percent_coverage) << "%" << std::endl);
ofs << "\tCovered LOC: " << total_tested << std::endl
<< "\tNot covered LOC: " << total_untested << std::endl
@@ -677,9 +679,9 @@ void cmCTestCoverageHandler::PopulateCustomVectors(cmMakefile* mf)
// Compare file names: fnc(fn1) == fnc(fn2) // fnc == file name compare
//
#ifdef _WIN32
-#define fnc(s) cmSystemTools::LowerCase(s)
+# define fnc(s) cmSystemTools::LowerCase(s)
#else
-#define fnc(s) s
+# define fnc(s) s
#endif
bool IsFileInDir(const std::string& infile, const std::string& indir)
@@ -1045,7 +1047,8 @@ int cmCTestCoverageHandler::HandleGCovCoverage(
continue;
}
if (retVal != 0) {
- cmCTestLog(this->CTest, ERROR_MESSAGE, "Coverage command returned: "
+ cmCTestLog(this->CTest, ERROR_MESSAGE,
+ "Coverage command returned: "
<< retVal << " while processing: " << f << std::endl);
cmCTestLog(this->CTest, ERROR_MESSAGE,
"Command produced error: " << cont->Error << std::endl);
@@ -1077,8 +1080,8 @@ int cmCTestCoverageHandler::HandleGCovCoverage(
gcovStyle = 1;
}
if (gcovStyle != 1) {
- cmCTestLog(this->CTest, ERROR_MESSAGE, "Unknown gcov output style e1"
- << std::endl);
+ cmCTestLog(this->CTest, ERROR_MESSAGE,
+ "Unknown gcov output style e1" << std::endl);
cont->Error++;
break;
}
@@ -1090,8 +1093,8 @@ int cmCTestCoverageHandler::HandleGCovCoverage(
gcovStyle = 1;
}
if (gcovStyle != 1) {
- cmCTestLog(this->CTest, ERROR_MESSAGE, "Unknown gcov output style e2"
- << std::endl);
+ cmCTestLog(this->CTest, ERROR_MESSAGE,
+ "Unknown gcov output style e2" << std::endl);
cont->Error++;
break;
}
@@ -1102,8 +1105,8 @@ int cmCTestCoverageHandler::HandleGCovCoverage(
gcovStyle = 2;
}
if (gcovStyle != 2) {
- cmCTestLog(this->CTest, ERROR_MESSAGE, "Unknown gcov output style e3"
- << std::endl);
+ cmCTestLog(this->CTest, ERROR_MESSAGE,
+ "Unknown gcov output style e3" << std::endl);
cont->Error++;
break;
}
@@ -1115,8 +1118,8 @@ int cmCTestCoverageHandler::HandleGCovCoverage(
gcovStyle = 2;
}
if (gcovStyle != 2) {
- cmCTestLog(this->CTest, ERROR_MESSAGE, "Unknown gcov output style e4"
- << std::endl);
+ cmCTestLog(this->CTest, ERROR_MESSAGE,
+ "Unknown gcov output style e4" << std::endl);
cont->Error++;
break;
}
@@ -1125,8 +1128,8 @@ int cmCTestCoverageHandler::HandleGCovCoverage(
gcovStyle = 2;
}
if (gcovStyle != 2) {
- cmCTestLog(this->CTest, ERROR_MESSAGE, "Unknown gcov output style e5"
- << std::endl);
+ cmCTestLog(this->CTest, ERROR_MESSAGE,
+ "Unknown gcov output style e5" << std::endl);
cont->Error++;
break;
}
@@ -1137,8 +1140,8 @@ int cmCTestCoverageHandler::HandleGCovCoverage(
gcovStyle = 2;
}
if (gcovStyle != 2) {
- cmCTestLog(this->CTest, ERROR_MESSAGE, "Unknown gcov output style e6"
- << std::endl);
+ cmCTestLog(this->CTest, ERROR_MESSAGE,
+ "Unknown gcov output style e6" << std::endl);
cont->Error++;
break;
}
@@ -1152,37 +1155,40 @@ int cmCTestCoverageHandler::HandleGCovCoverage(
gcovStyle = 2;
}
if (gcovStyle != 2) {
- cmCTestLog(this->CTest, ERROR_MESSAGE, "Unknown gcov output style e7"
- << std::endl);
+ cmCTestLog(this->CTest, ERROR_MESSAGE,
+ "Unknown gcov output style e7" << std::endl);
cont->Error++;
break;
}
- cmCTestOptionalLog(this->CTest, WARNING, "Warning: Cannot open file: "
- << st2re5.match(1) << std::endl,
+ cmCTestOptionalLog(this->CTest, WARNING,
+ "Warning: Cannot open file: " << st2re5.match(1)
+ << std::endl,
this->Quiet);
} else if (st2re6.find(line.c_str())) {
if (gcovStyle == 0) {
gcovStyle = 2;
}
if (gcovStyle != 2) {
- cmCTestLog(this->CTest, ERROR_MESSAGE, "Unknown gcov output style e8"
- << std::endl);
+ cmCTestLog(this->CTest, ERROR_MESSAGE,
+ "Unknown gcov output style e8" << std::endl);
cont->Error++;
break;
}
- cmCTestOptionalLog(this->CTest, WARNING, "Warning: File: "
- << st2re6.match(1) << " is newer than "
- << st2re6.match(2) << std::endl,
+ cmCTestOptionalLog(this->CTest, WARNING,
+ "Warning: File: " << st2re6.match(1)
+ << " is newer than "
+ << st2re6.match(2) << std::endl,
this->Quiet);
} else {
// gcov 4.7 can have output lines saying "No executable lines" and
// "Removing 'filename.gcov'"... Don't log those as "errors."
if (line != "No executable lines" &&
!cmSystemTools::StringStartsWith(line.c_str(), "Removing ")) {
- cmCTestLog(this->CTest, ERROR_MESSAGE, "Unknown gcov output line: ["
- << line << "]" << std::endl);
+ cmCTestLog(this->CTest, ERROR_MESSAGE,
+ "Unknown gcov output line: [" << line << "]"
+ << std::endl);
cont->Error++;
// abort();
}
@@ -1418,7 +1424,8 @@ int cmCTestCoverageHandler::HandleLCovCoverage(
continue;
}
if (retVal != 0) {
- cmCTestLog(this->CTest, ERROR_MESSAGE, "Coverage command returned: "
+ cmCTestLog(this->CTest, ERROR_MESSAGE,
+ "Coverage command returned: "
<< retVal << " while processing: " << f << std::endl);
cmCTestLog(this->CTest, ERROR_MESSAGE,
"Command produced error: " << cont->Error << std::endl);
@@ -1817,7 +1824,8 @@ int cmCTestCoverageHandler::RunBullseyeCoverageBranch(
"run covbr: " << std::endl, this->Quiet);
if (!this->RunBullseyeCommand(cont, "covbr", nullptr, outputFile)) {
- cmCTestLog(this->CTest, ERROR_MESSAGE, "error running covbr for."
+ cmCTestLog(this->CTest, ERROR_MESSAGE,
+ "error running covbr for."
<< "\n");
return -1;
}
@@ -1981,8 +1989,8 @@ int cmCTestCoverageHandler::RunBullseyeSourceSummary(
cmXMLWriter xml(covSumFile);
if (!this->StartResultingXML(cmCTest::PartCoverage, "Coverage",
covSumFile)) {
- cmCTestLog(this->CTest, ERROR_MESSAGE, "Cannot open coverage summary file."
- << std::endl);
+ cmCTestLog(this->CTest, ERROR_MESSAGE,
+ "Cannot open coverage summary file." << std::endl);
return 0;
}
this->CTest->StartXML(xml, this->AppendXML);
@@ -2198,7 +2206,8 @@ bool cmCTestCoverageHandler::ParseBullsEyeCovsrcLine(
}
// should be at the end now
if (pos != std::string::npos) {
- cmCTestLog(this->CTest, ERROR_MESSAGE, "Error parsing input : "
+ cmCTestLog(this->CTest, ERROR_MESSAGE,
+ "Error parsing input : "
<< inputLine << " last pos not npos = " << pos << "\n");
}
return true;
diff --git a/Source/CTest/cmCTestCurl.cxx b/Source/CTest/cmCTestCurl.cxx
index 7b5ea60..f7b5930 100644
--- a/Source/CTest/cmCTestCurl.cxx
+++ b/Source/CTest/cmCTestCurl.cxx
@@ -175,7 +175,8 @@ bool cmCTestCurl::UploadFile(std::string const& local_file,
"Curl debug: [" << curlDebug << "]\n", this->Quiet);
}
if (response.empty()) {
- cmCTestLog(this->CTest, ERROR_MESSAGE, "No response from server.\n"
+ cmCTestLog(this->CTest, ERROR_MESSAGE,
+ "No response from server.\n"
<< curlDebug);
return false;
}
@@ -186,7 +187,8 @@ bool cmCTestCurl::HttpRequest(std::string const& url,
std::string const& fields, std::string& response)
{
response.clear();
- cmCTestOptionalLog(this->CTest, DEBUG, "HttpRequest\n"
+ cmCTestOptionalLog(this->CTest, DEBUG,
+ "HttpRequest\n"
<< "url: " << url << "\n"
<< "fields " << fields << "\n",
this->Quiet);
diff --git a/Source/CTest/cmCTestGIT.cxx b/Source/CTest/cmCTestGIT.cxx
index e85af5e..b919c79 100644
--- a/Source/CTest/cmCTestGIT.cxx
+++ b/Source/CTest/cmCTestGIT.cxx
@@ -70,8 +70,9 @@ std::string cmCTestGIT::GetWorkingRevision()
bool cmCTestGIT::NoteOldRevision()
{
this->OldRevision = this->GetWorkingRevision();
- cmCTestLog(this->CTest, HANDLER_OUTPUT, " Old revision of repository is: "
- << this->OldRevision << "\n");
+ cmCTestLog(this->CTest, HANDLER_OUTPUT,
+ " Old revision of repository is: " << this->OldRevision
+ << "\n");
this->PriorRev.Rev = this->OldRevision;
return true;
}
@@ -79,8 +80,9 @@ bool cmCTestGIT::NoteOldRevision()
bool cmCTestGIT::NoteNewRevision()
{
this->NewRevision = this->GetWorkingRevision();
- cmCTestLog(this->CTest, HANDLER_OUTPUT, " New revision of repository is: "
- << this->NewRevision << "\n");
+ cmCTestLog(this->CTest, HANDLER_OUTPUT,
+ " New revision of repository is: " << this->NewRevision
+ << "\n");
return true;
}
diff --git a/Source/CTest/cmCTestGenericHandler.cxx b/Source/CTest/cmCTestGenericHandler.cxx
index ce8f709..dc1bba0 100644
--- a/Source/CTest/cmCTestGenericHandler.cxx
+++ b/Source/CTest/cmCTestGenericHandler.cxx
@@ -100,8 +100,9 @@ bool cmCTestGenericHandler::StartResultingXML(cmCTest::Part part,
}
if (!this->CTest->OpenOutputFile(this->CTest->GetCurrentTag(), ostr.str(),
xofs, true)) {
- cmCTestLog(this->CTest, ERROR_MESSAGE, "Cannot create resulting XML file: "
- << ostr.str() << std::endl);
+ cmCTestLog(this->CTest, ERROR_MESSAGE,
+ "Cannot create resulting XML file: " << ostr.str()
+ << std::endl);
return false;
}
this->CTest->AddSubmitFile(part, ostr.str().c_str());
diff --git a/Source/CTest/cmCTestHG.cxx b/Source/CTest/cmCTestHG.cxx
index 525dacc..c3c5da4 100644
--- a/Source/CTest/cmCTestHG.cxx
+++ b/Source/CTest/cmCTestHG.cxx
@@ -107,8 +107,9 @@ std::string cmCTestHG::GetWorkingRevision()
bool cmCTestHG::NoteOldRevision()
{
this->OldRevision = this->GetWorkingRevision();
- cmCTestLog(this->CTest, HANDLER_OUTPUT, " Old revision of repository is: "
- << this->OldRevision << "\n");
+ cmCTestLog(this->CTest, HANDLER_OUTPUT,
+ " Old revision of repository is: " << this->OldRevision
+ << "\n");
this->PriorRev.Rev = this->OldRevision;
return true;
}
@@ -116,8 +117,9 @@ bool cmCTestHG::NoteOldRevision()
bool cmCTestHG::NoteNewRevision()
{
this->NewRevision = this->GetWorkingRevision();
- cmCTestLog(this->CTest, HANDLER_OUTPUT, " New revision of repository is: "
- << this->NewRevision << "\n");
+ cmCTestLog(this->CTest, HANDLER_OUTPUT,
+ " New revision of repository is: " << this->NewRevision
+ << "\n");
return true;
}
@@ -157,8 +159,9 @@ bool cmCTestHG::UpdateImpl()
return this->RunUpdateCommand(&hg_update[0], &out, &err);
}
-class cmCTestHG::LogParser : public cmCTestVC::OutputLogger,
- private cmXMLParser
+class cmCTestHG::LogParser
+ : public cmCTestVC::OutputLogger
+ , private cmXMLParser
{
public:
LogParser(cmCTestHG* hg, const char* prefix)
@@ -168,6 +171,7 @@ public:
this->InitializeParser();
}
~LogParser() override { this->CleanupParser(); }
+
private:
cmCTestHG* HG;
diff --git a/Source/CTest/cmCTestHandlerCommand.cxx b/Source/CTest/cmCTestHandlerCommand.cxx
index 1fff2fa..8863dc8 100644
--- a/Source/CTest/cmCTestHandlerCommand.cxx
+++ b/Source/CTest/cmCTestHandlerCommand.cxx
@@ -158,13 +158,14 @@ bool cmCTestHandlerCommand::InitialPass(std::vector<std::string> const& args,
"BuildDirectory", cmSystemTools::CollapseFullPath(bdir).c_str(),
this->Quiet);
} else {
- cmCTestLog(this->CTest, ERROR_MESSAGE, "CTEST_BINARY_DIRECTORY not set"
- << std::endl;);
+ cmCTestLog(this->CTest, ERROR_MESSAGE,
+ "CTEST_BINARY_DIRECTORY not set" << std::endl;);
}
}
if (this->Values[ct_SOURCE]) {
- cmCTestLog(this->CTest, DEBUG, "Set source directory to: "
- << this->Values[ct_SOURCE] << std::endl);
+ cmCTestLog(this->CTest, DEBUG,
+ "Set source directory to: " << this->Values[ct_SOURCE]
+ << std::endl);
this->CTest->SetCTestConfiguration(
"SourceDirectory",
cmSystemTools::CollapseFullPath(this->Values[ct_SOURCE]).c_str(),
@@ -186,8 +187,9 @@ bool cmCTestHandlerCommand::InitialPass(std::vector<std::string> const& args,
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);
+ cmCTestLog(this->CTest, ERROR_MESSAGE,
+ "Cannot instantiate test handler " << this->GetName()
+ << std::endl);
if (capureCMakeError) {
this->Makefile->AddDefinition(this->Values[ct_CAPTURE_CMAKE_ERROR],
"-1");
@@ -226,8 +228,8 @@ bool cmCTestHandlerCommand::InitialPass(std::vector<std::string> const& args,
if (capureCMakeError) {
this->Makefile->AddDefinition(this->Values[ct_CAPTURE_CMAKE_ERROR],
"-1");
- cmCTestLog(this->CTest, ERROR_MESSAGE, this->GetName()
- << " " << this->GetError() << "\n");
+ cmCTestLog(this->CTest, ERROR_MESSAGE,
+ this->GetName() << " " << this->GetError() << "\n");
// return success because failure is recorded in CAPTURE_CMAKE_ERROR
return true;
}
@@ -303,8 +305,8 @@ bool cmCTestHandlerCommand::CheckArgumentValue(std::string const& arg)
return true;
}
this->Values[k] = arg.c_str();
- cmCTestLog(this->CTest, DEBUG, "Set " << this->Arguments[k] << " to "
- << arg << "\n");
+ cmCTestLog(this->CTest, DEBUG,
+ "Set " << this->Arguments[k] << " to " << arg << "\n");
return true;
}
return false;
diff --git a/Source/CTest/cmCTestLaunch.cxx b/Source/CTest/cmCTestLaunch.cxx
index e078645..0bffde3 100644
--- a/Source/CTest/cmCTestLaunch.cxx
+++ b/Source/CTest/cmCTestLaunch.cxx
@@ -21,9 +21,9 @@
#include "cmake.h"
#ifdef _WIN32
-#include <fcntl.h> // for _O_BINARY
-#include <io.h> // for _setmode
-#include <stdio.h> // for std{out,err} and fileno
+# include <fcntl.h> // for _O_BINARY
+# include <io.h> // for _setmode
+# include <stdio.h> // for std{out,err} and fileno
#endif
cmCTestLaunch::cmCTestLaunch(int argc, const char* const* argv)
diff --git a/Source/CTest/cmCTestMemCheckHandler.cxx b/Source/CTest/cmCTestMemCheckHandler.cxx
index cb1d947..04d1839 100644
--- a/Source/CTest/cmCTestMemCheckHandler.cxx
+++ b/Source/CTest/cmCTestMemCheckHandler.cxx
@@ -37,8 +37,9 @@ static CatToErrorType cmCTestMemCheckBoundsChecker[] = {
static void xmlReportError(int line, const char* msg, void* data)
{
cmCTest* ctest = static_cast<cmCTest*>(data);
- cmCTestLog(ctest, ERROR_MESSAGE, "Error parsing XML in stream at line "
- << line << ": " << msg << std::endl);
+ cmCTestLog(ctest, ERROR_MESSAGE,
+ "Error parsing XML in stream at line " << line << ": " << msg
+ << std::endl);
}
// parse the xml file containing the results of last BoundsChecker run
@@ -366,10 +367,10 @@ void cmCTestMemCheckHandler::GenerateDartOutput(cmXMLWriter& xml)
const int maxTestNameWidth = this->CTest->GetMaxTestNameWidth();
std::string outname = result.Name + " ";
outname.resize(maxTestNameWidth + 4, '.');
- cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, cc + 1
- << "/" << total << " MemCheck: #"
- << result.TestCount << ": " << outname
- << " Defects: " << memoryErrors << std::endl,
+ cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT,
+ cc + 1 << "/" << total << " MemCheck: #"
+ << result.TestCount << ": " << outname
+ << " Defects: " << memoryErrors << std::endl,
this->Quiet);
}
xml.StartElement("Log");
@@ -773,8 +774,9 @@ bool cmCTestMemCheckHandler::ProcessMemCheckPurifyOutput(
}
}
if (cc == this->ResultStrings.size()) {
- cmCTestLog(this->CTest, ERROR_MESSAGE, "Unknown Purify memory fault: "
- << pfW.match(1) << std::endl);
+ cmCTestLog(this->CTest, ERROR_MESSAGE,
+ "Unknown Purify memory fault: " << pfW.match(1)
+ << std::endl);
ostr << "*** Unknown Purify memory fault: " << pfW.match(1)
<< std::endl;
}
@@ -918,11 +920,12 @@ bool cmCTestMemCheckHandler::ProcessMemCheckValgrindOutput(
break; // stop the copy of output if we are full
}
}
- cmCTestOptionalLog(
- this->CTest, DEBUG, "End test (elapsed: "
- << cmDurationTo<unsigned int>(std::chrono::steady_clock::now() - sttime)
- << "s)" << std::endl,
- this->Quiet);
+ cmCTestOptionalLog(this->CTest, DEBUG,
+ "End test (elapsed: "
+ << cmDurationTo<unsigned int>(
+ std::chrono::steady_clock::now() - sttime)
+ << "s)" << std::endl,
+ this->Quiet);
log = ostr.str();
this->DefectCount += defects;
return defects == 0;
@@ -963,11 +966,12 @@ bool cmCTestMemCheckHandler::ProcessMemCheckBoundsCheckerOutput(
results[err]++;
defects++;
}
- cmCTestOptionalLog(
- this->CTest, DEBUG, "End test (elapsed: "
- << cmDurationTo<unsigned int>(std::chrono::steady_clock::now() - sttime)
- << "s)" << std::endl,
- this->Quiet);
+ cmCTestOptionalLog(this->CTest, DEBUG,
+ "End test (elapsed: "
+ << cmDurationTo<unsigned int>(
+ std::chrono::steady_clock::now() - sttime)
+ << "s)" << std::endl,
+ this->Quiet);
if (defects) {
// only put the output of Bounds Checker if there were
// errors or leaks detected
diff --git a/Source/CTest/cmCTestMultiProcessHandler.cxx b/Source/CTest/cmCTestMultiProcessHandler.cxx
index 14b5caa..dcef8a0 100644
--- a/Source/CTest/cmCTestMultiProcessHandler.cxx
+++ b/Source/CTest/cmCTestMultiProcessHandler.cxx
@@ -124,8 +124,9 @@ bool cmCTestMultiProcessHandler::StartTestProcess(int test)
std::chrono::system_clock::time_point stop_time = this->CTest->GetStopTime();
if (stop_time != std::chrono::system_clock::time_point() &&
stop_time <= std::chrono::system_clock::now()) {
- cmCTestLog(this->CTest, ERROR_MESSAGE, "The stop time has been passed. "
- "Stopping all tests."
+ cmCTestLog(this->CTest, ERROR_MESSAGE,
+ "The stop time has been passed. "
+ "Stopping all tests."
<< std::endl);
this->StopTimePassed = true;
return false;
@@ -330,10 +331,10 @@ void cmCTestMultiProcessHandler::StartNextTests()
bool testLoadOk = true;
if (this->TestLoad > 0) {
if (processors <= spareLoad) {
- cmCTestLog(this->CTest, DEBUG, "OK to run "
- << GetName(test) << ", it requires " << processors
- << " procs & system load is: " << systemLoad
- << std::endl);
+ cmCTestLog(this->CTest, DEBUG,
+ "OK to run " << GetName(test) << ", it requires "
+ << processors << " procs & system load is: "
+ << systemLoad << std::endl);
allTestsFailedTestLoadCheck = false;
} else {
testLoadOk = false;
@@ -712,8 +713,8 @@ void cmCTestMultiProcessHandler::PrintTestList()
if (!p.Labels.empty()) // print the labels
{
- cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Labels:",
- this->Quiet);
+ cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
+ "Labels:", this->Quiet);
}
for (std::string const& label : p.Labels) {
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT, " " << label,
@@ -747,7 +748,8 @@ void cmCTestMultiProcessHandler::PrintTestList()
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, std::endl, this->Quiet);
}
- cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, std::endl
+ cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT,
+ std::endl
<< "Total Tests: " << this->Total << std::endl,
this->Quiet);
}
diff --git a/Source/CTest/cmCTestMultiProcessHandler.h b/Source/CTest/cmCTestMultiProcessHandler.h
index 19e1a35..203170e 100644
--- a/Source/CTest/cmCTestMultiProcessHandler.h
+++ b/Source/CTest/cmCTestMultiProcessHandler.h
@@ -74,6 +74,7 @@ public:
cmCTestTestHandler* GetTestHandler() { return this->TestHandler; }
void SetQuiet(bool b) { this->Quiet = b; }
+
protected:
// Start the next test or tests as many as are allowed by
// ParallelLevel
diff --git a/Source/CTest/cmCTestP4.cxx b/Source/CTest/cmCTestP4.cxx
index fdf8932..511dbd2 100644
--- a/Source/CTest/cmCTestP4.cxx
+++ b/Source/CTest/cmCTestP4.cxx
@@ -372,8 +372,9 @@ bool cmCTestP4::NoteOldRevision()
{
this->OldRevision = this->GetWorkingRevision();
- cmCTestLog(this->CTest, HANDLER_OUTPUT, " Old revision of repository is: "
- << this->OldRevision << "\n");
+ cmCTestLog(this->CTest, HANDLER_OUTPUT,
+ " Old revision of repository is: " << this->OldRevision
+ << "\n");
this->PriorRev.Rev = this->OldRevision;
return true;
}
@@ -382,8 +383,9 @@ bool cmCTestP4::NoteNewRevision()
{
this->NewRevision = this->GetWorkingRevision();
- cmCTestLog(this->CTest, HANDLER_OUTPUT, " New revision of repository is: "
- << this->NewRevision << "\n");
+ cmCTestLog(this->CTest, HANDLER_OUTPUT,
+ " New revision of repository is: " << this->NewRevision
+ << "\n");
return true;
}
@@ -398,7 +400,8 @@ bool cmCTestP4::LoadRevisions()
// If any revision is unknown it means we couldn't contact the server.
// Do not process updates
if (this->OldRevision == "<unknown>" || this->NewRevision == "<unknown>") {
- cmCTestLog(this->CTest, HANDLER_OUTPUT, " At least one of the revisions "
+ cmCTestLog(this->CTest, HANDLER_OUTPUT,
+ " At least one of the revisions "
<< "is unknown. No repository changes will be reported.\n");
return false;
}
diff --git a/Source/CTest/cmCTestRunTest.cxx b/Source/CTest/cmCTestRunTest.cxx
index 8d8ebaa..e729eeb 100644
--- a/Source/CTest/cmCTestRunTest.cxx
+++ b/Source/CTest/cmCTestRunTest.cxx
@@ -41,8 +41,8 @@ cmCTestRunTest::cmCTestRunTest(cmCTestMultiProcessHandler& multiHandler)
void cmCTestRunTest::CheckOutput(std::string const& line)
{
- cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, this->GetIndex()
- << ": " << line << std::endl);
+ cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
+ this->GetIndex() << ": " << line << std::endl);
this->ProcessOutput += line;
this->ProcessOutput += "\n";
@@ -50,7 +50,8 @@ void cmCTestRunTest::CheckOutput(std::string const& line)
if (!this->TestProperties->TimeoutRegularExpressions.empty()) {
for (auto& reg : this->TestProperties->TimeoutRegularExpressions) {
if (reg.first.find(this->ProcessOutput.c_str())) {
- cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, this->GetIndex()
+ cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
+ this->GetIndex()
<< ": "
<< "Test timeout changed to "
<< std::chrono::duration_cast<std::chrono::seconds>(
@@ -380,10 +381,10 @@ void cmCTestRunTest::MemCheckPostProcess()
if (!this->TestHandler->MemCheck) {
return;
}
- cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT, this->Index
- << ": process test output now: "
- << this->TestProperties->Name << " "
- << this->TestResult.Name << std::endl,
+ cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
+ this->Index << ": process test output now: "
+ << this->TestProperties->Name << " "
+ << this->TestResult.Name << std::endl,
this->TestHandler->GetQuiet());
cmCTestMemCheckHandler* handler =
static_cast<cmCTestMemCheckHandler*>(this->TestHandler);
@@ -425,7 +426,8 @@ void cmCTestRunTest::StartFailure(std::string const& output)
bool cmCTestRunTest::StartTest(size_t total)
{
this->TotalNumberOfTests = total; // save for rerun case
- cmCTestLog(this->CTest, HANDLER_OUTPUT, std::setw(2 * getNumWidth(total) + 8)
+ cmCTestLog(this->CTest, HANDLER_OUTPUT,
+ std::setw(2 * getNumWidth(total) + 8)
<< "Start "
<< std::setw(getNumWidth(this->TestHandler->GetMaxIndex()))
<< this->TestProperties->Index << ": "
@@ -592,20 +594,21 @@ void cmCTestRunTest::ComputeArguments()
this->TestResult.FullCommandLine = testCommand;
// Print the test command in verbose mode
- cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, std::endl
+ cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
+ std::endl
<< this->Index << ": "
<< (this->TestHandler->MemCheck ? "MemCheck" : "Test")
<< " command: " << testCommand << std::endl);
// Print any test-specific env vars in verbose mode
if (!this->TestProperties->Environment.empty()) {
- cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, this->Index
- << ": "
- << "Environment variables: " << std::endl);
+ cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
+ this->Index << ": "
+ << "Environment variables: " << std::endl);
}
for (std::string const& env : this->TestProperties->Environment) {
- cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, this->Index << ": " << env
- << std::endl);
+ cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
+ this->Index << ": " << env << std::endl);
}
}
@@ -658,10 +661,11 @@ bool cmCTestRunTest::ForkProcess(cmDuration testTimeOut, bool explicitTimeout,
if (testTimeOut == cmDuration::zero() && explicitTimeout) {
timeout = cmDuration::zero();
}
- cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT, this->Index
- << ": "
- << "Test timeout computed to be: "
- << cmDurationTo<unsigned int>(timeout) << "\n",
+ cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
+ this->Index << ": "
+ << "Test timeout computed to be: "
+ << cmDurationTo<unsigned int>(timeout)
+ << "\n",
this->TestHandler->GetQuiet());
this->TestProcess->SetTimeout(timeout);
@@ -687,20 +691,20 @@ void cmCTestRunTest::WriteLogOutputTop(size_t completed, size_t total)
// got for run until pass. Trick is when this is called we don't
// yet know if we are passing or failing.
if (this->NumberOfRunsLeft == 1) {
- cmCTestLog(this->CTest, HANDLER_OUTPUT, std::setw(getNumWidth(total))
- << completed << "/");
- cmCTestLog(this->CTest, HANDLER_OUTPUT, std::setw(getNumWidth(total))
- << total << " ");
+ cmCTestLog(this->CTest, HANDLER_OUTPUT,
+ std::setw(getNumWidth(total)) << completed << "/");
+ cmCTestLog(this->CTest, HANDLER_OUTPUT,
+ std::setw(getNumWidth(total)) << total << " ");
}
// if this is one of several runs of a test just print blank space
// to keep things neat
else {
- cmCTestLog(this->CTest, HANDLER_OUTPUT, std::setw(getNumWidth(total))
- << " "
- << " ");
- cmCTestLog(this->CTest, HANDLER_OUTPUT, std::setw(getNumWidth(total))
- << " "
- << " ");
+ cmCTestLog(this->CTest, HANDLER_OUTPUT,
+ std::setw(getNumWidth(total)) << " "
+ << " ");
+ cmCTestLog(this->CTest, HANDLER_OUTPUT,
+ std::setw(getNumWidth(total)) << " "
+ << " ");
}
if (this->TestHandler->MemCheck) {
@@ -746,8 +750,8 @@ void cmCTestRunTest::WriteLogOutputTop(size_t completed, size_t total)
<< std::endl;
cmCTestLog(this->CTest, HANDLER_OUTPUT, outname.c_str());
- cmCTestLog(this->CTest, DEBUG, "Testing " << this->TestProperties->Name
- << " ... ");
+ cmCTestLog(this->CTest, DEBUG,
+ "Testing " << this->TestProperties->Name << " ... ");
}
void cmCTestRunTest::FinalizeTest()
diff --git a/Source/CTest/cmCTestSVN.cxx b/Source/CTest/cmCTestSVN.cxx
index 73184fc..58d9b3d 100644
--- a/Source/CTest/cmCTestSVN.cxx
+++ b/Source/CTest/cmCTestSVN.cxx
@@ -107,9 +107,10 @@ bool cmCTestSVN::NoteOldRevision()
svninfo.OldRevision = this->LoadInfo(svninfo);
this->Log << "Revision for repository '" << svninfo.LocalPath
<< "' before update: " << svninfo.OldRevision << "\n";
- cmCTestLog(
- this->CTest, HANDLER_OUTPUT, " Old revision of external repository '"
- << svninfo.LocalPath << "' is: " << svninfo.OldRevision << "\n");
+ cmCTestLog(this->CTest, HANDLER_OUTPUT,
+ " Old revision of external repository '"
+ << svninfo.LocalPath << "' is: " << svninfo.OldRevision
+ << "\n");
}
// Set the global old revision to the one of the root
@@ -128,9 +129,10 @@ bool cmCTestSVN::NoteNewRevision()
svninfo.NewRevision = this->LoadInfo(svninfo);
this->Log << "Revision for repository '" << svninfo.LocalPath
<< "' after update: " << svninfo.NewRevision << "\n";
- cmCTestLog(
- this->CTest, HANDLER_OUTPUT, " New revision of external repository '"
- << svninfo.LocalPath << "' is: " << svninfo.NewRevision << "\n");
+ cmCTestLog(this->CTest, HANDLER_OUTPUT,
+ " New revision of external repository '"
+ << svninfo.LocalPath << "' is: " << svninfo.NewRevision
+ << "\n");
// svninfo.Root = ""; // uncomment to test GuessBase
this->Log << "Repository '" << svninfo.LocalPath
@@ -290,8 +292,9 @@ bool cmCTestSVN::RunSVNCommand(std::vector<char const*> const& parameters,
return RunChild(&args[0], out, err);
}
-class cmCTestSVN::LogParser : public cmCTestVC::OutputLogger,
- private cmXMLParser
+class cmCTestSVN::LogParser
+ : public cmCTestVC::OutputLogger
+ , private cmXMLParser
{
public:
LogParser(cmCTestSVN* svn, const char* prefix, SVNInfo& svninfo)
@@ -302,6 +305,7 @@ public:
this->InitializeParser();
}
~LogParser() override { this->CleanupParser(); }
+
private:
cmCTestSVN* SVN;
cmCTestSVN::SVNInfo& SVNRepo;
diff --git a/Source/CTest/cmCTestScriptHandler.cxx b/Source/CTest/cmCTestScriptHandler.cxx
index 5fff730..333c899 100644
--- a/Source/CTest/cmCTestScriptHandler.cxx
+++ b/Source/CTest/cmCTestScriptHandler.cxx
@@ -39,9 +39,9 @@
#include "cmake.h"
#ifdef _WIN32
-#include <windows.h>
+# include <windows.h>
#else
-#include <unistd.h>
+# include <unistd.h>
#endif
class cmExecutionStatus;
@@ -184,8 +184,9 @@ int cmCTestScriptHandler::ExecuteScript(const std::string& total_script_arg)
argv.push_back("-SR");
argv.push_back(total_script_arg.c_str());
- cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Executable for CTest is: "
- << cmSystemTools::GetCTestCommand() << "\n");
+ cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
+ "Executable for CTest is: " << cmSystemTools::GetCTestCommand()
+ << "\n");
// now pass through all the other arguments
std::vector<std::string>& initArgs =
@@ -210,8 +211,8 @@ int cmCTestScriptHandler::ExecuteScript(const std::string& total_script_arg)
int pipe =
cmSystemTools::WaitForLine(cp, line, std::chrono::seconds(100), out, err);
while (pipe != cmsysProcess_Pipe_None) {
- cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Output: " << line
- << "\n");
+ cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
+ "Output: " << line << "\n");
if (pipe == cmsysProcess_Pipe_STDERR) {
cmCTestLog(this->CTest, ERROR_MESSAGE, line << "\n");
} else if (pipe == cmsysProcess_Pipe_STDOUT) {
@@ -230,17 +231,19 @@ int cmCTestScriptHandler::ExecuteScript(const std::string& total_script_arg)
retVal = cmsysProcess_GetExitValue(cp);
} else if (result == cmsysProcess_State_Exception) {
retVal = cmsysProcess_GetExitException(cp);
- cmCTestLog(this->CTest, ERROR_MESSAGE, "\tThere was an exception: "
+ cmCTestLog(this->CTest, ERROR_MESSAGE,
+ "\tThere was an exception: "
<< cmsysProcess_GetExceptionString(cp) << " " << retVal
<< std::endl);
failed = true;
} else if (result == cmsysProcess_State_Expired) {
- cmCTestLog(this->CTest, ERROR_MESSAGE, "\tThere was a timeout"
- << std::endl);
+ cmCTestLog(this->CTest, ERROR_MESSAGE,
+ "\tThere was a timeout" << std::endl);
failed = true;
} else if (result == cmsysProcess_State_Error) {
- cmCTestLog(this->CTest, ERROR_MESSAGE, "\tError executing ctest: "
- << cmsysProcess_GetErrorString(cp) << std::endl);
+ cmCTestLog(this->CTest, ERROR_MESSAGE,
+ "\tError executing ctest: " << cmsysProcess_GetErrorString(cp)
+ << std::endl);
failed = true;
}
cmsysProcess_Delete(cp);
@@ -253,8 +256,8 @@ int cmCTestScriptHandler::ExecuteScript(const std::string& total_script_arg)
message << arg << " ";
}
}
- cmCTestLog(this->CTest, ERROR_MESSAGE, message.str() << argv[0]
- << std::endl);
+ cmCTestLog(this->CTest, ERROR_MESSAGE,
+ message.str() << argv[0] << std::endl);
return -1;
}
return retVal;
@@ -372,8 +375,8 @@ int cmCTestScriptHandler::ReadInScript(const std::string& total_script_arg)
this->Makefile->GetModulesFile("CTestScriptMode.cmake");
if (!this->Makefile->ReadListFile(systemFile.c_str()) ||
cmSystemTools::GetErrorOccuredFlag()) {
- cmCTestLog(this->CTest, ERROR_MESSAGE, "Error in read:" << systemFile
- << "\n");
+ cmCTestLog(this->CTest, ERROR_MESSAGE,
+ "Error in read:" << systemFile << "\n");
return 2;
}
diff --git a/Source/CTest/cmCTestStartCommand.cxx b/Source/CTest/cmCTestStartCommand.cxx
index 367616c..3911540 100644
--- a/Source/CTest/cmCTestStartCommand.cxx
+++ b/Source/CTest/cmCTestStartCommand.cxx
@@ -98,14 +98,16 @@ bool cmCTestStartCommand::InitialPass(std::vector<std::string> const& args,
this->Quiet);
if (smodel) {
- cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, "Run dashboard with model "
+ cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT,
+ "Run dashboard with model "
<< smodel << std::endl
<< " Source directory: " << src_dir << std::endl
<< " Build directory: " << bld_dir << std::endl,
this->Quiet);
} else {
- cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, "Run dashboard with "
- "to-be-determined model"
+ cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT,
+ "Run dashboard with "
+ "to-be-determined model"
<< std::endl
<< " Source directory: " << src_dir << std::endl
<< " Build directory: " << bld_dir << std::endl,
diff --git a/Source/CTest/cmCTestSubmitHandler.cxx b/Source/CTest/cmCTestSubmitHandler.cxx
index 3bab81e..cae3d4c 100644
--- a/Source/CTest/cmCTestSubmitHandler.cxx
+++ b/Source/CTest/cmCTestSubmitHandler.cxx
@@ -28,9 +28,9 @@
#include "cmake.h"
#if defined(CTEST_USE_XMLRPC)
-#include "cmVersion.h"
-#include "cm_sys_stat.h"
-#include "cm_xmlrpc.h"
+# include "cmVersion.h"
+# include "cm_sys_stat.h"
+# include "cm_xmlrpc.h"
#endif
#define SUBMIT_TIMEOUT_IN_SECONDS_DEFAULT 120
@@ -248,14 +248,16 @@ bool cmCTestSubmitHandler::SubmitUsingFTP(const std::string& localprefix,
res = ::curl_easy_perform(curl);
if (!chunk.empty()) {
- cmCTestOptionalLog(this->CTest, DEBUG, "CURL output: ["
+ cmCTestOptionalLog(this->CTest, DEBUG,
+ "CURL output: ["
<< cmCTestLogWrite(&*chunk.begin(), chunk.size())
<< "]" << std::endl,
this->Quiet);
}
if (!chunkDebug.empty()) {
cmCTestOptionalLog(
- this->CTest, DEBUG, "CURL debug output: ["
+ this->CTest, DEBUG,
+ "CURL debug output: ["
<< cmCTestLogWrite(&*chunkDebug.begin(), chunkDebug.size()) << "]"
<< std::endl,
this->Quiet);
@@ -263,8 +265,9 @@ bool cmCTestSubmitHandler::SubmitUsingFTP(const std::string& localprefix,
fclose(ftpfile);
if (res) {
- cmCTestLog(this->CTest, ERROR_MESSAGE, " Error when uploading file: "
- << local_file << std::endl);
+ cmCTestLog(this->CTest, ERROR_MESSAGE,
+ " Error when uploading file: " << local_file
+ << std::endl);
cmCTestLog(this->CTest, ERROR_MESSAGE,
" Error message was: " << error_buffer << std::endl);
*this->LogFile << " Error when uploading file: " << local_file
@@ -274,7 +277,8 @@ bool cmCTestSubmitHandler::SubmitUsingFTP(const std::string& localprefix,
// avoid dereference of empty vector
if (!chunk.empty()) {
*this->LogFile << cmCTestLogWrite(&*chunk.begin(), chunk.size());
- cmCTestLog(this->CTest, ERROR_MESSAGE, "CURL output: ["
+ cmCTestLog(this->CTest, ERROR_MESSAGE,
+ "CURL output: ["
<< cmCTestLogWrite(&*chunk.begin(), chunk.size()) << "]"
<< std::endl);
}
@@ -418,8 +422,8 @@ bool cmCTestSubmitHandler::SubmitUsingHTTP(const std::string& localprefix,
}
}
std::string upload_as = url +
- ((url.find('?') == std::string::npos) ? '?' : '&') + "FileName=" +
- ofile;
+ ((url.find('?') == std::string::npos) ? '?' : '&') +
+ "FileName=" + ofile;
upload_as += "&MD5=";
@@ -475,7 +479,8 @@ bool cmCTestSubmitHandler::SubmitUsingHTTP(const std::string& localprefix,
res = ::curl_easy_perform(curl);
if (!chunk.empty()) {
- cmCTestOptionalLog(this->CTest, DEBUG, "CURL output: ["
+ cmCTestOptionalLog(this->CTest, DEBUG,
+ "CURL output: ["
<< cmCTestLogWrite(&*chunk.begin(), chunk.size())
<< "]" << std::endl,
this->Quiet);
@@ -483,7 +488,8 @@ bool cmCTestSubmitHandler::SubmitUsingHTTP(const std::string& localprefix,
}
if (!chunkDebug.empty()) {
cmCTestOptionalLog(
- this->CTest, DEBUG, "CURL debug output: ["
+ this->CTest, DEBUG,
+ "CURL debug output: ["
<< cmCTestLogWrite(&*chunkDebug.begin(), chunkDebug.size()) << "]"
<< std::endl,
this->Quiet);
@@ -537,7 +543,8 @@ bool cmCTestSubmitHandler::SubmitUsingHTTP(const std::string& localprefix,
if (!chunk.empty()) {
cmCTestOptionalLog(
- this->CTest, DEBUG, "CURL output: ["
+ this->CTest, DEBUG,
+ "CURL output: ["
<< cmCTestLogWrite(&*chunk.begin(), chunk.size()) << "]"
<< std::endl,
this->Quiet);
@@ -552,8 +559,9 @@ bool cmCTestSubmitHandler::SubmitUsingHTTP(const std::string& localprefix,
fclose(ftpfile);
if (res) {
- cmCTestLog(this->CTest, ERROR_MESSAGE, " Error when uploading file: "
- << local_file << std::endl);
+ cmCTestLog(this->CTest, ERROR_MESSAGE,
+ " Error when uploading file: " << local_file
+ << std::endl);
cmCTestLog(this->CTest, ERROR_MESSAGE,
" Error message was: " << error_buffer << std::endl);
*this->LogFile << " Error when uploading file: " << local_file
@@ -565,7 +573,8 @@ bool cmCTestSubmitHandler::SubmitUsingHTTP(const std::string& localprefix,
*this->LogFile << " Curl output was: "
<< cmCTestLogWrite(&*chunk.begin(), chunk.size())
<< std::endl;
- cmCTestLog(this->CTest, ERROR_MESSAGE, "CURL output: ["
+ cmCTestLog(this->CTest, ERROR_MESSAGE,
+ "CURL output: ["
<< cmCTestLogWrite(&*chunk.begin(), chunk.size()) << "]"
<< std::endl);
}
@@ -612,7 +621,8 @@ void cmCTestSubmitHandler::ParseResponse(
}
if (this->HasWarnings || this->HasErrors) {
- cmCTestLog(this->CTest, HANDLER_OUTPUT, " Server Response:\n"
+ cmCTestLog(this->CTest, HANDLER_OUTPUT,
+ " Server Response:\n"
<< cmCTestLogWrite(&*chunk.begin(), chunk.size()) << "\n");
}
}
@@ -689,8 +699,8 @@ bool cmCTestSubmitHandler::TriggerUsingHTTP(const std::set<std::string>& files,
}
}
std::string turl = url +
- ((url.find('?') == std::string::npos) ? '?' : '&') + "xmlfile=" +
- ofile;
+ ((url.find('?') == std::string::npos) ? '?' : '&') +
+ "xmlfile=" + ofile;
*this->LogFile << "Trigger url: " << turl << std::endl;
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
" Trigger url: " << turl << std::endl, this->Quiet);
@@ -709,7 +719,8 @@ bool cmCTestSubmitHandler::TriggerUsingHTTP(const std::set<std::string>& files,
*this->LogFile << " Curl output was: "
<< cmCTestLogWrite(&*chunk.begin(), chunk.size())
<< std::endl;
- cmCTestLog(this->CTest, ERROR_MESSAGE, "CURL output: ["
+ cmCTestLog(this->CTest, ERROR_MESSAGE,
+ "CURL output: ["
<< cmCTestLogWrite(&*chunk.begin(), chunk.size()) << "]"
<< std::endl);
}
@@ -719,14 +730,16 @@ bool cmCTestSubmitHandler::TriggerUsingHTTP(const std::set<std::string>& files,
}
if (!chunk.empty()) {
- cmCTestOptionalLog(this->CTest, DEBUG, "CURL output: ["
+ cmCTestOptionalLog(this->CTest, DEBUG,
+ "CURL output: ["
<< cmCTestLogWrite(&*chunk.begin(), chunk.size())
<< "]" << std::endl,
this->Quiet);
}
if (!chunkDebug.empty()) {
cmCTestOptionalLog(
- this->CTest, DEBUG, "CURL debug output: ["
+ this->CTest, DEBUG,
+ "CURL debug output: ["
<< cmCTestLogWrite(&*chunkDebug.begin(), chunkDebug.size()) << "]"
<< std::endl,
this->Quiet);
@@ -777,9 +790,9 @@ bool cmCTestSubmitHandler::SubmitUsingSCP(const std::string& scp_command,
argv[1] = lfname.c_str();
std::string rfname = url + "/" + remoteprefix + file;
argv[2] = rfname.c_str();
- cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Execute \""
- << argv[0] << "\" \"" << argv[1] << "\" \"" << argv[2]
- << "\"" << std::endl,
+ cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
+ "Execute \"" << argv[0] << "\" \"" << argv[1] << "\" \""
+ << argv[2] << "\"" << std::endl,
this->Quiet);
*this->LogFile << "Execute \"" << argv[0] << "\" \"" << argv[1] << "\" \""
<< argv[2] << "\"" << std::endl;
@@ -824,13 +837,14 @@ bool cmCTestSubmitHandler::SubmitUsingSCP(const std::string& scp_command,
*this->LogFile << "\tThere was an exception: " << retVal << std::endl;
problems++;
} else if (result == cmsysProcess_State_Expired) {
- cmCTestLog(this->CTest, ERROR_MESSAGE, "\tThere was a timeout"
- << std::endl);
+ cmCTestLog(this->CTest, ERROR_MESSAGE,
+ "\tThere was a timeout" << std::endl);
*this->LogFile << "\tThere was a timeout" << std::endl;
problems++;
} else if (result == cmsysProcess_State_Error) {
- cmCTestLog(this->CTest, ERROR_MESSAGE, "\tError executing SCP: "
- << cmsysProcess_GetErrorString(cp) << std::endl);
+ cmCTestLog(this->CTest, ERROR_MESSAGE,
+ "\tError executing SCP: " << cmsysProcess_GetErrorString(cp)
+ << std::endl);
*this->LogFile << "\tError executing SCP: "
<< cmsysProcess_GetErrorString(cp) << std::endl;
problems++;
@@ -864,8 +878,9 @@ bool cmCTestSubmitHandler::SubmitUsingCP(const std::string& localprefix,
lfname += "/" + file;
std::string rfname = destination + "/" + remoteprefix + file;
cmSystemTools::CopyFileAlways(lfname, rfname);
- cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT, " Copy file: "
- << lfname << " to " << rfname << std::endl,
+ cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
+ " Copy file: " << lfname << " to " << rfname
+ << std::endl,
this->Quiet);
}
std::string tagDoneFile = destination + "/" + remoteprefix + "DONE";
@@ -892,8 +907,9 @@ bool cmCTestSubmitHandler::SubmitUsingXMLRPC(
xmlrpc_env_init(&env);
/* Call the famous server at UserLand. */
- cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, " Submitting to: "
- << realURL << " (" << remoteprefix << ")" << std::endl,
+ cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT,
+ " Submitting to: " << realURL << " (" << remoteprefix
+ << ")" << std::endl,
this->Quiet);
for (std::string const& file : files) {
xmlrpc_value* result;
@@ -916,8 +932,8 @@ bool cmCTestSubmitHandler::SubmitUsingXMLRPC(
// make sure the file is not too big.
if (static_cast<off_t>(static_cast<size_t>(st.st_size)) !=
static_cast<off_t>(st.st_size)) {
- cmCTestLog(this->CTest, ERROR_MESSAGE, " File too big: " << local_file
- << std::endl);
+ cmCTestLog(this->CTest, ERROR_MESSAGE,
+ " File too big: " << local_file << std::endl);
return false;
}
size_t fileSize = static_cast<size_t>(st.st_size);
@@ -947,9 +963,10 @@ bool cmCTestSubmitHandler::SubmitUsingXMLRPC(
delete[] fileBuffer;
if (env.fault_occurred) {
- cmCTestLog(this->CTest, ERROR_MESSAGE, " Submission problem: "
- << env.fault_string << " (" << env.fault_code << ")"
- << std::endl);
+ cmCTestLog(this->CTest, ERROR_MESSAGE,
+ " Submission problem: " << env.fault_string << " ("
+ << env.fault_code << ")"
+ << std::endl);
xmlrpc_env_clean(&env);
xmlrpc_client_cleanup();
return false;
@@ -1004,8 +1021,8 @@ int cmCTestSubmitHandler::HandleCDashUploadFile(std::string const& file,
return -1;
}
if (!cmSystemTools::FileExists(file)) {
- cmCTestLog(this->CTest, ERROR_MESSAGE, "Upload file not found: '"
- << file << "'\n");
+ cmCTestLog(this->CTest, ERROR_MESSAGE,
+ "Upload file not found: '" << file << "'\n");
return -1;
}
cmCTestCurl curl(this->CTest);
@@ -1040,8 +1057,9 @@ int cmCTestSubmitHandler::HandleCDashUploadFile(std::string const& file,
unsigned long retryDelayValue = 0;
if (!cmSystemTools::StringToULong(retryDelayString.c_str(),
&retryDelayValue)) {
- cmCTestLog(this->CTest, WARNING, "Invalid value for 'RETRY_DELAY' : "
- << retryDelayString << std::endl);
+ cmCTestLog(this->CTest, WARNING,
+ "Invalid value for 'RETRY_DELAY' : " << retryDelayString
+ << std::endl);
} else {
retryDelay = std::chrono::seconds(retryDelayValue);
}
@@ -1049,8 +1067,9 @@ int cmCTestSubmitHandler::HandleCDashUploadFile(std::string const& file,
unsigned long retryCount = 0;
if (!retryCountString.empty()) {
if (!cmSystemTools::StringToULong(retryCountString.c_str(), &retryCount)) {
- cmCTestLog(this->CTest, WARNING, "Invalid value for 'RETRY_DELAY' : "
- << retryCountString << std::endl);
+ cmCTestLog(this->CTest, WARNING,
+ "Invalid value for 'RETRY_DELAY' : " << retryCountString
+ << std::endl);
}
}
@@ -1118,7 +1137,8 @@ int cmCTestSubmitHandler::HandleCDashUploadFile(std::string const& file,
}
}
if (!internalTest && !requestSucceeded) {
- cmCTestLog(this->CTest, ERROR_MESSAGE, "Error in HttpRequest\n"
+ cmCTestLog(this->CTest, ERROR_MESSAGE,
+ "Error in HttpRequest\n"
<< response);
return -1;
}
@@ -1128,7 +1148,8 @@ int cmCTestSubmitHandler::HandleCDashUploadFile(std::string const& file,
Json::Value json;
Json::Reader reader;
if (!internalTest && !reader.parse(response, json)) {
- cmCTestLog(this->CTest, ERROR_MESSAGE, "error parsing json string ["
+ cmCTestLog(this->CTest, ERROR_MESSAGE,
+ "error parsing json string ["
<< response << "]\n"
<< reader.getFormattedErrorMessages() << "\n");
return -1;
@@ -1195,12 +1216,14 @@ int cmCTestSubmitHandler::HandleCDashUploadFile(std::string const& file,
}
if (!uploadSucceeded) {
- cmCTestLog(this->CTest, ERROR_MESSAGE, "error uploading to CDash. "
- << file << " " << url << " " << fstr.str());
+ cmCTestLog(this->CTest, ERROR_MESSAGE,
+ "error uploading to CDash. " << file << " " << url << " "
+ << fstr.str());
return -1;
}
if (!reader.parse(response, json)) {
- cmCTestLog(this->CTest, ERROR_MESSAGE, "error parsing json string ["
+ cmCTestLog(this->CTest, ERROR_MESSAGE,
+ "error parsing json string ["
<< response << "]\n"
<< reader.getFormattedErrorMessages() << "\n");
return -1;
@@ -1357,7 +1380,8 @@ int cmCTestSubmitHandler::ProcessHandler()
cnt++;
}
}
- cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, "Submit files (using "
+ cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT,
+ "Submit files (using "
<< this->CTest->GetCTestConfiguration("DropMethod")
<< ")" << std::endl,
this->Quiet);
@@ -1380,8 +1404,9 @@ int cmCTestSubmitHandler::ProcessHandler()
std::string url = "ftp://";
url += cmCTest::MakeURLSafe(
this->CTest->GetCTestConfiguration("DropSiteUser")) +
- ":" + cmCTest::MakeURLSafe(
- this->CTest->GetCTestConfiguration("DropSitePassword")) +
+ ":" +
+ cmCTest::MakeURLSafe(
+ this->CTest->GetCTestConfiguration("DropSitePassword")) +
"@" + this->CTest->GetCTestConfiguration("DropSite") +
cmCTest::MakeURLSafe(this->CTest->GetCTestConfiguration("DropLocation"));
if (!this->CTest->GetCTestConfiguration("DropSiteUser").empty()) {
@@ -1409,12 +1434,13 @@ int cmCTestSubmitHandler::ProcessHandler()
return -1;
}
if (!this->CDash) {
- cmCTestOptionalLog(
- this->CTest, HANDLER_OUTPUT, " Using HTTP trigger method"
- << std::endl
- << " Trigger site: "
- << this->CTest->GetCTestConfiguration("TriggerSite") << std::endl,
- this->Quiet);
+ cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT,
+ " Using HTTP trigger method"
+ << std::endl
+ << " Trigger site: "
+ << this->CTest->GetCTestConfiguration("TriggerSite")
+ << std::endl,
+ this->Quiet);
if (!this->TriggerUsingHTTP(
files, prefix,
this->CTest->GetCTestConfiguration("TriggerSite"))) {
@@ -1466,12 +1492,13 @@ int cmCTestSubmitHandler::ProcessHandler()
return -1;
}
if (!this->CDash) {
- cmCTestOptionalLog(
- this->CTest, HANDLER_OUTPUT, " Using HTTP trigger method"
- << std::endl
- << " Trigger site: "
- << this->CTest->GetCTestConfiguration("TriggerSite") << std::endl,
- this->Quiet);
+ cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT,
+ " Using HTTP trigger method"
+ << std::endl
+ << " Trigger site: "
+ << this->CTest->GetCTestConfiguration("TriggerSite")
+ << std::endl,
+ this->Quiet);
if (!this->TriggerUsingHTTP(
files, prefix,
this->CTest->GetCTestConfiguration("TriggerSite"))) {
@@ -1482,15 +1509,17 @@ int cmCTestSubmitHandler::ProcessHandler()
}
}
if (this->HasErrors) {
- cmCTestLog(this->CTest, HANDLER_OUTPUT, " Errors occurred during "
- "submission."
+ cmCTestLog(this->CTest, HANDLER_OUTPUT,
+ " Errors occurred during "
+ "submission."
<< std::endl);
ofs << " Errors occurred during submission. " << std::endl;
} else {
- cmCTestOptionalLog(
- this->CTest, HANDLER_OUTPUT, " Submission successful"
- << (this->HasWarnings ? ", with warnings." : "") << std::endl,
- this->Quiet);
+ cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT,
+ " Submission successful"
+ << (this->HasWarnings ? ", with warnings." : "")
+ << std::endl,
+ this->Quiet);
ofs << " Submission successful"
<< (this->HasWarnings ? ", with warnings." : "") << std::endl;
}
@@ -1587,8 +1616,9 @@ int cmCTestSubmitHandler::ProcessHandler()
return 0;
}
- cmCTestLog(this->CTest, ERROR_MESSAGE, " Unknown submission method: \""
- << dropMethod << "\"" << std::endl);
+ cmCTestLog(this->CTest, ERROR_MESSAGE,
+ " Unknown submission method: \"" << dropMethod << "\""
+ << std::endl);
return -1;
}
diff --git a/Source/CTest/cmCTestTestCommand.cxx b/Source/CTest/cmCTestTestCommand.cxx
index daedf62..895ca12 100644
--- a/Source/CTest/cmCTestTestCommand.cxx
+++ b/Source/CTest/cmCTestTestCommand.cxx
@@ -112,14 +112,16 @@ cmCTestGenericHandler* cmCTestTestCommand::InitializeHandler()
if (!cmSystemTools::StringToULong(this->Values[ctt_TEST_LOAD],
&testLoad)) {
testLoad = 0;
- cmCTestLog(this->CTest, WARNING, "Invalid value for 'TEST_LOAD' : "
+ cmCTestLog(this->CTest, WARNING,
+ "Invalid value for 'TEST_LOAD' : "
<< this->Values[ctt_TEST_LOAD] << std::endl);
}
} else if (ctestTestLoad && *ctestTestLoad) {
if (!cmSystemTools::StringToULong(ctestTestLoad, &testLoad)) {
testLoad = 0;
- cmCTestLog(this->CTest, WARNING, "Invalid value for 'CTEST_TEST_LOAD' : "
- << ctestTestLoad << std::endl);
+ cmCTestLog(this->CTest, WARNING,
+ "Invalid value for 'CTEST_TEST_LOAD' : " << ctestTestLoad
+ << std::endl);
}
} else {
testLoad = this->CTest->GetTestLoad();
diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx
index cbaf984..91b92a3 100644
--- a/Source/CTest/cmCTestTestHandler.cxx
+++ b/Source/CTest/cmCTestTestHandler.cxx
@@ -259,7 +259,7 @@ public:
/**
* This is called when the command is first encountered in
* the CMakeLists.txt file.
- */
+ */
bool InitialPass(std::vector<std::string> const& /*unused*/,
cmExecutionStatus& /*unused*/) override;
@@ -472,11 +472,12 @@ int cmCTestTestHandler::ProcessHandler()
this->TestResults.clear();
- cmCTestOptionalLog(
- this->CTest, HANDLER_OUTPUT, (this->MemCheck ? "Memory check" : "Test")
- << " project " << cmSystemTools::GetCurrentWorkingDirectory()
- << std::endl,
- this->Quiet);
+ cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT,
+ (this->MemCheck ? "Memory check" : "Test")
+ << " project "
+ << cmSystemTools::GetCurrentWorkingDirectory()
+ << std::endl,
+ this->Quiet);
if (!this->PreProcessHandler()) {
return -1;
}
@@ -500,13 +501,14 @@ int cmCTestTestHandler::ProcessHandler()
if (total == 0) {
if (!this->CTest->GetShowOnly() && !this->CTest->ShouldPrintLabels()) {
- cmCTestLog(this->CTest, ERROR_MESSAGE, "No tests were found!!!"
- << std::endl);
+ cmCTestLog(this->CTest, ERROR_MESSAGE,
+ "No tests were found!!!" << std::endl);
}
} else {
if (this->HandlerVerbose && !passed.empty() &&
(this->UseIncludeRegExpFlag || this->UseExcludeRegExpFlag)) {
- cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT, std::endl
+ cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
+ std::endl
<< "The following tests passed:" << std::endl,
this->Quiet);
for (std::string const& j : passed) {
@@ -533,7 +535,8 @@ int cmCTestTestHandler::ProcessHandler()
percent = 99;
}
- cmCTestLog(this->CTest, HANDLER_OUTPUT, std::endl
+ cmCTestLog(this->CTest, HANDLER_OUTPUT,
+ std::endl
<< static_cast<int>(percent + .5f) << "% tests passed, "
<< failed.size() << " tests failed out of " << total
<< std::endl);
@@ -553,7 +556,8 @@ int cmCTestTestHandler::ProcessHandler()
if (!disabledTests.empty()) {
cmGeneratedFileStream ofs;
- cmCTestLog(this->CTest, HANDLER_OUTPUT, std::endl
+ cmCTestLog(this->CTest, HANDLER_OUTPUT,
+ std::endl
<< "The following tests did not run:" << std::endl);
this->StartLogFile("TestsDisabled", ofs);
@@ -565,15 +569,16 @@ int cmCTestTestHandler::ProcessHandler()
} else {
disabled_reason = "Skipped";
}
- cmCTestLog(this->CTest, HANDLER_OUTPUT, "\t"
- << std::setw(3) << dt.TestCount << " - " << dt.Name
- << " (" << disabled_reason << ")" << std::endl);
+ cmCTestLog(this->CTest, HANDLER_OUTPUT,
+ "\t" << std::setw(3) << dt.TestCount << " - " << dt.Name
+ << " (" << disabled_reason << ")" << std::endl);
}
}
if (!failed.empty()) {
cmGeneratedFileStream ofs;
- cmCTestLog(this->CTest, HANDLER_OUTPUT, std::endl
+ cmCTestLog(this->CTest, HANDLER_OUTPUT,
+ std::endl
<< "The following tests FAILED:" << std::endl);
this->StartLogFile("TestsFailed", ofs);
@@ -582,9 +587,10 @@ int cmCTestTestHandler::ProcessHandler()
!cmHasLiteralPrefix(ft.CompletionStatus, "SKIP_RETURN_CODE=") &&
ft.CompletionStatus != "Disabled") {
ofs << ft.TestCount << ":" << ft.Name << std::endl;
- cmCTestLog(this->CTest, HANDLER_OUTPUT, "\t"
- << std::setw(3) << ft.TestCount << " - " << ft.Name
- << " (" << this->GetTestStatus(ft) << ")" << std::endl);
+ cmCTestLog(this->CTest, HANDLER_OUTPUT,
+ "\t" << std::setw(3) << ft.TestCount << " - " << ft.Name
+ << " (" << this->GetTestStatus(ft) << ")"
+ << std::endl);
}
}
}
@@ -595,7 +601,8 @@ int cmCTestTestHandler::ProcessHandler()
if (!this->StartResultingXML(
(this->MemCheck ? cmCTest::PartMemCheck : cmCTest::PartTest),
(this->MemCheck ? "DynamicAnalysis" : "Test"), xmlfile)) {
- cmCTestLog(this->CTest, ERROR_MESSAGE, "Cannot create "
+ cmCTestLog(this->CTest, ERROR_MESSAGE,
+ "Cannot create "
<< (this->MemCheck ? "memory check" : "testing")
<< " XML file" << std::endl);
this->LogFile = nullptr;
@@ -671,8 +678,8 @@ void cmCTestTestHandler::PrintLabelOrSubprojectSummary(bool doSubProject)
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT,
"\nSubproject Time Summary:", this->Quiet);
} else {
- cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, "\nLabel Time Summary:",
- this->Quiet);
+ cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT,
+ "\nLabel Time Summary:", this->Quiet);
}
for (std::string const& i : labels) {
std::string label = i;
@@ -687,7 +694,8 @@ void cmCTestTestHandler::PrintLabelOrSubprojectSummary(bool doSubProject)
labelCountStr << "s";
}
labelCountStr << ")";
- cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, "\n"
+ cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT,
+ "\n"
<< label << " = " << buf << " "
<< labelCountStr.str(),
this->Quiet);
@@ -1089,9 +1097,10 @@ void cmCTestTestHandler::UpdateForFixtures(ListOfTests& tests) const
}
}
- cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Added "
- << fixtureTestsAdded
- << " tests to meet fixture requirements" << std::endl,
+ cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
+ "Added " << fixtureTestsAdded
+ << " tests to meet fixture requirements"
+ << std::endl,
this->Quiet);
}
@@ -1119,8 +1128,9 @@ bool cmCTestTestHandler::GetValue(const char* tag, int& value,
fin >> value;
ret = cmSystemTools::GetLineFromStream(fin, line); // read blank line
} else {
- cmCTestLog(this->CTest, ERROR_MESSAGE, "parse error: missing tag: "
- << tag << " found [" << line << "]" << std::endl);
+ cmCTestLog(this->CTest, ERROR_MESSAGE,
+ "parse error: missing tag: " << tag << " found [" << line << "]"
+ << std::endl);
ret = false;
}
return ret;
@@ -1136,8 +1146,9 @@ bool cmCTestTestHandler::GetValue(const char* tag, double& value,
fin >> value;
ret = cmSystemTools::GetLineFromStream(fin, line); // read blank line
} else {
- cmCTestLog(this->CTest, ERROR_MESSAGE, "parse error: missing tag: "
- << tag << " found [" << line << "]" << std::endl);
+ cmCTestLog(this->CTest, ERROR_MESSAGE,
+ "parse error: missing tag: " << tag << " found [" << line << "]"
+ << std::endl);
ret = false;
}
return ret;
@@ -1162,8 +1173,9 @@ bool cmCTestTestHandler::GetValue(const char* tag, bool& value,
#endif
ret = cmSystemTools::GetLineFromStream(fin, line); // read blank line
} else {
- cmCTestLog(this->CTest, ERROR_MESSAGE, "parse error: missing tag: "
- << tag << " found [" << line << "]" << std::endl);
+ cmCTestLog(this->CTest, ERROR_MESSAGE,
+ "parse error: missing tag: " << tag << " found [" << line << "]"
+ << std::endl);
ret = false;
}
return ret;
@@ -1179,8 +1191,9 @@ bool cmCTestTestHandler::GetValue(const char* tag, size_t& value,
fin >> value;
ret = cmSystemTools::GetLineFromStream(fin, line); // read blank line
} else {
- cmCTestLog(this->CTest, ERROR_MESSAGE, "parse error: missing tag: "
- << tag << " found [" << line << "]" << std::endl);
+ cmCTestLog(this->CTest, ERROR_MESSAGE,
+ "parse error: missing tag: " << tag << " found [" << line << "]"
+ << std::endl);
ret = false;
}
return ret;
@@ -1195,8 +1208,9 @@ bool cmCTestTestHandler::GetValue(const char* tag, std::string& value,
if (line == tag) {
ret = cmSystemTools::GetLineFromStream(fin, value);
} else {
- cmCTestLog(this->CTest, ERROR_MESSAGE, "parse error: missing tag: "
- << tag << " found [" << line << "]" << std::endl);
+ cmCTestLog(this->CTest, ERROR_MESSAGE,
+ "parse error: missing tag: " << tag << " found [" << line << "]"
+ << std::endl);
ret = false;
}
return ret;
@@ -1611,7 +1625,8 @@ std::string cmCTestTestHandler::FindExecutable(
}
}
if (fullPath.empty()) {
- cmCTestLog(ctest, HANDLER_OUTPUT, "Could not find executable "
+ cmCTestLog(ctest, HANDLER_OUTPUT,
+ "Could not find executable "
<< testCommand << "\n"
<< "Looked in the following places:\n");
for (std::string const& f : failed) {
@@ -1793,8 +1808,8 @@ void cmCTestTestHandler::ExpandTestsToRunInformationForRerunFailed()
cmsys::Directory directory;
if (directory.Load(dirName) == 0) {
- cmCTestLog(this->CTest, ERROR_MESSAGE, "Unable to read the contents of "
- << dirName << std::endl);
+ cmCTestLog(this->CTest, ERROR_MESSAGE,
+ "Unable to read the contents of " << dirName << std::endl);
return;
}
@@ -1829,8 +1844,8 @@ void cmCTestTestHandler::ExpandTestsToRunInformationForRerunFailed()
if (!cmSystemTools::FileExists(lastTestsFailedLog)) {
if (!this->CTest->GetShowOnly() && !this->CTest->ShouldPrintLabels()) {
- cmCTestLog(this->CTest, ERROR_MESSAGE, lastTestsFailedLog
- << " does not exist!" << std::endl);
+ cmCTestLog(this->CTest, ERROR_MESSAGE,
+ lastTestsFailedLog << " does not exist!" << std::endl);
}
return;
}
@@ -1852,7 +1867,8 @@ void cmCTestTestHandler::ExpandTestsToRunInformationForRerunFailed()
ifs.close();
} else if (!this->CTest->GetShowOnly() &&
!this->CTest->ShouldPrintLabels()) {
- cmCTestLog(this->CTest, ERROR_MESSAGE, "Problem reading file: "
+ cmCTestLog(this->CTest, ERROR_MESSAGE,
+ "Problem reading file: "
<< lastTestsFailedLog
<< " while generating list of previously failed tests."
<< std::endl);
@@ -1961,11 +1977,12 @@ void cmCTestTestHandler::GenerateRegressionImages(cmXMLWriter& xml,
xml.Element("Value", "Image " + filename + " is empty");
xml.EndElement();
} else {
- cmsys::ifstream ifs(filename.c_str(), std::ios::in
+ cmsys::ifstream ifs(filename.c_str(),
+ std::ios::in
#ifdef _WIN32
| std::ios::binary
#endif
- );
+ );
unsigned char* file_buffer = new unsigned char[len + 1];
ifs.read(reinterpret_cast<char*>(file_buffer), len);
unsigned char* encoded_buffer = new unsigned char[static_cast<int>(
@@ -2002,9 +2019,9 @@ void cmCTestTestHandler::GenerateRegressionImages(cmXMLWriter& xml,
xml.Attribute("text", "text/string");
xml.Element("Value", "File " + filename + " not found");
xml.EndElement();
- cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, "File \""
- << filename << "\" not found." << std::endl,
- this->Quiet);
+ cmCTestOptionalLog(
+ this->CTest, HANDLER_OUTPUT,
+ "File \"" << filename << "\" not found." << std::endl, this->Quiet);
}
cxml.erase(measurementfile.start(),
measurementfile.end() - measurementfile.start());
diff --git a/Source/CTest/cmCTestUpdateHandler.cxx b/Source/CTest/cmCTestUpdateHandler.cxx
index 504b210..57e40ce 100644
--- a/Source/CTest/cmCTestUpdateHandler.cxx
+++ b/Source/CTest/cmCTestUpdateHandler.cxx
@@ -47,7 +47,8 @@ void cmCTestUpdateHandler::Initialize()
int cmCTestUpdateHandler::DetermineType(const char* cmd, const char* type)
{
- cmCTestOptionalLog(this->CTest, DEBUG, "Determine update type from command: "
+ cmCTestOptionalLog(this->CTest, DEBUG,
+ "Determine update type from command: "
<< cmd << " and type: " << type << std::endl,
this->Quiet);
if (type && *type) {
@@ -130,7 +131,8 @@ int cmCTestUpdateHandler::ProcessHandler()
return -1;
}
- cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, " Use "
+ cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT,
+ " Use "
<< cmCTestUpdateHandlerUpdateToString(this->UpdateType)
<< " repository type" << std::endl;
, this->Quiet);
@@ -171,8 +173,8 @@ int cmCTestUpdateHandler::ProcessHandler()
//
cmGeneratedFileStream os;
if (!this->StartResultingXML(cmCTest::PartUpdate, "Update", os)) {
- cmCTestLog(this->CTest, ERROR_MESSAGE, "Cannot open log file"
- << std::endl);
+ cmCTestLog(this->CTest, ERROR_MESSAGE,
+ "Cannot open log file" << std::endl);
return -1;
}
std::string start_time = this->CTest->CurrentTime();
@@ -191,7 +193,8 @@ int cmCTestUpdateHandler::ProcessHandler()
std::string("ctest-") + cmVersion::GetCMakeVersion());
xml.Element("Site", this->CTest->GetCTestConfiguration("Site"));
xml.Element("BuildName", buildname);
- xml.Element("BuildStamp", this->CTest->GetCurrentTag() + "-" +
+ xml.Element("BuildStamp",
+ this->CTest->GetCurrentTag() + "-" +
this->CTest->GetTestModelString());
xml.Element("StartDateTime", start_time);
xml.Element("StartTime", start_time_time);
@@ -209,9 +212,9 @@ int cmCTestUpdateHandler::ProcessHandler()
this->Quiet);
}
if (int numModified = vc->GetPathCount(cmCTestVC::PathModified)) {
- cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, " Found "
- << numModified << " locally modified files\n",
- this->Quiet);
+ cmCTestOptionalLog(
+ this->CTest, HANDLER_OUTPUT,
+ " Found " << numModified << " locally modified files\n", this->Quiet);
localModifications += numModified;
}
if (int numConflicting = vc->GetPathCount(cmCTestVC::PathConflicting)) {
@@ -241,8 +244,9 @@ int cmCTestUpdateHandler::ProcessHandler()
if (!updated) {
xml.Content("Update command failed:\n");
xml.Content(vc->GetUpdateCommandLine());
- cmCTestLog(this->CTest, HANDLER_OUTPUT, " Update command failed: "
- << vc->GetUpdateCommandLine() << "\n");
+ cmCTestLog(this->CTest, HANDLER_OUTPUT,
+ " Update command failed: " << vc->GetUpdateCommandLine()
+ << "\n");
}
xml.EndElement(); // UpdateReturnStatus
xml.EndElement(); // Update
diff --git a/Source/CTest/cmCTestUploadHandler.cxx b/Source/CTest/cmCTestUploadHandler.cxx
index 59a5de4..261ecab 100644
--- a/Source/CTest/cmCTestUploadHandler.cxx
+++ b/Source/CTest/cmCTestUploadHandler.cxx
@@ -30,8 +30,8 @@ int cmCTestUploadHandler::ProcessHandler()
cmGeneratedFileStream ofs;
if (!this->CTest->OpenOutputFile(this->CTest->GetCurrentTag(), "Upload.xml",
ofs)) {
- cmCTestLog(this->CTest, ERROR_MESSAGE, "Cannot open Upload.xml file"
- << std::endl);
+ cmCTestLog(this->CTest, ERROR_MESSAGE,
+ "Cannot open Upload.xml file" << std::endl);
return -1;
}
std::string buildname =
@@ -45,7 +45,8 @@ int cmCTestUploadHandler::ProcessHandler()
"<file:///Dart/Source/Server/XSL/Build.xsl> \"");
xml.StartElement("Site");
xml.Attribute("BuildName", buildname);
- xml.Attribute("BuildStamp", this->CTest->GetCurrentTag() + "-" +
+ xml.Attribute("BuildStamp",
+ this->CTest->GetCurrentTag() + "-" +
this->CTest->GetTestModelString());
xml.Attribute("Name", this->CTest->GetCTestConfiguration("Site"));
xml.Attribute("Generator",
diff --git a/Source/CTest/cmCTestVC.cxx b/Source/CTest/cmCTestVC.cxx
index 13fa6e1..a59d671 100644
--- a/Source/CTest/cmCTestVC.cxx
+++ b/Source/CTest/cmCTestVC.cxx
@@ -69,8 +69,8 @@ bool cmCTestVC::InitialCheckout(const char* command)
bool result = this->RunChild(&vc_co[0], &out, &err, parent.c_str());
this->Log << "--- End Initial Checkout ---\n";
if (!result) {
- cmCTestLog(this->CTest, ERROR_MESSAGE, "Initial checkout failed!"
- << std::endl);
+ cmCTestLog(this->CTest, ERROR_MESSAGE,
+ "Initial checkout failed!" << std::endl);
}
return result;
}
diff --git a/Source/CTest/cmParseCacheCoverage.cxx b/Source/CTest/cmParseCacheCoverage.cxx
index 4cd6588..ca1fe70 100644
--- a/Source/CTest/cmParseCacheCoverage.cxx
+++ b/Source/CTest/cmParseCacheCoverage.cxx
@@ -100,10 +100,11 @@ bool cmParseCacheCoverage::ReadCMCovFile(const char* file)
std::string line;
std::vector<std::string> separateLine;
if (!cmSystemTools::GetLineFromStream(in, line)) {
- cmCTestLog(this->CTest, ERROR_MESSAGE, "Empty file : "
- << file << " referenced in this line of cmcov data:\n"
- "["
- << line << "]\n");
+ cmCTestLog(this->CTest, ERROR_MESSAGE,
+ "Empty file : " << file
+ << " referenced in this line of cmcov data:\n"
+ "["
+ << line << "]\n");
return false;
}
separateLine.clear();
@@ -112,8 +113,9 @@ bool cmParseCacheCoverage::ReadCMCovFile(const char* file)
separateLine[1] != "Line" || separateLine[2] != "RtnLine" ||
separateLine[3] != "Code") {
cmCTestLog(this->CTest, ERROR_MESSAGE,
- "Bad first line of cmcov file : " << file << " line:\n"
- "["
+ "Bad first line of cmcov file : " << file
+ << " line:\n"
+ "["
<< line << "]\n");
}
std::string routine;
@@ -128,8 +130,9 @@ bool cmParseCacheCoverage::ReadCMCovFile(const char* file)
if (separateLine.size() < 4) {
cmCTestLog(this->CTest, ERROR_MESSAGE,
"Bad line of cmcov file expected at least 4 found: "
- << separateLine.size() << " " << file << " line:\n"
- "["
+ << separateLine.size() << " " << file
+ << " line:\n"
+ "["
<< line << "]\n");
for (std::string::size_type i = 0; i < separateLine.size(); ++i) {
cmCTestLog(this->CTest, ERROR_MESSAGE, "" << separateLine[1] << " ");
diff --git a/Source/CTest/cmParseDelphiCoverage.cxx b/Source/CTest/cmParseDelphiCoverage.cxx
index 6d82cb2..cc81979 100644
--- a/Source/CTest/cmParseDelphiCoverage.cxx
+++ b/Source/CTest/cmParseDelphiCoverage.cxx
@@ -108,8 +108,9 @@ public:
while (true) {
lastoffset = line.find('(', pos);
if (lastoffset == std::string::npos) {
- cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT, endnamepos
- << "File not found " << lastoffset << std::endl,
+ cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
+ endnamepos << "File not found " << lastoffset
+ << std::endl,
this->Coverage.Quiet);
return false;
}
diff --git a/Source/CTest/cmParseGTMCoverage.cxx b/Source/CTest/cmParseGTMCoverage.cxx
index f965048..822363d 100644
--- a/Source/CTest/cmParseGTMCoverage.cxx
+++ b/Source/CTest/cmParseGTMCoverage.cxx
@@ -75,7 +75,8 @@ bool cmParseGTMCoverage::ReadMCovFile(const char* file)
this->Coverage.TotalCoverage[lastpath][lastoffset + linenumber] +=
count;
} else {
- cmCTestLog(this->CTest, ERROR_MESSAGE, "Can not find mumps file : "
+ cmCTestLog(this->CTest, ERROR_MESSAGE,
+ "Can not find mumps file : "
<< lastroutine
<< " referenced in this line of mcov data:\n"
"["
@@ -102,9 +103,11 @@ bool cmParseGTMCoverage::ReadMCovFile(const char* file)
lastoffset = lineoffset;
}
} else {
- cmCTestLog(this->CTest, ERROR_MESSAGE, "Can not find mumps file : "
- << routine << " referenced in this line of mcov data:\n"
- "["
+ cmCTestLog(this->CTest, ERROR_MESSAGE,
+ "Can not find mumps file : "
+ << routine
+ << " referenced in this line of mcov data:\n"
+ "["
<< line << "]\n");
}
lastfunction = function;
@@ -144,8 +147,9 @@ bool cmParseGTMCoverage::FindFunctionInMumpsFile(std::string const& filepath,
linenum++; // move to next line count
}
lineoffset = 0;
- cmCTestLog(this->CTest, ERROR_MESSAGE, "Could not find entry point : "
- << function << " in " << filepath << "\n");
+ cmCTestLog(this->CTest, ERROR_MESSAGE,
+ "Could not find entry point : " << function << " in " << filepath
+ << "\n");
return false;
}
@@ -221,8 +225,8 @@ bool cmParseGTMCoverage::ParseMCOVLine(std::string const& line,
}
// less then two arguments is an error
if (args.size() < 2) {
- cmCTestLog(this->CTest, ERROR_MESSAGE, "Error parsing mcov line: ["
- << line << "]\n");
+ cmCTestLog(this->CTest, ERROR_MESSAGE,
+ "Error parsing mcov line: [" << line << "]\n");
return false;
}
routine = args[0]; // the routine is the first argument
diff --git a/Source/CTest/cmParseJacocoCoverage.cxx b/Source/CTest/cmParseJacocoCoverage.cxx
index 7acb5ca..31e7cd4 100644
--- a/Source/CTest/cmParseJacocoCoverage.cxx
+++ b/Source/CTest/cmParseJacocoCoverage.cxx
@@ -38,8 +38,9 @@ protected:
if (this->PackagePath.empty()) {
if (!this->FindPackagePath(fileName)) {
- cmCTestLog(this->CTest, ERROR_MESSAGE, "Cannot find file: "
- << this->PackageName << "/" << fileName << std::endl);
+ cmCTestLog(this->CTest, ERROR_MESSAGE,
+ "Cannot find file: " << this->PackageName << "/"
+ << fileName << std::endl);
this->Coverage.Error++;
return;
}
diff --git a/Source/CTest/cmParsePHPCoverage.cxx b/Source/CTest/cmParsePHPCoverage.cxx
index 761ebec..a6e65c9 100644
--- a/Source/CTest/cmParsePHPCoverage.cxx
+++ b/Source/CTest/cmParsePHPCoverage.cxx
@@ -153,7 +153,8 @@ bool cmParsePHPCoverage::ReadFileInformation(std::istream& in)
delete[] s;
// read close quote
if (in.get(c) && c != '"') {
- cmCTestLog(this->CTest, ERROR_MESSAGE, "failed to read close quote\n"
+ cmCTestLog(this->CTest, ERROR_MESSAGE,
+ "failed to read close quote\n"
<< "read [" << c << "]\n");
return false;
}
@@ -184,8 +185,8 @@ bool cmParsePHPCoverage::ReadPHPData(const char* file)
}
for (int i = 0; i < size; i++) {
if (!this->ReadFileInformation(in)) {
- cmCTestLog(this->CTest, ERROR_MESSAGE, "Failed to read file #" << i
- << "\n");
+ cmCTestLog(this->CTest, ERROR_MESSAGE,
+ "Failed to read file #" << i << "\n");
return false;
}
in.get(c);
diff --git a/Source/CTest/cmProcess.cxx b/Source/CTest/cmProcess.cxx
index 5c9b169..39cea87 100644
--- a/Source/CTest/cmProcess.cxx
+++ b/Source/CTest/cmProcess.cxx
@@ -13,13 +13,13 @@
#include <signal.h>
#include <string>
#if !defined(_WIN32)
-#include <unistd.h>
+# include <unistd.h>
#endif
#define CM_PROCESS_BUF_SIZE 65536
#if defined(_WIN32) && !defined(__CYGWIN__)
-#include <io.h>
+# include <io.h>
static int cmProcessGetPipes(int* fds)
{
@@ -40,7 +40,7 @@ static int cmProcessGetPipes(int* fds)
return 0;
}
#else
-#include <errno.h>
+# include <errno.h>
static int cmProcessGetPipes(int* fds)
{
@@ -167,8 +167,9 @@ bool cmProcess::StartProcess(uv_loop_t& loop, std::vector<size_t>* affinity)
status = this->Process.spawn(loop, options, this);
if (status != 0) {
- cmCTestLog(this->Runner.GetCTest(), ERROR_MESSAGE, "Process not started\n "
- << this->Command << "\n[" << uv_strerror(status) << "]\n");
+ cmCTestLog(this->Runner.GetCTest(), ERROR_MESSAGE,
+ "Process not started\n " << this->Command << "\n["
+ << uv_strerror(status) << "]\n");
return false;
}
@@ -345,7 +346,7 @@ void cmProcess::OnExit(int64_t exit_status, int term_signal)
#else
term_signal != 0
#endif
- ) {
+ ) {
this->ProcessState = cmProcess::State::Exception;
} else {
this->ProcessState = cmProcess::State::Exited;
@@ -391,7 +392,7 @@ cmProcess::Exception cmProcess::GetExitException()
{
auto exception = Exception::None;
#if defined(_WIN32) && !defined(__CYGWIN__)
- auto exit_code = (DWORD) this->ExitValue;
+ auto exit_code = (DWORD)this->ExitValue;
if ((exit_code & 0xF0000000) != 0xC0000000) {
return exception;
}
@@ -415,12 +416,12 @@ cmProcess::Exception cmProcess::GetExitException()
case STATUS_FLOAT_OVERFLOW:
case STATUS_FLOAT_STACK_CHECK:
case STATUS_FLOAT_UNDERFLOW:
-#ifdef STATUS_FLOAT_MULTIPLE_FAULTS
+# ifdef STATUS_FLOAT_MULTIPLE_FAULTS
case STATUS_FLOAT_MULTIPLE_FAULTS:
-#endif
-#ifdef STATUS_FLOAT_MULTIPLE_TRAPS
+# endif
+# ifdef STATUS_FLOAT_MULTIPLE_TRAPS
case STATUS_FLOAT_MULTIPLE_TRAPS:
-#endif
+# endif
case STATUS_INTEGER_DIVIDE_BY_ZERO:
case STATUS_INTEGER_OVERFLOW:
exception = Exception::Numerical;
@@ -488,16 +489,16 @@ std::string cmProcess::GetExitExceptionString()
case STATUS_FLOAT_UNDERFLOW:
exception_str = "Floating-point underflow";
break;
-#ifdef STATUS_FLOAT_MULTIPLE_FAULTS
+# ifdef STATUS_FLOAT_MULTIPLE_FAULTS
case STATUS_FLOAT_MULTIPLE_FAULTS:
exception_str = "Floating-point exception (multiple faults)";
break;
-#endif
-#ifdef STATUS_FLOAT_MULTIPLE_TRAPS
+# endif
+# ifdef STATUS_FLOAT_MULTIPLE_TRAPS
case STATUS_FLOAT_MULTIPLE_TRAPS:
exception_str = "Floating-point exception (multiple traps)";
break;
-#endif
+# endif
case STATUS_INTEGER_DIVIDE_BY_ZERO:
exception_str = "Integer divide-by-zero";
break;
@@ -544,188 +545,188 @@ std::string cmProcess::GetExitExceptionString()
}
#else
switch (this->Signal) {
-#ifdef SIGSEGV
+# ifdef SIGSEGV
case SIGSEGV:
exception_str = "Segmentation fault";
break;
-#endif
-#ifdef SIGBUS
-#if !defined(SIGSEGV) || SIGBUS != SIGSEGV
+# endif
+# ifdef SIGBUS
+# if !defined(SIGSEGV) || SIGBUS != SIGSEGV
case SIGBUS:
exception_str = "Bus error";
break;
-#endif
-#endif
-#ifdef SIGFPE
+# endif
+# endif
+# ifdef SIGFPE
case SIGFPE:
exception_str = "Floating-point exception";
break;
-#endif
-#ifdef SIGILL
+# endif
+# ifdef SIGILL
case SIGILL:
exception_str = "Illegal instruction";
break;
-#endif
-#ifdef SIGINT
+# endif
+# ifdef SIGINT
case SIGINT:
exception_str = "User interrupt";
break;
-#endif
-#ifdef SIGABRT
+# endif
+# ifdef SIGABRT
case SIGABRT:
exception_str = "Child aborted";
break;
-#endif
-#ifdef SIGKILL
+# endif
+# ifdef SIGKILL
case SIGKILL:
exception_str = "Child killed";
break;
-#endif
-#ifdef SIGTERM
+# endif
+# ifdef SIGTERM
case SIGTERM:
exception_str = "Child terminated";
break;
-#endif
-#ifdef SIGHUP
+# endif
+# ifdef SIGHUP
case SIGHUP:
exception_str = "SIGHUP";
break;
-#endif
-#ifdef SIGQUIT
+# endif
+# ifdef SIGQUIT
case SIGQUIT:
exception_str = "SIGQUIT";
break;
-#endif
-#ifdef SIGTRAP
+# endif
+# ifdef SIGTRAP
case SIGTRAP:
exception_str = "SIGTRAP";
break;
-#endif
-#ifdef SIGIOT
-#if !defined(SIGABRT) || SIGIOT != SIGABRT
+# endif
+# ifdef SIGIOT
+# if !defined(SIGABRT) || SIGIOT != SIGABRT
case SIGIOT:
exception_str = "SIGIOT";
break;
-#endif
-#endif
-#ifdef SIGUSR1
+# endif
+# endif
+# ifdef SIGUSR1
case SIGUSR1:
exception_str = "SIGUSR1";
break;
-#endif
-#ifdef SIGUSR2
+# endif
+# ifdef SIGUSR2
case SIGUSR2:
exception_str = "SIGUSR2";
break;
-#endif
-#ifdef SIGPIPE
+# endif
+# ifdef SIGPIPE
case SIGPIPE:
exception_str = "SIGPIPE";
break;
-#endif
-#ifdef SIGALRM
+# endif
+# ifdef SIGALRM
case SIGALRM:
exception_str = "SIGALRM";
break;
-#endif
-#ifdef SIGSTKFLT
+# endif
+# ifdef SIGSTKFLT
case SIGSTKFLT:
exception_str = "SIGSTKFLT";
break;
-#endif
-#ifdef SIGCHLD
+# endif
+# ifdef SIGCHLD
case SIGCHLD:
exception_str = "SIGCHLD";
break;
-#elif defined(SIGCLD)
+# elif defined(SIGCLD)
case SIGCLD:
exception_str = "SIGCLD";
break;
-#endif
-#ifdef SIGCONT
+# endif
+# ifdef SIGCONT
case SIGCONT:
exception_str = "SIGCONT";
break;
-#endif
-#ifdef SIGSTOP
+# endif
+# ifdef SIGSTOP
case SIGSTOP:
exception_str = "SIGSTOP";
break;
-#endif
-#ifdef SIGTSTP
+# endif
+# ifdef SIGTSTP
case SIGTSTP:
exception_str = "SIGTSTP";
break;
-#endif
-#ifdef SIGTTIN
+# endif
+# ifdef SIGTTIN
case SIGTTIN:
exception_str = "SIGTTIN";
break;
-#endif
-#ifdef SIGTTOU
+# endif
+# ifdef SIGTTOU
case SIGTTOU:
exception_str = "SIGTTOU";
break;
-#endif
-#ifdef SIGURG
+# endif
+# ifdef SIGURG
case SIGURG:
exception_str = "SIGURG";
break;
-#endif
-#ifdef SIGXCPU
+# endif
+# ifdef SIGXCPU
case SIGXCPU:
exception_str = "SIGXCPU";
break;
-#endif
-#ifdef SIGXFSZ
+# endif
+# ifdef SIGXFSZ
case SIGXFSZ:
exception_str = "SIGXFSZ";
break;
-#endif
-#ifdef SIGVTALRM
+# endif
+# ifdef SIGVTALRM
case SIGVTALRM:
exception_str = "SIGVTALRM";
break;
-#endif
-#ifdef SIGPROF
+# endif
+# ifdef SIGPROF
case SIGPROF:
exception_str = "SIGPROF";
break;
-#endif
-#ifdef SIGWINCH
+# endif
+# ifdef SIGWINCH
case SIGWINCH:
exception_str = "SIGWINCH";
break;
-#endif
-#ifdef SIGPOLL
+# endif
+# ifdef SIGPOLL
case SIGPOLL:
exception_str = "SIGPOLL";
break;
-#endif
-#ifdef SIGIO
-#if !defined(SIGPOLL) || SIGIO != SIGPOLL
+# endif
+# ifdef SIGIO
+# if !defined(SIGPOLL) || SIGIO != SIGPOLL
case SIGIO:
exception_str = "SIGIO";
break;
-#endif
-#endif
-#ifdef SIGPWR
+# endif
+# endif
+# ifdef SIGPWR
case SIGPWR:
exception_str = "SIGPWR";
break;
-#endif
-#ifdef SIGSYS
+# endif
+# ifdef SIGSYS
case SIGSYS:
exception_str = "SIGSYS";
break;
-#endif
-#ifdef SIGUNUSED
-#if !defined(SIGSYS) || SIGUNUSED != SIGSYS
+# endif
+# ifdef SIGUNUSED
+# if !defined(SIGSYS) || SIGUNUSED != SIGSYS
case SIGUNUSED:
exception_str = "SIGUNUSED";
break;
-#endif
-#endif
+# endif
+# endif
default:
exception_str = "Signal ";
exception_str += std::to_string(this->Signal);
diff --git a/Source/Checks/Curses/CheckCurses.c b/Source/Checks/Curses/CheckCurses.c
index 857ae28..7d827e6 100644
--- a/Source/Checks/Curses/CheckCurses.c
+++ b/Source/Checks/Curses/CheckCurses.c
@@ -1,11 +1,11 @@
#if defined(CURSES_HAVE_NCURSES_H)
-#include <ncurses.h>
+# include <ncurses.h>
#elif defined(CURSES_HAVE_NCURSES_NCURSES_H)
-#include <ncurses/ncurses.h>
+# include <ncurses/ncurses.h>
#elif defined(CURSES_HAVE_NCURSES_CURSES_H)
-#include <ncurses/curses.h>
+# include <ncurses/curses.h>
#else
-#include <curses.h>
+# include <curses.h>
#endif
int main()
diff --git a/Source/CursesDialog/ccmake.cxx b/Source/CursesDialog/ccmake.cxx
index 17cf628..a3e0717 100644
--- a/Source/CursesDialog/ccmake.cxx
+++ b/Source/CursesDialog/ccmake.cxx
@@ -22,11 +22,13 @@ static const char* cmDocumentationName[][2] = {
};
static const char* cmDocumentationUsage[][2] = {
- { nullptr, " ccmake <path-to-source>\n"
- " ccmake <path-to-existing-build>" },
- { nullptr, "Specify a source directory to (re-)generate a build system for "
- "it in the current working directory. Specify an existing build "
- "directory to re-generate its build system." },
+ { nullptr,
+ " ccmake <path-to-source>\n"
+ " ccmake <path-to-existing-build>" },
+ { nullptr,
+ "Specify a source directory to (re-)generate a build system for "
+ "it in the current working directory. Specify an existing build "
+ "directory to re-generate its build system." },
{ nullptr, nullptr }
};
@@ -35,9 +37,10 @@ static const char* cmDocumentationUsageNote[][2] = {
{ nullptr, nullptr }
};
-static const char* cmDocumentationOptions[]
- [2] = { CMAKE_STANDARD_OPTIONS_TABLE,
- { nullptr, nullptr } };
+static const char* cmDocumentationOptions[][2] = {
+ CMAKE_STANDARD_OPTIONS_TABLE,
+ { nullptr, nullptr }
+};
cmCursesForm* cmCursesForm::CurrentForm = nullptr;
diff --git a/Source/CursesDialog/cmCursesMainForm.cxx b/Source/CursesDialog/cmCursesMainForm.cxx
index 4a9dc47..4a379c3 100644
--- a/Source/CursesDialog/cmCursesMainForm.cxx
+++ b/Source/CursesDialog/cmCursesMainForm.cxx
@@ -371,8 +371,9 @@ void cmCursesMainForm::PrintKeys(int process /* = 0 */)
sprintf(thirdLine, toggleKeyInstruction,
this->AdvancedMode ? "On" : "Off");
}
- sprintf(secondLine, "Press [h] for help "
- "Press [q] to quit without generating");
+ sprintf(secondLine,
+ "Press [h] for help "
+ "Press [q] to quit without generating");
}
curses_move(y - 4, 0);
@@ -412,9 +413,10 @@ void cmCursesMainForm::UpdateStatusBar(const char* message)
curses_clear();
curses_move(0, 0);
char fmt[] = "Window is too small. A size of at least %dx%d is required.";
- printw(fmt, (cmCursesMainForm::MIN_WIDTH < this->InitialWidth
- ? this->InitialWidth
- : cmCursesMainForm::MIN_WIDTH),
+ printw(fmt,
+ (cmCursesMainForm::MIN_WIDTH < this->InitialWidth
+ ? this->InitialWidth
+ : cmCursesMainForm::MIN_WIDTH),
cmCursesMainForm::MIN_HEIGHT);
touchwin(stdscr);
wrefresh(stdscr);
@@ -568,10 +570,11 @@ int cmCursesMainForm::Configure(int noconfigure)
}
int xx, yy;
getmaxyx(stdscr, yy, xx);
- cmCursesLongMessageForm* msgs = new cmCursesLongMessageForm(
- this->Errors, cmSystemTools::GetErrorOccuredFlag()
- ? "Errors occurred during the last pass."
- : "CMake produced the following output.");
+ cmCursesLongMessageForm* msgs =
+ new cmCursesLongMessageForm(this->Errors,
+ cmSystemTools::GetErrorOccuredFlag()
+ ? "Errors occurred during the last pass."
+ : "CMake produced the following output.");
// reset error condition
cmSystemTools::ResetErrorOccuredFlag();
CurrentForm = msgs;
diff --git a/Source/CursesDialog/cmCursesStandardIncludes.h b/Source/CursesDialog/cmCursesStandardIncludes.h
index 60bad94..5b0ad58 100644
--- a/Source/CursesDialog/cmCursesStandardIncludes.h
+++ b/Source/CursesDialog/cmCursesStandardIncludes.h
@@ -7,12 +7,12 @@
// Record whether __attribute__ is currently defined. See purpose below.
#ifndef __attribute__
-#define cm_no__attribute__
+# define cm_no__attribute__
#endif
#if defined(__hpux)
-#define _BOOL_DEFINED
-#include <sys/time.h>
+# define _BOOL_DEFINED
+# include <sys/time.h>
#endif
#include <form.h>
@@ -38,7 +38,7 @@ inline void curses_clear()
// define __attribute__ as a macro. This breaks C++ headers
// in some cases, so undefine it now.
#if defined(cm_no__attribute__) && defined(__attribute__)
-#undef __attribute__
+# undef __attribute__
#endif
#undef cm_no__attribute__
diff --git a/Source/QtDialog/AddCacheEntry.h b/Source/QtDialog/AddCacheEntry.h
index cc710f5..65e11c0 100644
--- a/Source/QtDialog/AddCacheEntry.h
+++ b/Source/QtDialog/AddCacheEntry.h
@@ -11,7 +11,9 @@
#include "ui_AddCacheEntry.h"
-class AddCacheEntry : public QWidget, public Ui::AddCacheEntry
+class AddCacheEntry
+ : public QWidget
+ , public Ui::AddCacheEntry
{
Q_OBJECT
public:
diff --git a/Source/QtDialog/CMakeSetup.cxx b/Source/QtDialog/CMakeSetup.cxx
index 193f4d3..2646c9a 100644
--- a/Source/QtDialog/CMakeSetup.cxx
+++ b/Source/QtDialog/CMakeSetup.cxx
@@ -27,9 +27,10 @@ static const char* cmDocumentationName[][2] = { { nullptr,
{ nullptr, nullptr } };
static const char* cmDocumentationUsage[][2] = {
- { nullptr, " cmake-gui [options]\n"
- " cmake-gui [options] <path-to-source>\n"
- " cmake-gui [options] <path-to-existing-build>" },
+ { nullptr,
+ " cmake-gui [options]\n"
+ " cmake-gui [options] <path-to-source>\n"
+ " cmake-gui [options] <path-to-existing-build>" },
{ nullptr, nullptr }
};
@@ -192,10 +193,10 @@ int main(int argc, char** argv)
}
#if defined(Q_OS_MAC)
-#include "cm_sys_stat.h"
-#include <errno.h>
-#include <string.h>
-#include <unistd.h>
+# include "cm_sys_stat.h"
+# include <errno.h>
+# include <string.h>
+# include <unistd.h>
static bool cmOSXInstall(std::string const& dir, std::string const& tool)
{
if (tool.empty()) {
diff --git a/Source/QtDialog/CMakeSetupDialog.cxx b/Source/QtDialog/CMakeSetupDialog.cxx
index 5be9ec3..5d589cc 100644
--- a/Source/QtDialog/CMakeSetupDialog.cxx
+++ b/Source/QtDialog/CMakeSetupDialog.cxx
@@ -842,7 +842,7 @@ void CMakeSetupDialog::doAbout()
"Qt is licensed under terms of the GNU LGPLv" USE_LGPL ", available at:\n"
" \"%3\""
#endif
- );
+ );
msg = msg.arg(cmVersion::GetCMakeVersion());
msg = msg.arg(qVersion());
#ifdef USE_LGPL
@@ -989,8 +989,9 @@ void CMakeSetupDialog::removeSelectedCacheEntries()
void CMakeSetupDialog::selectionChanged()
{
QModelIndexList idxs = this->CacheValues->selectionModel()->selectedRows();
- if (idxs.count() && (this->CurrentState == ReadyConfigure ||
- this->CurrentState == ReadyGenerate)) {
+ if (idxs.count() &&
+ (this->CurrentState == ReadyConfigure ||
+ this->CurrentState == ReadyGenerate)) {
this->RemoveEntry->setEnabled(true);
} else {
this->RemoveEntry->setEnabled(false);
diff --git a/Source/QtDialog/CMakeSetupDialog.h b/Source/QtDialog/CMakeSetupDialog.h
index 7b767e5..1cce35c 100644
--- a/Source/QtDialog/CMakeSetupDialog.h
+++ b/Source/QtDialog/CMakeSetupDialog.h
@@ -16,7 +16,9 @@ class QProgressBar;
class QToolButton;
/// Qt user interface for CMake
-class CMakeSetupDialog : public QMainWindow, public Ui::CMakeSetupDialog
+class CMakeSetupDialog
+ : public QMainWindow
+ , public Ui::CMakeSetupDialog
{
Q_OBJECT
public:
diff --git a/Source/QtDialog/Compilers.h b/Source/QtDialog/Compilers.h
index 746266c..96770e3 100644
--- a/Source/QtDialog/Compilers.h
+++ b/Source/QtDialog/Compilers.h
@@ -9,7 +9,9 @@
#include <ui_Compilers.h>
-class Compilers : public QWidget, public Ui::Compilers
+class Compilers
+ : public QWidget
+ , public Ui::Compilers
{
Q_OBJECT
public:
diff --git a/Source/QtDialog/FirstConfigure.h b/Source/QtDialog/FirstConfigure.h
index c467ddb..abfa03f 100644
--- a/Source/QtDialog/FirstConfigure.h
+++ b/Source/QtDialog/FirstConfigure.h
@@ -63,7 +63,9 @@ private:
};
//! the page that gives basic options for native compilers
-class NativeCompilerSetup : public QWizardPage, protected Ui::Compilers
+class NativeCompilerSetup
+ : public QWizardPage
+ , protected Ui::Compilers
{
Q_OBJECT
public:
@@ -83,7 +85,9 @@ public:
};
//! the page that gives options for cross compilers
-class CrossCompilerSetup : public QWizardPage, protected Ui::CrossCompiler
+class CrossCompilerSetup
+ : public QWizardPage
+ , protected Ui::CrossCompiler
{
Q_OBJECT
public:
diff --git a/Source/QtDialog/QCMake.cxx b/Source/QtDialog/QCMake.cxx
index a84429b..0e14a3f 100644
--- a/Source/QtDialog/QCMake.cxx
+++ b/Source/QtDialog/QCMake.cxx
@@ -10,7 +10,7 @@
#include "cmSystemTools.h"
#ifdef Q_OS_WIN
-#include "qt_windows.h" // For SetErrorMode
+# include "qt_windows.h" // For SetErrorMode
#endif
QCMake::QCMake(QObject* p)
diff --git a/Source/QtDialog/QCMake.h b/Source/QtDialog/QCMake.h
index 6fae7e3..4b3920a 100644
--- a/Source/QtDialog/QCMake.h
+++ b/Source/QtDialog/QCMake.h
@@ -8,8 +8,8 @@
#include "cmake.h"
#ifdef _MSC_VER
-#pragma warning(disable : 4127)
-#pragma warning(disable : 4512)
+# pragma warning(disable : 4127)
+# pragma warning(disable : 4512)
#endif
#include <vector>
diff --git a/Source/QtDialog/RegexExplorer.h b/Source/QtDialog/RegexExplorer.h
index 8679892..c7dbb76 100644
--- a/Source/QtDialog/RegexExplorer.h
+++ b/Source/QtDialog/RegexExplorer.h
@@ -12,7 +12,9 @@
class QString;
class QWidget;
-class RegexExplorer : public QDialog, public Ui::RegexExplorer
+class RegexExplorer
+ : public QDialog
+ , public Ui::RegexExplorer
{
Q_OBJECT
public:
diff --git a/Source/QtDialog/WarningMessagesDialog.h b/Source/QtDialog/WarningMessagesDialog.h
index acb830d..9b29ad6 100644
--- a/Source/QtDialog/WarningMessagesDialog.h
+++ b/Source/QtDialog/WarningMessagesDialog.h
@@ -12,7 +12,9 @@
/**
* Dialog window for setting the warning message related options.
*/
-class WarningMessagesDialog : public QDialog, public Ui_MessagesDialog
+class WarningMessagesDialog
+ : public QDialog
+ , public Ui_MessagesDialog
{
Q_OBJECT
diff --git a/Source/bindexplib.cxx b/Source/bindexplib.cxx
index 9ec9624..5bcaa45 100644
--- a/Source/bindexplib.cxx
+++ b/Source/bindexplib.cxx
@@ -8,26 +8,26 @@
-------------------------------------------------------------------------*/
/*
-*----------------------------------------------------------------------
-* Program: dumpexts.exe
-* Author: Gordon Chaffee
-*
-* History: The real functionality of this file was written by
-* Matt Pietrek in 1993 in his pedump utility. I've
-* modified it to dump the externals in a bunch of object
-* files to create a .def file.
-*
-* Notes: Visual C++ puts an underscore before each exported symbol.
-* This file removes them. I don't know if this is a problem
-* this other compilers. If _MSC_VER is defined,
-* the underscore is removed. If not, it isn't. To get a
-* full dump of an object file, use the -f option. This can
-* help determine the something that may be different with a
-* compiler other than Visual C++.
-* ======================================
-* Corrections (Axel 2006-04-04):
-* Conversion to C++. Mostly.
-*
+ *----------------------------------------------------------------------
+ * Program: dumpexts.exe
+ * Author: Gordon Chaffee
+ *
+ * History: The real functionality of this file was written by
+ * Matt Pietrek in 1993 in his pedump utility. I've
+ * modified it to dump the externals in a bunch of object
+ * files to create a .def file.
+ *
+ * Notes: Visual C++ puts an underscore before each exported symbol.
+ * This file removes them. I don't know if this is a problem
+ * this other compilers. If _MSC_VER is defined,
+ * the underscore is removed. If not, it isn't. To get a
+ * full dump of an object file, use the -f option. This can
+ * help determine the something that may be different with a
+ * compiler other than Visual C++.
+ * ======================================
+ * Corrections (Axel 2006-04-04):
+ * Conversion to C++. Mostly.
+ *
* Extension (Axel 2006-03-15)
* As soon as an object file contains an /EXPORT directive (which
* is generated by the compiler when a symbol is declared as
@@ -37,30 +37,31 @@
* programmer).
*
* ======================================
-* ======================================
-* Corrections (Valery Fine 23/02/98):
-*
-* The "(vector) deleting destructor" MUST not be exported
-* To recognize it the following test are introduced:
-* "@@UAEPAXI@Z" scalar deleting dtor
-* "@@QAEPAXI@Z" vector deleting dtor
-* "AEPAXI@Z" vector deleting dtor with thunk adjustor
-* ======================================
-* Corrections (Valery Fine 12/02/97):
-*
-* It created a wrong EXPORTS for the global pointers and constants.
-* The Section Header has been involved to discover the missing information
-* Now the pointers are correctly supplied with "DATA" descriptor
-* the constants with no extra descriptor.
-*
-* Corrections (Valery Fine 16/09/96):
-*
-* It didn't work for C++ code with global variables and class definitions
-* The DumpExternalObject function has been introduced to generate .DEF file
-*
-* Author: Valery Fine 16/09/96 (E-mail: fine@vxcern.cern.ch)
-*----------------------------------------------------------------------
-*/
+ * ======================================
+ * Corrections (Valery Fine 23/02/98):
+ *
+ * The "(vector) deleting destructor" MUST not be exported
+ * To recognize it the following test are introduced:
+ * "@@UAEPAXI@Z" scalar deleting dtor
+ * "@@QAEPAXI@Z" vector deleting dtor
+ * "AEPAXI@Z" vector deleting dtor with thunk adjustor
+ * ======================================
+ * Corrections (Valery Fine 12/02/97):
+ *
+ * It created a wrong EXPORTS for the global pointers and constants.
+ * The Section Header has been involved to discover the missing information
+ * Now the pointers are correctly supplied with "DATA" descriptor
+ * the constants with no extra descriptor.
+ *
+ * Corrections (Valery Fine 16/09/96):
+ *
+ * It didn't work for C++ code with global variables and class definitions
+ * The DumpExternalObject function has been introduced to generate .DEF
+ *file
+ *
+ * Author: Valery Fine 16/09/96 (E-mail: fine@vxcern.cern.ch)
+ *----------------------------------------------------------------------
+ */
#include "bindexplib.h"
#include "cmsys/Encoding.hxx"
@@ -69,19 +70,19 @@
#include <windows.h>
#ifndef IMAGE_FILE_MACHINE_ARM
-#define IMAGE_FILE_MACHINE_ARM 0x01c0 // ARM Little-Endian
+# define IMAGE_FILE_MACHINE_ARM 0x01c0 // ARM Little-Endian
#endif
#ifndef IMAGE_FILE_MACHINE_THUMB
-#define IMAGE_FILE_MACHINE_THUMB 0x01c2 // ARM Thumb/Thumb-2 Little-Endian
+# define IMAGE_FILE_MACHINE_THUMB 0x01c2 // ARM Thumb/Thumb-2 Little-Endian
#endif
#ifndef IMAGE_FILE_MACHINE_ARMNT
-#define IMAGE_FILE_MACHINE_ARMNT 0x01c4 // ARM Thumb-2 Little-Endian
+# define IMAGE_FILE_MACHINE_ARMNT 0x01c4 // ARM Thumb-2 Little-Endian
#endif
#ifndef IMAGE_FILE_MACHINE_ARM64
-#define IMAGE_FILE_MACHINE_ARM64 0xaa64 // ARM64 Little-Endian
+# define IMAGE_FILE_MACHINE_ARM64 0xaa64 // ARM64 Little-Endian
#endif
typedef struct cmANON_OBJECT_HEADER_BIGOBJ
@@ -188,7 +189,7 @@ public:
{
this->ObjectImageHeader = ih;
this->SymbolTable =
- (SymbolTableType*)((DWORD_PTR) this->ObjectImageHeader +
+ (SymbolTableType*)((DWORD_PTR)this->ObjectImageHeader +
this->ObjectImageHeader->PointerToSymbolTable);
this->SectionHeaders = GetSectionHeaderOffset(this->ObjectImageHeader);
this->SymbolCount = this->ObjectImageHeader->NumberOfSymbols;
@@ -227,8 +228,8 @@ public:
(pSymbolTable->Type == 0x20 || pSymbolTable->Type == 0x0)) {
if (pSymbolTable->StorageClass == IMAGE_SYM_CLASS_EXTERNAL) {
/*
- * The name of the Function entry points
- */
+ * The name of the Function entry points
+ */
if (pSymbolTable->N.Name.Short != 0) {
symbol.clear();
symbol.insert(0, (const char*)pSymbolTable->N.ShortName, 8);
@@ -282,8 +283,8 @@ public:
}
/*
- * Take into account any aux symbols
- */
+ * Take into account any aux symbols
+ */
i += pSymbolTable->NumberOfAuxSymbols;
pSymbolTable += pSymbolTable->NumberOfAuxSymbols;
pSymbolTable++;
@@ -345,11 +346,11 @@ bool DumpFile(const char* filename, std::set<std::string>& symbols,
(imageHeader->Machine == IMAGE_FILE_MACHINE_ARM64)) &&
(imageHeader->Characteristics == 0)) {
/*
- * The tests above are checking for IMAGE_FILE_HEADER.Machine
- * if it contains supported machine formats (currently ARM and x86)
- * and IMAGE_FILE_HEADER.Characteristics == 0 indicating that
- * this is not linked COFF OBJ file;
- */
+ * The tests above are checking for IMAGE_FILE_HEADER.Machine
+ * if it contains supported machine formats (currently ARM and x86)
+ * and IMAGE_FILE_HEADER.Characteristics == 0 indicating that
+ * this is not linked COFF OBJ file;
+ */
DumpSymbols<IMAGE_FILE_HEADER, IMAGE_SYMBOL> symbolDumper(
(PIMAGE_FILE_HEADER)lpFileBase, symbols, dataSymbols,
(imageHeader->Machine == IMAGE_FILE_MACHINE_I386));
@@ -360,8 +361,8 @@ bool DumpFile(const char* filename, std::set<std::string>& symbols,
(cmANON_OBJECT_HEADER_BIGOBJ*)lpFileBase;
if (h->Sig1 == 0x0 && h->Sig2 == 0xffff) {
DumpSymbols<cmANON_OBJECT_HEADER_BIGOBJ, cmIMAGE_SYMBOL_EX>
- symbolDumper((cmANON_OBJECT_HEADER_BIGOBJ*)lpFileBase, symbols,
- dataSymbols, (h->Machine == IMAGE_FILE_MACHINE_I386));
+ symbolDumper((cmANON_OBJECT_HEADER_BIGOBJ*)lpFileBase, symbols,
+ dataSymbols, (h->Machine == IMAGE_FILE_MACHINE_I386));
symbolDumper.DumpObjFile();
} else {
printf("unrecognized file format in '%s'\n", filename);
diff --git a/Source/cmAddLibraryCommand.cxx b/Source/cmAddLibraryCommand.cxx
index 7792235..fae8063 100644
--- a/Source/cmAddLibraryCommand.cxx
+++ b/Source/cmAddLibraryCommand.cxx
@@ -211,8 +211,9 @@ bool cmAddLibraryCommand::InitialPass(std::vector<std::string> const& args,
if (!aliasedTarget) {
std::ostringstream e;
e << "cannot create ALIAS target \"" << libName << "\" because target \""
- << aliasedName << "\" does not already "
- "exist.";
+ << aliasedName
+ << "\" does not already "
+ "exist.";
this->SetError(e.str());
return false;
}
diff --git a/Source/cmAffinity.cxx b/Source/cmAffinity.cxx
index bdf1f42..588b2f2 100644
--- a/Source/cmAffinity.cxx
+++ b/Source/cmAffinity.cxx
@@ -5,24 +5,24 @@
#include "cm_uv.h"
#ifndef CMAKE_USE_SYSTEM_LIBUV
-#ifdef _WIN32
-#define CM_HAVE_CPU_AFFINITY
-#include <windows.h>
-#elif defined(__linux__) || defined(__FreeBSD__)
-#define CM_HAVE_CPU_AFFINITY
-#include <pthread.h>
-#include <sched.h>
-#if defined(__FreeBSD__)
-#include <pthread_np.h>
-#include <sys/cpuset.h>
-#include <sys/param.h>
-#endif
-#if defined(__linux__)
+# ifdef _WIN32
+# define CM_HAVE_CPU_AFFINITY
+# include <windows.h>
+# elif defined(__linux__) || defined(__FreeBSD__)
+# define CM_HAVE_CPU_AFFINITY
+# include <pthread.h>
+# include <sched.h>
+# if defined(__FreeBSD__)
+# include <pthread_np.h>
+# include <sys/cpuset.h>
+# include <sys/param.h>
+# endif
+# if defined(__linux__)
typedef cpu_set_t cm_cpuset_t;
-#else
+# else
typedef cpuset_t cm_cpuset_t;
-#endif
-#endif
+# endif
+# endif
#endif
namespace cmAffinity {
@@ -33,7 +33,7 @@ std::set<size_t> GetProcessorsAvailable()
#ifdef CM_HAVE_CPU_AFFINITY
int cpumask_size = uv_cpumask_size();
if (cpumask_size > 0) {
-#ifdef _WIN32
+# ifdef _WIN32
DWORD_PTR procmask;
DWORD_PTR sysmask;
if (GetProcessAffinityMask(GetCurrentProcess(), &procmask, &sysmask) !=
@@ -44,7 +44,7 @@ std::set<size_t> GetProcessorsAvailable()
}
}
}
-#else
+# else
cm_cpuset_t cpuset;
CPU_ZERO(&cpuset); // NOLINT(clang-tidy)
if (pthread_getaffinity_np(pthread_self(), sizeof(cpuset), &cpuset) == 0) {
@@ -54,7 +54,7 @@ std::set<size_t> GetProcessorsAvailable()
}
}
}
-#endif
+# endif
}
#endif
return processorsAvailable;
diff --git a/Source/cmAlgorithms.h b/Source/cmAlgorithms.h
index c4eb62b..bbd3e8e 100644
--- a/Source/cmAlgorithms.h
+++ b/Source/cmAlgorithms.h
@@ -375,9 +375,9 @@ using std::size;
// std::size backport from C++17.
template <class C>
-#if !defined(_MSC_VER) || _MSC_VER >= 1900
+# if !defined(_MSC_VER) || _MSC_VER >= 1900
constexpr
-#endif
+# endif
auto
size(C const& c) -> decltype(c.size())
{
@@ -385,9 +385,9 @@ constexpr
}
template <typename T, size_t N>
-#if !defined(_MSC_VER) || _MSC_VER >= 1900
+# if !defined(_MSC_VER) || _MSC_VER >= 1900
constexpr
-#endif
+# endif
std::size_t
size(const T (&)[N]) throw()
{
@@ -405,22 +405,22 @@ using std::cend;
// std::c{begin,end} backport from C++14
template <class C>
-#if defined(_MSC_VER) && _MSC_VER < 1900
+# if defined(_MSC_VER) && _MSC_VER < 1900
auto cbegin(C const& c)
-#else
+# else
constexpr auto cbegin(C const& c) noexcept(noexcept(std::begin(c)))
-#endif
+# endif
-> decltype(std::begin(c))
{
return std::begin(c);
}
template <class C>
-#if defined(_MSC_VER) && _MSC_VER < 1900
+# if defined(_MSC_VER) && _MSC_VER < 1900
auto cend(C const& c)
-#else
+# else
constexpr auto cend(C const& c) noexcept(noexcept(std::end(c)))
-#endif
+# endif
-> decltype(std::end(c))
{
return std::end(c);
diff --git a/Source/cmArchiveWrite.cxx b/Source/cmArchiveWrite.cxx
index 02408a1..1dd7734 100644
--- a/Source/cmArchiveWrite.cxx
+++ b/Source/cmArchiveWrite.cxx
@@ -14,7 +14,7 @@
#include <time.h>
#ifndef __LA_SSIZE_T
-#define __LA_SSIZE_T la_ssize_t
+# define __LA_SSIZE_T la_ssize_t
#endif
static std::string cm_archive_error_string(struct archive* a)
diff --git a/Source/cmArchiveWrite.h b/Source/cmArchiveWrite.h
index 56dce2a..6c678ac 100644
--- a/Source/cmArchiveWrite.h
+++ b/Source/cmArchiveWrite.h
@@ -10,7 +10,7 @@
#include <string>
#if !defined(CMAKE_BUILD_WITH_CMAKE)
-#error "cmArchiveWrite not allowed during bootstrap build!"
+# error "cmArchiveWrite not allowed during bootstrap build!"
#endif
template <typename T>
@@ -28,6 +28,7 @@ public:
void Clear() { this->IsValueSet = false; }
bool IsSet() const { return this->IsValueSet; }
T Get() const { return Value; }
+
private:
T Value;
bool IsValueSet;
@@ -41,6 +42,7 @@ class cmArchiveWrite
{
typedef void (cmArchiveWrite::*safe_bool)();
void safe_bool_true() {}
+
public:
/** Compression type. */
enum Compress
diff --git a/Source/cmCMakeHostSystemInformationCommand.cxx b/Source/cmCMakeHostSystemInformationCommand.cxx
index 662dd74..8822942 100644
--- a/Source/cmCMakeHostSystemInformationCommand.cxx
+++ b/Source/cmCMakeHostSystemInformationCommand.cxx
@@ -8,12 +8,12 @@
#include "cmsys/SystemInformation.hxx"
#if defined(_WIN32)
-#include "cmAlgorithms.h"
-#include "cmGlobalGenerator.h"
-#include "cmGlobalVisualStudio15Generator.h"
-#include "cmSystemTools.h"
-#include "cmVSSetupHelper.h"
-#define HAVE_VS_SETUP_HELPER
+# include "cmAlgorithms.h"
+# include "cmGlobalGenerator.h"
+# include "cmGlobalVisualStudio15Generator.h"
+# include "cmSystemTools.h"
+# include "cmVSSetupHelper.h"
+# define HAVE_VS_SETUP_HELPER
#endif
class cmExecutionStatus;
diff --git a/Source/cmCPluginAPI.cxx b/Source/cmCPluginAPI.cxx
index 8e7e3ad..be3d2f4 100644
--- a/Source/cmCPluginAPI.cxx
+++ b/Source/cmCPluginAPI.cxx
@@ -17,7 +17,7 @@
#include <stdlib.h>
#ifdef __QNX__
-#include <malloc.h> /* for malloc/free on QNX */
+# include <malloc.h> /* for malloc/free on QNX */
#endif
extern "C" {
@@ -395,9 +395,10 @@ void CCONV cmAddLibrary(void* arg, const char* libname, int shared,
for (i = 0; i < numSrcs; ++i) {
srcs2.push_back(srcs[i]);
}
- mf->AddLibrary(libname, (shared ? cmStateEnums::SHARED_LIBRARY
- : cmStateEnums::STATIC_LIBRARY),
- srcs2);
+ mf->AddLibrary(
+ libname,
+ (shared ? cmStateEnums::SHARED_LIBRARY : cmStateEnums::STATIC_LIBRARY),
+ srcs2);
}
char CCONV* cmExpandVariablesInString(void* arg, const char* source,
diff --git a/Source/cmCPluginAPI.h b/Source/cmCPluginAPI.h
index 88b81c6..adc57a2 100644
--- a/Source/cmCPluginAPI.h
+++ b/Source/cmCPluginAPI.h
@@ -19,9 +19,9 @@ extern "C" {
#endif
#ifdef __WATCOMC__
-#define CCONV __cdecl
+# define CCONV __cdecl
#else
-#define CCONV
+# define CCONV
#endif
/*=========================================================================
this is the structure of function entry points that a plugin may call. This
@@ -161,9 +161,9 @@ typedef struct
CM_PLUGIN_EXPORT should be used by plugins
=========================================================================*/
#ifdef _WIN32
-#define CM_PLUGIN_EXPORT __declspec(dllexport)
+# define CM_PLUGIN_EXPORT __declspec(dllexport)
#else
-#define CM_PLUGIN_EXPORT
+# define CM_PLUGIN_EXPORT
#endif
/*=========================================================================
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx
index 2c32dea..d0e668d 100644
--- a/Source/cmCTest.cxx
+++ b/Source/cmCTest.cxx
@@ -55,7 +55,7 @@
#include "cmake.h"
#if defined(__BEOS__) || defined(__HAIKU__)
-#include <be/kernel/OS.h> /* disable_debugger() API. */
+# include <be/kernel/OS.h> /* disable_debugger() API. */
#endif
#define DEBUGOUT \
@@ -75,9 +75,10 @@ struct tm* cmCTest::GetNightlyTime(std::string const& str, bool tomorrowtag)
// curl_getdate no longer assumes the day is today
sprintf(buf, "%d%02d%02d %s", lctime->tm_year + 1900, lctime->tm_mon + 1,
lctime->tm_mday, str.c_str());
- cmCTestLog(this, OUTPUT, "Determine Nightly Start Time"
- << std::endl
- << " Specified time: " << str << std::endl);
+ cmCTestLog(this, OUTPUT,
+ "Determine Nightly Start Time" << std::endl
+ << " Specified time: " << str
+ << std::endl);
// Convert the nightly start time to seconds. Since we are
// providing only a time and a timezone, the current date of
// the local machine is assumed. Consequently, nightlySeconds
@@ -99,16 +100,17 @@ struct tm* cmCTest::GetNightlyTime(std::string const& str, bool tomorrowtag)
// time of the current open dashboard
ntime -= dayLength;
cmCTestLog(this, DEBUG, "Pick yesterday" << std::endl);
- cmCTestLog(this, DEBUG, " Future time, subtract day: " << ntime
- << std::endl);
+ cmCTestLog(this, DEBUG,
+ " Future time, subtract day: " << ntime << std::endl);
}
while (tctime > (ntime + dayLength)) {
ntime += dayLength;
cmCTestLog(this, DEBUG, " Past time, add day: " << ntime << std::endl);
}
cmCTestLog(this, DEBUG, "nightlySeconds: " << ntime << std::endl);
- cmCTestLog(this, DEBUG, " Current time: " << tctime << " Nightly time: "
- << ntime << std::endl);
+ cmCTestLog(this, DEBUG,
+ " Current time: " << tctime << " Nightly time: " << ntime
+ << std::endl);
if (tomorrowtag) {
cmCTestLog(this, OUTPUT, " Use future tag, Add a day" << std::endl);
ntime += dayLength;
@@ -390,13 +392,14 @@ int cmCTest::Initialize(const char* binary_dir, cmCTestStartCommand* command)
cmCTestOptionalLog(this, DEBUG, "Here: " << __LINE__ << std::endl, quiet);
if (this->ProduceXML) {
cmCTestOptionalLog(this, DEBUG, "Here: " << __LINE__ << std::endl, quiet);
- cmCTestOptionalLog(
- this, OUTPUT, " Site: "
- << this->GetCTestConfiguration("Site") << std::endl
- << " Build name: "
- << cmCTest::SafeBuildIdField(this->GetCTestConfiguration("BuildName"))
- << std::endl,
- quiet);
+ cmCTestOptionalLog(this, OUTPUT,
+ " Site: "
+ << this->GetCTestConfiguration("Site") << std::endl
+ << " Build name: "
+ << cmCTest::SafeBuildIdField(
+ this->GetCTestConfiguration("BuildName"))
+ << std::endl,
+ quiet);
cmCTestOptionalLog(this, DEBUG, "Produce XML is on" << std::endl, quiet);
if (this->TestModel == cmCTest::NIGHTLY &&
this->GetCTestConfiguration("NightlyStartTime").empty()) {
@@ -431,16 +434,16 @@ int cmCTest::Initialize(const char* binary_dir, cmCTestStartCommand* command)
std::string testingDir = this->BinaryDir + "/Testing";
if (cmSystemTools::FileExists(testingDir)) {
if (!cmSystemTools::FileIsDirectory(testingDir)) {
- cmCTestLog(this, ERROR_MESSAGE, "File "
- << testingDir
- << " is in the place of the testing directory"
- << std::endl);
+ cmCTestLog(this, ERROR_MESSAGE,
+ "File " << testingDir
+ << " is in the place of the testing directory"
+ << std::endl);
return 0;
}
} else {
if (!cmSystemTools::MakeDirectory(testingDir)) {
- cmCTestLog(this, ERROR_MESSAGE, "Cannot create directory "
- << testingDir << std::endl);
+ cmCTestLog(this, ERROR_MESSAGE,
+ "Cannot create directory " << testingDir << std::endl);
return 0;
}
}
@@ -518,9 +521,10 @@ int cmCTest::Initialize(const char* binary_dir, cmCTestStartCommand* command)
}
ofs.close();
if (nullptr == command) {
- cmCTestOptionalLog(this, OUTPUT, "Create new tag: "
- << tag << " - " << this->GetTestModelString()
- << std::endl,
+ cmCTestOptionalLog(this, OUTPUT,
+ "Create new tag: " << tag << " - "
+ << this->GetTestModelString()
+ << std::endl,
quiet);
}
}
@@ -539,8 +543,9 @@ int cmCTest::Initialize(const char* binary_dir, cmCTestStartCommand* command)
}
if (tag.empty()) {
- cmCTestLog(this, ERROR_MESSAGE, "Cannot read existing TAG file in "
- << testingDir << std::endl);
+ cmCTestLog(this, ERROR_MESSAGE,
+ "Cannot read existing TAG file in " << testingDir
+ << std::endl);
return 0;
}
@@ -558,24 +563,27 @@ int cmCTest::Initialize(const char* binary_dir, cmCTestStartCommand* command)
if (model != this->TestModel && model != cmCTest::UNKNOWN &&
this->TestModel != cmCTest::UNKNOWN) {
- cmCTestOptionalLog(this, WARNING, "Model given in TAG does not match "
- "model given in ctest_start()"
+ cmCTestOptionalLog(this, WARNING,
+ "Model given in TAG does not match "
+ "model given in ctest_start()"
<< std::endl,
quiet);
}
if (!this->SpecificTrack.empty() && track != this->SpecificTrack) {
- cmCTestOptionalLog(this, WARNING, "Track given in TAG does not match "
- "track given in ctest_start()"
+ cmCTestOptionalLog(this, WARNING,
+ "Track given in TAG does not match "
+ "track given in ctest_start()"
<< std::endl,
quiet);
} else {
this->SpecificTrack = track;
}
- cmCTestOptionalLog(this, OUTPUT, " Use existing tag: "
- << tag << " - " << this->GetTestModelString()
- << std::endl,
+ cmCTestOptionalLog(this, OUTPUT,
+ " Use existing tag: " << tag << " - "
+ << this->GetTestModelString()
+ << std::endl,
quiet);
}
@@ -613,8 +621,9 @@ bool cmCTest::InitializeFromCommand(cmCTestStartCommand* command)
}
if (!fname.empty()) {
- cmCTestOptionalLog(this, OUTPUT, " Reading ctest configuration file: "
- << fname << std::endl,
+ cmCTestOptionalLog(this, OUTPUT,
+ " Reading ctest configuration file: " << fname
+ << std::endl,
command->ShouldBeQuiet());
bool readit = mf->ReadDependentFile(fname.c_str());
if (!readit) {
@@ -629,7 +638,8 @@ bool cmCTest::InitializeFromCommand(cmCTestStartCommand* command)
<< bld_dir_fname << std::endl,
command->ShouldBeQuiet());
cmCTestOptionalLog(
- this, WARNING, "Cannot locate CTest configuration: in SourceDirectory: "
+ this, WARNING,
+ "Cannot locate CTest configuration: in SourceDirectory: "
<< src_dir_fname << std::endl,
command->ShouldBeQuiet());
}
@@ -645,7 +655,8 @@ bool cmCTest::InitializeFromCommand(cmCTestStartCommand* command)
if (dartVersion) {
this->DartVersion = atoi(dartVersion);
if (this->DartVersion < 0) {
- cmCTestLog(this, ERROR_MESSAGE, "Invalid Dart server version: "
+ cmCTestLog(this, ERROR_MESSAGE,
+ "Invalid Dart server version: "
<< dartVersion << ". Please specify the version number."
<< std::endl);
return false;
@@ -656,9 +667,9 @@ bool cmCTest::InitializeFromCommand(cmCTestStartCommand* command)
if (!this->Initialize(bld_dir.c_str(), command)) {
return false;
}
- cmCTestOptionalLog(this, OUTPUT, " Use "
- << this->GetTestModelString()
- << " tag: " << this->GetCurrentTag() << std::endl,
+ cmCTestOptionalLog(this, OUTPUT,
+ " Use " << this->GetTestModelString() << " tag: "
+ << this->GetCurrentTag() << std::endl,
command->ShouldBeQuiet());
return true;
}
@@ -677,13 +688,13 @@ bool cmCTest::UpdateCTestConfiguration()
if (!cmSystemTools::FileExists(fileName)) {
// No need to exit if we are not producing XML
if (this->ProduceXML) {
- cmCTestLog(this, ERROR_MESSAGE, "Cannot find file: " << fileName
- << std::endl);
+ cmCTestLog(this, ERROR_MESSAGE,
+ "Cannot find file: " << fileName << std::endl);
return false;
}
} else {
- cmCTestLog(this, HANDLER_VERBOSE_OUTPUT, "Parse Config file:" << fileName
- << "\n");
+ cmCTestLog(this, HANDLER_VERBOSE_OUTPUT,
+ "Parse Config file:" << fileName << "\n");
// parse the dart test file
cmsys::ifstream fin(fileName.c_str());
@@ -774,8 +785,9 @@ bool cmCTest::SetTest(const char* ttype, bool report)
return true;
}
if (report) {
- cmCTestLog(this, ERROR_MESSAGE, "Don't know about test \""
- << ttype << "\" yet..." << std::endl);
+ cmCTestLog(this, ERROR_MESSAGE,
+ "Don't know about test \"" << ttype << "\" yet..."
+ << std::endl);
}
return false;
}
@@ -793,23 +805,24 @@ bool cmCTest::OpenOutputFile(const std::string& path, const std::string& name,
}
if (cmSystemTools::FileExists(testingDir)) {
if (!cmSystemTools::FileIsDirectory(testingDir)) {
- cmCTestLog(this, ERROR_MESSAGE, "File "
- << testingDir << " is in the place of the testing directory"
- << std::endl);
+ cmCTestLog(this, ERROR_MESSAGE,
+ "File " << testingDir
+ << " is in the place of the testing directory"
+ << std::endl);
return false;
}
} else {
if (!cmSystemTools::MakeDirectory(testingDir)) {
- cmCTestLog(this, ERROR_MESSAGE, "Cannot create directory " << testingDir
- << std::endl);
+ cmCTestLog(this, ERROR_MESSAGE,
+ "Cannot create directory " << testingDir << std::endl);
return false;
}
}
std::string filename = testingDir + "/" + name;
stream.Open(filename.c_str());
if (!stream) {
- cmCTestLog(this, ERROR_MESSAGE, "Problem opening file: " << filename
- << std::endl);
+ cmCTestLog(this, ERROR_MESSAGE,
+ "Problem opening file: " << filename << std::endl);
return false;
}
if (compress) {
@@ -1048,9 +1061,10 @@ int cmCTest::RunMakeCommand(const char* command, std::string& output,
int length;
cmProcessOutput processOutput(encoding);
std::string strdata;
- cmCTestLog(this, HANDLER_PROGRESS_OUTPUT, " Each . represents "
- << tick_len << " bytes of output" << std::endl
- << " " << std::flush);
+ cmCTestLog(this, HANDLER_PROGRESS_OUTPUT,
+ " Each . represents " << tick_len << " bytes of output"
+ << std::endl
+ << " " << std::flush);
while (cmsysProcess_WaitForData(cp, &data, &length, nullptr)) {
processOutput.DecodeText(data, length, strdata);
for (char& cc : strdata) {
@@ -1084,8 +1098,9 @@ int cmCTest::RunMakeCommand(const char* command, std::string& output,
ofs << cmCTestLogWrite(strdata.c_str(), strdata.size());
}
}
- cmCTestLog(this, HANDLER_PROGRESS_OUTPUT, " Size of output: "
- << int(double(output.size()) / 1024.0) << "K" << std::endl);
+ cmCTestLog(this, HANDLER_PROGRESS_OUTPUT,
+ " Size of output: " << int(double(output.size()) / 1024.0) << "K"
+ << std::endl);
cmsysProcess_WaitForExit(cp, nullptr);
@@ -1097,16 +1112,17 @@ int cmCTest::RunMakeCommand(const char* command, std::string& output,
"Command exited with the value: " << *retVal << std::endl);
} else if (result == cmsysProcess_State_Exception) {
*retVal = cmsysProcess_GetExitException(cp);
- cmCTestLog(this, WARNING, "There was an exception: " << *retVal
- << std::endl);
+ cmCTestLog(this, WARNING,
+ "There was an exception: " << *retVal << std::endl);
} else if (result == cmsysProcess_State_Expired) {
cmCTestLog(this, WARNING, "There was a timeout" << std::endl);
} else if (result == cmsysProcess_State_Error) {
output += "\n*** ERROR executing: ";
output += cmsysProcess_GetErrorString(cp);
output += "\n***The build process failed.";
- cmCTestLog(this, ERROR_MESSAGE, "There was an error: "
- << cmsysProcess_GetErrorString(cp) << std::endl);
+ cmCTestLog(this, ERROR_MESSAGE,
+ "There was an error: " << cmsysProcess_GetErrorString(cp)
+ << std::endl);
}
cmsysProcess_Delete(cp);
@@ -1142,7 +1158,8 @@ int cmCTest::RunTest(std::vector<const char*> argv, std::string* output,
if (timeout <= cmDuration::zero()) {
timeout = std::chrono::seconds(1);
}
- cmCTestLog(this, HANDLER_VERBOSE_OUTPUT, "Test timeout computed to be: "
+ cmCTestLog(this, HANDLER_VERBOSE_OUTPUT,
+ "Test timeout computed to be: "
<< (timeout == cmCTest::MaxDuration()
? std::string("infinite")
: std::to_string(cmDurationTo<unsigned int>(timeout)))
@@ -1250,8 +1267,8 @@ int cmCTest::RunTest(std::vector<const char*> argv, std::string* output,
if (output && tempOutput.begin() != tempOutput.end()) {
output->append(&*tempOutput.begin(), tempOutput.size());
}
- cmCTestLog(this, HANDLER_VERBOSE_OUTPUT, "-- Process completed"
- << std::endl);
+ cmCTestLog(this, HANDLER_VERBOSE_OUTPUT,
+ "-- Process completed" << std::endl);
int result = cmsysProcess_GetState(cp);
@@ -1270,16 +1287,18 @@ int cmCTest::RunTest(std::vector<const char*> argv, std::string* output,
if (output) {
*output += outerr;
}
- cmCTestLog(this, HANDLER_VERBOSE_OUTPUT, outerr << std::endl
- << std::flush);
+ cmCTestLog(this, HANDLER_VERBOSE_OUTPUT,
+ outerr << std::endl
+ << std::flush);
} else if (result == cmsysProcess_State_Error) {
std::string outerr = "\n*** ERROR executing: ";
outerr += cmsysProcess_GetErrorString(cp);
if (output) {
*output += outerr;
}
- cmCTestLog(this, HANDLER_VERBOSE_OUTPUT, outerr << std::endl
- << std::flush);
+ cmCTestLog(this, HANDLER_VERBOSE_OUTPUT,
+ outerr << std::endl
+ << std::flush);
}
cmsysProcess_Delete(cp);
@@ -1319,8 +1338,9 @@ std::string cmCTest::SafeBuildIdField(const std::string& value)
void cmCTest::StartXML(cmXMLWriter& xml, bool append)
{
if (this->CurrentTag.empty()) {
- cmCTestLog(this, ERROR_MESSAGE, "Current Tag empty, this may mean"
- " NightlStartTime was not set correctly."
+ cmCTestLog(this, ERROR_MESSAGE,
+ "Current Tag empty, this may mean"
+ " NightlStartTime was not set correctly."
<< std::endl);
cmSystemTools::SetFatalErrorOccured();
}
@@ -1489,8 +1509,9 @@ int cmCTest::GenerateCTestNotesOutput(cmXMLWriter& xml,
ifs.close();
} else {
xml.Content("Problem reading file: " + file + "\n");
- cmCTestLog(this, ERROR_MESSAGE, "Problem reading file: "
- << file << " while creating notes" << std::endl);
+ cmCTestLog(this, ERROR_MESSAGE,
+ "Problem reading file: " << file << " while creating notes"
+ << std::endl);
}
xml.EndElement(); // Text
xml.EndElement(); // Note
@@ -1539,8 +1560,9 @@ std::string cmCTest::Base64GzipEncodeFile(std::string const& file)
if (!cmSystemTools::CreateTar(tarFile.c_str(), files,
cmSystemTools::TarCompressGZip, false)) {
- cmCTestLog(this, ERROR_MESSAGE, "Error creating tar while "
- "encoding file: "
+ cmCTestLog(this, ERROR_MESSAGE,
+ "Error creating tar while "
+ "encoding file: "
<< file << std::endl);
return "";
}
@@ -1552,11 +1574,12 @@ std::string cmCTest::Base64GzipEncodeFile(std::string const& file)
std::string cmCTest::Base64EncodeFile(std::string const& file)
{
size_t const len = cmSystemTools::FileLength(file);
- cmsys::ifstream ifs(file.c_str(), std::ios::in
+ cmsys::ifstream ifs(file.c_str(),
+ std::ios::in
#ifdef _WIN32
| std::ios::binary
#endif
- );
+ );
std::vector<char> file_buffer(len + 1);
ifs.read(&file_buffer[0], len);
ifs.close();
@@ -1574,8 +1597,9 @@ bool cmCTest::SubmitExtraFiles(const VectorOfStrings& files)
{
for (cmsys::String const& file : files) {
if (!cmSystemTools::FileExists(file)) {
- cmCTestLog(this, ERROR_MESSAGE, "Cannot find extra file: "
- << file << " to submit." << std::endl;);
+ cmCTestLog(this, ERROR_MESSAGE,
+ "Cannot find extra file: " << file << " to submit."
+ << std::endl;);
return false;
}
this->AddSubmitFile(PartExtraFiles, file.c_str());
@@ -1732,7 +1756,8 @@ void cmCTest::ErrorMessageUnknownDashDValue(std::string& val)
"CTest -D called with incorrect option: " << val << std::endl);
cmCTestLog(
- this, ERROR_MESSAGE, "Available options are:"
+ this, ERROR_MESSAGE,
+ "Available options are:"
<< std::endl
<< " ctest -D Continuous" << std::endl
<< " ctest -D Continuous(Start|Update|Configure|Build)" << std::endl
@@ -2191,9 +2216,11 @@ bool cmCTest::HandleTestActionArgument(const char* ctestExec, size_t& i,
i++;
if (!this->SetTest(args[i].c_str(), false)) {
success = false;
- cmCTestLog(this, ERROR_MESSAGE, "CTest -T called with incorrect option: "
- << args[i] << std::endl);
- cmCTestLog(this, ERROR_MESSAGE, "Available options are:"
+ cmCTestLog(this, ERROR_MESSAGE,
+ "CTest -T called with incorrect option: " << args[i]
+ << std::endl);
+ cmCTestLog(this, ERROR_MESSAGE,
+ "Available options are:"
<< std::endl
<< " " << ctestExec << " -T all" << std::endl
<< " " << ctestExec << " -T start" << std::endl
@@ -2227,9 +2254,11 @@ bool cmCTest::HandleTestModelArgument(const char* ctestExec, size_t& i,
this->SetTestModel(cmCTest::EXPERIMENTAL);
} else {
success = false;
- cmCTestLog(this, ERROR_MESSAGE, "CTest -M called with incorrect option: "
- << str << std::endl);
- cmCTestLog(this, ERROR_MESSAGE, "Available options are:"
+ cmCTestLog(this, ERROR_MESSAGE,
+ "CTest -M called with incorrect option: " << str
+ << std::endl);
+ cmCTestLog(this, ERROR_MESSAGE,
+ "Available options are:"
<< std::endl
<< " " << ctestExec << " -M Continuous" << std::endl
<< " " << ctestExec << " -M Experimental" << std::endl
@@ -2270,8 +2299,8 @@ int cmCTest::ExecuteTests()
std::string cwd = cmSystemTools::GetCurrentWorkingDirectory();
if (!this->Initialize(cwd.c_str(), nullptr)) {
res = 12;
- cmCTestLog(this, ERROR_MESSAGE, "Problem initializing the dashboard."
- << std::endl);
+ cmCTestLog(this, ERROR_MESSAGE,
+ "Problem initializing the dashboard." << std::endl);
} else {
res = this->ProcessSteps();
}
@@ -2295,8 +2324,8 @@ int cmCTest::RunCMakeAndTest(std::string* output)
cmDynamicLoader::FlushCache();
#endif
if (retv != 0) {
- cmCTestLog(this, DEBUG, "build and test failing returning: " << retv
- << std::endl);
+ cmCTestLog(this, DEBUG,
+ "build and test failing returning: " << retv << std::endl);
}
return retv;
}
@@ -2351,22 +2380,25 @@ int cmCTest::ReadCustomConfigurationFileTree(const char* dir, cmMakefile* mf)
bool found = false;
VectorOfStrings dirs;
VectorOfStrings ndirs;
- cmCTestLog(this, DEBUG, "* Read custom CTest configuration directory: "
- << dir << std::endl);
+ cmCTestLog(this, DEBUG,
+ "* Read custom CTest configuration directory: " << dir
+ << std::endl);
std::string fname = dir;
fname += "/CTestCustom.cmake";
cmCTestLog(this, DEBUG, "* Check for file: " << fname << std::endl);
if (cmSystemTools::FileExists(fname)) {
- cmCTestLog(this, DEBUG, "* Read custom CTest configuration file: "
- << fname << std::endl);
+ cmCTestLog(this, DEBUG,
+ "* Read custom CTest configuration file: " << fname
+ << std::endl);
bool erroroc = cmSystemTools::GetErrorOccuredFlag();
cmSystemTools::ResetErrorOccuredFlag();
if (!mf->ReadListFile(fname.c_str()) ||
cmSystemTools::GetErrorOccuredFlag()) {
- cmCTestLog(this, ERROR_MESSAGE, "Problem reading custom configuration: "
- << fname << std::endl);
+ cmCTestLog(this, ERROR_MESSAGE,
+ "Problem reading custom configuration: " << fname
+ << std::endl);
}
found = true;
if (erroroc) {
@@ -2384,8 +2416,9 @@ int cmCTest::ReadCustomConfigurationFileTree(const char* dir, cmMakefile* mf)
std::vector<std::string>& files = gl.GetFiles();
std::vector<std::string>::iterator fileIt;
for (fileIt = files.begin(); fileIt != files.end(); ++fileIt) {
- cmCTestLog(this, DEBUG, "* Read custom CTest configuration file: "
- << *fileIt << std::endl);
+ cmCTestLog(this, DEBUG,
+ "* Read custom CTest configuration file: " << *fileIt
+ << std::endl);
if (!mf->ReadListFile(fileIt->c_str()) ||
cmSystemTools::GetErrorOccuredFlag()) {
cmCTestLog(this, ERROR_MESSAGE,
@@ -2398,9 +2431,10 @@ int cmCTest::ReadCustomConfigurationFileTree(const char* dir, cmMakefile* mf)
if (found) {
for (auto& handler : this->TestingHandlers) {
- cmCTestLog(
- this, DEBUG, "* Read custom CTest configuration vectors for handler: "
- << handler.first << " (" << handler.second << ")" << std::endl);
+ cmCTestLog(this, DEBUG,
+ "* Read custom CTest configuration vectors for handler: "
+ << handler.first << " (" << handler.second << ")"
+ << std::endl);
handler.second->PopulateCustomVectors(mf);
}
}
@@ -2502,7 +2536,8 @@ void cmCTest::EmptyCTestConfiguration()
void cmCTest::SetCTestConfiguration(const char* name, const char* value,
bool suppress)
{
- cmCTestOptionalLog(this, HANDLER_VERBOSE_OUTPUT, "SetCTestConfiguration:"
+ cmCTestOptionalLog(this, HANDLER_VERBOSE_OUTPUT,
+ "SetCTestConfiguration:"
<< name << ":" << (value ? value : "(null)") << "\n",
suppress);
@@ -2889,8 +2924,8 @@ bool cmCTest::CompressString(std::string& str)
ret = deflate(&strm, Z_FINISH);
if (ret != Z_STREAM_END) {
- cmCTestLog(this, ERROR_MESSAGE, "Error during gzip compression."
- << std::endl);
+ cmCTestLog(this, ERROR_MESSAGE,
+ "Error during gzip compression." << std::endl);
return false;
}
diff --git a/Source/cmCacheManager.cxx b/Source/cmCacheManager.cxx
index 13407e5..c6a1cff 100644
--- a/Source/cmCacheManager.cxx
+++ b/Source/cmCacheManager.cxx
@@ -566,7 +566,8 @@ void cmCacheManager::AddCacheEntry(const std::string& key, const char* value,
cmSystemTools::ConvertToUnixSlashes(e.Value);
}
}
- e.SetProperty("HELPSTRING", helpString
+ e.SetProperty("HELPSTRING",
+ helpString
? helpString
: "(This variable does not exist and should not be used)");
}
diff --git a/Source/cmCallVisualStudioMacro.cxx b/Source/cmCallVisualStudioMacro.cxx
index 99fe587..ecfcfb9 100644
--- a/Source/cmCallVisualStudioMacro.cxx
+++ b/Source/cmCallVisualStudioMacro.cxx
@@ -7,7 +7,7 @@
#include "cmSystemTools.h"
#if defined(_MSC_VER)
-#define HAVE_COMDEF_H
+# define HAVE_COMDEF_H
#endif
// Just for this file:
@@ -16,39 +16,39 @@ static bool LogErrorsAsMessages;
#if defined(HAVE_COMDEF_H)
-#include <comdef.h>
+# include <comdef.h>
// Copied from a correct comdef.h to avoid problems with deficient versions
// of comdef.h that exist in the wild... Fixes issue #7533.
//
-#ifdef _NATIVE_WCHAR_T_DEFINED
-#ifdef _DEBUG
-#pragma comment(lib, "comsuppwd.lib")
-#else
-#pragma comment(lib, "comsuppw.lib")
-#endif
-#else
-#ifdef _DEBUG
-#pragma comment(lib, "comsuppd.lib")
-#else
-#pragma comment(lib, "comsupp.lib")
-#endif
-#endif
+# ifdef _NATIVE_WCHAR_T_DEFINED
+# ifdef _DEBUG
+# pragma comment(lib, "comsuppwd.lib")
+# else
+# pragma comment(lib, "comsuppw.lib")
+# endif
+# else
+# ifdef _DEBUG
+# pragma comment(lib, "comsuppd.lib")
+# else
+# pragma comment(lib, "comsupp.lib")
+# endif
+# endif
///! Use ReportHRESULT to make a cmSystemTools::Message after calling
///! a COM method that may have failed.
-#define ReportHRESULT(hr, context) \
- if (FAILED(hr)) { \
- if (LogErrorsAsMessages) { \
- std::ostringstream _hresult_oss; \
- _hresult_oss.flags(std::ios::hex); \
- _hresult_oss << context << " failed HRESULT, hr = 0x" << hr \
- << std::endl; \
- _hresult_oss.flags(std::ios::dec); \
- _hresult_oss << __FILE__ << "(" << __LINE__ << ")"; \
- cmSystemTools::Message(_hresult_oss.str().c_str()); \
- } \
- }
+# define ReportHRESULT(hr, context) \
+ if (FAILED(hr)) { \
+ if (LogErrorsAsMessages) { \
+ std::ostringstream _hresult_oss; \
+ _hresult_oss.flags(std::ios::hex); \
+ _hresult_oss << context << " failed HRESULT, hr = 0x" << hr \
+ << std::endl; \
+ _hresult_oss.flags(std::ios::dec); \
+ _hresult_oss << __FILE__ << "(" << __LINE__ << ")"; \
+ cmSystemTools::Message(_hresult_oss.str().c_str()); \
+ } \
+ }
///! Using the given instance of Visual Studio, call the named macro
HRESULT InstanceCallMacro(IDispatch* vsIDE, const std::string& macro,
diff --git a/Source/cmCommandArgumentsHelper.h b/Source/cmCommandArgumentsHelper.h
index d3f102c..c68e64c 100644
--- a/Source/cmCommandArgumentsHelper.h
+++ b/Source/cmCommandArgumentsHelper.h
@@ -98,6 +98,7 @@ public:
/** Is there a keyword which should be skipped in
the arguments (e.g. ARGS for ADD_CUSTOM_COMMAND) ? */
void SetIgnore(const char* ignore) { this->Ignore = ignore; }
+
private:
std::vector<std::string> Vector;
unsigned int DataStart;
@@ -118,6 +119,7 @@ public:
/// Return the string
const std::string& GetString() const { return this->String; }
const char* GetCString() const { return this->String.c_str(); }
+
private:
std::string String;
unsigned int DataStart;
@@ -136,6 +138,7 @@ public:
/// Has it been enabled ?
bool IsEnabled() const { return this->Enabled; }
+
private:
bool Enabled;
bool DoConsume(const std::string& arg, unsigned int index) override;
@@ -153,6 +156,7 @@ public:
/// Is it still enabled ?
bool IsEnabled() const { return this->Enabled; }
+
private:
bool Enabled;
bool DoConsume(const std::string& arg, unsigned int index) override;
diff --git a/Source/cmCommands.cxx b/Source/cmCommands.cxx
index a87b450..dc9318e 100644
--- a/Source/cmCommands.cxx
+++ b/Source/cmCommands.cxx
@@ -81,30 +81,30 @@
#include "cmWhileCommand.h"
#if defined(CMAKE_BUILD_WITH_CMAKE)
-#include "cmAddCompileOptionsCommand.h"
-#include "cmAuxSourceDirectoryCommand.h"
-#include "cmBuildNameCommand.h"
-#include "cmCMakeHostSystemInformationCommand.h"
-#include "cmExportCommand.h"
-#include "cmExportLibraryDependenciesCommand.h"
-#include "cmFLTKWrapUICommand.h"
-#include "cmIncludeExternalMSProjectCommand.h"
-#include "cmInstallProgramsCommand.h"
-#include "cmLinkLibrariesCommand.h"
-#include "cmLoadCacheCommand.h"
-#include "cmLoadCommandCommand.h"
-#include "cmOutputRequiredFilesCommand.h"
-#include "cmQTWrapCPPCommand.h"
-#include "cmQTWrapUICommand.h"
-#include "cmRemoveCommand.h"
-#include "cmRemoveDefinitionsCommand.h"
-#include "cmSourceGroupCommand.h"
-#include "cmSubdirDependsCommand.h"
-#include "cmUseMangledMesaCommand.h"
-#include "cmUtilitySourceCommand.h"
-#include "cmVariableRequiresCommand.h"
-#include "cmVariableWatchCommand.h"
-#include "cmWriteFileCommand.h"
+# include "cmAddCompileOptionsCommand.h"
+# include "cmAuxSourceDirectoryCommand.h"
+# include "cmBuildNameCommand.h"
+# include "cmCMakeHostSystemInformationCommand.h"
+# include "cmExportCommand.h"
+# include "cmExportLibraryDependenciesCommand.h"
+# include "cmFLTKWrapUICommand.h"
+# include "cmIncludeExternalMSProjectCommand.h"
+# include "cmInstallProgramsCommand.h"
+# include "cmLinkLibrariesCommand.h"
+# include "cmLoadCacheCommand.h"
+# include "cmLoadCommandCommand.h"
+# include "cmOutputRequiredFilesCommand.h"
+# include "cmQTWrapCPPCommand.h"
+# include "cmQTWrapUICommand.h"
+# include "cmRemoveCommand.h"
+# include "cmRemoveDefinitionsCommand.h"
+# include "cmSourceGroupCommand.h"
+# include "cmSubdirDependsCommand.h"
+# include "cmUseMangledMesaCommand.h"
+# include "cmUtilitySourceCommand.h"
+# include "cmVariableRequiresCommand.h"
+# include "cmVariableWatchCommand.h"
+# include "cmWriteFileCommand.h"
#endif
void GetScriptingCommands(cmState* state)
@@ -155,32 +155,39 @@ void GetScriptingCommands(cmState* state)
state->AddBuiltinCommand("while", new cmWhileCommand);
state->AddUnexpectedCommand(
- "else", "An ELSE command was found outside of a proper "
- "IF ENDIF structure. Or its arguments did not match "
- "the opening IF command.");
+ "else",
+ "An ELSE command was found outside of a proper "
+ "IF ENDIF structure. Or its arguments did not match "
+ "the opening IF command.");
state->AddUnexpectedCommand(
- "elseif", "An ELSEIF command was found outside of a proper "
- "IF ENDIF structure.");
+ "elseif",
+ "An ELSEIF command was found outside of a proper "
+ "IF ENDIF structure.");
state->AddUnexpectedCommand(
- "endforeach", "An ENDFOREACH command was found outside of a proper "
- "FOREACH ENDFOREACH structure. Or its arguments did "
- "not match the opening FOREACH command.");
+ "endforeach",
+ "An ENDFOREACH command was found outside of a proper "
+ "FOREACH ENDFOREACH structure. Or its arguments did "
+ "not match the opening FOREACH command.");
state->AddUnexpectedCommand(
- "endfunction", "An ENDFUNCTION command was found outside of a proper "
- "FUNCTION ENDFUNCTION structure. Or its arguments did not "
- "match the opening FUNCTION command.");
+ "endfunction",
+ "An ENDFUNCTION command was found outside of a proper "
+ "FUNCTION ENDFUNCTION structure. Or its arguments did not "
+ "match the opening FUNCTION command.");
state->AddUnexpectedCommand(
- "endif", "An ENDIF command was found outside of a proper "
- "IF ENDIF structure. Or its arguments did not match "
- "the opening IF command.");
+ "endif",
+ "An ENDIF command was found outside of a proper "
+ "IF ENDIF structure. Or its arguments did not match "
+ "the opening IF command.");
state->AddUnexpectedCommand(
- "endmacro", "An ENDMACRO command was found outside of a proper "
- "MACRO ENDMACRO structure. Or its arguments did not "
- "match the opening MACRO command.");
+ "endmacro",
+ "An ENDMACRO command was found outside of a proper "
+ "MACRO ENDMACRO structure. Or its arguments did not "
+ "match the opening MACRO command.");
state->AddUnexpectedCommand(
- "endwhile", "An ENDWHILE command was found outside of a proper "
- "WHILE ENDWHILE structure. Or its arguments did not "
- "match the opening WHILE command.");
+ "endwhile",
+ "An ENDWHILE command was found outside of a proper "
+ "WHILE ENDWHILE structure. Or its arguments did not "
+ "match the opening WHILE command.");
#if defined(CMAKE_BUILD_WITH_CMAKE)
state->AddBuiltinCommand("cmake_host_system_information",
diff --git a/Source/cmCommonTargetGenerator.cxx b/Source/cmCommonTargetGenerator.cxx
index d6d8eb0..a1df271 100644
--- a/Source/cmCommonTargetGenerator.cxx
+++ b/Source/cmCommonTargetGenerator.cxx
@@ -149,7 +149,8 @@ std::vector<std::string> cmCommonTargetGenerator::GetLinkedTargetDirectories()
cmComputeLinkInformation::ItemVector const& items = cli->GetItems();
for (auto const& item : items) {
cmGeneratorTarget const* linkee = item.Target;
- if (linkee && !linkee->IsImported()
+ if (linkee &&
+ !linkee->IsImported()
// We can ignore the INTERFACE_LIBRARY items because
// Target->GetLinkInformation already processed their
// link interface and they don't have any output themselves.
diff --git a/Source/cmComputeLinkDepends.cxx b/Source/cmComputeLinkDepends.cxx
index 354de36..b1f3860 100644
--- a/Source/cmComputeLinkDepends.cxx
+++ b/Source/cmComputeLinkDepends.cxx
@@ -239,8 +239,9 @@ cmComputeLinkDepends::Compute()
// Display the constraint graph.
if (this->DebugMode) {
- fprintf(stderr, "---------------------------------------"
- "---------------------------------------\n");
+ fprintf(stderr,
+ "---------------------------------------"
+ "---------------------------------------\n");
fprintf(stderr, "Link dependency analysis for target %s, config %s\n",
this->Target->GetName().c_str(),
this->HasConfig ? this->Config.c_str() : "noconfig");
diff --git a/Source/cmComputeLinkInformation.cxx b/Source/cmComputeLinkInformation.cxx
index 6e6e0be..8d6efde 100644
--- a/Source/cmComputeLinkInformation.cxx
+++ b/Source/cmComputeLinkInformation.cxx
@@ -241,13 +241,12 @@ because this need be done only for shared libraries without soname-s.
cmComputeLinkInformation::cmComputeLinkInformation(
const cmGeneratorTarget* target, const std::string& config)
// Store context information.
- : Target(target),
- Makefile(target->Target->GetMakefile()),
- GlobalGenerator(target->GetLocalGenerator()->GetGlobalGenerator()),
- CMakeInstance(this->GlobalGenerator->GetCMakeInstance())
- // The configuration being linked.
- ,
- Config(config)
+ : Target(target)
+ , Makefile(target->Target->GetMakefile())
+ , GlobalGenerator(target->GetLocalGenerator()->GetGlobalGenerator())
+ , CMakeInstance(this->GlobalGenerator->GetCMakeInstance())
+ // The configuration being linked.
+ , Config(config)
{
// Check whether to recognize OpenBSD-style library versioned names.
this->OpenBSD = this->Makefile->GetState()->GetGlobalPropertyAsBool(
diff --git a/Source/cmComputeLinkInformation.h b/Source/cmComputeLinkInformation.h
index 65c12da..e00d230 100644
--- a/Source/cmComputeLinkInformation.h
+++ b/Source/cmComputeLinkInformation.h
@@ -65,6 +65,7 @@ public:
std::string GetRPathLinkString() const;
std::string GetConfig() const { return this->Config; }
+
private:
void AddItem(std::string const& item, const cmGeneratorTarget* tgt);
void AddSharedDepItem(std::string const& item, cmGeneratorTarget const* tgt);
diff --git a/Source/cmCoreTryCompile.cxx b/Source/cmCoreTryCompile.cxx
index a9b7adf..0b50121 100644
--- a/Source/cmCoreTryCompile.cxx
+++ b/Source/cmCoreTryCompile.cxx
@@ -82,17 +82,20 @@ int cmCoreTryCompile::TryCompileCode(std::vector<std::string> const& argv,
if (strcmp(tt, cmState::GetTargetTypeName(cmStateEnums::EXECUTABLE)) ==
0) {
targetType = cmStateEnums::EXECUTABLE;
- } else if (strcmp(tt, cmState::GetTargetTypeName(
- cmStateEnums::STATIC_LIBRARY)) == 0) {
+ } else if (strcmp(tt,
+ cmState::GetTargetTypeName(
+ cmStateEnums::STATIC_LIBRARY)) == 0) {
targetType = cmStateEnums::STATIC_LIBRARY;
} else {
this->Makefile->IssueMessage(
- cmake::FATAL_ERROR, std::string("Invalid value '") + tt +
+ cmake::FATAL_ERROR,
+ std::string("Invalid value '") + tt +
"' for "
"CMAKE_TRY_COMPILE_TARGET_TYPE. Only "
"'" +
- cmState::GetTargetTypeName(cmStateEnums::EXECUTABLE) + "' and "
- "'" +
+ cmState::GetTargetTypeName(cmStateEnums::EXECUTABLE) +
+ "' and "
+ "'" +
cmState::GetTargetTypeName(cmStateEnums::STATIC_LIBRARY) +
"' "
"are allowed.");
@@ -224,8 +227,9 @@ int cmCoreTryCompile::TryCompileCode(std::vector<std::string> const& argv,
cmake::FATAL_ERROR,
"Only libraries may be used as try_compile or try_run IMPORTED "
"LINK_LIBRARIES. Got " +
- std::string(tgt->GetName()) + " of "
- "type " +
+ std::string(tgt->GetName()) +
+ " of "
+ "type " +
cmState::GetTargetTypeName(tgt->GetType()) + ".");
return -1;
}
@@ -487,8 +491,9 @@ int cmCoreTryCompile::TryCompileCode(std::vector<std::string> const& argv,
const char* flags = this->Makefile->GetDefinition(langFlags);
fprintf(fout, "set(CMAKE_%s_FLAGS %s)\n", li.c_str(),
cmOutputConverter::EscapeForCMake(flags ? flags : "").c_str());
- fprintf(fout, "set(CMAKE_%s_FLAGS \"${CMAKE_%s_FLAGS}"
- " ${COMPILE_DEFINITIONS}\")\n",
+ fprintf(fout,
+ "set(CMAKE_%s_FLAGS \"${CMAKE_%s_FLAGS}"
+ " ${COMPILE_DEFINITIONS}\")\n",
li.c_str(), li.c_str());
}
switch (this->Makefile->GetPolicyStatus(cmPolicies::CMP0066)) {
@@ -563,8 +568,9 @@ int cmCoreTryCompile::TryCompileCode(std::vector<std::string> const& argv,
}
break;
}
- fprintf(fout, "set(CMAKE_EXE_LINKER_FLAGS \"${CMAKE_EXE_LINKER_FLAGS}"
- " ${EXE_LINKER_FLAGS}\")\n");
+ fprintf(fout,
+ "set(CMAKE_EXE_LINKER_FLAGS \"${CMAKE_EXE_LINKER_FLAGS}"
+ " ${EXE_LINKER_FLAGS}\")\n");
fprintf(fout, "include_directories(${INCLUDE_DIRECTORIES})\n");
fprintf(fout, "set(CMAKE_SUPPRESS_REGENERATION 1)\n");
fprintf(fout, "link_directories(${LINK_DIRECTORIES})\n");
diff --git a/Source/cmCurl.cxx b/Source/cmCurl.cxx
index 8ef8bff..3360323 100644
--- a/Source/cmCurl.cxx
+++ b/Source/cmCurl.cxx
@@ -6,13 +6,13 @@
#if !defined(CMAKE_USE_SYSTEM_CURL) && !defined(_WIN32) && \
!defined(__APPLE__) && !defined(CURL_CA_BUNDLE) && !defined(CURL_CA_PATH)
-#define CMAKE_FIND_CAFILE
-#include "cmSystemTools.h"
+# define CMAKE_FIND_CAFILE
+# include "cmSystemTools.h"
#endif
// curl versions before 7.21.5 did not provide this error code
#if defined(LIBCURL_VERSION_NUM) && LIBCURL_VERSION_NUM < 0x071505
-#define CURLE_NOT_BUILT_IN 4
+# define CURLE_NOT_BUILT_IN 4
#endif
#define check_curl_result(result, errstr) \
@@ -30,28 +30,28 @@ std::string cmCurlSetCAInfo(::CURL* curl, const char* cafile)
check_curl_result(res, "Unable to set TLS/SSL Verify CAINFO: ");
}
#ifdef CMAKE_FIND_CAFILE
-#define CMAKE_CAFILE_FEDORA "/etc/pki/tls/certs/ca-bundle.crt"
+# define CMAKE_CAFILE_FEDORA "/etc/pki/tls/certs/ca-bundle.crt"
else if (cmSystemTools::FileExists(CMAKE_CAFILE_FEDORA, true)) {
::CURLcode res =
::curl_easy_setopt(curl, CURLOPT_CAINFO, CMAKE_CAFILE_FEDORA);
check_curl_result(res, "Unable to set TLS/SSL Verify CAINFO: ");
}
-#undef CMAKE_CAFILE_FEDORA
+# undef CMAKE_CAFILE_FEDORA
else {
-#define CMAKE_CAFILE_COMMON "/etc/ssl/certs/ca-certificates.crt"
+# define CMAKE_CAFILE_COMMON "/etc/ssl/certs/ca-certificates.crt"
if (cmSystemTools::FileExists(CMAKE_CAFILE_COMMON, true)) {
::CURLcode res =
::curl_easy_setopt(curl, CURLOPT_CAINFO, CMAKE_CAFILE_COMMON);
check_curl_result(res, "Unable to set TLS/SSL Verify CAINFO: ");
}
-#undef CMAKE_CAFILE_COMMON
-#define CMAKE_CAPATH_COMMON "/etc/ssl/certs"
+# undef CMAKE_CAFILE_COMMON
+# define CMAKE_CAPATH_COMMON "/etc/ssl/certs"
if (cmSystemTools::FileIsDirectory(CMAKE_CAPATH_COMMON)) {
::CURLcode res =
::curl_easy_setopt(curl, CURLOPT_CAPATH, CMAKE_CAPATH_COMMON);
check_curl_result(res, "Unable to set TLS/SSL Verify CAPATH: ");
}
-#undef CMAKE_CAPATH_COMMON
+# undef CMAKE_CAPATH_COMMON
}
#endif
return e;
diff --git a/Source/cmELF.cxx b/Source/cmELF.cxx
index 77ccd30..0ccd68a 100644
--- a/Source/cmELF.cxx
+++ b/Source/cmELF.cxx
@@ -13,39 +13,39 @@
// Include the ELF format information system header.
#if defined(__OpenBSD__)
-#include <elf_abi.h>
-#include <stdint.h>
+# include <elf_abi.h>
+# include <stdint.h>
#elif defined(__HAIKU__)
-#include <elf32.h>
-#include <elf64.h>
+# include <elf32.h>
+# include <elf64.h>
typedef struct Elf32_Ehdr Elf32_Ehdr;
typedef struct Elf32_Shdr Elf32_Shdr;
typedef struct Elf32_Sym Elf32_Sym;
typedef struct Elf32_Rel Elf32_Rel;
typedef struct Elf32_Rela Elf32_Rela;
-#define ELFMAG0 0x7F
-#define ELFMAG1 'E'
-#define ELFMAG2 'L'
-#define ELFMAG3 'F'
-#define ET_NONE 0
-#define ET_REL 1
-#define ET_EXEC 2
-#define ET_DYN 3
-#define ET_CORE 4
-#define EM_386 3
-#define EM_SPARC 2
-#define EM_PPC 20
+# define ELFMAG0 0x7F
+# define ELFMAG1 'E'
+# define ELFMAG2 'L'
+# define ELFMAG3 'F'
+# define ET_NONE 0
+# define ET_REL 1
+# define ET_EXEC 2
+# define ET_DYN 3
+# define ET_CORE 4
+# define EM_386 3
+# define EM_SPARC 2
+# define EM_PPC 20
#else
-#include <elf.h>
+# include <elf.h>
#endif
#if defined(__sun)
-#include <sys/link.h> // For dynamic section information
+# include <sys/link.h> // For dynamic section information
#endif
#ifdef _SCO_DS
-#include <link.h> // For DT_SONAME etc.
+# include <link.h> // For DT_SONAME etc.
#endif
#ifndef DT_RUNPATH
-#define DT_RUNPATH 29
+# define DT_RUNPATH 29
#endif
// Low-level byte swapping implementation.
@@ -162,6 +162,7 @@ public:
// Return the recorded ELF type.
cmELF::FileType GetFileType() const { return this->ELFType; }
+
protected:
// Data common to all ELF class implementations.
diff --git a/Source/cmELF.h b/Source/cmELF.h
index 8c17348..9172f38 100644
--- a/Source/cmELF.h
+++ b/Source/cmELF.h
@@ -11,7 +11,7 @@
#include <vector>
#if !defined(CMAKE_USE_ELF_PARSER)
-#error "This file may be included only if CMAKE_USE_ELF_PARSER is enabled."
+# error "This file may be included only if CMAKE_USE_ELF_PARSER is enabled."
#endif
class cmELFInternal;
diff --git a/Source/cmExecProgramCommand.cxx b/Source/cmExecProgramCommand.cxx
index 49f880c..ea4cd40 100644
--- a/Source/cmExecProgramCommand.cxx
+++ b/Source/cmExecProgramCommand.cxx
@@ -194,9 +194,9 @@ bool cmExecProgramCommand::RunCommand(const char* command, std::string& output,
} else {
commandInDir = command;
}
-#ifndef __VMS
+# ifndef __VMS
commandInDir += " 2>&1";
-#endif
+# endif
command = commandInDir.c_str();
if (verbose) {
cmSystemTools::Stdout("running ");
diff --git a/Source/cmExportCommand.cxx b/Source/cmExportCommand.cxx
index 655ebe8..4e1d771 100644
--- a/Source/cmExportCommand.cxx
+++ b/Source/cmExportCommand.cxx
@@ -20,8 +20,8 @@
class cmExecutionStatus;
#if defined(__HAIKU__)
-#include <FindDirectory.h>
-#include <StorageDefs.h>
+# include <FindDirectory.h>
+# include <StorageDefs.h>
#endif
cmExportCommand::cmExportCommand()
@@ -266,7 +266,7 @@ bool cmExportCommand::HandlePackage(std::vector<std::string> const& args)
}
#if defined(_WIN32) && !defined(__CYGWIN__)
-#include <windows.h>
+# include <windows.h>
void cmExportCommand::ReportRegistryError(std::string const& msg,
std::string const& key, long err)
@@ -317,7 +317,7 @@ void cmExportCommand::StorePackageRegistryDir(std::string const& package,
const char* content,
const char* hash)
{
-#if defined(__HAIKU__)
+# if defined(__HAIKU__)
char dir[B_PATH_NAME_LENGTH];
if (find_directory(B_USER_SETTINGS_DIRECTORY, -1, false, dir, sizeof(dir)) !=
B_OK) {
@@ -326,7 +326,7 @@ void cmExportCommand::StorePackageRegistryDir(std::string const& package,
std::string fname = dir;
fname += "/cmake/packages/";
fname += package;
-#else
+# else
std::string fname;
if (!cmSystemTools::GetEnv("HOME", fname)) {
return;
@@ -334,7 +334,7 @@ void cmExportCommand::StorePackageRegistryDir(std::string const& package,
cmSystemTools::ConvertToUnixSlashes(fname);
fname += "/.cmake/packages/";
fname += package;
-#endif
+# endif
cmSystemTools::MakeDirectory(fname);
fname += "/";
fname += hash;
diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx
index bf9d341..5f61571 100644
--- a/Source/cmExportFileGenerator.cxx
+++ b/Source/cmExportFileGenerator.cxx
@@ -266,10 +266,12 @@ static bool checkInterfaceDirs(const std::string& prepro,
s << "Directory:\n \"" << li
<< "\"\nin "
"INTERFACE_INCLUDE_DIRECTORIES of target \""
- << target->GetName() << "\" is a subdirectory of the install "
- "directory:\n \""
- << installDir << "\"\nhowever it is also "
- "a subdirectory of the "
+ << target->GetName()
+ << "\" is a subdirectory of the install "
+ "directory:\n \""
+ << installDir
+ << "\"\nhowever it is also "
+ "a subdirectory of the "
<< (inBinary ? "build" : "source") << " tree:\n \""
<< (inBinary ? topBinaryDir : topSourceDir) << "\""
<< std::endl;
diff --git a/Source/cmExportTryCompileFileGenerator.h b/Source/cmExportTryCompileFileGenerator.h
index ca2987c..2a2ba7e 100644
--- a/Source/cmExportTryCompileFileGenerator.h
+++ b/Source/cmExportTryCompileFileGenerator.h
@@ -26,6 +26,7 @@ public:
/** Set the list of targets to export. */
void SetConfig(const std::string& config) { this->Config = config; }
+
protected:
// Implement virtual methods from the superclass.
bool GenerateMainFile(std::ostream& os) override;
diff --git a/Source/cmExtraCodeBlocksGenerator.cxx b/Source/cmExtraCodeBlocksGenerator.cxx
index 4b95140..759094b 100644
--- a/Source/cmExtraCodeBlocksGenerator.cxx
+++ b/Source/cmExtraCodeBlocksGenerator.cxx
@@ -614,23 +614,27 @@ void cmExtraCodeBlocksGenerator::AppendTarget(
xml.StartElement("MakeCommands");
xml.StartElement("Build");
- xml.Attribute("command", this->BuildMakeCommand(make, makefileName.c_str(),
- targetName, makeFlags));
+ xml.Attribute(
+ "command",
+ this->BuildMakeCommand(make, makefileName.c_str(), targetName, makeFlags));
xml.EndElement();
xml.StartElement("CompileFile");
- xml.Attribute("command", this->BuildMakeCommand(make, makefileName.c_str(),
- "\"$file\"", makeFlags));
+ xml.Attribute("command",
+ this->BuildMakeCommand(make, makefileName.c_str(), "\"$file\"",
+ makeFlags));
xml.EndElement();
xml.StartElement("Clean");
- xml.Attribute("command", this->BuildMakeCommand(make, makefileName.c_str(),
- "clean", makeFlags));
+ xml.Attribute(
+ "command",
+ this->BuildMakeCommand(make, makefileName.c_str(), "clean", makeFlags));
xml.EndElement();
xml.StartElement("DistClean");
- xml.Attribute("command", this->BuildMakeCommand(make, makefileName.c_str(),
- "clean", makeFlags));
+ xml.Attribute(
+ "command",
+ this->BuildMakeCommand(make, makefileName.c_str(), "clean", makeFlags));
xml.EndElement();
xml.EndElement(); // MakeCommands
diff --git a/Source/cmExtraEclipseCDT4Generator.cxx b/Source/cmExtraEclipseCDT4Generator.cxx
index e7279d9..14448f5 100644
--- a/Source/cmExtraEclipseCDT4Generator.cxx
+++ b/Source/cmExtraEclipseCDT4Generator.cxx
@@ -277,10 +277,11 @@ void cmExtraEclipseCDT4Generator::CreateProjectFile()
xml.StartDocument("UTF-8");
xml.StartElement("projectDescription");
- xml.Element("name", this->GenerateProjectName(
- lg->GetProjectName(),
- mf->GetSafeDefinition("CMAKE_BUILD_TYPE"),
- this->GetPathBasename(this->HomeOutputDirectory)));
+ xml.Element("name",
+ this->GenerateProjectName(
+ lg->GetProjectName(),
+ mf->GetSafeDefinition("CMAKE_BUILD_TYPE"),
+ this->GetPathBasename(this->HomeOutputDirectory)));
xml.Element("comment", "");
xml.Element("projects", "");
@@ -641,7 +642,8 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const
xml.EndElement(); // extension
} else if (systemName == "Darwin") {
xml.StartElement("extension");
- xml.Attribute("id", this->SupportsMachO64Parser
+ xml.Attribute("id",
+ this->SupportsMachO64Parser
? "org.eclipse.cdt.core.MachO64"
: "org.eclipse.cdt.core.MachO");
xml.Attribute("point", "org.eclipse.cdt.core.BinaryParser");
diff --git a/Source/cmExtraKateGenerator.cxx b/Source/cmExtraKateGenerator.cxx
index 7a83e41..df18715 100644
--- a/Source/cmExtraKateGenerator.cxx
+++ b/Source/cmExtraKateGenerator.cxx
@@ -199,8 +199,9 @@ void cmExtraKateGenerator::AppendTarget(cmGeneratedFileStream& fout,
{
static char JsonSep = ' ';
- fout << "\t\t\t" << JsonSep << "{\"name\":\"" << target << "\", "
- "\"build_cmd\":\""
+ fout << "\t\t\t" << JsonSep << "{\"name\":\"" << target
+ << "\", "
+ "\"build_cmd\":\""
<< make << " -C \\\"" << (this->UseNinja ? homeOutputDir : path)
<< "\\\" " << makeArgs << " " << target << "\"}\n";
diff --git a/Source/cmExtraSublimeTextGenerator.cxx b/Source/cmExtraSublimeTextGenerator.cxx
index 46dcaf6..fb85a68 100644
--- a/Source/cmExtraSublimeTextGenerator.cxx
+++ b/Source/cmExtraSublimeTextGenerator.cxx
@@ -400,8 +400,9 @@ std::string cmExtraSublimeTextGenerator::ComputeDefines(
std::string defPropName = "COMPILE_DEFINITIONS_";
defPropName += cmSystemTools::UpperCase(config);
if (const char* config_compile_defs = source->GetProperty(defPropName)) {
- lg->AppendDefines(defines, genexInterpreter.Evaluate(config_compile_defs,
- COMPILE_DEFINITIONS));
+ lg->AppendDefines(
+ defines,
+ genexInterpreter.Evaluate(config_compile_defs, COMPILE_DEFINITIONS));
}
std::string definesString;
diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx
index 1e47687..aae70b1 100644
--- a/Source/cmFileCommand.cxx
+++ b/Source/cmFileCommand.cxx
@@ -36,17 +36,17 @@
#include "cmake.h"
#if defined(CMAKE_BUILD_WITH_CMAKE)
-#include "cmCurl.h"
-#include "cmFileLockResult.h"
-#include "cm_curl.h"
+# include "cmCurl.h"
+# include "cmFileLockResult.h"
+# include "cm_curl.h"
#endif
#if defined(CMAKE_USE_ELF_PARSER)
-#include "cmELF.h"
+# include "cmELF.h"
#endif
#if defined(_WIN32)
-#include <windows.h>
+# include <windows.h>
#endif
class cmSystemToolsFileTime;
@@ -216,7 +216,7 @@ bool cmFileCommand::HandleWriteCommand(std::vector<std::string> const& args,
#else
mode | S_IWUSR | S_IWGRP
#endif
- );
+ );
}
// If GetPermissions fails, pretend like it is ok. File open will fail if
// the file is not writable
@@ -282,7 +282,8 @@ bool cmFileCommand::HandleReadCommand(std::vector<std::string> const& args)
// Open the specified file.
#if defined(_WIN32) || defined(__CYGWIN__)
cmsys::ifstream file(
- fileName.c_str(), std::ios::in |
+ fileName.c_str(),
+ std::ios::in |
(hexOutputArg.IsEnabled() ? std::ios::binary : std::ios::in));
#else
cmsys::ifstream file(fileName.c_str());
@@ -327,8 +328,9 @@ bool cmFileCommand::HandleReadCommand(std::vector<std::string> const& args)
} else {
std::string line;
bool has_newline = false;
- while (sizeLimit != 0 && cmSystemTools::GetLineFromStream(
- file, line, &has_newline, sizeLimit)) {
+ while (
+ sizeLimit != 0 &&
+ cmSystemTools::GetLineFromStream(file, line, &has_newline, sizeLimit)) {
if (sizeLimit > 0) {
sizeLimit = sizeLimit - static_cast<long>(line.size());
if (has_newline) {
@@ -616,7 +618,9 @@ bool cmFileCommand::HandleStringsCommand(std::vector<std::string> const& args)
} else if (encoding == encoding_utf8) {
// Check for UTF-8 encoded string (up to 4 octets)
static const unsigned char utf8_check_table[3][2] = {
- { 0xE0, 0xC0 }, { 0xF0, 0xE0 }, { 0xF8, 0xF0 },
+ { 0xE0, 0xC0 },
+ { 0xF0, 0xE0 },
+ { 0xF8, 0xF0 },
};
// how many octets are there?
@@ -865,8 +869,9 @@ bool cmFileCommand::HandleGlobCommand(std::vector<std::string> const& args,
globMessage.content);
} else {
this->Makefile->IssueMessage(
- cmake::FATAL_ERROR, "Error has occurred while globbing for '" +
- *i + "' - " + globMessage.content);
+ cmake::FATAL_ERROR,
+ "Error has occurred while globbing for '" + *i + "' - " +
+ globMessage.content);
shouldExit = true;
}
}
@@ -2866,9 +2871,9 @@ bool cmFileCommand::HandleDownloadCommand(std::vector<std::string> const& args)
return false;
}
-#if defined(_WIN32)
+# if defined(_WIN32)
url = fix_file_url_windows(url);
-#endif
+# endif
::CURL* curl;
::curl_global_init(CURL_GLOBAL_DEFAULT);
@@ -3155,9 +3160,9 @@ bool cmFileCommand::HandleUploadCommand(std::vector<std::string> const& args)
unsigned long file_size = cmsys::SystemTools::FileLength(filename);
-#if defined(_WIN32)
+# if defined(_WIN32)
url = fix_file_url_windows(url);
-#endif
+# endif
::CURL* curl;
::curl_global_init(CURL_GLOBAL_DEFAULT);
diff --git a/Source/cmFileLock.cxx b/Source/cmFileLock.cxx
index f309241..1e472da 100644
--- a/Source/cmFileLock.cxx
+++ b/Source/cmFileLock.cxx
@@ -54,7 +54,7 @@ bool cmFileLock::IsLocked(const std::string& filename) const
}
#if defined(_WIN32)
-#include "cmFileLockWin32.cxx"
+# include "cmFileLockWin32.cxx"
#else
-#include "cmFileLockUnix.cxx"
+# include "cmFileLockUnix.cxx"
#endif
diff --git a/Source/cmFileLock.h b/Source/cmFileLock.h
index c9ab0db..6c9a7b8 100644
--- a/Source/cmFileLock.h
+++ b/Source/cmFileLock.h
@@ -8,17 +8,17 @@
#include <string>
#if defined(_WIN32)
-#include <windows.h> // HANDLE
+# include <windows.h> // HANDLE
#endif
class cmFileLockResult;
/**
- * @brief Cross-platform file locking.
- * @details Under the hood this class use 'fcntl' for Unix-like platforms and
- * 'LockFileEx'/'UnlockFileEx' for Win32 platform. Locks are exclusive and
- * advisory.
- */
+ * @brief Cross-platform file locking.
+ * @details Under the hood this class use 'fcntl' for Unix-like platforms and
+ * 'LockFileEx'/'UnlockFileEx' for Win32 platform. Locks are exclusive and
+ * advisory.
+ */
class cmFileLock
{
CM_DISABLE_COPY(cmFileLock)
@@ -28,21 +28,21 @@ public:
~cmFileLock();
/**
- * @brief Lock the file.
- * @param timeoutSec Lock timeout. If -1 try until success or fatal error.
- */
+ * @brief Lock the file.
+ * @param timeoutSec Lock timeout. If -1 try until success or fatal error.
+ */
cmFileLockResult Lock(const std::string& filename, unsigned long timeoutSec);
/**
- * @brief Unlock the file.
- */
+ * @brief Unlock the file.
+ */
cmFileLockResult Release();
/**
- * @brief Check file is locked by this class.
- * @details This function helps to find double locks (deadlocks) and to do
- * explicit unlocks.
- */
+ * @brief Check file is locked by this class.
+ * @details This function helps to find double locks (deadlocks) and to do
+ * explicit unlocks.
+ */
bool IsLocked(const std::string& filename) const;
private:
diff --git a/Source/cmFileLockPool.h b/Source/cmFileLockPool.h
index af98270..0197354 100644
--- a/Source/cmFileLockPool.h
+++ b/Source/cmFileLockPool.h
@@ -21,25 +21,25 @@ public:
//@{
/**
- * @brief Function scope control.
- */
+ * @brief Function scope control.
+ */
void PushFunctionScope();
void PopFunctionScope();
//@}
//@{
/**
- * @brief File scope control.
- */
+ * @brief File scope control.
+ */
void PushFileScope();
void PopFileScope();
//@}
//@{
/**
- * @brief Lock the file in given scope.
- * @param timeoutSec Lock timeout. If -1 try until success or fatal error.
- */
+ * @brief Lock the file in given scope.
+ * @param timeoutSec Lock timeout. If -1 try until success or fatal error.
+ */
cmFileLockResult LockFunctionScope(const std::string& filename,
unsigned long timeoutSec);
cmFileLockResult LockFileScope(const std::string& filename,
@@ -49,8 +49,8 @@ public:
//@}
/**
- * @brief Unlock the file explicitly.
- */
+ * @brief Unlock the file explicitly.
+ */
cmFileLockResult Release(const std::string& filename);
private:
diff --git a/Source/cmFileLockResult.h b/Source/cmFileLockResult.h
index 4cedc0a..8b4929a 100644
--- a/Source/cmFileLockResult.h
+++ b/Source/cmFileLockResult.h
@@ -8,13 +8,13 @@
#include <string>
#if defined(_WIN32)
-#include <windows.h> // DWORD
+# include <windows.h> // DWORD
#endif
/**
- * @brief Result of the locking/unlocking file.
- * @note See @c cmFileLock
- */
+ * @brief Result of the locking/unlocking file.
+ * @note See @c cmFileLock
+ */
class cmFileLockResult
{
public:
@@ -25,33 +25,33 @@ public:
#endif
/**
- * @brief Successful lock/unlock.
- */
+ * @brief Successful lock/unlock.
+ */
static cmFileLockResult MakeOk();
/**
- * @brief Lock/Unlock failed. Read error/GetLastError.
- */
+ * @brief Lock/Unlock failed. Read error/GetLastError.
+ */
static cmFileLockResult MakeSystem();
/**
- * @brief Lock/Unlock failed. Timeout reached.
- */
+ * @brief Lock/Unlock failed. Timeout reached.
+ */
static cmFileLockResult MakeTimeout();
/**
- * @brief File already locked.
- */
+ * @brief File already locked.
+ */
static cmFileLockResult MakeAlreadyLocked();
/**
- * @brief Internal error.
- */
+ * @brief Internal error.
+ */
static cmFileLockResult MakeInternal();
/**
- * @brief Try to lock with function guard outside of the function
- */
+ * @brief Try to lock with function guard outside of the function
+ */
static cmFileLockResult MakeNoFunction();
bool IsOk() const;
diff --git a/Source/cmFileTimeComparison.cxx b/Source/cmFileTimeComparison.cxx
index 622c15e..8f6993d 100644
--- a/Source/cmFileTimeComparison.cxx
+++ b/Source/cmFileTimeComparison.cxx
@@ -9,12 +9,12 @@
// Use a platform-specific API to get file times efficiently.
#if !defined(_WIN32) || defined(__CYGWIN__)
-#include "cm_sys_stat.h"
-#define cmFileTimeComparison_Type struct stat
+# include "cm_sys_stat.h"
+# define cmFileTimeComparison_Type struct stat
#else
-#include "cmsys/Encoding.hxx"
-#include <windows.h>
-#define cmFileTimeComparison_Type FILETIME
+# include "cmsys/Encoding.hxx"
+# include <windows.h>
+# define cmFileTimeComparison_Type FILETIME
#endif
class cmFileTimeComparisonInternal
@@ -98,7 +98,7 @@ int cmFileTimeComparisonInternal::Compare(cmFileTimeComparison_Type* s1,
cmFileTimeComparison_Type* s2)
{
#if !defined(_WIN32) || defined(__CYGWIN__)
-#if CMake_STAT_HAS_ST_MTIM
+# if CMake_STAT_HAS_ST_MTIM
// Compare using nanosecond resolution.
if (s1->st_mtim.tv_sec < s2->st_mtim.tv_sec) {
return -1;
@@ -112,7 +112,7 @@ int cmFileTimeComparisonInternal::Compare(cmFileTimeComparison_Type* s1,
if (s1->st_mtim.tv_nsec > s2->st_mtim.tv_nsec) {
return 1;
}
-#elif CMake_STAT_HAS_ST_MTIMESPEC
+# elif CMake_STAT_HAS_ST_MTIMESPEC
// Compare using nanosecond resolution.
if (s1->st_mtimespec.tv_sec < s2->st_mtimespec.tv_sec) {
return -1;
@@ -126,7 +126,7 @@ int cmFileTimeComparisonInternal::Compare(cmFileTimeComparison_Type* s1,
if (s1->st_mtimespec.tv_nsec > s2->st_mtimespec.tv_nsec) {
return 1;
}
-#else
+# else
// Compare using 1 second resolution.
if (s1->st_mtime < s2->st_mtime) {
return -1;
@@ -134,7 +134,7 @@ int cmFileTimeComparisonInternal::Compare(cmFileTimeComparison_Type* s1,
if (s1->st_mtime > s2->st_mtime) {
return 1;
}
-#endif
+# endif
// Files have the same time.
return 0;
#else
@@ -147,7 +147,7 @@ bool cmFileTimeComparisonInternal::TimesDiffer(cmFileTimeComparison_Type* s1,
cmFileTimeComparison_Type* s2)
{
#if !defined(_WIN32) || defined(__CYGWIN__)
-#if CMake_STAT_HAS_ST_MTIM
+# if CMake_STAT_HAS_ST_MTIM
// Times are integers in units of 1ns.
long long bil = 1000000000;
long long t1 = s1->st_mtim.tv_sec * bil + s1->st_mtim.tv_nsec;
@@ -159,7 +159,7 @@ bool cmFileTimeComparisonInternal::TimesDiffer(cmFileTimeComparison_Type* s1,
return (t1 - t2) >= bil;
}
return false;
-#elif CMake_STAT_HAS_ST_MTIMESPEC
+# elif CMake_STAT_HAS_ST_MTIMESPEC
// Times are integers in units of 1ns.
long long bil = 1000000000;
long long t1 = s1->st_mtimespec.tv_sec * bil + s1->st_mtimespec.tv_nsec;
@@ -171,7 +171,7 @@ bool cmFileTimeComparisonInternal::TimesDiffer(cmFileTimeComparison_Type* s1,
return (t1 - t2) >= bil;
}
return false;
-#else
+# else
// Times are integers in units of 1s.
if (s1->st_mtime < s2->st_mtime) {
return (s2->st_mtime - s1->st_mtime) >= 1;
@@ -180,7 +180,7 @@ bool cmFileTimeComparisonInternal::TimesDiffer(cmFileTimeComparison_Type* s1,
return (s1->st_mtime - s2->st_mtime) >= 1;
}
return false;
-#endif
+# endif
#else
// Times are integers in units of 100ns.
LARGE_INTEGER t1;
diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx
index 46854f7..7ac0cdf 100644
--- a/Source/cmFindPackageCommand.cxx
+++ b/Source/cmFindPackageCommand.cxx
@@ -29,8 +29,8 @@
#include "cmake.h"
#if defined(__HAIKU__)
-#include <FindDirectory.h>
-#include <StorageDefs.h>
+# include <FindDirectory.h>
+# include <StorageDefs.h>
#endif
class cmExecutionStatus;
@@ -525,10 +525,12 @@ bool cmFindPackageCommand::InitialPass(std::vector<std::string> const& args,
"Add NO_MODULE to exclusively request Config mode and search for a "
"package configuration file provided by "
<< this->Name << " (" << this->Name << "Config.cmake or "
- << cmSystemTools::LowerCase(this->Name) << "-config.cmake). "
- "Otherwise make Find"
- << this->Name << ".cmake available in "
- "CMAKE_MODULE_PATH.";
+ << cmSystemTools::LowerCase(this->Name)
+ << "-config.cmake). "
+ "Otherwise make Find"
+ << this->Name
+ << ".cmake available in "
+ "CMAKE_MODULE_PATH.";
}
aw << "\n"
"(Variable CMAKE_FIND_PACKAGE_WARN_NO_MODULE enabled this warning.)";
@@ -764,8 +766,9 @@ bool cmFindPackageCommand::HandlePackageMode()
if (result && !found) {
// warn if package required or neither quiet nor in config mode
if (this->Required ||
- !(this->Quiet || (this->UseConfigFiles && !this->UseFindModules &&
- this->ConsideredConfigs.empty()))) {
+ !(this->Quiet ||
+ (this->UseConfigFiles && !this->UseFindModules &&
+ this->ConsideredConfigs.empty()))) {
// The variable is not set.
std::ostringstream e;
std::ostringstream aw;
@@ -810,8 +813,9 @@ bool cmFindPackageCommand::HandlePackageMode()
<< ".cmake\" in "
"CMAKE_MODULE_PATH this project has asked CMake to find a "
"package configuration file provided by \""
- << this->Name << "\", "
- "but CMake did not find one.\n";
+ << this->Name
+ << "\", "
+ "but CMake did not find one.\n";
}
if (this->Configs.size() == 1) {
@@ -832,8 +836,9 @@ bool cmFindPackageCommand::HandlePackageMode()
<< "\" to a "
"directory containing one of the above files. "
"If \""
- << this->Name << "\" provides a separate development "
- "package or SDK, be sure it has been installed.";
+ << this->Name
+ << "\" provides a separate development "
+ "package or SDK, be sure it has been installed.";
} else // if(!this->UseFindModules && !this->UseConfigFiles)
{
e << "No \"Find" << this->Name << ".cmake\" found in "
@@ -1234,14 +1239,14 @@ void cmFindPackageCommand::FillPrefixesSystemRegistry()
}
#if defined(_WIN32) && !defined(__CYGWIN__)
-#include <windows.h>
+# include <windows.h>
// http://msdn.microsoft.com/en-us/library/aa384253%28v=vs.85%29.aspx
-#if !defined(KEY_WOW64_32KEY)
-#define KEY_WOW64_32KEY 0x0200
-#endif
-#if !defined(KEY_WOW64_64KEY)
-#define KEY_WOW64_64KEY 0x0100
-#endif
+# if !defined(KEY_WOW64_32KEY)
+# define KEY_WOW64_32KEY 0x0200
+# endif
+# if !defined(KEY_WOW64_64KEY)
+# define KEY_WOW64_64KEY 0x0100
+# endif
void cmFindPackageCommand::LoadPackageRegistryWinUser()
{
// HKEY_CURRENT_USER\\Software shares 32-bit and 64-bit views.
diff --git a/Source/cmFindPackageCommand.h b/Source/cmFindPackageCommand.h
index 68b5ec0..d8c7ab3 100644
--- a/Source/cmFindPackageCommand.h
+++ b/Source/cmFindPackageCommand.h
@@ -22,7 +22,7 @@ namespace std {
}
/* clang-format on */
#else
-#include <functional>
+# include <functional>
#endif
#include "cmFindCommon.h"
diff --git a/Source/cmFindProgramCommand.cxx b/Source/cmFindProgramCommand.cxx
index 1c63428..13a18e2 100644
--- a/Source/cmFindProgramCommand.cxx
+++ b/Source/cmFindProgramCommand.cxx
@@ -9,7 +9,7 @@
class cmExecutionStatus;
#if defined(__APPLE__)
-#include <CoreFoundation/CoreFoundation.h>
+# include <CoreFoundation/CoreFoundation.h>
#endif
struct cmFindProgramHelper
diff --git a/Source/cmFortranParser.h b/Source/cmFortranParser.h
index efcd100..132b3e6 100644
--- a/Source/cmFortranParser.h
+++ b/Source/cmFortranParser.h
@@ -4,11 +4,11 @@
#define cmFortranParser_h
#if !defined(cmFortranLexer_cxx) && !defined(cmFortranParser_cxx)
-#include "cmConfigure.h" // IWYU pragma: keep
+# include "cmConfigure.h" // IWYU pragma: keep
-#include <set>
-#include <string>
-#include <vector>
+# include <set>
+# include <string>
+# include <vector>
#endif
#include <stddef.h> /* size_t */
@@ -73,20 +73,20 @@ struct cmFortran_yystype
#define YYSTYPE cmFortran_yystype
#define YYSTYPE_IS_DECLARED 1
#if !defined(cmFortranLexer_cxx)
-#define YY_NO_UNISTD_H
-#include "cmFortranLexer.h"
+# define YY_NO_UNISTD_H
+# include "cmFortranLexer.h"
#endif
#if !defined(cmFortranLexer_cxx)
-#if !defined(cmFortranParser_cxx)
-#undef YY_EXTRA_TYPE
-#undef YY_DECL
-#undef YYSTYPE
-#undef YYSTYPE_IS_DECLARED
-#endif
+# if !defined(cmFortranParser_cxx)
+# undef YY_EXTRA_TYPE
+# undef YY_DECL
+# undef YYSTYPE
+# undef YYSTYPE_IS_DECLARED
+# endif
#endif
#if !defined(cmFortranLexer_cxx) && !defined(cmFortranParser_cxx)
-#include <stack>
+# include <stack>
// Information about a single source file.
class cmFortranSourceInfo
diff --git a/Source/cmGeneratedFileStream.cxx b/Source/cmGeneratedFileStream.cxx
index c0a74a5..6bdf3a4 100644
--- a/Source/cmGeneratedFileStream.cxx
+++ b/Source/cmGeneratedFileStream.cxx
@@ -7,8 +7,8 @@
#include "cmSystemTools.h"
#if defined(CMAKE_BUILD_WITH_CMAKE)
-#include "cm_codecvt.hxx"
-#include "cm_zlib.h"
+# include "cm_codecvt.hxx"
+# include "cm_zlib.h"
#endif
cmGeneratedFileStream::cmGeneratedFileStream(Encoding encoding)
diff --git a/Source/cmGeneratedFileStream.h b/Source/cmGeneratedFileStream.h
index a96f38f..2b8056f 100644
--- a/Source/cmGeneratedFileStream.h
+++ b/Source/cmGeneratedFileStream.h
@@ -67,8 +67,9 @@ protected:
* contents have changed to prevent the file modification time from
* being updated.
*/
-class cmGeneratedFileStream : private cmGeneratedFileStreamBase,
- public cmsys::ofstream
+class cmGeneratedFileStream
+ : private cmGeneratedFileStreamBase
+ , public cmsys::ofstream
{
public:
typedef cmsys::ofstream Stream;
diff --git a/Source/cmGeneratorExpressionEvaluator.cxx b/Source/cmGeneratorExpressionEvaluator.cxx
index dbc6840..f9a6d64 100644
--- a/Source/cmGeneratorExpressionEvaluator.cxx
+++ b/Source/cmGeneratorExpressionEvaluator.cxx
@@ -41,8 +41,9 @@ std::string GeneratorExpressionContent::ProcessArbitraryContent(
for (; it != end; ++it) {
if (node->RequiresLiteralInput()) {
if ((*it)->GetType() != cmGeneratorExpressionEvaluator::Text) {
- reportError(context, this->GetOriginalExpression(), "$<" +
- identifier + "> expression requires literal input.");
+ reportError(context, this->GetOriginalExpression(),
+ "$<" + identifier +
+ "> expression requires literal input.");
return std::string();
}
}
@@ -157,7 +158,8 @@ std::string GeneratorExpressionContent::EvaluateParameters(
reportError(context, this->GetOriginalExpression(),
"$<" + identifier + "> expression requires no parameters.");
} else if (numExpected == 1) {
- reportError(context, this->GetOriginalExpression(), "$<" + identifier +
+ reportError(context, this->GetOriginalExpression(),
+ "$<" + identifier +
"> expression requires "
"exactly one parameter.");
} else {
@@ -172,12 +174,14 @@ std::string GeneratorExpressionContent::EvaluateParameters(
if (numExpected == cmGeneratorExpressionNode::OneOrMoreParameters &&
parameters.empty()) {
- reportError(context, this->GetOriginalExpression(), "$<" + identifier +
+ reportError(context, this->GetOriginalExpression(),
+ "$<" + identifier +
"> expression requires at least one parameter.");
}
if (numExpected == cmGeneratorExpressionNode::OneOrZeroParameters &&
parameters.size() > 1) {
- reportError(context, this->GetOriginalExpression(), "$<" + identifier +
+ reportError(context, this->GetOriginalExpression(),
+ "$<" + identifier +
"> expression requires one or zero parameters.");
}
return std::string();
diff --git a/Source/cmGeneratorExpressionNode.cxx b/Source/cmGeneratorExpressionNode.cxx
index 7b35bce..1594904 100644
--- a/Source/cmGeneratorExpressionNode.cxx
+++ b/Source/cmGeneratorExpressionNode.cxx
@@ -1421,8 +1421,9 @@ static const struct TargetObjectsNode : public cmGeneratorExpressionNode
std::ostringstream e;
e << "The evaluation of the TARGET_OBJECTS generator expression "
"is only suitable for consumption by CMake (limited"
- << reason << "). "
- "It is not suitable for writing out elsewhere.";
+ << reason
+ << "). "
+ "It is not suitable for writing out elsewhere.";
reportError(context, content->GetOriginalExpression(), e.str());
return std::string();
}
@@ -1649,7 +1650,7 @@ static const struct TargetPolicyNode : public cmGeneratorExpressionNode
CM_FOR_EACH_TARGET_POLICY(TARGET_POLICY_LIST_ITEM)
#undef TARGET_POLICY_LIST_ITEM
- );
+ );
return std::string();
}
@@ -1904,13 +1905,15 @@ struct TargetFilesystemArtifact : public cmGeneratorExpressionNode
}
if (target->GetType() >= cmStateEnums::OBJECT_LIBRARY &&
target->GetType() != cmStateEnums::UNKNOWN_LIBRARY) {
- ::reportError(context, content->GetOriginalExpression(), "Target \"" +
- name + "\" is not an executable or library.");
+ ::reportError(context, content->GetOriginalExpression(),
+ "Target \"" + name +
+ "\" is not an executable or library.");
return std::string();
}
- if (dagChecker && (dagChecker->EvaluatingLinkLibraries(name.c_str()) ||
- (dagChecker->EvaluatingSources() &&
- name == dagChecker->TopTarget()))) {
+ if (dagChecker &&
+ (dagChecker->EvaluatingLinkLibraries(name.c_str()) ||
+ (dagChecker->EvaluatingSources() &&
+ name == dagChecker->TopTarget()))) {
::reportError(context, content->GetOriginalExpression(),
"Expressions which require the linker language may not "
"be used while evaluating link libraries");
diff --git a/Source/cmGeneratorExpressionParser.cxx b/Source/cmGeneratorExpressionParser.cxx
index 7b4dc7b..489970c 100644
--- a/Source/cmGeneratorExpressionParser.cxx
+++ b/Source/cmGeneratorExpressionParser.cxx
@@ -87,9 +87,9 @@ void cmGeneratorExpressionParser::ParseGeneratorExpression(
if (this->it != this->Tokens.end() &&
this->it->TokenType == cmGeneratorExpressionToken::EndExpression) {
- GeneratorExpressionContent* content =
- new GeneratorExpressionContent(startToken->Content, this->it->Content -
- startToken->Content + this->it->Length);
+ GeneratorExpressionContent* content = new GeneratorExpressionContent(
+ startToken->Content,
+ this->it->Content - startToken->Content + this->it->Length);
assert(this->it != this->Tokens.end());
++this->it;
--this->NestingLevel;
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index 0c99ed4..b223c5e 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -46,8 +46,9 @@ const char* cmTargetPropertyComputer::GetSources<cmGeneratorTarget>(
}
template <>
-const char* cmTargetPropertyComputer::ComputeLocationForBuild<
- cmGeneratorTarget>(cmGeneratorTarget const* tgt)
+const char*
+cmTargetPropertyComputer::ComputeLocationForBuild<cmGeneratorTarget>(
+ cmGeneratorTarget const* tgt)
{
return tgt->GetLocation("");
}
@@ -893,8 +894,9 @@ static bool processSources(
}
if (!usedSources.empty()) {
tgt->GetLocalGenerator()->GetCMakeInstance()->IssueMessage(
- cmake::LOG, std::string("Used sources for target ") + tgt->GetName() +
- ":\n" + usedSources,
+ cmake::LOG,
+ std::string("Used sources for target ") + tgt->GetName() + ":\n" +
+ usedSources,
entry->ge->GetBacktrace());
}
}
@@ -2553,8 +2555,9 @@ static void processIncludeDirectories(
}
if (!usedIncludes.empty()) {
tgt->GetLocalGenerator()->GetCMakeInstance()->IssueMessage(
- cmake::LOG, std::string("Used includes for target ") + tgt->GetName() +
- ":\n" + usedIncludes,
+ cmake::LOG,
+ std::string("Used includes for target ") + tgt->GetName() + ":\n" +
+ usedIncludes,
entry->ge->GetBacktrace());
}
}
@@ -2661,8 +2664,9 @@ static void processCompileOptionsInternal(
}
if (!usedOptions.empty()) {
tgt->GetLocalGenerator()->GetCMakeInstance()->IssueMessage(
- cmake::LOG, std::string("Used compile ") + logName +
- std::string(" for target ") + tgt->GetName() + ":\n" + usedOptions,
+ cmake::LOG,
+ std::string("Used compile ") + logName + std::string(" for target ") +
+ tgt->GetName() + ":\n" + usedOptions,
entry->ge->GetBacktrace());
}
}
@@ -3958,8 +3962,9 @@ PropertyType checkInterfacePropertyCompatibility(cmGeneratorTarget const* tgt,
e << "Property " << p << " on target \"" << tgt->GetName()
<< "\" does\nnot match the "
"INTERFACE_"
- << p << " property requirement\nof "
- "dependency \""
+ << p
+ << " property requirement\nof "
+ "dependency \""
<< theTarget->GetName() << "\".\n";
cmSystemTools::Error(e.str().c_str());
break;
diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h
index d4a553a..2132b15 100644
--- a/Source/cmGeneratorTarget.h
+++ b/Source/cmGeneratorTarget.h
@@ -260,12 +260,12 @@ public:
BundleDirectoryLevel level) const;
/** Return the install name directory for the target in the
- * build tree. For example: "\@rpath/", "\@loader_path/",
- * or "/full/path/to/library". */
+ * build tree. For example: "\@rpath/", "\@loader_path/",
+ * or "/full/path/to/library". */
std::string GetInstallNameDirForBuildTree(const std::string& config) const;
/** Return the install name directory for the target in the
- * install tree. For example: "\@rpath/" or "\@loader_path/". */
+ * install tree. For example: "\@rpath/" or "\@loader_path/". */
std::string GetInstallNameDirForInstallTree() const;
cmListFileBacktrace GetBacktrace() const;
@@ -499,8 +499,8 @@ public:
cmStateEnums::ArtifactType artifact) const;
/** Clears cached meta data for local and external source files.
- * The meta data will be recomputed on demand.
- */
+ * The meta data will be recomputed on demand.
+ */
void ClearSourcesCache();
void AddSource(const std::string& src);
diff --git a/Source/cmGhsMultiTargetGenerator.cxx b/Source/cmGhsMultiTargetGenerator.cxx
index 270413c..847230a 100644
--- a/Source/cmGhsMultiTargetGenerator.cxx
+++ b/Source/cmGhsMultiTargetGenerator.cxx
@@ -118,8 +118,8 @@ void cmGhsMultiTargetGenerator::Generate()
config = cmSystemTools::UpperCase(config);
this->DynamicDownload = this->DetermineIfDynamicDownload(config, language);
if (this->DynamicDownload) {
- *this->GetFolderBuildStreams() << "#component integrity_dynamic_download"
- << std::endl;
+ *this->GetFolderBuildStreams()
+ << "#component integrity_dynamic_download" << std::endl;
}
GhsMultiGpj::WriteGpjTag(this->GetGpjTag(), this->GetFolderBuildStreams());
cmGlobalGhsMultiGenerator::WriteDisclaimer(this->GetFolderBuildStreams());
@@ -198,9 +198,9 @@ void cmGhsMultiTargetGenerator::WriteTypeSpecifics(const std::string& config,
if (this->GeneratorTarget->GetType() == cmStateEnums::STATIC_LIBRARY) {
std::string const static_library_suffix =
this->Makefile->GetSafeDefinition("CMAKE_STATIC_LIBRARY_SUFFIX");
- *this->GetFolderBuildStreams() << " -o \"" << outputDir
- << outputFilename << static_library_suffix
- << "\"" << std::endl;
+ *this->GetFolderBuildStreams()
+ << " -o \"" << outputDir << outputFilename << static_library_suffix
+ << "\"" << std::endl;
} else if (this->GeneratorTarget->GetType() == cmStateEnums::EXECUTABLE) {
if (notKernel && !this->IsTargetGroup()) {
*this->GetFolderBuildStreams() << " -relprog" << std::endl;
@@ -208,15 +208,15 @@ void cmGhsMultiTargetGenerator::WriteTypeSpecifics(const std::string& config,
if (this->IsTargetGroup()) {
*this->GetFolderBuildStreams()
<< " -o \"" << outputDir << outputFilename << ".elf\"" << std::endl;
- *this->GetFolderBuildStreams() << " :extraOutputFile=\"" << outputDir
- << outputFilename << ".elf.ael\""
- << std::endl;
+ *this->GetFolderBuildStreams()
+ << " :extraOutputFile=\"" << outputDir << outputFilename
+ << ".elf.ael\"" << std::endl;
} else {
std::string const executable_suffix =
this->Makefile->GetSafeDefinition("CMAKE_EXECUTABLE_SUFFIX");
- *this->GetFolderBuildStreams() << " -o \"" << outputDir
- << outputFilename << executable_suffix
- << "\"" << std::endl;
+ *this->GetFolderBuildStreams()
+ << " -o \"" << outputDir << outputFilename << executable_suffix
+ << "\"" << std::endl;
}
}
}
@@ -293,8 +293,8 @@ void cmGhsMultiTargetGenerator::WriteCompilerFlags(std::string const&,
this->FlagsByLanguage.find(language);
if (flagsByLangI != this->FlagsByLanguage.end()) {
if (!flagsByLangI->second.empty()) {
- *this->GetFolderBuildStreams() << " " << flagsByLangI->second
- << std::endl;
+ *this->GetFolderBuildStreams()
+ << " " << flagsByLangI->second << std::endl;
}
}
}
@@ -321,8 +321,8 @@ void cmGhsMultiTargetGenerator::WriteIncludes(const std::string& config,
for (std::vector<std::string>::const_iterator includes_i = includes.begin();
includes_i != includes.end(); ++includes_i) {
- *this->GetFolderBuildStreams() << " -I\"" << *includes_i << "\""
- << std::endl;
+ *this->GetFolderBuildStreams()
+ << " -I\"" << *includes_i << "\"" << std::endl;
}
}
@@ -335,8 +335,8 @@ void cmGhsMultiTargetGenerator::WriteTargetLinkLibraries(
for (cmTargetDependSet::iterator tdsI = tds.begin(); tdsI != tds.end();
++tdsI) {
const cmGeneratorTarget* tg = *tdsI;
- *this->GetFolderBuildStreams() << " -L\"" << GetAbsBuildFilePath(tg)
- << "\"" << std::endl;
+ *this->GetFolderBuildStreams()
+ << " -L\"" << GetAbsBuildFilePath(tg) << "\"" << std::endl;
}
// library targets
cmTarget::LinkLibraryVectorType llv =
@@ -349,8 +349,8 @@ void cmGhsMultiTargetGenerator::WriteTargetLinkLibraries(
if (NULL != tg) {
libName = tg->GetName() + ".a";
}
- *this->GetFolderBuildStreams() << " -l\"" << libName << "\""
- << std::endl;
+ *this->GetFolderBuildStreams()
+ << " -l\"" << libName << "\"" << std::endl;
}
if (!this->TargetGroup) {
diff --git a/Source/cmGlobalBorlandMakefileGenerator.h b/Source/cmGlobalBorlandMakefileGenerator.h
index 85fee74..27de6cc 100644
--- a/Source/cmGlobalBorlandMakefileGenerator.h
+++ b/Source/cmGlobalBorlandMakefileGenerator.h
@@ -46,11 +46,14 @@ public:
bool AllowDeleteOnError() const override { return false; }
protected:
- void GenerateBuildCommand(
- std::vector<std::string>& makeCommand, const std::string& makeProgram,
- const std::string& projectName, const std::string& projectDir,
- const std::string& targetName, const std::string& config, bool fast,
- int jobs, bool verbose, std::vector<std::string> const& makeOptions =
+ void GenerateBuildCommand(std::vector<std::string>& makeCommand,
+ const std::string& makeProgram,
+ const std::string& projectName,
+ const std::string& projectDir,
+ const std::string& targetName,
+ const std::string& config, bool fast, int jobs,
+ bool verbose,
+ std::vector<std::string> const& makeOptions =
std::vector<std::string>()) override;
void PrintBuildCommandAdvice(std::ostream& os, int jobs) const override;
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 8a89f36..2872831 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -13,7 +13,7 @@
#include <stdlib.h>
#if defined(_WIN32) && !defined(__CYGWIN__)
-#include <windows.h>
+# include <windows.h>
#endif
#include "cmAlgorithms.h"
@@ -44,13 +44,13 @@
#include "cmake.h"
#if defined(CMAKE_BUILD_WITH_CMAKE)
-#include "cmCryptoHash.h"
-#include "cm_jsoncpp_value.h"
-#include "cm_jsoncpp_writer.h"
+# include "cmCryptoHash.h"
+# include "cm_jsoncpp_value.h"
+# include "cm_jsoncpp_writer.h"
#endif
#if defined(_MSC_VER) && _MSC_VER >= 1800
-#define KWSYS_WINDOWS_DEPRECATED_GetVersionEx
+# define KWSYS_WINDOWS_DEPRECATED_GetVersionEx
#endif
const std::string kCMAKE_PLATFORM_INFO_INITIALIZED =
@@ -442,8 +442,9 @@ void cmGlobalGenerator::EnableLanguage(
for (std::string const& li : cur_languages) {
if (!this->LanguagesInProgress.insert(li).second) {
std::ostringstream e;
- e << "Language '" << li << "' is currently being enabled. "
- "Recursive call not allowed.";
+ e << "Language '" << li
+ << "' is currently being enabled. "
+ "Recursive call not allowed.";
mf->IssueMessage(cmake::FATAL_ERROR, e.str());
cmSystemTools::SetFatalErrorOccured();
return;
@@ -523,14 +524,14 @@ void cmGlobalGenerator::EnableLanguage(
ZeroMemory(&osviex, sizeof(osviex));
osviex.dwOSVersionInfoSize = sizeof(osviex);
-#ifdef KWSYS_WINDOWS_DEPRECATED_GetVersionEx
-#pragma warning(push)
-#pragma warning(disable : 4996)
-#endif
+# ifdef KWSYS_WINDOWS_DEPRECATED_GetVersionEx
+# pragma warning(push)
+# pragma warning(disable : 4996)
+# endif
GetVersionExW((OSVERSIONINFOW*)&osviex);
-#ifdef KWSYS_WINDOWS_DEPRECATED_GetVersionEx
-#pragma warning(pop)
-#endif
+# ifdef KWSYS_WINDOWS_DEPRECATED_GetVersionEx
+# pragma warning(pop)
+# endif
std::ostringstream windowsVersionString;
windowsVersionString << osviex.dwMajorVersion << "."
<< osviex.dwMinorVersion << "."
@@ -1403,7 +1404,8 @@ void cmGlobalGenerator::Generate()
}
this->LocalGenerators[i]->GenerateTestFiles();
this->CMakeInstance->UpdateProgress(
- "Generating", (static_cast<float>(i) + 1.0f) /
+ "Generating",
+ (static_cast<float>(i) + 1.0f) /
static_cast<float>(this->LocalGenerators.size()));
}
this->SetCurrentMakefile(nullptr);
@@ -1560,8 +1562,8 @@ void cmGlobalGenerator::FinalizeTargetCompileInfo()
cmBacktraceRange::const_iterator btIt =
noconfig_compile_definitions_bts.begin();
- for (cmStringRange::const_iterator
- it = noconfig_compile_definitions.begin();
+ for (cmStringRange::const_iterator it =
+ noconfig_compile_definitions.begin();
it != noconfig_compile_definitions.end(); ++it, ++btIt) {
t->InsertCompileDefinition(*it, *btIt);
}
@@ -1721,7 +1723,8 @@ void cmGlobalGenerator::CheckTargetProperties()
}
}
this->CMakeInstance->UpdateProgress(
- "Configuring", 0.9f +
+ "Configuring",
+ 0.9f +
0.1f * (static_cast<float>(i) + 1.0f) /
static_cast<float>(this->Makefiles.size()));
}
@@ -1769,7 +1772,7 @@ int cmGlobalGenerator::TryCompile(int jobs, const std::string& srcdir,
if (!target.empty()) {
newTarget += target;
#if 0
-#if defined(_WIN32) || defined(__CYGWIN__)
+# if defined(_WIN32) || defined(__CYGWIN__)
std::string tmp = target;
// if the target does not already end in . something
// then assume .exe
@@ -1777,7 +1780,7 @@ int cmGlobalGenerator::TryCompile(int jobs, const std::string& srcdir,
{
newTarget += ".exe";
}
-#endif // WIN32
+# endif // WIN32
#endif
}
std::string config =
@@ -2466,8 +2469,9 @@ void cmGlobalGenerator::AddGlobalTarget_Install(
bool skipInstallRules = mf->IsOn("CMAKE_SKIP_INSTALL_RULES");
if (this->InstallTargetEnabled && skipInstallRules) {
this->CMakeInstance->IssueMessage(
- cmake::WARNING, "CMAKE_SKIP_INSTALL_RULES was enabled even though "
- "installation rules have been specified",
+ cmake::WARNING,
+ "CMAKE_SKIP_INSTALL_RULES was enabled even though "
+ "installation rules have been specified",
mf->GetBacktrace());
} else if (this->InstallTargetEnabled && !skipInstallRules) {
if (!cmakeCfgIntDir || !*cmakeCfgIntDir || cmakeCfgIntDir[0] == '.') {
diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h
index 62c5441..a50cc3b 100644
--- a/Source/cmGlobalGenerator.h
+++ b/Source/cmGlobalGenerator.h
@@ -23,7 +23,7 @@
#include "cm_codecvt.hxx"
#if defined(CMAKE_BUILD_WITH_CMAKE)
-#include "cmFileLockPool.h"
+# include "cmFileLockPool.h"
#endif
class cmExportBuildFileGenerator;
@@ -158,14 +158,15 @@ public:
* empty then all is assumed. clean indicates if a "make clean" should be
* done first.
*/
- int Build(int jobs, const std::string& srcdir, const std::string& bindir,
- const std::string& projectName, const std::string& targetName,
- std::string& output, const std::string& makeProgram,
- const std::string& config, bool clean, bool fast, bool verbose,
- cmDuration timeout, cmSystemTools::OutputOption outputflag =
- cmSystemTools::OUTPUT_NONE,
- std::vector<std::string> const& nativeOptions =
- std::vector<std::string>());
+ int Build(
+ int jobs, const std::string& srcdir, const std::string& bindir,
+ const std::string& projectName, const std::string& targetName,
+ std::string& output, const std::string& makeProgram,
+ const std::string& config, bool clean, bool fast, bool verbose,
+ cmDuration timeout,
+ cmSystemTools::OutputOption outputflag = cmSystemTools::OUTPUT_NONE,
+ std::vector<std::string> const& nativeOptions =
+ std::vector<std::string>());
/**
* Open a generated IDE project given the following information.
diff --git a/Source/cmGlobalGhsMultiGenerator.cxx b/Source/cmGlobalGhsMultiGenerator.cxx
index f4ecff2..0328991 100644
--- a/Source/cmGlobalGhsMultiGenerator.cxx
+++ b/Source/cmGlobalGhsMultiGenerator.cxx
@@ -313,8 +313,8 @@ void cmGlobalGhsMultiGenerator::WriteMacros()
void cmGlobalGhsMultiGenerator::WriteHighLevelDirectives()
{
- *this->GetBuildFileStream() << "primaryTarget=arm_integrity.tgt"
- << std::endl;
+ *this->GetBuildFileStream()
+ << "primaryTarget=arm_integrity.tgt" << std::endl;
char const* const customization =
this->GetCMakeInstance()->GetCacheDefinition("GHS_CUSTOMIZATION");
if (NULL != customization && strlen(customization) > 0) {
@@ -326,8 +326,8 @@ void cmGlobalGhsMultiGenerator::WriteHighLevelDirectives()
void cmGlobalGhsMultiGenerator::WriteCompilerOptions(std::string const& fOSDir)
{
- *this->GetBuildFileStream() << " -os_dir=\"" << fOSDir << "\""
- << std::endl;
+ *this->GetBuildFileStream()
+ << " -os_dir=\"" << fOSDir << "\"" << std::endl;
}
void cmGlobalGhsMultiGenerator::WriteDisclaimer(std::ostream* os)
diff --git a/Source/cmGlobalGhsMultiGenerator.h b/Source/cmGlobalGhsMultiGenerator.h
index c5388ad..30d4d3b 100644
--- a/Source/cmGlobalGhsMultiGenerator.h
+++ b/Source/cmGlobalGhsMultiGenerator.h
@@ -49,14 +49,14 @@ public:
static bool SupportsPlatform() { return false; }
/**
- * Try to determine system information such as shared library
- * extension, pthreads, byte order etc.
- */
+ * Try to determine system information such as shared library
+ * extension, pthreads, byte order etc.
+ */
virtual void EnableLanguage(std::vector<std::string> const& languages,
cmMakefile*, bool optional);
/*
- * Determine what program to use for building the project.
- */
+ * Determine what program to use for building the project.
+ */
bool FindMakeProgram(cmMakefile* mf) override;
cmGeneratedFileStream* GetBuildFileStream()
diff --git a/Source/cmGlobalJOMMakefileGenerator.h b/Source/cmGlobalJOMMakefileGenerator.h
index 65f340c..bcf46d0 100644
--- a/Source/cmGlobalJOMMakefileGenerator.h
+++ b/Source/cmGlobalJOMMakefileGenerator.h
@@ -40,11 +40,14 @@ public:
bool optional) override;
protected:
- void GenerateBuildCommand(
- std::vector<std::string>& makeCommand, const std::string& makeProgram,
- const std::string& projectName, const std::string& projectDir,
- const std::string& targetName, const std::string& config, bool fast,
- int jobs, bool verbose, std::vector<std::string> const& makeOptions =
+ void GenerateBuildCommand(std::vector<std::string>& makeCommand,
+ const std::string& makeProgram,
+ const std::string& projectName,
+ const std::string& projectDir,
+ const std::string& targetName,
+ const std::string& config, bool fast, int jobs,
+ bool verbose,
+ std::vector<std::string> const& makeOptions =
std::vector<std::string>()) override;
private:
diff --git a/Source/cmGlobalNMakeMakefileGenerator.h b/Source/cmGlobalNMakeMakefileGenerator.h
index 4b6382e..62dea6e 100644
--- a/Source/cmGlobalNMakeMakefileGenerator.h
+++ b/Source/cmGlobalNMakeMakefileGenerator.h
@@ -45,11 +45,14 @@ public:
bool optional) override;
protected:
- void GenerateBuildCommand(
- std::vector<std::string>& makeCommand, const std::string& makeProgram,
- const std::string& projectName, const std::string& projectDir,
- const std::string& targetName, const std::string& config, bool fast,
- int jobs, bool verbose, std::vector<std::string> const& makeOptions =
+ void GenerateBuildCommand(std::vector<std::string>& makeCommand,
+ const std::string& makeProgram,
+ const std::string& projectName,
+ const std::string& projectDir,
+ const std::string& targetName,
+ const std::string& config, bool fast, int jobs,
+ bool verbose,
+ std::vector<std::string> const& makeOptions =
std::vector<std::string>()) override;
void PrintBuildCommandAdvice(std::ostream& os, int jobs) const override;
diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx
index 69bc3be..6f7e82a 100644
--- a/Source/cmGlobalNinjaGenerator.cxx
+++ b/Source/cmGlobalNinjaGenerator.cxx
@@ -555,9 +555,10 @@ bool cmGlobalNinjaGenerator::FindMakeProgram(cmMakefile* mf)
if (!cmSystemTools::RunSingleCommand(command, &version, &error, nullptr,
nullptr,
cmSystemTools::OUTPUT_NONE)) {
- mf->IssueMessage(cmake::FATAL_ERROR, "Running\n '" +
- cmJoin(command, "' '") + "'\n"
- "failed with:\n " +
+ mf->IssueMessage(cmake::FATAL_ERROR,
+ "Running\n '" + cmJoin(command, "' '") +
+ "'\n"
+ "failed with:\n " +
error);
cmSystemTools::SetFatalErrorOccured();
return false;
diff --git a/Source/cmGlobalNinjaGenerator.h b/Source/cmGlobalNinjaGenerator.h
index 17b9a7d..00fa348 100644
--- a/Source/cmGlobalNinjaGenerator.h
+++ b/Source/cmGlobalNinjaGenerator.h
@@ -202,11 +202,14 @@ public:
void EnableLanguage(std::vector<std::string> const& languages,
cmMakefile* mf, bool optional) override;
- void GenerateBuildCommand(
- std::vector<std::string>& makeCommand, const std::string& makeProgram,
- const std::string& projectName, const std::string& projectDir,
- const std::string& targetName, const std::string& config, bool fast,
- int jobs, bool verbose, std::vector<std::string> const& makeOptions =
+ void GenerateBuildCommand(std::vector<std::string>& makeCommand,
+ const std::string& makeProgram,
+ const std::string& projectName,
+ const std::string& projectDir,
+ const std::string& targetName,
+ const std::string& config, bool fast, int jobs,
+ bool verbose,
+ std::vector<std::string> const& makeOptions =
std::vector<std::string>()) override;
// Setup target names
diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx
index 641b760..61c42be 100644
--- a/Source/cmGlobalUnixMakefileGenerator3.cxx
+++ b/Source/cmGlobalUnixMakefileGenerator3.cxx
@@ -640,12 +640,13 @@ void cmGlobalUnixMakefileGenerator3::WriteConvenienceRules2(
for (cmGeneratorTarget* gtarget : targets) {
int type = gtarget->GetType();
std::string name = gtarget->GetName();
- if (!name.empty() && ((type == cmStateEnums::EXECUTABLE) ||
- (type == cmStateEnums::STATIC_LIBRARY) ||
- (type == cmStateEnums::SHARED_LIBRARY) ||
- (type == cmStateEnums::MODULE_LIBRARY) ||
- (type == cmStateEnums::OBJECT_LIBRARY) ||
- (type == cmStateEnums::UTILITY))) {
+ if (!name.empty() &&
+ ((type == cmStateEnums::EXECUTABLE) ||
+ (type == cmStateEnums::STATIC_LIBRARY) ||
+ (type == cmStateEnums::SHARED_LIBRARY) ||
+ (type == cmStateEnums::MODULE_LIBRARY) ||
+ (type == cmStateEnums::OBJECT_LIBRARY) ||
+ (type == cmStateEnums::UTILITY))) {
std::string makefileName;
// Add a rule to build the target by name.
localName = lg->GetRelativeTargetDirectory(gtarget);
@@ -920,8 +921,9 @@ void cmGlobalUnixMakefileGenerator3::WriteHelpRule(
std::string path;
std::vector<std::string> no_depends;
std::vector<std::string> commands;
- lg->AppendEcho(commands, "The following are some of the valid targets "
- "for this Makefile:");
+ lg->AppendEcho(commands,
+ "The following are some of the valid targets "
+ "for this Makefile:");
lg->AppendEcho(commands, "... all (the default if no target is provided)");
lg->AppendEcho(commands, "... clean");
if (!this->GlobalSettingIsOn("CMAKE_SUPPRESS_REGENERATION")) {
diff --git a/Source/cmGlobalUnixMakefileGenerator3.h b/Source/cmGlobalUnixMakefileGenerator3.h
index 097678f..a2ad095 100644
--- a/Source/cmGlobalUnixMakefileGenerator3.h
+++ b/Source/cmGlobalUnixMakefileGenerator3.h
@@ -127,11 +127,14 @@ public:
std::string GetEmptyRuleHackDepends() { return this->EmptyRuleHackDepends; }
// change the build command for speed
- void GenerateBuildCommand(
- std::vector<std::string>& makeCommand, const std::string& makeProgram,
- const std::string& projectName, const std::string& projectDir,
- const std::string& targetName, const std::string& config, bool fast,
- int jobs, bool verbose, std::vector<std::string> const& makeOptions =
+ void GenerateBuildCommand(std::vector<std::string>& makeCommand,
+ const std::string& makeProgram,
+ const std::string& projectName,
+ const std::string& projectDir,
+ const std::string& targetName,
+ const std::string& config, bool fast, int jobs,
+ bool verbose,
+ std::vector<std::string> const& makeOptions =
std::vector<std::string>()) override;
/** Record per-target progress information. */
diff --git a/Source/cmGlobalVisualStudio10Generator.h b/Source/cmGlobalVisualStudio10Generator.h
index 148f85f..f85b773 100644
--- a/Source/cmGlobalVisualStudio10Generator.h
+++ b/Source/cmGlobalVisualStudio10Generator.h
@@ -24,11 +24,14 @@ public:
bool SetGeneratorPlatform(std::string const& p, cmMakefile* mf) override;
bool SetGeneratorToolset(std::string const& ts, cmMakefile* mf) override;
- void GenerateBuildCommand(
- std::vector<std::string>& makeCommand, const std::string& makeProgram,
- const std::string& projectName, const std::string& projectDir,
- const std::string& targetName, const std::string& config, bool fast,
- int jobs, bool verbose, std::vector<std::string> const& makeOptions =
+ void GenerateBuildCommand(std::vector<std::string>& makeCommand,
+ const std::string& makeProgram,
+ const std::string& projectName,
+ const std::string& projectDir,
+ const std::string& targetName,
+ const std::string& config, bool fast, int jobs,
+ bool verbose,
+ std::vector<std::string> const& makeOptions =
std::vector<std::string>()) override;
///! create the correct local generator
diff --git a/Source/cmGlobalVisualStudio12Generator.cxx b/Source/cmGlobalVisualStudio12Generator.cxx
index a9c605c..e05ae70 100644
--- a/Source/cmGlobalVisualStudio12Generator.cxx
+++ b/Source/cmGlobalVisualStudio12Generator.cxx
@@ -125,8 +125,9 @@ bool cmGlobalVisualStudio12Generator::InitializeWindowsPhone(cmMakefile* mf)
if (!this->SelectWindowsPhoneToolset(this->DefaultPlatformToolset)) {
std::ostringstream e;
if (this->DefaultPlatformToolset.empty()) {
- e << this->GetName() << " supports Windows Phone '8.0' and '8.1', but "
- "not '"
+ e << this->GetName()
+ << " supports Windows Phone '8.0' and '8.1', but "
+ "not '"
<< this->SystemVersion << "'. Check CMAKE_SYSTEM_VERSION.";
} else {
e << "A Windows Phone component with CMake requires both the Windows "
@@ -144,8 +145,9 @@ bool cmGlobalVisualStudio12Generator::InitializeWindowsStore(cmMakefile* mf)
if (!this->SelectWindowsStoreToolset(this->DefaultPlatformToolset)) {
std::ostringstream e;
if (this->DefaultPlatformToolset.empty()) {
- e << this->GetName() << " supports Windows Store '8.0' and '8.1', but "
- "not '"
+ e << this->GetName()
+ << " supports Windows Store '8.0' and '8.1', but "
+ "not '"
<< this->SystemVersion << "'. Check CMAKE_SYSTEM_VERSION.";
} else {
e << "A Windows Store component with CMake requires both the Windows "
diff --git a/Source/cmGlobalVisualStudio12Generator.h b/Source/cmGlobalVisualStudio12Generator.h
index c941809..9d6554a 100644
--- a/Source/cmGlobalVisualStudio12Generator.h
+++ b/Source/cmGlobalVisualStudio12Generator.h
@@ -30,6 +30,7 @@ public:
// from the .Net Framework version and instead made it have it's own
// version number
const char* GetToolsVersion() override { return "12.0"; }
+
protected:
bool ProcessGeneratorToolsetField(std::string const& key,
std::string const& value) override;
@@ -48,6 +49,7 @@ protected:
bool IsWindowsPhoneToolsetInstalled() const;
bool IsWindowsStoreToolsetInstalled() const;
const char* GetIDEVersion() override { return "12.0"; }
+
private:
class Factory;
};
diff --git a/Source/cmGlobalVisualStudio14Generator.cxx b/Source/cmGlobalVisualStudio14Generator.cxx
index c440e0d..b0db146 100644
--- a/Source/cmGlobalVisualStudio14Generator.cxx
+++ b/Source/cmGlobalVisualStudio14Generator.cxx
@@ -122,8 +122,9 @@ bool cmGlobalVisualStudio14Generator::InitializeWindowsStore(cmMakefile* mf)
std::ostringstream e;
if (!this->SelectWindowsStoreToolset(this->DefaultPlatformToolset)) {
if (this->DefaultPlatformToolset.empty()) {
- e << this->GetName() << " supports Windows Store '8.0', '8.1' and "
- "'10.0', but not '"
+ e << this->GetName()
+ << " supports Windows Store '8.0', '8.1' and "
+ "'10.0', but not '"
<< this->SystemVersion << "'. Check CMAKE_SYSTEM_VERSION.";
} else {
e << "A Windows Store component with CMake requires both the Windows "
diff --git a/Source/cmGlobalVisualStudio14Generator.h b/Source/cmGlobalVisualStudio14Generator.h
index d92a11a..4868df0 100644
--- a/Source/cmGlobalVisualStudio14Generator.h
+++ b/Source/cmGlobalVisualStudio14Generator.h
@@ -27,6 +27,7 @@ public:
void WriteSLNHeader(std::ostream& fout) override;
const char* GetToolsVersion() override { return "14.0"; }
+
protected:
bool InitializeWindows(cmMakefile* mf) override;
bool InitializeWindowsStore(cmMakefile* mf) override;
diff --git a/Source/cmGlobalVisualStudio7Generator.h b/Source/cmGlobalVisualStudio7Generator.h
index 77d4a96..0c9dd88 100644
--- a/Source/cmGlobalVisualStudio7Generator.h
+++ b/Source/cmGlobalVisualStudio7Generator.h
@@ -55,11 +55,14 @@ public:
* Try running cmake and building a file. This is used for dynamically
* loaded commands, not as part of the usual build process.
*/
- void GenerateBuildCommand(
- std::vector<std::string>& makeCommand, const std::string& makeProgram,
- const std::string& projectName, const std::string& projectDir,
- const std::string& targetName, const std::string& config, bool fast,
- int jobs, bool verbose, std::vector<std::string> const& makeOptions =
+ void GenerateBuildCommand(std::vector<std::string>& makeCommand,
+ const std::string& makeProgram,
+ const std::string& projectName,
+ const std::string& projectDir,
+ const std::string& targetName,
+ const std::string& config, bool fast, int jobs,
+ bool verbose,
+ std::vector<std::string> const& makeOptions =
std::vector<std::string>()) override;
/**
diff --git a/Source/cmGlobalVisualStudio9Generator.h b/Source/cmGlobalVisualStudio9Generator.h
index 37efb9c..2aa6a91 100644
--- a/Source/cmGlobalVisualStudio9Generator.h
+++ b/Source/cmGlobalVisualStudio9Generator.h
@@ -38,6 +38,7 @@ public:
protected:
const char* GetIDEVersion() override { return "9.0"; }
+
private:
class Factory;
friend class Factory;
diff --git a/Source/cmGlobalVisualStudioGenerator.cxx b/Source/cmGlobalVisualStudioGenerator.cxx
index 1175acf..4aa52c3 100644
--- a/Source/cmGlobalVisualStudioGenerator.cxx
+++ b/Source/cmGlobalVisualStudioGenerator.cxx
@@ -458,9 +458,9 @@ bool IsVisualStudioMacrosFileRegistered(const std::string& macrosFile,
lastWriteTime.dwHighDateTime = 0;
lastWriteTime.dwLowDateTime = 0;
- while (ERROR_SUCCESS == RegEnumKeyExW(hkey, index, subkeyname,
- &cch_subkeyname, 0, keyclass,
- &cch_keyclass, &lastWriteTime)) {
+ while (ERROR_SUCCESS ==
+ RegEnumKeyExW(hkey, index, subkeyname, &cch_subkeyname, 0, keyclass,
+ &cch_keyclass, &lastWriteTime)) {
// Open the subkey and query the values of interest:
HKEY hsubkey = NULL;
result = RegOpenKeyExW(hkey, subkeyname, 0, KEY_READ, &hsubkey);
diff --git a/Source/cmGlobalWatcomWMakeGenerator.h b/Source/cmGlobalWatcomWMakeGenerator.h
index 1729bf1..0d10d58 100644
--- a/Source/cmGlobalWatcomWMakeGenerator.h
+++ b/Source/cmGlobalWatcomWMakeGenerator.h
@@ -50,11 +50,14 @@ public:
bool AllowDeleteOnError() const override { return false; }
protected:
- void GenerateBuildCommand(
- std::vector<std::string>& makeCommand, const std::string& makeProgram,
- const std::string& projectName, const std::string& projectDir,
- const std::string& targetName, const std::string& config, bool fast,
- int jobs, bool verbose, std::vector<std::string> const& makeOptions =
+ void GenerateBuildCommand(std::vector<std::string>& makeCommand,
+ const std::string& makeProgram,
+ const std::string& projectName,
+ const std::string& projectDir,
+ const std::string& targetName,
+ const std::string& config, bool fast, int jobs,
+ bool verbose,
+ std::vector<std::string> const& makeOptions =
std::vector<std::string>()) override;
void PrintBuildCommandAdvice(std::ostream& os, int jobs) const override;
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index f69f23e..47741f9 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -36,12 +36,12 @@
struct cmLinkImplementation;
#if defined(CMAKE_BUILD_WITH_CMAKE) && defined(__APPLE__)
-#define HAVE_APPLICATION_SERVICES
-#include <ApplicationServices/ApplicationServices.h>
+# define HAVE_APPLICATION_SERVICES
+# include <ApplicationServices/ApplicationServices.h>
#endif
#if defined(CMAKE_BUILD_WITH_CMAKE)
-#include "cmXMLParser.h"
+# include "cmXMLParser.h"
// parse the xml file storing the installed version of Xcode on
// the machine
diff --git a/Source/cmGlobalXCodeGenerator.h b/Source/cmGlobalXCodeGenerator.h
index f7f4428..0051c4a 100644
--- a/Source/cmGlobalXCodeGenerator.h
+++ b/Source/cmGlobalXCodeGenerator.h
@@ -66,11 +66,14 @@ public:
* Try running cmake and building a file. This is used for dynalically
* loaded commands, not as part of the usual build process.
*/
- void GenerateBuildCommand(
- std::vector<std::string>& makeCommand, const std::string& makeProgram,
- const std::string& projectName, const std::string& projectDir,
- const std::string& targetName, const std::string& config, bool fast,
- int jobs, bool verbose, std::vector<std::string> const& makeOptions =
+ void GenerateBuildCommand(std::vector<std::string>& makeCommand,
+ const std::string& makeProgram,
+ const std::string& projectName,
+ const std::string& projectDir,
+ const std::string& targetName,
+ const std::string& config, bool fast, int jobs,
+ bool verbose,
+ std::vector<std::string> const& makeOptions =
std::vector<std::string>()) override;
/** Append the subdirectory for the given configuration. */
diff --git a/Source/cmGraphAdjacencyList.h b/Source/cmGraphAdjacencyList.h
index 46cf878..6a0a799 100644
--- a/Source/cmGraphAdjacencyList.h
+++ b/Source/cmGraphAdjacencyList.h
@@ -23,6 +23,7 @@ public:
operator int() const { return this->Dest; }
bool IsStrong() const { return this->Strong; }
+
private:
int Dest;
bool Strong;
diff --git a/Source/cmIncludeCommand.cxx b/Source/cmIncludeCommand.cxx
index b42d75e..f862578 100644
--- a/Source/cmIncludeCommand.cxx
+++ b/Source/cmIncludeCommand.cxx
@@ -95,8 +95,9 @@ bool cmIncludeCommand::InitialPass(std::vector<std::string> const& args,
messageType = cmake::FATAL_ERROR;
}
if (modal) {
- e << "The file\n " << fname_abs << "\nwas generated by the export() "
- "command. It "
+ e << "The file\n " << fname_abs
+ << "\nwas generated by the export() "
+ "command. It "
<< modal
<< " not be used as the argument to the "
"include() command. Use ALIAS targets instead to refer to targets "
diff --git a/Source/cmIncludeExternalMSProjectCommand.cxx b/Source/cmIncludeExternalMSProjectCommand.cxx
index 85e8cd3..c9217d3 100644
--- a/Source/cmIncludeExternalMSProjectCommand.cxx
+++ b/Source/cmIncludeExternalMSProjectCommand.cxx
@@ -3,11 +3,11 @@
#include "cmIncludeExternalMSProjectCommand.h"
#ifdef _WIN32
-#include "cmGlobalGenerator.h"
-#include "cmMakefile.h"
-#include "cmStateTypes.h"
-#include "cmSystemTools.h"
-#include "cmTarget.h"
+# include "cmGlobalGenerator.h"
+# include "cmMakefile.h"
+# include "cmStateTypes.h"
+# include "cmSystemTools.h"
+# include "cmTarget.h"
#endif
class cmExecutionStatus;
diff --git a/Source/cmInstallCommand.cxx b/Source/cmInstallCommand.cxx
index b325b0c..87dcb18 100644
--- a/Source/cmInstallCommand.cxx
+++ b/Source/cmInstallCommand.cxx
@@ -861,11 +861,13 @@ bool cmInstallCommand::HandleFilesMode(std::vector<std::string> const& args)
messageType = cmake::FATAL_ERROR;
}
if (modal) {
- e << "The file\n " << file << "\nwas generated by the export() "
- "command. It "
- << modal << " not be installed with the "
- "install() command. Use the install(EXPORT) mechanism "
- "instead. See the cmake-packages(7) manual for more.\n";
+ e << "The file\n " << file
+ << "\nwas generated by the export() "
+ "command. It "
+ << modal
+ << " not be installed with the "
+ "install() command. Use the install(EXPORT) mechanism "
+ "instead. See the cmake-packages(7) manual for more.\n";
this->Makefile->IssueMessage(messageType, e.str());
if (messageType == cmake::FATAL_ERROR) {
return false;
diff --git a/Source/cmInstallExportGenerator.cxx b/Source/cmInstallExportGenerator.cxx
index 5990f30..d441e41 100644
--- a/Source/cmInstallExportGenerator.cxx
+++ b/Source/cmInstallExportGenerator.cxx
@@ -7,7 +7,7 @@
#include <utility>
#ifdef CMAKE_BUILD_WITH_CMAKE
-#include "cmExportInstallAndroidMKGenerator.h"
+# include "cmExportInstallAndroidMKGenerator.h"
#endif
#include "cmExportInstallFileGenerator.h"
#include "cmExportSet.h"
diff --git a/Source/cmListCommand.cxx b/Source/cmListCommand.cxx
index 31bc1c0..1ac2cc2 100644
--- a/Source/cmListCommand.cxx
+++ b/Source/cmListCommand.cxx
@@ -686,8 +686,8 @@ bool cmListCommand::HandleTransformCommand(
// Build a set of supported actions.
std::set<ActionDescriptor,
std::function<bool(const std::string&, const std::string&)>>
- descriptors(
- [](const std::string& x, const std::string& y) { return x < y; });
+ descriptors(
+ [](const std::string& x, const std::string& y) { return x < y; });
descriptors = { { "APPEND", 1,
[&command](const std::string& s) -> std::string {
if (command.Selector->InSelection(s)) {
diff --git a/Source/cmListFileLexer.h b/Source/cmListFileLexer.h
index f243010a..8962396 100644
--- a/Source/cmListFileLexer.h
+++ b/Source/cmListFileLexer.h
@@ -3,7 +3,8 @@
#ifndef cmListFileLexer_h
#define cmListFileLexer_h
-typedef enum cmListFileLexer_Type_e {
+typedef enum cmListFileLexer_Type_e
+{
cmListFileLexer_Token_None,
cmListFileLexer_Token_Space,
cmListFileLexer_Token_Newline,
diff --git a/Source/cmLoadCommandCommand.cxx b/Source/cmLoadCommandCommand.cxx
index 6bfac17..cd71518 100644
--- a/Source/cmLoadCommandCommand.cxx
+++ b/Source/cmLoadCommandCommand.cxx
@@ -18,7 +18,7 @@
class cmExecutionStatus;
#ifdef __QNX__
-#include <malloc.h> /* for malloc/free on QNX */
+# include <malloc.h> /* for malloc/free on QNX */
#endif
extern "C" void TrapsForSignalsCFunction(int sig);
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index c5370e4..a3f4a8f 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -27,8 +27,8 @@
#include "cmake.h"
#if defined(CMAKE_BUILD_WITH_CMAKE)
-#define CM_LG_ENCODE_OBJECT_NAMES
-#include "cmCryptoHash.h"
+# define CM_LG_ENCODE_OBJECT_NAMES
+# include "cmCryptoHash.h"
#endif
#include "cmsys/RegularExpression.hxx"
@@ -42,8 +42,8 @@
#include <utility>
#if defined(__HAIKU__)
-#include <FindDirectory.h>
-#include <StorageDefs.h>
+# include <FindDirectory.h>
+# include <StorageDefs.h>
#endif
// List of variables that are replaced when
@@ -1562,8 +1562,9 @@ void cmLocalGenerator::AddCompilerRequirementFlag(
target->Target->GetMakefile()->GetDefinition(option_flag);
if (!opt) {
std::ostringstream e;
- e << "Target \"" << target->GetName() << "\" requires the language "
- "dialect \""
+ e << "Target \"" << target->GetName()
+ << "\" requires the language "
+ "dialect \""
<< lang << standardProp << "\" "
<< (ext ? "(with compiler extensions)" : "")
<< ", but CMake "
diff --git a/Source/cmLocalNinjaGenerator.cxx b/Source/cmLocalNinjaGenerator.cxx
index b5ae939..360f73d 100644
--- a/Source/cmLocalNinjaGenerator.cxx
+++ b/Source/cmLocalNinjaGenerator.cxx
@@ -76,8 +76,8 @@ void cmLocalNinjaGenerator::Generate()
if (!showIncludesPrefix.empty()) {
cmGlobalNinjaGenerator::WriteComment(this->GetRulesFileStream(),
"localized /showIncludes string");
- this->GetRulesFileStream() << "msvc_deps_prefix = " << showIncludesPrefix
- << "\n\n";
+ this->GetRulesFileStream()
+ << "msvc_deps_prefix = " << showIncludesPrefix << "\n\n";
}
}
@@ -465,7 +465,7 @@ void cmLocalNinjaGenerator::WriteCustomCommandBuildStatement(
}
#if 0
-#error TODO: Once CC in an ExternalProject target must provide the \
+# error TODO: Once CC in an ExternalProject target must provide the \
file of each imported target that has an add_dependencies pointing \
at us. How to know which ExternalProject step actually provides it?
#endif
diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx
index cf2a7b9..9fd2ddb 100644
--- a/Source/cmLocalUnixMakefileGenerator3.cxx
+++ b/Source/cmLocalUnixMakefileGenerator3.cxx
@@ -35,8 +35,8 @@
// C/C++ scanner is needed for bootstrapping CMake.
#include "cmDependsC.h"
#ifdef CMAKE_BUILD_WITH_CMAKE
-#include "cmDependsFortran.h"
-#include "cmDependsJava.h"
+# include "cmDependsFortran.h"
+# include "cmDependsJava.h"
#endif
// Escape special characters in Makefile dependency lines
@@ -786,13 +786,14 @@ void cmLocalUnixMakefileGenerator3::WriteSpecialTargetsBottom(
this->CreateCDCommand(commands, this->GetBinaryDirectory(),
this->GetCurrentBinaryDirectory());
}
- this->WriteMakeRule(
- makefileStream, "Special rule to run CMake to check the build system "
- "integrity.\n"
- "No rule that depends on this can have "
- "commands that come from listfiles\n"
- "because they might be regenerated.",
- "cmake_check_build_system", no_depends, commands, true);
+ this->WriteMakeRule(makefileStream,
+ "Special rule to run CMake to check the build system "
+ "integrity.\n"
+ "No rule that depends on this can have "
+ "commands that come from listfiles\n"
+ "because they might be regenerated.",
+ "cmake_check_build_system", no_depends, commands,
+ true);
}
}
@@ -1521,9 +1522,10 @@ void cmLocalUnixMakefileGenerator3::WriteLocalAllRules(
static_cast<cmGlobalUnixMakefileGenerator3*>(this->GlobalGenerator);
if (gg->AllowNotParallel()) {
std::vector<std::string> no_depends;
- this->WriteMakeRule(ruleFileStream, "Allow only one \"make -f "
- "Makefile2\" at a time, but pass "
- "parallelism.",
+ this->WriteMakeRule(ruleFileStream,
+ "Allow only one \"make -f "
+ "Makefile2\" at a time, but pass "
+ "parallelism.",
".NOTPARALLEL", no_depends, no_commands, false);
}
}
diff --git a/Source/cmLocalVisualStudio10Generator.cxx b/Source/cmLocalVisualStudio10Generator.cxx
index 5b6e781..0c2c64e 100644
--- a/Source/cmLocalVisualStudio10Generator.cxx
+++ b/Source/cmLocalVisualStudio10Generator.cxx
@@ -91,8 +91,9 @@ void cmLocalVisualStudio10Generator::GenerateTargetsDepthFirst(
this->CreateSingleVCProj(target->GetName(), target);
} else {
cmVisualStudio10TargetGenerator tg(
- target, static_cast<cmGlobalVisualStudio10Generator*>(
- this->GetGlobalGenerator()));
+ target,
+ static_cast<cmGlobalVisualStudio10Generator*>(
+ this->GetGlobalGenerator()));
tg.Generate();
}
}
diff --git a/Source/cmMSVC60LinkLineComputer.cxx b/Source/cmMSVC60LinkLineComputer.cxx
index 5298d1a..74c9435 100644
--- a/Source/cmMSVC60LinkLineComputer.cxx
+++ b/Source/cmMSVC60LinkLineComputer.cxx
@@ -4,7 +4,7 @@
#include "cmMSVC60LinkLineComputer.h"
#if defined(_WIN32) && !defined(__CYGWIN__)
-#include "cmSystemTools.h"
+# include "cmSystemTools.h"
#endif
class cmOutputConverter;
diff --git a/Source/cmMachO.h b/Source/cmMachO.h
index aa17c6a..5886d76 100644
--- a/Source/cmMachO.h
+++ b/Source/cmMachO.h
@@ -9,7 +9,7 @@
#include <string>
#if !defined(CMAKE_USE_MACH_PARSER)
-#error "This file may be included only if CMAKE_USE_MACH_PARSER is enabled."
+# error "This file may be included only if CMAKE_USE_MACH_PARSER is enabled."
#endif
class cmMachOInternal;
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index d67d280..3c7a4cf 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -43,7 +43,7 @@
#include "cmake.h"
#ifdef CMAKE_BUILD_WITH_CMAKE
-#include "cmVariableWatch.h"
+# include "cmVariableWatch.h"
#endif
class cmMessenger;
@@ -1705,8 +1705,9 @@ void cmMakefile::AddCacheDefinition(const std::string& name, const char* value,
// must be outside the following if() to keep it alive long enough
std::string nvalue;
- if (existingValue && (this->GetState()->GetCacheEntryType(name) ==
- cmStateEnums::UNINITIALIZED)) {
+ if (existingValue &&
+ (this->GetState()->GetCacheEntryType(name) ==
+ cmStateEnums::UNINITIALIZED)) {
// if this is not a force, then use the value from the cache
// if it is a force, then use the value being passed in
if (!force) {
@@ -2374,10 +2375,11 @@ const char* cmMakefile::GetDefinition(const std::string& name) const
#ifdef CMAKE_BUILD_WITH_CMAKE
cmVariableWatch* vv = this->GetVariableWatch();
if (vv && !this->SuppressWatches) {
- bool const watch_function_executed = vv->VariableAccessed(
- name, def ? cmVariableWatch::VARIABLE_READ_ACCESS
- : cmVariableWatch::UNKNOWN_VARIABLE_READ_ACCESS,
- def, this);
+ bool const watch_function_executed =
+ vv->VariableAccessed(name,
+ def ? cmVariableWatch::VARIABLE_READ_ACCESS
+ : cmVariableWatch::UNKNOWN_VARIABLE_READ_ACCESS,
+ def, this);
if (watch_function_executed) {
// A callback was executed and may have caused re-allocation of the
@@ -2630,7 +2632,12 @@ cmake::MessageType cmMakefile::ExpandVariablesInStringOld(
return mtype;
}
-typedef enum { NORMAL, ENVIRONMENT, CACHE } t_domain;
+typedef enum
+{
+ NORMAL,
+ ENVIRONMENT,
+ CACHE
+} t_domain;
struct t_lookup
{
t_lookup()
@@ -2819,9 +2826,11 @@ cmake::MessageType cmMakefile::ExpandVariablesInStringNew(
const char* nextAt = strchr(in + 1, '@');
if (nextAt && nextAt != in + 1 &&
nextAt ==
- in + 1 + strspn(in + 1, "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
- "abcdefghijklmnopqrstuvwxyz"
- "0123456789/_.+-")) {
+ in + 1 +
+ strspn(in + 1,
+ "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
+ "abcdefghijklmnopqrstuvwxyz"
+ "0123456789/_.+-")) {
std::string variable(in + 1, nextAt - in - 1);
std::string varresult = this->GetSafeDefinition(variable);
if (escapeQuotes) {
@@ -3298,7 +3307,8 @@ int cmMakefile::TryCompile(const std::string& srcdir,
cmGlobalGenerator* gg =
cm.CreateGlobalGenerator(this->GetGlobalGenerator()->GetName());
if (!gg) {
- this->IssueMessage(cmake::INTERNAL_ERROR, "Global generator '" +
+ this->IssueMessage(cmake::INTERNAL_ERROR,
+ "Global generator '" +
this->GetGlobalGenerator()->GetName() +
"' could not be created.");
cmSystemTools::SetFatalErrorOccured();
@@ -3863,8 +3873,9 @@ cmTarget* cmMakefile::AddImportedTarget(const std::string& name,
{
// Create the target.
std::unique_ptr<cmTarget> target(
- new cmTarget(name, type, global ? cmTarget::VisibilityImportedGlobally
- : cmTarget::VisibilityImported,
+ new cmTarget(name, type,
+ global ? cmTarget::VisibilityImportedGlobally
+ : cmTarget::VisibilityImported,
this));
// Add to the set of available imported targets.
@@ -4311,8 +4322,9 @@ bool cmMakefile::CompileFeatureKnown(cmTarget const* target,
} else {
e << "Specified";
}
- e << " unknown feature \"" << feature << "\" for "
- "target \""
+ e << " unknown feature \"" << feature
+ << "\" for "
+ "target \""
<< target->GetName() << "\".";
if (error) {
*error = e.str();
diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h
index ac7baae..a7c8df5 100644
--- a/Source/cmMakefile.h
+++ b/Source/cmMakefile.h
@@ -27,7 +27,7 @@
#include "cmake.h"
#if defined(CMAKE_BUILD_WITH_CMAKE)
-#include "cmSourceGroup.h"
+# include "cmSourceGroup.h"
#endif
class cmCommand;
@@ -282,8 +282,8 @@ public:
//@{
/**
- * Set, Push, Pop policy values for CMake.
- */
+ * Set, Push, Pop policy values for CMake.
+ */
bool SetPolicy(cmPolicies::PolicyID id, cmPolicies::PolicyStatus status);
bool SetPolicy(const char* id, cmPolicies::PolicyStatus status);
cmPolicies::PolicyStatus GetPolicyStatus(cmPolicies::PolicyID id,
@@ -724,6 +724,7 @@ public:
~FunctionPushPop();
void Quiet() { this->ReportError = false; }
+
private:
cmMakefile* Makefile;
bool ReportError;
@@ -737,6 +738,7 @@ public:
~MacroPushPop();
void Quiet() { this->ReportError = false; }
+
private:
cmMakefile* Makefile;
bool ReportError;
@@ -767,6 +769,7 @@ public:
this->Makefile->PushScope();
}
~ScopePushPop() { this->Makefile->PopScope(); }
+
private:
cmMakefile* Makefile;
};
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx
index 3998823..1f65f08 100644
--- a/Source/cmMakefileTargetGenerator.cxx
+++ b/Source/cmMakefileTargetGenerator.cxx
@@ -645,8 +645,9 @@ void cmMakefileTargetGenerator::WriteObjectBuildFile(
// See if we need to use a compiler launcher like ccache or distcc
std::string compilerLauncher;
- if (!compileCommands.empty() && (lang == "C" || lang == "CXX" ||
- lang == "Fortran" || lang == "CUDA")) {
+ if (!compileCommands.empty() &&
+ (lang == "C" || lang == "CXX" || lang == "Fortran" ||
+ lang == "CUDA")) {
std::string const clauncher_prop = lang + "_COMPILER_LAUNCHER";
const char* clauncher =
this->GeneratorTarget->GetProperty(clauncher_prop);
@@ -1027,10 +1028,11 @@ void cmMakefileTargetGenerator::WriteTargetDependRules()
// paths. Make sure PWD is set to the original name of the home
// output directory to help cmSystemTools to create the same
// translation table for the dependency scanning process.
- depCmd << "cd " << (this->LocalGenerator->ConvertToOutputFormat(
- cmSystemTools::CollapseFullPath(
- this->LocalGenerator->GetBinaryDirectory()),
- cmOutputConverter::SHELL))
+ depCmd << "cd "
+ << (this->LocalGenerator->ConvertToOutputFormat(
+ cmSystemTools::CollapseFullPath(
+ this->LocalGenerator->GetBinaryDirectory()),
+ cmOutputConverter::SHELL))
<< " && ";
#endif
// Generate a call this signature:
diff --git a/Source/cmMessenger.cxx b/Source/cmMessenger.cxx
index 3ae5bc5..a81428a 100644
--- a/Source/cmMessenger.cxx
+++ b/Source/cmMessenger.cxx
@@ -8,7 +8,7 @@
#include "cmSystemTools.h"
#if defined(CMAKE_BUILD_WITH_CMAKE)
-#include "cmsys/SystemInformation.hxx"
+# include "cmsys/SystemInformation.hxx"
#endif
#include <sstream>
diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx
index 542bb0a..a4d3e06 100644
--- a/Source/cmNinjaNormalTargetGenerator.cxx
+++ b/Source/cmNinjaNormalTargetGenerator.cxx
@@ -148,16 +148,18 @@ std::string cmNinjaNormalTargetGenerator::LanguageLinkerRule() const
{
return this->TargetLinkLanguage + "_" +
cmState::GetTargetTypeName(this->GetGeneratorTarget()->GetType()) +
- "_LINKER__" + cmGlobalNinjaGenerator::EncodeRuleName(
- this->GetGeneratorTarget()->GetName());
+ "_LINKER__" +
+ cmGlobalNinjaGenerator::EncodeRuleName(
+ this->GetGeneratorTarget()->GetName());
}
std::string cmNinjaNormalTargetGenerator::LanguageLinkerDeviceRule() const
{
return this->TargetLinkLanguage + "_" +
cmState::GetTargetTypeName(this->GetGeneratorTarget()->GetType()) +
- "_DEVICE_LINKER__" + cmGlobalNinjaGenerator::EncodeRuleName(
- this->GetGeneratorTarget()->GetName());
+ "_DEVICE_LINKER__" +
+ cmGlobalNinjaGenerator::EncodeRuleName(
+ this->GetGeneratorTarget()->GetName());
}
struct cmNinjaRemoveNoOpCommands
@@ -413,8 +415,9 @@ void cmNinjaNormalTargetGenerator::WriteLinkRule(bool useResponseFile)
this->GetGlobalGenerator()->AddRule(
"CMAKE_SYMLINK_EXECUTABLE",
this->GetLocalGenerator()->BuildCommandLine(commandLines),
- "Creating executable symlink $out", "Rule for creating "
- "executable symlink.",
+ "Creating executable symlink $out",
+ "Rule for creating "
+ "executable symlink.",
/*depfile*/ "",
/*deptype*/ "",
/*rspfile*/ "",
@@ -430,8 +433,9 @@ void cmNinjaNormalTargetGenerator::WriteLinkRule(bool useResponseFile)
this->GetGlobalGenerator()->AddRule(
"CMAKE_SYMLINK_LIBRARY",
this->GetLocalGenerator()->BuildCommandLine(commandLines),
- "Creating library symlink $out", "Rule for creating "
- "library symlink.",
+ "Creating library symlink $out",
+ "Rule for creating "
+ "library symlink.",
/*depfile*/ "",
/*deptype*/ "",
/*rspfile*/ "",
@@ -772,9 +776,9 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement()
// Write comments.
cmGlobalNinjaGenerator::WriteDivider(this->GetBuildFileStream());
const cmStateEnums::TargetType targetType = gt.GetType();
- this->GetBuildFileStream() << "# Link build statements for "
- << cmState::GetTargetTypeName(targetType)
- << " target " << this->GetTargetName() << "\n\n";
+ this->GetBuildFileStream()
+ << "# Link build statements for " << cmState::GetTargetTypeName(targetType)
+ << " target " << this->GetTargetName() << "\n\n";
cmNinjaDeps emptyDeps;
cmNinjaVars vars;
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx
index 7dfce57..9d41948 100644
--- a/Source/cmNinjaTargetGenerator.cxx
+++ b/Source/cmNinjaTargetGenerator.cxx
@@ -534,10 +534,12 @@ void cmNinjaTargetGenerator::WriteCompileRule(const std::string& lang)
std::string const cmake = this->GetLocalGenerator()->ConvertToOutputFormat(
cmSystemTools::GetCMakeCommand(), cmLocalGenerator::SHELL);
ppCmds.push_back(
- cmake + " -E cmake_ninja_depends"
- " --tdi=" +
- tdi + " --pp=$out"
- " --dep=$DEP_FILE" +
+ cmake +
+ " -E cmake_ninja_depends"
+ " --tdi=" +
+ tdi +
+ " --pp=$out"
+ " --dep=$DEP_FILE" +
(needDyndep ? " --obj=$OBJ_FILE --ddi=$DYNDEP_INTERMEDIATE_FILE" : ""));
std::string const ppCmdLine =
@@ -568,10 +570,12 @@ void cmNinjaTargetGenerator::WriteCompileRule(const std::string& lang)
// Run CMake dependency scanner on preprocessed output.
std::string const cmake = this->GetLocalGenerator()->ConvertToOutputFormat(
cmSystemTools::GetCMakeCommand(), cmLocalGenerator::SHELL);
- ddCmds.push_back(cmake + " -E cmake_ninja_dyndep"
- " --tdi=" +
- tdi + " --dd=$out"
- " " +
+ ddCmds.push_back(cmake +
+ " -E cmake_ninja_dyndep"
+ " --tdi=" +
+ tdi +
+ " --dd=$out"
+ " " +
ddInput);
std::string const ddCmdLine =
@@ -1150,10 +1154,11 @@ void cmNinjaTargetGenerator::ExportObjectCompileCommand(
std::string escapedSourceFileName = sourceFileName;
if (!cmSystemTools::FileIsFullPath(sourceFileName)) {
- escapedSourceFileName = cmSystemTools::CollapseFullPath(
- escapedSourceFileName, this->GetGlobalGenerator()
- ->GetCMakeInstance()
- ->GetHomeOutputDirectory());
+ escapedSourceFileName =
+ cmSystemTools::CollapseFullPath(escapedSourceFileName,
+ this->GetGlobalGenerator()
+ ->GetCMakeInstance()
+ ->GetHomeOutputDirectory());
}
escapedSourceFileName = this->LocalGenerator->ConvertToOutputFormat(
diff --git a/Source/cmParseArgumentsCommand.cxx b/Source/cmParseArgumentsCommand.cxx
index 9a5b097..2d61cc3 100644
--- a/Source/cmParseArgumentsCommand.cxx
+++ b/Source/cmParseArgumentsCommand.cxx
@@ -54,8 +54,8 @@ bool cmParseArgumentsCommand::InitialPass(std::vector<std::string> const& args,
parseFromArgV = true;
argIter++; // move past PARSE_ARGV
if (!cmSystemTools::StringToULong(argIter->c_str(), &argvStart)) {
- this->Makefile->IssueMessage(cmake::FATAL_ERROR, "PARSE_ARGV index '" +
- *argIter +
+ this->Makefile->IssueMessage(cmake::FATAL_ERROR,
+ "PARSE_ARGV index '" + *argIter +
"' is not an unsigned integer");
cmSystemTools::SetFatalErrorOccured();
return true;
diff --git a/Source/cmPolicies.cxx b/Source/cmPolicies.cxx
index dba22b3..ba50fb8 100644
--- a/Source/cmPolicies.cxx
+++ b/Source/cmPolicies.cxx
@@ -303,14 +303,17 @@ bool cmPolicies::GetPolicyID(const char* id, cmPolicies::PolicyID& pid)
std::string cmPolicies::GetPolicyWarning(cmPolicies::PolicyID id)
{
std::ostringstream msg;
- msg << "Policy " << idToString(id) << " is not set: "
- ""
- << idToShortDescription(id) << " "
- "Run \"cmake --help-policy "
- << idToString(id) << "\" for "
- "policy details. "
- "Use the cmake_policy command to set the policy "
- "and suppress this warning.";
+ msg << "Policy " << idToString(id)
+ << " is not set: "
+ ""
+ << idToShortDescription(id)
+ << " "
+ "Run \"cmake --help-policy "
+ << idToString(id)
+ << "\" for "
+ "policy details. "
+ "Use the cmake_policy command to set the policy "
+ "and suppress this warning.";
return msg.str();
}
@@ -334,19 +337,22 @@ std::string cmPolicies::GetPolicyDeprecatedWarning(cmPolicies::PolicyID id)
std::string cmPolicies::GetRequiredPolicyError(cmPolicies::PolicyID id)
{
std::ostringstream error;
- error << "Policy " << idToString(id) << " is not set to NEW: "
- ""
- << idToShortDescription(id) << " "
- "Run \"cmake --help-policy "
+ error << "Policy " << idToString(id)
+ << " is not set to NEW: "
+ ""
+ << idToShortDescription(id)
+ << " "
+ "Run \"cmake --help-policy "
<< idToString(id)
<< "\" for "
"policy details. "
"CMake now requires this policy to be set to NEW by the project. "
"The policy may be set explicitly using the code\n"
" cmake_policy(SET "
- << idToString(id) << " NEW)\n"
- "or by upgrading all policies with the code\n"
- " cmake_policy(VERSION "
+ << idToString(id)
+ << " NEW)\n"
+ "or by upgrading all policies with the code\n"
+ " cmake_policy(VERSION "
<< idToVersion(id)
<< ") # or later\n"
"Run \"cmake --help-command cmake_policy\" for more information.";
diff --git a/Source/cmPolicies.h b/Source/cmPolicies.h
index 7190c36..3fe0c84 100644
--- a/Source/cmPolicies.h
+++ b/Source/cmPolicies.h
@@ -155,8 +155,9 @@ class cmMakefile;
3, 0, 0, cmPolicies::WARN) \
SELECT(POLICY, CMP0051, "List TARGET_OBJECTS in SOURCES target property.", \
3, 1, 0, cmPolicies::WARN) \
- SELECT(POLICY, CMP0052, "Reject source and build dirs in installed " \
- "INTERFACE_INCLUDE_DIRECTORIES.", \
+ SELECT(POLICY, CMP0052, \
+ "Reject source and build dirs in installed " \
+ "INTERFACE_INCLUDE_DIRECTORIES.", \
3, 1, 0, cmPolicies::WARN) \
SELECT(POLICY, CMP0053, \
"Simplify variable reference and escape sequence evaluation.", 3, 1, \
diff --git a/Source/cmProcessOutput.cxx b/Source/cmProcessOutput.cxx
index 8371706..e4ca426 100644
--- a/Source/cmProcessOutput.cxx
+++ b/Source/cmProcessOutput.cxx
@@ -4,7 +4,7 @@
#include "cmProcessOutput.h"
#if defined(_WIN32)
-#include <windows.h>
+# include <windows.h>
unsigned int cmProcessOutput::defaultCodepage =
KWSYS_ENCODING_DEFAULT_CODEPAGE;
#endif
diff --git a/Source/cmProcessOutput.h b/Source/cmProcessOutput.h
index b5ec4a8..400354c 100644
--- a/Source/cmProcessOutput.h
+++ b/Source/cmProcessOutput.h
@@ -28,10 +28,10 @@ public:
};
/**
- * Find encoding enum value for given encoding \a name.
- * \param name a encoding name.
- * \return encoding enum value or Auto if \a name was not found.
- */
+ * Find encoding enum value for given encoding \a name.
+ * \param name a encoding name.
+ * \return encoding enum value or Auto if \a name was not found.
+ */
static Encoding FindEncoding(std::string const& name);
/// The code page that is used as internal encoding to which we will encode.
diff --git a/Source/cmProcessTools.h b/Source/cmProcessTools.h
index 23fa74e..f1c2a22 100644
--- a/Source/cmProcessTools.h
+++ b/Source/cmProcessTools.h
@@ -35,6 +35,7 @@ public:
}
virtual ~OutputParser() {}
+
protected:
/** Implement in a subclass to process a chunk of data. It should
return true only if it is interested in more data. */
diff --git a/Source/cmQtAutoGen.cxx b/Source/cmQtAutoGen.cxx
index 6e9ca44..000529d 100644
--- a/Source/cmQtAutoGen.cxx
+++ b/Source/cmQtAutoGen.cxx
@@ -55,8 +55,9 @@ void MergeOptions(std::vector<std::string>& baseOpts,
}
}
// Test if this is a value option and change the existing value
- if (!optName.empty() && (std::find(valueOpts.begin(), valueOpts.end(),
- optName) != valueOpts.end())) {
+ if (!optName.empty() &&
+ (std::find(valueOpts.begin(), valueOpts.end(), optName) !=
+ valueOpts.end())) {
const Iter existItNext(existIt + 1);
const CIter fitNext(fit + 1);
if ((existItNext != baseOpts.end()) && (fitNext != fitEnd)) {
diff --git a/Source/cmQtAutoGenInitializer.cxx b/Source/cmQtAutoGenInitializer.cxx
index d59f3a7..34196d9 100644
--- a/Source/cmQtAutoGenInitializer.cxx
+++ b/Source/cmQtAutoGenInitializer.cxx
@@ -1,7 +1,7 @@
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
file Copyright.txt or https://cmake.org/licensing for details. */
-#include "cmQtAutoGen.h"
#include "cmQtAutoGenInitializer.h"
+#include "cmQtAutoGen.h"
#include "cmAlgorithms.h"
#include "cmCustomCommand.h"
@@ -913,17 +913,18 @@ void cmQtAutoGenInitializer::SetupCustomTargets()
std::vector<std::string> const& list) {
CWrite(key, cmJoin(list, ";"));
};
- auto CWriteNestedLists = [&CWrite](
- const char* key, std::vector<std::vector<std::string>> const& lists) {
- std::vector<std::string> seplist;
- for (const std::vector<std::string>& list : lists) {
- std::string blist = "{";
- blist += cmJoin(list, ";");
- blist += "}";
- seplist.push_back(std::move(blist));
- }
- CWrite(key, cmJoin(seplist, cmQtAutoGen::ListSep));
- };
+ auto CWriteNestedLists =
+ [&CWrite](const char* key,
+ std::vector<std::vector<std::string>> const& lists) {
+ std::vector<std::string> seplist;
+ for (const std::vector<std::string>& list : lists) {
+ std::string blist = "{";
+ blist += cmJoin(list, ";");
+ blist += "}";
+ seplist.push_back(std::move(blist));
+ }
+ CWrite(key, cmJoin(seplist, cmQtAutoGen::ListSep));
+ };
auto CWriteSet = [&CWrite](const char* key,
std::set<std::string> const& list) {
CWrite(key, cmJoin(list, ";"));
@@ -1023,13 +1024,14 @@ void cmQtAutoGenInitializer::SetupCustomTargets()
ofs << "set(" << key << " "
<< cmOutputConverter::EscapeForCMake(value) << ")\n";
};
- auto CWriteMap = [&ofs](
- const char* key, std::map<std::string, std::string> const& map) {
- for (auto const& item : map) {
- ofs << "set(" << key << "_" << item.first << " "
- << cmOutputConverter::EscapeForCMake(item.second) << ")\n";
- }
- };
+ auto CWriteMap =
+ [&ofs](const char* key,
+ std::map<std::string, std::string> const& map) {
+ for (auto const& item : map) {
+ ofs << "set(" << key << "_" << item.first << " "
+ << cmOutputConverter::EscapeForCMake(item.second) << ")\n";
+ }
+ };
// Write
ofs << "# Configurations\n";
diff --git a/Source/cmQtAutoGenerator.cxx b/Source/cmQtAutoGenerator.cxx
index 750e1ed..7aa792f 100644
--- a/Source/cmQtAutoGenerator.cxx
+++ b/Source/cmQtAutoGenerator.cxx
@@ -1,7 +1,7 @@
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
file Copyright.txt or https://cmake.org/licensing for details. */
-#include "cmQtAutoGen.h"
#include "cmQtAutoGenerator.h"
+#include "cmQtAutoGen.h"
#include "cmsys/FStream.hxx"
diff --git a/Source/cmQtAutoGeneratorMocUic.cxx b/Source/cmQtAutoGeneratorMocUic.cxx
index 80db6ac..f196b97 100644
--- a/Source/cmQtAutoGeneratorMocUic.cxx
+++ b/Source/cmQtAutoGeneratorMocUic.cxx
@@ -1,7 +1,7 @@
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
file Copyright.txt or https://cmake.org/licensing for details. */
-#include "cmQtAutoGen.h"
#include "cmQtAutoGeneratorMocUic.h"
+#include "cmQtAutoGen.h"
#include <algorithm>
#include <array>
@@ -18,7 +18,7 @@
#include "cmake.h"
#if defined(__APPLE__)
-#include <unistd.h>
+# include <unistd.h>
#endif
// -- Class methods
@@ -1330,8 +1330,9 @@ bool cmQtAutoGeneratorMocUic::Init(cmMakefile* makefile)
std::string error;
// Insert default filter for Q_PLUGIN_METADATA
if (Base().QtVersionMajor != 4) {
- pushFilter("Q_PLUGIN_METADATA", "[\n][ \t]*Q_PLUGIN_METADATA[ \t]*\\("
- "[^\\)]*FILE[ \t]*\"([^\"]+)\"",
+ pushFilter("Q_PLUGIN_METADATA",
+ "[\n][ \t]*Q_PLUGIN_METADATA[ \t]*\\("
+ "[^\\)]*FILE[ \t]*\"([^\"]+)\"",
error);
}
// Insert user defined dependency filters
diff --git a/Source/cmQtAutoGeneratorRcc.cxx b/Source/cmQtAutoGeneratorRcc.cxx
index fdb556a..3064895 100644
--- a/Source/cmQtAutoGeneratorRcc.cxx
+++ b/Source/cmQtAutoGeneratorRcc.cxx
@@ -1,7 +1,7 @@
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
file Copyright.txt or https://cmake.org/licensing for details. */
-#include "cmQtAutoGen.h"
#include "cmQtAutoGeneratorRcc.h"
+#include "cmQtAutoGen.h"
#include "cmAlgorithms.h"
#include "cmCryptoHash.h"
diff --git a/Source/cmRST.cxx b/Source/cmRST.cxx
index d9e5bcb..12817ae 100644
--- a/Source/cmRST.cxx
+++ b/Source/cmRST.cxx
@@ -154,8 +154,9 @@ void cmRST::ProcessLine(std::string const& line)
this->LastLineEndedInColonColon = false;
// A line starting in .. is an explicit markup start.
- if (line == ".." || (line.size() >= 3 && line[0] == '.' && line[1] == '.' &&
- isspace(line[2]))) {
+ if (line == ".." ||
+ (line.size() >= 3 && line[0] == '.' && line[1] == '.' &&
+ isspace(line[2]))) {
this->Reset();
this->Markup =
(line.find_first_not_of(" \t", 2) == std::string::npos ? MarkupEmpty
diff --git a/Source/cmServerConnection.cxx b/Source/cmServerConnection.cxx
index 78c8f06..1fc8cf8 100644
--- a/Source/cmServerConnection.cxx
+++ b/Source/cmServerConnection.cxx
@@ -9,9 +9,9 @@
#include <algorithm>
#ifdef _WIN32
-#include "io.h"
+# include "io.h"
#else
-#include <unistd.h>
+# include <unistd.h>
#endif
#include <cassert>
diff --git a/Source/cmServerProtocol.cxx b/Source/cmServerProtocol.cxx
index 7c10110..c267160 100644
--- a/Source/cmServerProtocol.cxx
+++ b/Source/cmServerProtocol.cxx
@@ -300,7 +300,8 @@ static bool getOrTestValue(cmState* state, const std::string& key,
value = cachedValue;
}
if (!cachedValue.empty() && cachedValue != value) {
- setErrorMessage(errorMessage, std::string("\"") + key +
+ setErrorMessage(errorMessage,
+ std::string("\"") + key +
"\" is set but incompatible with configured " +
keyDescription + " value.");
return false;
@@ -320,7 +321,8 @@ bool cmServerProtocol1::DoActivate(const cmServerRequest& request,
std::string platform = request.Data[kPLATFORM_KEY].asString();
if (buildDirectory.empty()) {
- setErrorMessage(errorMessage, std::string("\"") + kBUILD_DIRECTORY_KEY +
+ setErrorMessage(errorMessage,
+ std::string("\"") + kBUILD_DIRECTORY_KEY +
"\" is missing.");
return false;
}
@@ -328,7 +330,8 @@ bool cmServerProtocol1::DoActivate(const cmServerRequest& request,
cmake* cm = CMakeInstance();
if (cmSystemTools::PathExists(buildDirectory)) {
if (!cmSystemTools::FileIsDirectory(buildDirectory)) {
- setErrorMessage(errorMessage, std::string("\"") + kBUILD_DIRECTORY_KEY +
+ setErrorMessage(errorMessage,
+ std::string("\"") + kBUILD_DIRECTORY_KEY +
"\" exists but is not a directory.");
return false;
}
@@ -369,17 +372,20 @@ bool cmServerProtocol1::DoActivate(const cmServerRequest& request,
}
if (sourceDirectory.empty()) {
- setErrorMessage(errorMessage, std::string("\"") + kSOURCE_DIRECTORY_KEY +
+ setErrorMessage(errorMessage,
+ std::string("\"") + kSOURCE_DIRECTORY_KEY +
"\" is unset but required.");
return false;
}
if (!cmSystemTools::FileIsDirectory(sourceDirectory)) {
- setErrorMessage(errorMessage, std::string("\"") + kSOURCE_DIRECTORY_KEY +
+ setErrorMessage(errorMessage,
+ std::string("\"") + kSOURCE_DIRECTORY_KEY +
"\" is not a directory.");
return false;
}
if (generator.empty()) {
- setErrorMessage(errorMessage, std::string("\"") + kGENERATOR_KEY +
+ setErrorMessage(errorMessage,
+ std::string("\"") + kGENERATOR_KEY +
"\" is unset but required.");
return false;
}
@@ -391,7 +397,8 @@ bool cmServerProtocol1::DoActivate(const cmServerRequest& request,
return info.name == generator;
});
if (baseIt == generators.end()) {
- setErrorMessage(errorMessage, std::string("Generator \"") + generator +
+ setErrorMessage(errorMessage,
+ std::string("Generator \"") + generator +
"\" not supported.");
return false;
}
@@ -629,8 +636,9 @@ struct hash<LanguageData>
size_t result =
hash<std::string>()(in.Language) ^ hash<std::string>()(in.Flags);
for (auto const& i : in.IncludePathList) {
- result = result ^ (hash<std::string>()(i.first) ^
- (i.second ? std::numeric_limits<size_t>::max() : 0));
+ result = result ^
+ (hash<std::string>()(i.first) ^
+ (i.second ? std::numeric_limits<size_t>::max() : 0));
}
for (auto const& i : in.Defines) {
result = result ^ hash<std::string>()(i);
@@ -726,8 +734,9 @@ static Json::Value DumpSourceFilesList(
for (const auto& include : includes) {
fileData.IncludePathList.push_back(
- std::make_pair(include, target->IsSystemIncludeDirectory(
- include, config, fileData.Language)));
+ std::make_pair(include,
+ target->IsSystemIncludeDirectory(
+ include, config, fileData.Language)));
}
}
@@ -745,8 +754,9 @@ static Json::Value DumpSourceFilesList(
const std::string defPropName =
"COMPILE_DEFINITIONS_" + cmSystemTools::UpperCase(config);
if (const char* config_defs = file->GetProperty(defPropName)) {
- lg->AppendDefines(defines, genexInterpreter.Evaluate(
- config_defs, COMPILE_DEFINITIONS));
+ lg->AppendDefines(
+ defines,
+ genexInterpreter.Evaluate(config_defs, COMPILE_DEFINITIONS));
}
defines.insert(ld.Defines.begin(), ld.Defines.end());
diff --git a/Source/cmSourceFileLocation.h b/Source/cmSourceFileLocation.h
index f325e54..886a184 100644
--- a/Source/cmSourceFileLocation.h
+++ b/Source/cmSourceFileLocation.h
@@ -81,6 +81,7 @@ public:
* Get the cmMakefile instance for which the source file was created.
*/
cmMakefile const* GetMakefile() const { return this->Makefile; }
+
private:
cmMakefile const* const Makefile;
bool AmbiguousDirectory;
diff --git a/Source/cmStandardLexer.h b/Source/cmStandardLexer.h
index b212c7e..13f7622 100644
--- a/Source/cmStandardLexer.h
+++ b/Source/cmStandardLexer.h
@@ -7,41 +7,41 @@
/* Disable some warnings. */
#if defined(_MSC_VER)
-#pragma warning(disable : 4018)
-#pragma warning(disable : 4127)
-#pragma warning(disable : 4131)
-#pragma warning(disable : 4244)
-#pragma warning(disable : 4251)
-#pragma warning(disable : 4267)
-#pragma warning(disable : 4305)
-#pragma warning(disable : 4309)
-#pragma warning(disable : 4706)
-#pragma warning(disable : 4786)
+# pragma warning(disable : 4018)
+# pragma warning(disable : 4127)
+# pragma warning(disable : 4131)
+# pragma warning(disable : 4244)
+# pragma warning(disable : 4251)
+# pragma warning(disable : 4267)
+# pragma warning(disable : 4305)
+# pragma warning(disable : 4309)
+# pragma warning(disable : 4706)
+# pragma warning(disable : 4786)
#endif
#if defined(__GNUC__) && !defined(__INTEL_COMPILER)
-#if ((__GNUC__ * 100) + __GNUC_MINOR__) >= 402
-#pragma GCC diagnostic ignored "-Wconversion"
-#pragma GCC diagnostic ignored "-Wsign-compare"
-#endif
-#if ((__GNUC__ * 100) + __GNUC_MINOR__) >= 403
-#pragma GCC diagnostic ignored "-Wsign-conversion"
-#endif
+# if ((__GNUC__ * 100) + __GNUC_MINOR__) >= 402
+# pragma GCC diagnostic ignored "-Wconversion"
+# pragma GCC diagnostic ignored "-Wsign-compare"
+# endif
+# if ((__GNUC__ * 100) + __GNUC_MINOR__) >= 403
+# pragma GCC diagnostic ignored "-Wsign-conversion"
+# endif
#endif
/* Make sure isatty is available. */
#if defined(_WIN32) && !defined(__CYGWIN__)
-#include <io.h>
-#if defined(_MSC_VER)
-#define isatty _isatty
-#endif
+# include <io.h>
+# if defined(_MSC_VER)
+# define isatty _isatty
+# endif
#else
-#include <unistd.h> // IWYU pragma: export
+# include <unistd.h> // IWYU pragma: export
#endif
/* Make sure malloc and free are available on QNX. */
#ifdef __QNX__
-#include <malloc.h>
+# include <malloc.h>
#endif
/* Disable features we do not need. */
diff --git a/Source/cmStateSnapshot.cxx b/Source/cmStateSnapshot.cxx
index 0229a77..8f5f58c 100644
--- a/Source/cmStateSnapshot.cxx
+++ b/Source/cmStateSnapshot.cxx
@@ -19,11 +19,11 @@
#include "cmake.h"
#if !defined(_WIN32)
-#include <sys/utsname.h>
+# include <sys/utsname.h>
#endif
#if defined(__CYGWIN__)
-#include "cmSystemTools.h"
+# include "cmSystemTools.h"
#endif
cmStateSnapshot::cmStateSnapshot(cmState* state)
diff --git a/Source/cmStringCommand.cxx b/Source/cmStringCommand.cxx
index dabec47..ed88a1e 100644
--- a/Source/cmStringCommand.cxx
+++ b/Source/cmStringCommand.cxx
@@ -348,8 +348,8 @@ bool cmStringCommand::RegexReplace(std::vector<std::string> const& args)
cmStringReplaceHelper replaceHelper(regex, replace, this->Makefile);
if (!replaceHelper.IsReplaceExpressionValid()) {
- this->SetError("sub-command REGEX, mode REPLACE: " +
- replaceHelper.GetError() + ".");
+ this->SetError(
+ "sub-command REGEX, mode REPLACE: " + replaceHelper.GetError() + ".");
return false;
}
@@ -369,8 +369,8 @@ bool cmStringCommand::RegexReplace(std::vector<std::string> const& args)
std::string output;
if (!replaceHelper.Replace(input, output)) {
- this->SetError("sub-command REGEX, mode REPLACE: " +
- replaceHelper.GetError() + ".");
+ this->SetError(
+ "sub-command REGEX, mode REPLACE: " + replaceHelper.GetError() + ".");
return false;
}
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index cf1068f..d641a4e 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -8,24 +8,24 @@
#include "cm_sys_stat.h"
#if defined(CMAKE_BUILD_WITH_CMAKE)
-#include "cmArchiveWrite.h"
-#include "cmLocale.h"
-#include "cm_libarchive.h"
-#ifndef __LA_INT64_T
-#define __LA_INT64_T la_int64_t
-#endif
+# include "cmArchiveWrite.h"
+# include "cmLocale.h"
+# include "cm_libarchive.h"
+# ifndef __LA_INT64_T
+# define __LA_INT64_T la_int64_t
+# endif
#endif
#if defined(CMAKE_BUILD_WITH_CMAKE)
-#include "cmCryptoHash.h"
+# include "cmCryptoHash.h"
#endif
#if defined(CMAKE_USE_ELF_PARSER)
-#include "cmELF.h"
+# include "cmELF.h"
#endif
#if defined(CMAKE_USE_MACH_PARSER)
-#include "cmMachO.h"
+# include "cmMachO.h"
#endif
#include "cmsys/Directory.hxx"
@@ -48,30 +48,30 @@
#include <utility>
#if defined(_WIN32)
-#include <windows.h>
+# include <windows.h>
// include wincrypt.h after windows.h
-#include <wincrypt.h>
+# include <wincrypt.h>
-#include <fcntl.h> /* _O_TEXT */
+# include <fcntl.h> /* _O_TEXT */
-#include "cm_uv.h"
+# include "cm_uv.h"
#else
-#include <sys/time.h>
-#include <unistd.h>
-#include <utime.h>
+# include <sys/time.h>
+# include <unistd.h>
+# include <utime.h>
#endif
#if defined(_WIN32) && \
(defined(_MSC_VER) || defined(__WATCOMC__) || defined(__MINGW32__))
-#include <io.h>
+# include <io.h>
#endif
#if defined(__APPLE__)
-#include <mach-o/dyld.h>
+# include <mach-o/dyld.h>
#endif
#ifdef __QNX__
-#include <malloc.h> /* for malloc/free on QNX */
+# include <malloc.h> /* for malloc/free on QNX */
#endif
static bool cm_isspace(char c)
@@ -93,32 +93,32 @@ public:
#if !defined(HAVE_ENVIRON_NOT_REQUIRE_PROTOTYPE)
// For GetEnvironmentVariables
-#if defined(_WIN32)
+# if defined(_WIN32)
extern __declspec(dllimport) char** environ;
-#else
+# else
extern char** environ;
-#endif
+# endif
#endif
#if defined(CMAKE_BUILD_WITH_CMAKE)
static std::string cm_archive_entry_pathname(struct archive_entry* entry)
{
-#if cmsys_STL_HAS_WSTRING
+# if cmsys_STL_HAS_WSTRING
return cmsys::Encoding::ToNarrow(archive_entry_pathname_w(entry));
-#else
+# else
return archive_entry_pathname(entry);
-#endif
+# endif
}
static int cm_archive_read_open_file(struct archive* a, const char* file,
int block_size)
{
-#if cmsys_STL_HAS_WSTRING
+# if cmsys_STL_HAS_WSTRING
std::wstring wfile = cmsys::Encoding::ToWide(file);
return archive_read_open_filename_w(a, wfile.c_str(), block_size);
-#else
+# else
return archive_read_open_filename(a, file, block_size);
-#endif
+# endif
}
#endif
@@ -144,9 +144,9 @@ private:
HANDLE handle_;
};
#elif defined(__APPLE__)
-#include <crt_externs.h>
+# include <crt_externs.h>
-#define environ (*_NSGetEnviron())
+# define environ (*_NSGetEnviron())
#endif
bool cmSystemTools::s_RunCommandHideConsole = false;
@@ -689,11 +689,11 @@ size_t cmSystemTools::CalculateCommandLineLengthLimit()
// We estimate the size of the environment block to be 1000.
// This isn't accurate at all, but leaves some headroom.
szArgMax = szArgMax < 1000 ? 0 : szArgMax - 1000;
-#if defined(_WIN32) || defined(__linux)
+# if defined(_WIN32) || defined(__linux)
sz = std::min(sz, static_cast<size_t>(szArgMax));
-#else
+# else
sz = static_cast<size_t>(szArgMax);
-#endif
+# endif
}
#endif
return sz;
@@ -995,20 +995,20 @@ void cmSystemTools::InitializeLibUV()
// global _fmode setting so that using libuv does not change the
// default file text/binary mode. See libuv issue 840.
uv_loop_close(uv_default_loop());
-#ifdef _MSC_VER
+# ifdef _MSC_VER
_set_fmode(_O_TEXT);
-#else
+# else
_fmode = _O_TEXT;
-#endif
+# endif
#endif
}
bool cmSystemTools::RenameFile(const char* oldname, const char* newname)
{
#ifdef _WIN32
-#ifndef INVALID_FILE_ATTRIBUTES
-#define INVALID_FILE_ATTRIBUTES ((DWORD)-1)
-#endif
+# ifndef INVALID_FILE_ATTRIBUTES
+# define INVALID_FILE_ATTRIBUTES ((DWORD)-1)
+# endif
/* Windows MoveFileEx may not replace read-only or in-use files. If it
fails then remove the read-only attribute from any existing destination.
Try multiple times since we may be racing against another process
@@ -1460,14 +1460,14 @@ std::string cmSystemTools::CollapseCombinedPath(std::string const& dir,
#ifdef CMAKE_BUILD_WITH_CMAKE
bool cmSystemTools::UnsetEnv(const char* value)
{
-#if !defined(HAVE_UNSETENV)
+# if !defined(HAVE_UNSETENV)
std::string var = value;
var += "=";
return cmSystemTools::PutEnv(var.c_str());
-#else
+# else
unsetenv(value);
return true;
-#endif
+# endif
}
std::vector<std::string> cmSystemTools::GetEnvironmentVariables()
@@ -1522,13 +1522,13 @@ void cmSystemTools::EnableVSConsoleOutput()
// output and allow it to be captured on the fly.
cmSystemTools::PutEnv("vsconsoleoutput=1");
-#ifdef CMAKE_BUILD_WITH_CMAKE
+# ifdef CMAKE_BUILD_WITH_CMAKE
// VS sets an environment variable to tell MS tools like "cl" to report
// output through a backdoor pipe instead of stdout/stderr. Unset the
// environment variable to close this backdoor for any path of process
// invocations that passes through CMake so we can capture the output.
cmSystemTools::UnsetEnv("VS_UNICODE_OUTPUT");
-#endif
+# endif
#endif
}
@@ -1599,8 +1599,8 @@ bool cmSystemTools::CreateTar(const char* outFileName,
#if defined(CMAKE_BUILD_WITH_CMAKE)
namespace {
-#define BSDTAR_FILESIZE_PRINTF "%lu"
-#define BSDTAR_FILESIZE_TYPE unsigned long
+# define BSDTAR_FILESIZE_PRINTF "%lu"
+# define BSDTAR_FILESIZE_TYPE unsigned long
void list_item_verbose(FILE* out, struct archive_entry* entry)
{
char tmp[100];
@@ -1673,13 +1673,13 @@ void list_item_verbose(FILE* out, struct archive_entry* entry)
/* Format the time using 'ls -l' conventions. */
tim = archive_entry_mtime(entry);
-#define HALF_YEAR ((time_t)365 * 86400 / 2)
-#if defined(_WIN32) && !defined(__CYGWIN__)
+# define HALF_YEAR ((time_t)365 * 86400 / 2)
+# if defined(_WIN32) && !defined(__CYGWIN__)
/* Windows' strftime function does not support %e format. */
-#define DAY_FMT "%d"
-#else
-#define DAY_FMT "%e" /* Day number without leading zeros */
-#endif
+# define DAY_FMT "%d"
+# else
+# define DAY_FMT "%e" /* Day number without leading zeros */
+# endif
if (tim < now - HALF_YEAR || tim > now + HALF_YEAR) {
fmt = DAY_FMT " %b %Y";
} else {
@@ -1706,11 +1706,11 @@ bool copy_data(struct archive* ar, struct archive* aw)
long r;
const void* buff;
size_t size;
-#if defined(ARCHIVE_VERSION_NUMBER) && ARCHIVE_VERSION_NUMBER >= 3000000
+# if defined(ARCHIVE_VERSION_NUMBER) && ARCHIVE_VERSION_NUMBER >= 3000000
__LA_INT64_T offset;
-#else
+# else
off_t offset;
-#endif
+# endif
for (;;) {
// Return value:
@@ -1733,9 +1733,9 @@ bool copy_data(struct archive* ar, struct archive* aw)
return false;
}
}
-#if !defined(__clang__) && !defined(__HP_aCC)
+# if !defined(__clang__) && !defined(__HP_aCC)
return false; /* this should not happen but it quiets some compilers */
-#endif
+# endif
}
bool extract_tar(const char* outFileName, bool verbose, bool extract)
@@ -1798,13 +1798,13 @@ bool extract_tar(const char* outFileName, bool verbose, bool extract)
break;
}
}
-#ifdef _WIN32
+# ifdef _WIN32
else if (const char* linktext = archive_entry_symlink(entry)) {
std::cerr << "cmake -E tar: warning: skipping symbolic link \""
<< cm_archive_entry_pathname(entry) << "\" -> \"" << linktext
<< "\"." << std::endl;
}
-#endif
+# endif
else {
cmSystemTools::Error("Problem with archive_write_header(): ",
archive_error_string(ext));
@@ -2051,9 +2051,9 @@ bool cmSystemTools::FileTimeSet(const char* fname, cmSystemToolsFileTime* t)
}
#ifdef _WIN32
-#ifndef CRYPT_SILENT
-#define CRYPT_SILENT 0x40 /* Not defined by VS 6 version of header. */
-#endif
+# ifndef CRYPT_SILENT
+# define CRYPT_SILENT 0x40 /* Not defined by VS 6 version of header. */
+# endif
static int WinCryptRandom(void* data, size_t size)
{
int result = 0;
@@ -2134,14 +2134,14 @@ void cmSystemTools::FindCMakeResources(const char* argv0)
exe_dir = cmSystemTools::GetFilenamePath(realPath);
#elif defined(__APPLE__)
(void)argv0; // ignore this on OS X
-#define CM_EXE_PATH_LOCAL_SIZE 16384
+# define CM_EXE_PATH_LOCAL_SIZE 16384
char exe_path_local[CM_EXE_PATH_LOCAL_SIZE];
-#if defined(MAC_OS_X_VERSION_10_3) && !defined(MAC_OS_X_VERSION_10_4)
+# if defined(MAC_OS_X_VERSION_10_3) && !defined(MAC_OS_X_VERSION_10_4)
unsigned long exe_path_size = CM_EXE_PATH_LOCAL_SIZE;
-#else
+# else
uint32_t exe_path_size = CM_EXE_PATH_LOCAL_SIZE;
-#endif
-#undef CM_EXE_PATH_LOCAL_SIZE
+# endif
+# undef CM_EXE_PATH_LOCAL_SIZE
char* exe_path = exe_path_local;
if (_NSGetExecutablePath(exe_path, &exe_path_size) < 0) {
exe_path = static_cast<char*>(malloc(exe_path_size));
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 7dcba74..1868816 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -720,8 +720,9 @@ void cmTarget::AddLinkLibrary(cmMakefile& mf, const std::string& lib,
}
if (cmGeneratorExpression::Find(lib) != std::string::npos ||
- (tgt && (tgt->GetType() == cmStateEnums::INTERFACE_LIBRARY ||
- tgt->GetType() == cmStateEnums::OBJECT_LIBRARY)) ||
+ (tgt &&
+ (tgt->GetType() == cmStateEnums::INTERFACE_LIBRARY ||
+ tgt->GetType() == cmStateEnums::OBJECT_LIBRARY)) ||
(this->Name == lib)) {
return;
}
@@ -1512,22 +1513,24 @@ bool cmTarget::CheckImportedLibName(std::string const& prop,
if (this->GetType() != cmStateEnums::INTERFACE_LIBRARY ||
!this->IsImported()) {
this->Makefile->IssueMessage(
- cmake::FATAL_ERROR, prop +
+ cmake::FATAL_ERROR,
+ prop +
" property may be set only on imported INTERFACE library targets.");
return false;
}
if (!value.empty()) {
if (value[0] == '-') {
- this->Makefile->IssueMessage(cmake::FATAL_ERROR, prop +
- " property value\n " + value +
+ this->Makefile->IssueMessage(cmake::FATAL_ERROR,
+ prop + " property value\n " + value +
"\nmay not start with '-'.");
return false;
}
std::string::size_type bad = value.find_first_of(":/\\;");
if (bad != std::string::npos) {
- this->Makefile->IssueMessage(
- cmake::FATAL_ERROR, prop + " property value\n " + value +
- "\nmay not contain '" + value.substr(bad, 1) + "'.");
+ this->Makefile->IssueMessage(cmake::FATAL_ERROR,
+ prop + " property value\n " + value +
+ "\nmay not contain '" +
+ value.substr(bad, 1) + "'.");
return false;
}
}
diff --git a/Source/cmTarget.h b/Source/cmTarget.h
index 62c4e22..3abb47e 100644
--- a/Source/cmTarget.h
+++ b/Source/cmTarget.h
@@ -36,6 +36,7 @@ public:
cmTargetInternalPointer& operator=(cmTargetInternalPointer const& r);
cmTargetInternals* operator->() const { return this->Pointer; }
cmTargetInternals* Get() const { return this->Pointer; }
+
private:
cmTargetInternals* Pointer;
};
@@ -181,8 +182,8 @@ public:
void SetHaveInstallRule(bool h) { this->HaveInstallRule = h; }
/**
- * Get/Set whether this target was auto-created by a generator.
- */
+ * Get/Set whether this target was auto-created by a generator.
+ */
bool GetIsGeneratorProvided() const { return this->IsGeneratorProvided; }
void SetIsGeneratorProvided(bool igp) { this->IsGeneratorProvided = igp; }
diff --git a/Source/cmTargetLinkLibrariesCommand.cxx b/Source/cmTargetLinkLibrariesCommand.cxx
index 53f1213..73f9a2e 100644
--- a/Source/cmTargetLinkLibrariesCommand.cxx
+++ b/Source/cmTargetLinkLibrariesCommand.cxx
@@ -342,8 +342,9 @@ bool cmTargetLinkLibrariesCommand::HandleLibrary(const std::string& lib,
// form must be the plain form.
const char* existingSig =
(sig == cmTarget::KeywordTLLSignature ? "plain" : "keyword");
- e << "The " << existingSig << " signature for target_link_libraries has "
- "already been used with the target \""
+ e << "The " << existingSig
+ << " signature for target_link_libraries has "
+ "already been used with the target \""
<< this->Target->GetName()
<< "\". All uses of target_link_libraries with a target " << modal
<< " be either all-keyword or all-plain.\n";
diff --git a/Source/cmTestGenerator.cxx b/Source/cmTestGenerator.cxx
index b548359..c532efb 100644
--- a/Source/cmTestGenerator.cxx
+++ b/Source/cmTestGenerator.cxx
@@ -111,8 +111,9 @@ void cmTestGenerator::GenerateScriptForConfig(std::ostream& os,
os << cmOutputConverter::EscapeForCMake(exe);
for (std::vector<std::string>::const_iterator ci = command.begin() + 1;
ci != command.end(); ++ci) {
- os << " " << cmOutputConverter::EscapeForCMake(
- ge.Parse(*ci)->Evaluate(this->LG, config));
+ os << " "
+ << cmOutputConverter::EscapeForCMake(
+ ge.Parse(*ci)->Evaluate(this->LG, config));
}
// Finish the test command.
diff --git a/Source/cmUVHandlePtr.cxx b/Source/cmUVHandlePtr.cxx
index eb70416..fd07d2d 100644
--- a/Source/cmUVHandlePtr.cxx
+++ b/Source/cmUVHandlePtr.cxx
@@ -87,16 +87,16 @@ template <>
struct uv_handle_deleter<uv_async_t>
{
/***
- * Wile uv_async_send is itself thread-safe, there are
- * no strong guarantees that close hasn't already been
- * called on the handle; and that it might be deleted
- * as the send call goes through. This mutex guards
- * against that.
- *
- * The shared_ptr here is to allow for copy construction
- * which is mandated by the standard for Deleter on
- * shared_ptrs.
- */
+ * Wile uv_async_send is itself thread-safe, there are
+ * no strong guarantees that close hasn't already been
+ * called on the handle; and that it might be deleted
+ * as the send call goes through. This mutex guards
+ * against that.
+ *
+ * The shared_ptr here is to allow for copy construction
+ * which is mandated by the standard for Deleter on
+ * shared_ptrs.
+ */
std::shared_ptr<std::mutex> handleMutex;
uv_handle_deleter()
diff --git a/Source/cmUVHandlePtr.h b/Source/cmUVHandlePtr.h
index a6ce565..2937e0d 100644
--- a/Source/cmUVHandlePtr.h
+++ b/Source/cmUVHandlePtr.h
@@ -21,12 +21,12 @@
namespace cm {
/***
-* RAII class to simplify and insure the safe usage of uv_*_t types. This
-* includes making sure resources are properly freed and contains casting
-* operators which allow for passing into relevant uv_* functions.
-*
-*@tparam T actual uv_*_t type represented.
-*/
+ * RAII class to simplify and insure the safe usage of uv_*_t types. This
+ * includes making sure resources are properly freed and contains casting
+ * operators which allow for passing into relevant uv_* functions.
+ *
+ *@tparam T actual uv_*_t type represented.
+ */
template <typename T>
class uv_handle_ptr_base_
{
@@ -65,8 +65,9 @@ public:
* that initializes something like uv_pipe_ptr or uv_tcp_ptr and interact
* and clean up after it without caring about the exact type.
*/
- template <typename S, typename = typename std::enable_if<
- std::is_rvalue_reference<S&&>::value>::type>
+ template <typename S,
+ typename = typename std::enable_if<
+ std::is_rvalue_reference<S&&>::value>::type>
uv_handle_ptr_base_(S&& rhs)
{
// This will force a compiler error if rhs doesn't have a casting
@@ -198,9 +199,9 @@ typedef uv_handle_ptr_<uv_handle_t> uv_handle_ptr;
extern template class uv_handle_ptr_base_<uv_handle_t>;
-#define UV_HANDLE_PTR_INSTANTIATE_EXTERN(NAME) \
- extern template class uv_handle_ptr_base_<uv_##NAME##_t>; \
- extern template class uv_handle_ptr_<uv_##NAME##_t>;
+# define UV_HANDLE_PTR_INSTANTIATE_EXTERN(NAME) \
+ extern template class uv_handle_ptr_base_<uv_##NAME##_t>; \
+ extern template class uv_handle_ptr_<uv_##NAME##_t>;
UV_HANDLE_PTR_INSTANTIATE_EXTERN(async)
@@ -216,7 +217,7 @@ UV_HANDLE_PTR_INSTANTIATE_EXTERN(timer)
UV_HANDLE_PTR_INSTANTIATE_EXTERN(tty)
-#undef UV_HANDLE_PTR_INSTANTIATE_EXTERN
+# undef UV_HANDLE_PTR_INSTANTIATE_EXTERN
#endif
}
diff --git a/Source/cmUVSignalHackRAII.h b/Source/cmUVSignalHackRAII.h
index c019aea..63599db 100644
--- a/Source/cmUVSignalHackRAII.h
+++ b/Source/cmUVSignalHackRAII.h
@@ -7,8 +7,8 @@
#if defined(CMAKE_USE_SYSTEM_LIBUV) && !defined(_WIN32) && \
UV_VERSION_MAJOR == 1 && UV_VERSION_MINOR < 19
-#define CMAKE_UV_SIGNAL_HACK
-#include "cmUVHandlePtr.h"
+# define CMAKE_UV_SIGNAL_HACK
+# include "cmUVHandlePtr.h"
/*
libuv does not use SA_RESTART on its signal handler, but C++ streams
depend on it for reliable i/o operations. This RAII helper convinces
@@ -22,6 +22,7 @@ class cmUVSignalHackRAII
uv_loop_t HackLoop;
cm::uv_signal_ptr HackSignal;
static void HackCB(uv_signal_t*, int) {}
+
public:
cmUVSignalHackRAII()
{
diff --git a/Source/cmUtilitySourceCommand.cxx b/Source/cmUtilitySourceCommand.cxx
index 1140800..a601637 100644
--- a/Source/cmUtilitySourceCommand.cxx
+++ b/Source/cmUtilitySourceCommand.cxx
@@ -44,11 +44,11 @@ bool cmUtilitySourceCommand::InitialPass(std::vector<std::string> const& args,
}
} else {
cmState* state = this->Makefile->GetState();
- haveCacheValue =
- (cacheValue && (strstr(cacheValue, "(IntDir)") == nullptr ||
- (intDir && strcmp(intDir, "$(IntDir)") == 0)) &&
- (state->GetCacheMajorVersion() != 0 &&
- state->GetCacheMinorVersion() != 0));
+ haveCacheValue = (cacheValue &&
+ (strstr(cacheValue, "(IntDir)") == nullptr ||
+ (intDir && strcmp(intDir, "$(IntDir)") == 0)) &&
+ (state->GetCacheMajorVersion() != 0 &&
+ state->GetCacheMinorVersion() != 0));
}
if (haveCacheValue) {
diff --git a/Source/cmVS10LibFlagTable.h b/Source/cmVS10LibFlagTable.h
index 65f28ef..be4f475 100644
--- a/Source/cmVS10LibFlagTable.h
+++ b/Source/cmVS10LibFlagTable.h
@@ -49,11 +49,11 @@ static cmVS7FlagTable cmVS10LibFlagTable[] = {
// String List Properties
// Skip [AdditionalDependencies] - no command line Switch.
- { "AdditionalLibraryDirectories", "LIBPATH:",
- "Additional Library Directories", "",
+ { "AdditionalLibraryDirectories",
+ "LIBPATH:", "Additional Library Directories", "",
cmVS7FlagTable::UserValue | cmVS7FlagTable::SemicolonAppendable },
- { "IgnoreSpecificDefaultLibraries", "NODEFAULTLIB:",
- "Ignore Specific Default Libraries", "",
+ { "IgnoreSpecificDefaultLibraries",
+ "NODEFAULTLIB:", "Ignore Specific Default Libraries", "",
cmVS7FlagTable::UserValue | cmVS7FlagTable::SemicolonAppendable },
{ "ExportNamedFunctions", "EXPORT:", "Export Named Functions", "",
cmVS7FlagTable::UserValue | cmVS7FlagTable::SemicolonAppendable },
diff --git a/Source/cmVS10LinkFlagTable.h b/Source/cmVS10LinkFlagTable.h
index 6a0313a..8f5b59b 100644
--- a/Source/cmVS10LinkFlagTable.h
+++ b/Source/cmVS10LinkFlagTable.h
@@ -176,17 +176,17 @@ static cmVS7FlagTable cmVS10LinkFlagTable[] = {
cmVS7FlagTable::UserValueRequired },
// String List Properties
- { "AdditionalLibraryDirectories", "LIBPATH:",
- "Additional Library Directories", "",
+ { "AdditionalLibraryDirectories",
+ "LIBPATH:", "Additional Library Directories", "",
cmVS7FlagTable::UserValue | cmVS7FlagTable::SemicolonAppendable },
// Skip [AdditionalDependencies] - no command line Switch.
- { "IgnoreSpecificDefaultLibraries", "NODEFAULTLIB:",
- "Ignore Specific Default Libraries", "",
+ { "IgnoreSpecificDefaultLibraries",
+ "NODEFAULTLIB:", "Ignore Specific Default Libraries", "",
cmVS7FlagTable::UserValue | cmVS7FlagTable::SemicolonAppendable },
{ "AddModuleNamesToAssembly", "ASSEMBLYMODULE:", "Add Module to Assembly",
"", cmVS7FlagTable::UserValue | cmVS7FlagTable::SemicolonAppendable },
- { "EmbedManagedResourceFile", "ASSEMBLYRESOURCE:",
- "Embed Managed Resource File", "",
+ { "EmbedManagedResourceFile",
+ "ASSEMBLYRESOURCE:", "Embed Managed Resource File", "",
cmVS7FlagTable::UserValue | cmVS7FlagTable::SemicolonAppendable },
{ "ForceSymbolReferences", "INCLUDE:", "Force Symbol References", "",
cmVS7FlagTable::UserValue | cmVS7FlagTable::SemicolonAppendable },
@@ -194,8 +194,8 @@ static cmVS7FlagTable cmVS10LinkFlagTable[] = {
cmVS7FlagTable::UserValue | cmVS7FlagTable::SemicolonAppendable },
{ "AssemblyLinkResource", "ASSEMBLYLINKRESOURCE:", "Assembly Link Resource",
"", cmVS7FlagTable::UserValue | cmVS7FlagTable::SemicolonAppendable },
- { "AdditionalManifestDependencies", "MANIFESTDEPENDENCY:",
- "Additional Manifest Dependencies", "",
+ { "AdditionalManifestDependencies",
+ "MANIFESTDEPENDENCY:", "Additional Manifest Dependencies", "",
cmVS7FlagTable::UserValue | cmVS7FlagTable::SemicolonAppendable },
// String Properties
diff --git a/Source/cmVS11LibFlagTable.h b/Source/cmVS11LibFlagTable.h
index 8aacaac..15c8ddd 100644
--- a/Source/cmVS11LibFlagTable.h
+++ b/Source/cmVS11LibFlagTable.h
@@ -49,11 +49,11 @@ static cmVS7FlagTable cmVS11LibFlagTable[] = {
// String List Properties
// Skip [AdditionalDependencies] - no command line Switch.
- { "AdditionalLibraryDirectories", "LIBPATH:",
- "Additional Library Directories", "",
+ { "AdditionalLibraryDirectories",
+ "LIBPATH:", "Additional Library Directories", "",
cmVS7FlagTable::UserValue | cmVS7FlagTable::SemicolonAppendable },
- { "IgnoreSpecificDefaultLibraries", "NODEFAULTLIB:",
- "Ignore Specific Default Libraries", "",
+ { "IgnoreSpecificDefaultLibraries",
+ "NODEFAULTLIB:", "Ignore Specific Default Libraries", "",
cmVS7FlagTable::UserValue | cmVS7FlagTable::SemicolonAppendable },
{ "ExportNamedFunctions", "EXPORT:", "Export Named Functions", "",
cmVS7FlagTable::UserValue | cmVS7FlagTable::SemicolonAppendable },
diff --git a/Source/cmVS11LinkFlagTable.h b/Source/cmVS11LinkFlagTable.h
index 24ba8fd..53f1139 100644
--- a/Source/cmVS11LinkFlagTable.h
+++ b/Source/cmVS11LinkFlagTable.h
@@ -193,17 +193,17 @@ static cmVS7FlagTable cmVS11LinkFlagTable[] = {
cmVS7FlagTable::UserValueRequired },
// String List Properties
- { "AdditionalLibraryDirectories", "LIBPATH:",
- "Additional Library Directories", "",
+ { "AdditionalLibraryDirectories",
+ "LIBPATH:", "Additional Library Directories", "",
cmVS7FlagTable::UserValue | cmVS7FlagTable::SemicolonAppendable },
// Skip [AdditionalDependencies] - no command line Switch.
- { "IgnoreSpecificDefaultLibraries", "NODEFAULTLIB:",
- "Ignore Specific Default Libraries", "",
+ { "IgnoreSpecificDefaultLibraries",
+ "NODEFAULTLIB:", "Ignore Specific Default Libraries", "",
cmVS7FlagTable::UserValue | cmVS7FlagTable::SemicolonAppendable },
{ "AddModuleNamesToAssembly", "ASSEMBLYMODULE:", "Add Module to Assembly",
"", cmVS7FlagTable::UserValue | cmVS7FlagTable::SemicolonAppendable },
- { "EmbedManagedResourceFile", "ASSEMBLYRESOURCE:",
- "Embed Managed Resource File", "",
+ { "EmbedManagedResourceFile",
+ "ASSEMBLYRESOURCE:", "Embed Managed Resource File", "",
cmVS7FlagTable::UserValue | cmVS7FlagTable::SemicolonAppendable },
{ "ForceSymbolReferences", "INCLUDE:", "Force Symbol References", "",
cmVS7FlagTable::UserValue | cmVS7FlagTable::SemicolonAppendable },
@@ -211,8 +211,8 @@ static cmVS7FlagTable cmVS11LinkFlagTable[] = {
cmVS7FlagTable::UserValue | cmVS7FlagTable::SemicolonAppendable },
{ "AssemblyLinkResource", "ASSEMBLYLINKRESOURCE:", "Assembly Link Resource",
"", cmVS7FlagTable::UserValue | cmVS7FlagTable::SemicolonAppendable },
- { "AdditionalManifestDependencies", "MANIFESTDEPENDENCY:",
- "Additional Manifest Dependencies", "",
+ { "AdditionalManifestDependencies",
+ "MANIFESTDEPENDENCY:", "Additional Manifest Dependencies", "",
cmVS7FlagTable::UserValue | cmVS7FlagTable::SemicolonAppendable },
{ "ManifestInput", "manifestinput:", "Manifest Input", "",
cmVS7FlagTable::UserValue | cmVS7FlagTable::SemicolonAppendable },
diff --git a/Source/cmVS12LibFlagTable.h b/Source/cmVS12LibFlagTable.h
index 0f7a259..2229b97 100644
--- a/Source/cmVS12LibFlagTable.h
+++ b/Source/cmVS12LibFlagTable.h
@@ -49,11 +49,11 @@ static cmVS7FlagTable cmVS12LibFlagTable[] = {
// String List Properties
// Skip [AdditionalDependencies] - no command line Switch.
- { "AdditionalLibraryDirectories", "LIBPATH:",
- "Additional Library Directories", "",
+ { "AdditionalLibraryDirectories",
+ "LIBPATH:", "Additional Library Directories", "",
cmVS7FlagTable::UserValue | cmVS7FlagTable::SemicolonAppendable },
- { "IgnoreSpecificDefaultLibraries", "NODEFAULTLIB:",
- "Ignore Specific Default Libraries", "",
+ { "IgnoreSpecificDefaultLibraries",
+ "NODEFAULTLIB:", "Ignore Specific Default Libraries", "",
cmVS7FlagTable::UserValue | cmVS7FlagTable::SemicolonAppendable },
{ "ExportNamedFunctions", "EXPORT:", "Export Named Functions", "",
cmVS7FlagTable::UserValue | cmVS7FlagTable::SemicolonAppendable },
diff --git a/Source/cmVS12LinkFlagTable.h b/Source/cmVS12LinkFlagTable.h
index fc667c3..ddc3ea1 100644
--- a/Source/cmVS12LinkFlagTable.h
+++ b/Source/cmVS12LinkFlagTable.h
@@ -193,17 +193,17 @@ static cmVS7FlagTable cmVS12LinkFlagTable[] = {
cmVS7FlagTable::UserValueRequired },
// String List Properties
- { "AdditionalLibraryDirectories", "LIBPATH:",
- "Additional Library Directories", "",
+ { "AdditionalLibraryDirectories",
+ "LIBPATH:", "Additional Library Directories", "",
cmVS7FlagTable::UserValue | cmVS7FlagTable::SemicolonAppendable },
// Skip [AdditionalDependencies] - no command line Switch.
- { "IgnoreSpecificDefaultLibraries", "NODEFAULTLIB:",
- "Ignore Specific Default Libraries", "",
+ { "IgnoreSpecificDefaultLibraries",
+ "NODEFAULTLIB:", "Ignore Specific Default Libraries", "",
cmVS7FlagTable::UserValue | cmVS7FlagTable::SemicolonAppendable },
{ "AddModuleNamesToAssembly", "ASSEMBLYMODULE:", "Add Module to Assembly",
"", cmVS7FlagTable::UserValue | cmVS7FlagTable::SemicolonAppendable },
- { "EmbedManagedResourceFile", "ASSEMBLYRESOURCE:",
- "Embed Managed Resource File", "",
+ { "EmbedManagedResourceFile",
+ "ASSEMBLYRESOURCE:", "Embed Managed Resource File", "",
cmVS7FlagTable::UserValue | cmVS7FlagTable::SemicolonAppendable },
{ "ForceSymbolReferences", "INCLUDE:", "Force Symbol References", "",
cmVS7FlagTable::UserValue | cmVS7FlagTable::SemicolonAppendable },
@@ -211,8 +211,8 @@ static cmVS7FlagTable cmVS12LinkFlagTable[] = {
cmVS7FlagTable::UserValue | cmVS7FlagTable::SemicolonAppendable },
{ "AssemblyLinkResource", "ASSEMBLYLINKRESOURCE:", "Assembly Link Resource",
"", cmVS7FlagTable::UserValue | cmVS7FlagTable::SemicolonAppendable },
- { "AdditionalManifestDependencies", "MANIFESTDEPENDENCY:",
- "Additional Manifest Dependencies", "",
+ { "AdditionalManifestDependencies",
+ "MANIFESTDEPENDENCY:", "Additional Manifest Dependencies", "",
cmVS7FlagTable::UserValue | cmVS7FlagTable::SemicolonAppendable },
{ "ManifestInput", "manifestinput:", "Manifest Input", "",
cmVS7FlagTable::UserValue | cmVS7FlagTable::SemicolonAppendable },
diff --git a/Source/cmVS140LinkFlagTable.h b/Source/cmVS140LinkFlagTable.h
index 7c9452a..fe03153 100644
--- a/Source/cmVS140LinkFlagTable.h
+++ b/Source/cmVS140LinkFlagTable.h
@@ -204,19 +204,19 @@ static cmVS7FlagTable cmVS140LinkFlagTable[] = {
cmVS7FlagTable::UserValueRequired },
// String List Properties
- { "AdditionalLibraryDirectories", "LIBPATH:",
- "Additional Library Directories", "",
+ { "AdditionalLibraryDirectories",
+ "LIBPATH:", "Additional Library Directories", "",
cmVS7FlagTable::UserValue | cmVS7FlagTable::SemicolonAppendable },
{ "Natvis", "NATVIS:", "Natvis files", "",
cmVS7FlagTable::UserValue | cmVS7FlagTable::SemicolonAppendable },
// Skip [AdditionalDependencies] - no command line Switch.
- { "IgnoreSpecificDefaultLibraries", "NODEFAULTLIB:",
- "Ignore Specific Default Libraries", "",
+ { "IgnoreSpecificDefaultLibraries",
+ "NODEFAULTLIB:", "Ignore Specific Default Libraries", "",
cmVS7FlagTable::UserValue | cmVS7FlagTable::SemicolonAppendable },
{ "AddModuleNamesToAssembly", "ASSEMBLYMODULE:", "Add Module to Assembly",
"", cmVS7FlagTable::UserValue | cmVS7FlagTable::SemicolonAppendable },
- { "EmbedManagedResourceFile", "ASSEMBLYRESOURCE:",
- "Embed Managed Resource File", "",
+ { "EmbedManagedResourceFile",
+ "ASSEMBLYRESOURCE:", "Embed Managed Resource File", "",
cmVS7FlagTable::UserValue | cmVS7FlagTable::SemicolonAppendable },
{ "ForceSymbolReferences", "INCLUDE:", "Force Symbol References", "",
cmVS7FlagTable::UserValue | cmVS7FlagTable::SemicolonAppendable },
@@ -224,8 +224,8 @@ static cmVS7FlagTable cmVS140LinkFlagTable[] = {
cmVS7FlagTable::UserValue | cmVS7FlagTable::SemicolonAppendable },
{ "AssemblyLinkResource", "ASSEMBLYLINKRESOURCE:", "Assembly Link Resource",
"", cmVS7FlagTable::UserValue | cmVS7FlagTable::SemicolonAppendable },
- { "AdditionalManifestDependencies", "MANIFESTDEPENDENCY:",
- "Additional Manifest Dependencies", "",
+ { "AdditionalManifestDependencies",
+ "MANIFESTDEPENDENCY:", "Additional Manifest Dependencies", "",
cmVS7FlagTable::UserValue | cmVS7FlagTable::SemicolonAppendable },
{ "ManifestInput", "manifestinput:", "Manifest Input", "",
cmVS7FlagTable::UserValue | cmVS7FlagTable::SemicolonAppendable },
diff --git a/Source/cmVS141LinkFlagTable.h b/Source/cmVS141LinkFlagTable.h
index f159f70..7e56c8e 100644
--- a/Source/cmVS141LinkFlagTable.h
+++ b/Source/cmVS141LinkFlagTable.h
@@ -206,19 +206,19 @@ static cmVS7FlagTable cmVS141LinkFlagTable[] = {
cmVS7FlagTable::UserValueRequired },
// String List Properties
- { "AdditionalLibraryDirectories", "LIBPATH:",
- "Additional Library Directories", "",
+ { "AdditionalLibraryDirectories",
+ "LIBPATH:", "Additional Library Directories", "",
cmVS7FlagTable::UserValue | cmVS7FlagTable::SemicolonAppendable },
{ "Natvis", "NATVIS:", "Natvis files", "",
cmVS7FlagTable::UserValue | cmVS7FlagTable::SemicolonAppendable },
// Skip [AdditionalDependencies] - no command line Switch.
- { "IgnoreSpecificDefaultLibraries", "NODEFAULTLIB:",
- "Ignore Specific Default Libraries", "",
+ { "IgnoreSpecificDefaultLibraries",
+ "NODEFAULTLIB:", "Ignore Specific Default Libraries", "",
cmVS7FlagTable::UserValue | cmVS7FlagTable::SemicolonAppendable },
{ "AddModuleNamesToAssembly", "ASSEMBLYMODULE:", "Add Module to Assembly",
"", cmVS7FlagTable::UserValue | cmVS7FlagTable::SemicolonAppendable },
- { "EmbedManagedResourceFile", "ASSEMBLYRESOURCE:",
- "Embed Managed Resource File", "",
+ { "EmbedManagedResourceFile",
+ "ASSEMBLYRESOURCE:", "Embed Managed Resource File", "",
cmVS7FlagTable::UserValue | cmVS7FlagTable::SemicolonAppendable },
{ "ForceSymbolReferences", "INCLUDE:", "Force Symbol References", "",
cmVS7FlagTable::UserValue | cmVS7FlagTable::SemicolonAppendable },
@@ -226,8 +226,8 @@ static cmVS7FlagTable cmVS141LinkFlagTable[] = {
cmVS7FlagTable::UserValue | cmVS7FlagTable::SemicolonAppendable },
{ "AssemblyLinkResource", "ASSEMBLYLINKRESOURCE:", "Assembly Link Resource",
"", cmVS7FlagTable::UserValue | cmVS7FlagTable::SemicolonAppendable },
- { "AdditionalManifestDependencies", "MANIFESTDEPENDENCY:",
- "Additional Manifest Dependencies", "",
+ { "AdditionalManifestDependencies",
+ "MANIFESTDEPENDENCY:", "Additional Manifest Dependencies", "",
cmVS7FlagTable::UserValue | cmVS7FlagTable::SemicolonAppendable },
{ "ManifestInput", "manifestinput:", "Manifest Input", "",
cmVS7FlagTable::UserValue | cmVS7FlagTable::SemicolonAppendable },
diff --git a/Source/cmVS14LibFlagTable.h b/Source/cmVS14LibFlagTable.h
index be4652c..adce075 100644
--- a/Source/cmVS14LibFlagTable.h
+++ b/Source/cmVS14LibFlagTable.h
@@ -50,11 +50,11 @@ static cmVS7FlagTable cmVS14LibFlagTable[] = {
// String List Properties
// Skip [AdditionalDependencies] - no command line Switch.
- { "AdditionalLibraryDirectories", "LIBPATH:",
- "Additional Library Directories", "",
+ { "AdditionalLibraryDirectories",
+ "LIBPATH:", "Additional Library Directories", "",
cmVS7FlagTable::UserValue | cmVS7FlagTable::SemicolonAppendable },
- { "IgnoreSpecificDefaultLibraries", "NODEFAULTLIB:",
- "Ignore Specific Default Libraries", "",
+ { "IgnoreSpecificDefaultLibraries",
+ "NODEFAULTLIB:", "Ignore Specific Default Libraries", "",
cmVS7FlagTable::UserValue | cmVS7FlagTable::SemicolonAppendable },
{ "ExportNamedFunctions", "EXPORT:", "Export Named Functions", "",
cmVS7FlagTable::UserValue | cmVS7FlagTable::SemicolonAppendable },
diff --git a/Source/cmVSSetupHelper.cxx b/Source/cmVSSetupHelper.cxx
index c2f8deb..4ca847e 100644
--- a/Source/cmVSSetupHelper.cxx
+++ b/Source/cmVSSetupHelper.cxx
@@ -7,7 +7,7 @@
#include "cmsys/FStream.hxx"
#ifndef VSSetupConstants
-#define VSSetupConstants
+# define VSSetupConstants
/* clang-format off */
const IID IID_ISetupConfiguration = {
0x42843719, 0xDB4C, 0x46C2,
diff --git a/Source/cmVSSetupHelper.h b/Source/cmVSSetupHelper.h
index c07cfaf..368341c 100644
--- a/Source/cmVSSetupHelper.h
+++ b/Source/cmVSSetupHelper.h
@@ -4,7 +4,7 @@
#define cmVSSetupHelper_h
#ifndef NOMINMAX
-#define NOMINMAX // Undefine min and max defined by windows.h
+# define NOMINMAX // Undefine min and max defined by windows.h
#endif
// Published by Visual Studio Setup team
@@ -97,6 +97,7 @@ public:
operator BSTR() const { return str; }
BSTR* operator&() throw() { return &str; }
~SmartBSTR() throw() { ::SysFreeString(str); }
+
private:
BSTR str;
};
diff --git a/Source/cmVersionMacros.h b/Source/cmVersionMacros.h
index 1b617bd..e8ac4f8 100644
--- a/Source/cmVersionMacros.h
+++ b/Source/cmVersionMacros.h
@@ -7,7 +7,7 @@
#define CMake_VERSION_PATCH_IS_RELEASE(patch) ((patch) < 20000000)
#if CMake_VERSION_PATCH_IS_RELEASE(CMake_VERSION_PATCH)
-#define CMake_VERSION_IS_RELEASE 1
+# define CMake_VERSION_IS_RELEASE 1
#endif
#endif
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index f16db76..1768c57 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -1742,18 +1742,21 @@ void cmVisualStudio10TargetGenerator::WriteExtraSource(Elem& e1,
e2.Element("Link", deployLocation + "\\%(FileName)%(Extension)");
}
for (size_t i = 0; i != this->Configurations.size(); ++i) {
- if (0 == strcmp(cge->Evaluate(this->LocalGenerator,
- this->Configurations[i]),
- "1")) {
- e2.WritePlatformConfigTag(
- "DeploymentContent", "'$(Configuration)|$(Platform)'=='" +
- this->Configurations[i] + "|" + this->Platform + "'",
- "true");
+ if (0 ==
+ strcmp(
+ cge->Evaluate(this->LocalGenerator, this->Configurations[i]),
+ "1")) {
+ e2.WritePlatformConfigTag("DeploymentContent",
+ "'$(Configuration)|$(Platform)'=='" +
+ this->Configurations[i] + "|" +
+ this->Platform + "'",
+ "true");
} else {
- e2.WritePlatformConfigTag(
- "ExcludedFromBuild", "'$(Configuration)|$(Platform)'=='" +
- this->Configurations[i] + "|" + this->Platform + "'",
- "true");
+ e2.WritePlatformConfigTag("ExcludedFromBuild",
+ "'$(Configuration)|$(Platform)'=='" +
+ this->Configurations[i] + "|" +
+ this->Platform + "'",
+ "true");
}
}
}
@@ -1768,18 +1771,20 @@ void cmVisualStudio10TargetGenerator::WriteExtraSource(Elem& e1,
}
if (!outputHeaderFile.empty()) {
for (size_t i = 0; i != this->Configurations.size(); ++i) {
- e2.WritePlatformConfigTag(
- "HeaderFileOutput", "'$(Configuration)|$(Platform)'=='" +
- this->Configurations[i] + "|" + this->Platform + "'",
- outputHeaderFile);
+ e2.WritePlatformConfigTag("HeaderFileOutput",
+ "'$(Configuration)|$(Platform)'=='" +
+ this->Configurations[i] + "|" +
+ this->Platform + "'",
+ outputHeaderFile);
}
}
if (!variableName.empty()) {
for (size_t i = 0; i != this->Configurations.size(); ++i) {
- e2.WritePlatformConfigTag(
- "VariableName", "'$(Configuration)|$(Platform)'=='" +
- this->Configurations[i] + "|" + this->Platform + "'",
- variableName);
+ e2.WritePlatformConfigTag("VariableName",
+ "'$(Configuration)|$(Platform)'=='" +
+ this->Configurations[i] + "|" +
+ this->Platform + "'",
+ variableName);
}
}
if (!shaderEnableDebug.empty()) {
@@ -1792,8 +1797,9 @@ void cmVisualStudio10TargetGenerator::WriteExtraSource(Elem& e1,
cge->Evaluate(this->LocalGenerator, this->Configurations[i]);
if (strlen(enableDebug) > 0) {
e2.WritePlatformConfigTag(
- "EnableDebuggingInformation", "'$(Configuration)|$(Platform)'=='" +
- this->Configurations[i] + "|" + this->Platform + "'",
+ "EnableDebuggingInformation",
+ "'$(Configuration)|$(Platform)'=='" + this->Configurations[i] +
+ "|" + this->Platform + "'",
cmSystemTools::IsOn(enableDebug) ? "true" : "false");
}
}
@@ -1808,8 +1814,9 @@ void cmVisualStudio10TargetGenerator::WriteExtraSource(Elem& e1,
cge->Evaluate(this->LocalGenerator, this->Configurations[i]);
if (strlen(disableOptimizations) > 0) {
e2.WritePlatformConfigTag(
- "DisableOptimizations", "'$(Configuration)|$(Platform)'=='" +
- this->Configurations[i] + "|" + this->Platform + "'",
+ "DisableOptimizations",
+ "'$(Configuration)|$(Platform)'=='" + this->Configurations[i] +
+ "|" + this->Platform + "'",
(cmSystemTools::IsOn(disableOptimizations) ? "true" : "false"));
}
}
@@ -2190,10 +2197,11 @@ void cmVisualStudio10TargetGenerator::WriteExcludeFromBuild(
Elem& e2, std::vector<size_t> const& exclude_configs)
{
for (size_t ci : exclude_configs) {
- e2.WritePlatformConfigTag(
- "ExcludedFromBuild", "'$(Configuration)|$(Platform)'=='" +
- this->Configurations[ci] + "|" + this->Platform + "'",
- "true");
+ e2.WritePlatformConfigTag("ExcludedFromBuild",
+ "'$(Configuration)|$(Platform)'=='" +
+ this->Configurations[ci] + "|" +
+ this->Platform + "'",
+ "true");
}
}
@@ -2968,8 +2976,9 @@ bool cmVisualStudio10TargetGenerator::ComputeNasmOptions(
std::string configFlagsVar = std::string("CMAKE_ASM_NASM_FLAGS_") + CONFIG;
std::string flags =
std::string(this->Makefile->GetSafeDefinition("CMAKE_ASM_NASM_FLAGS")) +
- std::string(" -f") + std::string(this->Makefile->GetSafeDefinition(
- "CMAKE_ASM_NASM_OBJECT_FORMAT")) +
+ std::string(" -f") +
+ std::string(
+ this->Makefile->GetSafeDefinition("CMAKE_ASM_NASM_OBJECT_FORMAT")) +
std::string(" ") +
std::string(this->Makefile->GetSafeDefinition(configFlagsVar));
nasmOptions.Parse(flags.c_str());
diff --git a/Source/cmVisualStudioGeneratorOptions.cxx b/Source/cmVisualStudioGeneratorOptions.cxx
index 3ec3355..4afef8b 100644
--- a/Source/cmVisualStudioGeneratorOptions.cxx
+++ b/Source/cmVisualStudioGeneratorOptions.cxx
@@ -393,7 +393,8 @@ void cmVisualStudioGeneratorOptions::StoreUnknownFlag(std::string const& flag)
// This option is not known. Store it in the output flags.
std::string const opts = cmOutputConverter::EscapeWindowsShellArgument(
- flag.c_str(), cmOutputConverter::Shell_Flag_AllowMakeVariables |
+ flag.c_str(),
+ cmOutputConverter::Shell_Flag_AllowMakeVariables |
cmOutputConverter::Shell_Flag_VSIDE);
this->AppendFlagString(this->UnknownFlagField, opts);
}
diff --git a/Source/cmWriteFileCommand.cxx b/Source/cmWriteFileCommand.cxx
index 3464a1b..d3d2db0 100644
--- a/Source/cmWriteFileCommand.cxx
+++ b/Source/cmWriteFileCommand.cxx
@@ -54,7 +54,7 @@ bool cmWriteFileCommand::InitialPass(std::vector<std::string> const& args,
#else
mode | S_IWUSR | S_IWGRP
#endif
- );
+ );
}
// If GetPermissions fails, pretend like it is ok. File open will fail if
// the file is not writable
diff --git a/Source/cmXMLWriter.h b/Source/cmXMLWriter.h
index d124907..b080654 100644
--- a/Source/cmXMLWriter.h
+++ b/Source/cmXMLWriter.h
@@ -145,6 +145,7 @@ public:
xmlwr.StartDocument();
}
~cmXMLDocument() { xmlwr.EndDocument(); }
+
private:
friend class cmXMLElement;
cmXMLWriter& xmlwr;
diff --git a/Source/cm_codecvt.cxx b/Source/cm_codecvt.cxx
index 6705851..9519f91 100644
--- a/Source/cm_codecvt.cxx
+++ b/Source/cm_codecvt.cxx
@@ -3,11 +3,11 @@
#include "cm_codecvt.hxx"
#if defined(_WIN32)
-#include <assert.h>
-#include <string.h>
-#include <windows.h>
-#undef max
-#include "cmsys/Encoding.hxx"
+# include <assert.h>
+# include <string.h>
+# include <windows.h>
+# undef max
+# include "cmsys/Encoding.hxx"
#endif
#if defined(_WIN32)
diff --git a/Source/cm_codecvt.hxx b/Source/cm_codecvt.hxx
index 3a5606b..2df3961 100644
--- a/Source/cm_codecvt.hxx
+++ b/Source/cm_codecvt.hxx
@@ -52,13 +52,13 @@ private:
};
bool m_noconv;
-#if defined(_WIN32)
+# if defined(_WIN32)
unsigned int m_codepage;
result Decode(mbstate_t& state, int need, const char*& from_next,
char*& to_next, char* to_end) const;
result DecodePartial(mbstate_t& state, char*& to_next, char* to_end) const;
void BufferPartial(mbstate_t& state, int need, const char*& from_next) const;
-#endif
+# endif
#endif
};
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 801d52d..6edaa74 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -28,69 +28,69 @@
#include "cm_sys_stat.h"
#if defined(CMAKE_BUILD_WITH_CMAKE)
-#include "cm_jsoncpp_writer.h"
+# include "cm_jsoncpp_writer.h"
-#include "cmGraphVizWriter.h"
-#include "cmVariableWatch.h"
-#include <unordered_map>
+# include "cmGraphVizWriter.h"
+# include "cmVariableWatch.h"
+# include <unordered_map>
#endif
#if defined(CMAKE_BUILD_WITH_CMAKE)
-#define CMAKE_USE_ECLIPSE
+# define CMAKE_USE_ECLIPSE
#endif
#if defined(__MINGW32__) && !defined(CMAKE_BUILD_WITH_CMAKE)
-#define CMAKE_BOOT_MINGW
+# define CMAKE_BOOT_MINGW
#endif
// include the generator
#if defined(_WIN32) && !defined(__CYGWIN__)
-#if !defined(CMAKE_BOOT_MINGW)
-#include "cmGlobalBorlandMakefileGenerator.h"
-#include "cmGlobalGhsMultiGenerator.h"
-#include "cmGlobalJOMMakefileGenerator.h"
-#include "cmGlobalNMakeMakefileGenerator.h"
-#include "cmGlobalVisualStudio10Generator.h"
-#include "cmGlobalVisualStudio11Generator.h"
-#include "cmGlobalVisualStudio12Generator.h"
-#include "cmGlobalVisualStudio14Generator.h"
-#include "cmGlobalVisualStudio15Generator.h"
-#include "cmGlobalVisualStudio9Generator.h"
-#include "cmVSSetupHelper.h"
-
-#define CMAKE_HAVE_VS_GENERATORS
-#endif
-#include "cmGlobalMSYSMakefileGenerator.h"
-#include "cmGlobalMinGWMakefileGenerator.h"
+# if !defined(CMAKE_BOOT_MINGW)
+# include "cmGlobalBorlandMakefileGenerator.h"
+# include "cmGlobalGhsMultiGenerator.h"
+# include "cmGlobalJOMMakefileGenerator.h"
+# include "cmGlobalNMakeMakefileGenerator.h"
+# include "cmGlobalVisualStudio10Generator.h"
+# include "cmGlobalVisualStudio11Generator.h"
+# include "cmGlobalVisualStudio12Generator.h"
+# include "cmGlobalVisualStudio14Generator.h"
+# include "cmGlobalVisualStudio15Generator.h"
+# include "cmGlobalVisualStudio9Generator.h"
+# include "cmVSSetupHelper.h"
+
+# define CMAKE_HAVE_VS_GENERATORS
+# endif
+# include "cmGlobalMSYSMakefileGenerator.h"
+# include "cmGlobalMinGWMakefileGenerator.h"
#else
#endif
#if defined(CMAKE_USE_WMAKE)
-#include "cmGlobalWatcomWMakeGenerator.h"
+# include "cmGlobalWatcomWMakeGenerator.h"
#endif
#include "cmGlobalUnixMakefileGenerator3.h"
#if defined(CMAKE_BUILD_WITH_CMAKE)
-#include "cmGlobalNinjaGenerator.h"
+# include "cmGlobalNinjaGenerator.h"
#endif
#include "cmExtraCodeLiteGenerator.h"
#if !defined(CMAKE_BOOT_MINGW)
-#include "cmExtraCodeBlocksGenerator.h"
+# include "cmExtraCodeBlocksGenerator.h"
#endif
#include "cmExtraKateGenerator.h"
#include "cmExtraSublimeTextGenerator.h"
#ifdef CMAKE_USE_ECLIPSE
-#include "cmExtraEclipseCDT4Generator.h"
+# include "cmExtraEclipseCDT4Generator.h"
#endif
#if defined(__APPLE__)
-#if defined(CMAKE_BUILD_WITH_CMAKE)
-#include "cmGlobalXCodeGenerator.h"
+# if defined(CMAKE_BUILD_WITH_CMAKE)
+# include "cmGlobalXCodeGenerator.h"
-#define CMAKE_USE_XCODE 1
-#endif
-#include <sys/resource.h>
-#include <sys/time.h>
+# define CMAKE_USE_XCODE 1
+# endif
+# include <sys/resource.h>
+# include <sys/time.h>
#endif
#include "cmsys/FStream.hxx"
@@ -891,9 +891,9 @@ void cmake::AddDefaultExtraGenerators()
this->ExtraGenerators.push_back(cmExtraSublimeTextGenerator::GetFactory());
this->ExtraGenerators.push_back(cmExtraKateGenerator::GetFactory());
-#ifdef CMAKE_USE_ECLIPSE
+# ifdef CMAKE_USE_ECLIPSE
this->ExtraGenerators.push_back(cmExtraEclipseCDT4Generator::GetFactory());
-#endif
+# endif
#endif
}
@@ -1708,7 +1708,7 @@ void cmake::AddProjectCommands()
void cmake::AddDefaultGenerators()
{
#if defined(_WIN32) && !defined(__CYGWIN__)
-#if !defined(CMAKE_BOOT_MINGW)
+# if !defined(CMAKE_BOOT_MINGW)
this->Generators.push_back(cmGlobalVisualStudio15Generator::NewFactory());
this->Generators.push_back(cmGlobalVisualStudio14Generator::NewFactory());
this->Generators.push_back(cmGlobalVisualStudio12Generator::NewFactory());
@@ -1719,7 +1719,7 @@ void cmake::AddDefaultGenerators()
this->Generators.push_back(cmGlobalNMakeMakefileGenerator::NewFactory());
this->Generators.push_back(cmGlobalJOMMakefileGenerator::NewFactory());
this->Generators.push_back(cmGlobalGhsMultiGenerator::NewFactory());
-#endif
+# endif
this->Generators.push_back(cmGlobalMSYSMakefileGenerator::NewFactory());
this->Generators.push_back(cmGlobalMinGWMakefileGenerator::NewFactory());
#endif
diff --git a/Source/cmake.h b/Source/cmake.h
index 53c2f45..86e06df 100644
--- a/Source/cmake.h
+++ b/Source/cmake.h
@@ -17,7 +17,7 @@
#include "cmStateTypes.h"
#if defined(CMAKE_BUILD_WITH_CMAKE)
-#include "cm_jsoncpp_value.h"
+# include "cm_jsoncpp_value.h"
#endif
class cmExternalMakefileProjectGeneratorFactory;
@@ -566,11 +566,13 @@ private:
{ "-Wno-error=dev", "Make developer warnings not errors." }, \
{ "-Wdeprecated", "Enable deprecation warnings." }, \
{ "-Wno-deprecated", "Suppress deprecation warnings." }, \
- { "-Werror=deprecated", "Make deprecated macro and function warnings " \
- "errors." }, \
+ { "-Werror=deprecated", \
+ "Make deprecated macro and function warnings " \
+ "errors." }, \
{ \
- "-Wno-error=deprecated", "Make deprecated macro and function warnings " \
- "not errors." \
+ "-Wno-error=deprecated", \
+ "Make deprecated macro and function warnings " \
+ "not errors." \
}
#define FOR_EACH_C_FEATURE(F) \
diff --git a/Source/cmakemain.cxx b/Source/cmakemain.cxx
index 9c9f65c..e3d94f6 100644
--- a/Source/cmakemain.cxx
+++ b/Source/cmakemain.cxx
@@ -1,7 +1,6 @@
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
file Copyright.txt or https://cmake.org/licensing for details. */
-#include "cmake.h"
#include "cmAlgorithms.h"
#include "cmDocumentationEntry.h"
#include "cmGlobalGenerator.h"
@@ -9,18 +8,19 @@
#include "cmState.h"
#include "cmStateTypes.h"
#include "cmSystemTools.h"
+#include "cmake.h"
#include "cmcmd.h"
#ifdef CMAKE_BUILD_WITH_CMAKE
-#include "cmDocumentation.h"
-#include "cmDynamicLoader.h"
+# include "cmDocumentation.h"
+# include "cmDynamicLoader.h"
#endif
#include "cm_uv.h"
#include "cmsys/Encoding.hxx"
#if defined(_WIN32) && defined(CMAKE_BUILD_WITH_CMAKE)
-#include "cmsys/ConsoleBuf.hxx"
+# include "cmsys/ConsoleBuf.hxx"
#endif
#include <ctype.h>
@@ -36,11 +36,13 @@ static const char* cmDocumentationName[][2] = {
};
static const char* cmDocumentationUsage[][2] = {
- { nullptr, " cmake [options] <path-to-source>\n"
- " cmake [options] <path-to-existing-build>" },
- { nullptr, "Specify a source directory to (re-)generate a build system for "
- "it in the current working directory. Specify an existing build "
- "directory to re-generate its build system." },
+ { nullptr,
+ " cmake [options] <path-to-source>\n"
+ " cmake [options] <path-to-existing-build>" },
+ { nullptr,
+ "Specify a source directory to (re-)generate a build system for "
+ "it in the current working directory. Specify an existing build "
+ "directory to re-generate its build system." },
{ nullptr, nullptr }
};
@@ -49,21 +51,23 @@ static const char* cmDocumentationUsageNote[][2] = {
{ nullptr, nullptr }
};
-#define CMAKE_BUILD_OPTIONS \
- " <dir> = Project binary directory to be built.\n" \
- " -j [<jobs>] --parallel [<jobs>] = Build in parallel using\n" \
- " the given number of jobs. If <jobs> is omitted\n" \
- " the native build tool's default number is used.\n" \
- " The CMAKE_BUILD_PARALLEL_LEVEL environment variable\n" \
- " specifies a default parallel level when this option\n" \
- " is not given.\n" \
- " --target <tgt> = Build <tgt> instead of default targets.\n" \
- " May only be specified once.\n" \
- " --config <cfg> = For multi-configuration tools, choose <cfg>.\n" \
- " --clean-first = Build target 'clean' first, then build.\n" \
- " (To clean only, use --target 'clean'.)\n" \
- " --use-stderr = Ignored. Behavior is default in CMake >= 3.0.\n" \
- " -- = Pass remaining options to the native tool.\n"
+# define CMAKE_BUILD_OPTIONS \
+ " <dir> = Project binary directory to be built.\n" \
+ " -j [<jobs>] --parallel [<jobs>] = Build in parallel using\n" \
+ " the given number of jobs. If <jobs> is omitted\n" \
+ " the native build tool's default number is used.\n" \
+ " The CMAKE_BUILD_PARALLEL_LEVEL environment " \
+ "variable\n" \
+ " specifies a default parallel level when this " \
+ "option\n" \
+ " is not given.\n" \
+ " --target <tgt> = Build <tgt> instead of default targets.\n" \
+ " May only be specified once.\n" \
+ " --config <cfg> = For multi-configuration tools, choose <cfg>.\n" \
+ " --clean-first = Build target 'clean' first, then build.\n" \
+ " (To clean only, use --target 'clean'.)\n" \
+ " --use-stderr = Ignored. Behavior is default in CMake >= 3.0.\n" \
+ " -- = Pass remaining options to the native tool.\n"
static const char* cmDocumentationOptions[][2] = {
CMAKE_STANDARD_OPTIONS_TABLE,
@@ -74,11 +78,13 @@ static const char* cmDocumentationOptions[][2] = {
{ "-N", "View mode only." },
{ "-P <file>", "Process script mode." },
{ "--find-package", "Run in pkg-config like mode." },
- { "--graphviz=[file]", "Generate graphviz of dependencies, see "
- "CMakeGraphVizOptions.cmake for more." },
+ { "--graphviz=[file]",
+ "Generate graphviz of dependencies, see "
+ "CMakeGraphVizOptions.cmake for more." },
{ "--system-information [file]", "Dump information about this system." },
- { "--debug-trycompile", "Do not delete the try_compile build tree. Only "
- "useful on one try_compile at a time." },
+ { "--debug-trycompile",
+ "Do not delete the try_compile build tree. Only "
+ "useful on one try_compile at a time." },
{ "--debug-output", "Put cmake in a debug mode." },
{ "--trace", "Put cmake in trace mode." },
{ "--trace-expand", "Put cmake in trace mode with variable expansion." },
@@ -87,8 +93,9 @@ static const char* cmDocumentationOptions[][2] = {
{ "--warn-uninitialized", "Warn about uninitialized values." },
{ "--warn-unused-vars", "Warn about unused variables." },
{ "--no-warn-unused-cli", "Don't warn about command line options." },
- { "--check-system-vars", "Find problems with variable usage in system "
- "files." },
+ { "--check-system-vars",
+ "Find problems with variable usage in system "
+ "files." },
{ nullptr, nullptr }
};
diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx
index 6f3a90f..0a75e77 100644
--- a/Source/cmcmd.cxx
+++ b/Source/cmcmd.cxx
@@ -17,17 +17,17 @@
#include "cmake.h"
#if defined(CMAKE_BUILD_WITH_CMAKE)
-#include "cmDependsFortran.h" // For -E cmake_copy_f90_mod callback.
-#include "cmServer.h"
-#include "cmServerConnection.h"
+# include "cmDependsFortran.h" // For -E cmake_copy_f90_mod callback.
+# include "cmServer.h"
+# include "cmServerConnection.h"
#endif
#if defined(CMAKE_BUILD_WITH_CMAKE) && defined(_WIN32)
-#include "bindexplib.h"
+# include "bindexplib.h"
#endif
#if defined(CMAKE_BUILD_WITH_CMAKE) && defined(_WIN32) && !defined(__CYGWIN__)
-#include "cmVisualStudioWCEPlatformParser.h"
+# include "cmVisualStudioWCEPlatformParser.h"
#endif
#include "cmsys/Directory.hxx"
@@ -1775,8 +1775,9 @@ int cmVSLink::LinkIncremental()
if (!fout) {
return -1;
}
- fout << this->Type << " /* CREATEPROCESS_MANIFEST_RESOURCE_ID */ "
- "24 /* RT_MANIFEST */ \""
+ fout << this->Type
+ << " /* CREATEPROCESS_MANIFEST_RESOURCE_ID */ "
+ "24 /* RT_MANIFEST */ \""
<< absManifestFile << "\"";
}
diff --git a/Source/ctest.cxx b/Source/ctest.cxx
index 0a6d1d2..b338dea 100644
--- a/Source/ctest.cxx
+++ b/Source/ctest.cxx
@@ -9,7 +9,7 @@
#include "cmsys/Encoding.hxx"
#if defined(_WIN32) && defined(CMAKE_BUILD_WITH_CMAKE)
-#include "cmsys/ConsoleBuf.hxx"
+# include "cmsys/ConsoleBuf.hxx"
#endif
#include <iostream>
#include <string.h>
@@ -30,60 +30,76 @@ static const char* cmDocumentationOptions[][2] = {
{ "-V,--verbose", "Enable verbose output from tests." },
{ "-VV,--extra-verbose", "Enable more verbose output from tests." },
{ "--debug", "Displaying more verbose internals of CTest." },
- { "--output-on-failure", "Output anything outputted by the test program "
- "if the test should fail." },
- { "--test-output-size-passed <size>", "Limit the output for passed tests "
- "to <size> bytes" },
- { "--test-output-size-failed <size>", "Limit the output for failed tests "
- "to <size> bytes" },
+ { "--output-on-failure",
+ "Output anything outputted by the test program "
+ "if the test should fail." },
+ { "--test-output-size-passed <size>",
+ "Limit the output for passed tests "
+ "to <size> bytes" },
+ { "--test-output-size-failed <size>",
+ "Limit the output for failed tests "
+ "to <size> bytes" },
{ "-F", "Enable failover." },
- { "-j <jobs>, --parallel <jobs>", "Run the tests in parallel using the "
- "given number of jobs." },
+ { "-j <jobs>, --parallel <jobs>",
+ "Run the tests in parallel using the "
+ "given number of jobs." },
{ "-Q,--quiet", "Make ctest quiet." },
{ "-O <file>, --output-log <file>", "Output to log file" },
{ "-N,--show-only", "Disable actual execution of tests." },
- { "-L <regex>, --label-regex <regex>", "Run tests with labels matching "
- "regular expression." },
- { "-R <regex>, --tests-regex <regex>", "Run tests matching regular "
- "expression." },
- { "-E <regex>, --exclude-regex <regex>", "Exclude tests matching regular "
- "expression." },
- { "-LE <regex>, --label-exclude <regex>", "Exclude tests with labels "
- "matching regular expression." },
- { "-FA <regex>, --fixture-exclude-any <regex>", "Do not automatically "
- "add any tests for "
- "fixtures matching "
- "regular expression." },
- { "-FS <regex>, --fixture-exclude-setup <regex>", "Do not automatically "
- "add setup tests for "
- "fixtures matching "
- "regular expression." },
- { "-FC <regex>, --fixture-exclude-cleanup <regex>", "Do not automatically "
- "add cleanup tests for "
- "fixtures matching "
- "regular expression." },
+ { "-L <regex>, --label-regex <regex>",
+ "Run tests with labels matching "
+ "regular expression." },
+ { "-R <regex>, --tests-regex <regex>",
+ "Run tests matching regular "
+ "expression." },
+ { "-E <regex>, --exclude-regex <regex>",
+ "Exclude tests matching regular "
+ "expression." },
+ { "-LE <regex>, --label-exclude <regex>",
+ "Exclude tests with labels "
+ "matching regular expression." },
+ { "-FA <regex>, --fixture-exclude-any <regex>",
+ "Do not automatically "
+ "add any tests for "
+ "fixtures matching "
+ "regular expression." },
+ { "-FS <regex>, --fixture-exclude-setup <regex>",
+ "Do not automatically "
+ "add setup tests for "
+ "fixtures matching "
+ "regular expression." },
+ { "-FC <regex>, --fixture-exclude-cleanup <regex>",
+ "Do not automatically "
+ "add cleanup tests for "
+ "fixtures matching "
+ "regular expression." },
{ "-D <dashboard>, --dashboard <dashboard>", "Execute dashboard test" },
{ "-D <var>:<type>=<value>", "Define a variable for script mode" },
{ "-M <model>, --test-model <model>", "Sets the model for a dashboard" },
- { "-T <action>, --test-action <action>", "Sets the dashboard action to "
- "perform" },
+ { "-T <action>, --test-action <action>",
+ "Sets the dashboard action to "
+ "perform" },
{ "--track <track>", "Specify the track to submit dashboard to" },
- { "-S <script>, --script <script>", "Execute a dashboard for a "
- "configuration" },
- { "-SP <script>, --script-new-process <script>", "Execute a dashboard for a "
- "configuration" },
+ { "-S <script>, --script <script>",
+ "Execute a dashboard for a "
+ "configuration" },
+ { "-SP <script>, --script-new-process <script>",
+ "Execute a dashboard for a "
+ "configuration" },
{ "-A <file>, --add-notes <file>", "Add a notes file with submission" },
{ "-I [Start,End,Stride,test#,test#|Test file], --tests-information",
"Run a specific number of tests by number." },
{ "-U, --union", "Take the Union of -I and -R" },
{ "--rerun-failed", "Run only the tests that failed previously" },
- { "--repeat-until-fail <n>", "Require each test to run <n> "
- "times without failing in order to pass" },
+ { "--repeat-until-fail <n>",
+ "Require each test to run <n> "
+ "times without failing in order to pass" },
{ "--max-width <width>", "Set the max width for a test name to output" },
{ "--interactive-debug-mode [0|1]", "Set the interactive mode to 0 or 1." },
{ "--no-label-summary", "Disable timing summary information for labels." },
- { "--no-subproject-summary", "Disable timing summary information for "
- "subprojects." },
+ { "--no-subproject-summary",
+ "Disable timing summary information for "
+ "subprojects." },
{ "--build-and-test", "Configure, build and run a test." },
{ "--build-target", "Specify a specific target to build." },
{ "--build-nocmake", "Run the build without running cmake first." },
@@ -161,7 +177,8 @@ int main(int argc, char const* const* argv)
!(cmSystemTools::FileExists("CTestTestfile.cmake") ||
cmSystemTools::FileExists("DartTestfile.txt"))) {
if (argc == 1) {
- cmCTestLog(&inst, ERROR_MESSAGE, "*********************************"
+ cmCTestLog(&inst, ERROR_MESSAGE,
+ "*********************************"
<< std::endl
<< "No test configuration file found!" << std::endl
<< "*********************************" << std::endl);
diff --git a/Tests/AliasTarget/bat.cpp b/Tests/AliasTarget/bat.cpp
index cb76bfe..14942bf 100644
--- a/Tests/AliasTarget/bat.cpp
+++ b/Tests/AliasTarget/bat.cpp
@@ -1,22 +1,22 @@
#ifndef FOO_DEFINE
-#error Expected FOO_DEFINE
+# error Expected FOO_DEFINE
#endif
#ifndef BAR_DEFINE
-#error Expected Bar_DEFINE
+# error Expected Bar_DEFINE
#endif
#include "commandoutput.h"
#ifndef COMMANDOUTPUT_DEFINE
-#error Expected COMMANDOUTPUT_DEFINE
+# error Expected COMMANDOUTPUT_DEFINE
#endif
#include "targetoutput.h"
#ifndef TARGETOUTPUT_DEFINE
-#error Expected TARGETOUTPUT_DEFINE
+# error Expected TARGETOUTPUT_DEFINE
#endif
#ifdef _WIN32
diff --git a/Tests/BundleTest/BundleLib.cxx b/Tests/BundleTest/BundleLib.cxx
index 9ae802f..2e4325c 100644
--- a/Tests/BundleTest/BundleLib.cxx
+++ b/Tests/BundleTest/BundleLib.cxx
@@ -8,7 +8,7 @@
int fileExists(char* filename)
{
#ifndef R_OK
-#define R_OK 04
+# define R_OK 04
#endif
if (access(filename, R_OK) != 0) {
printf("Cannot find file: %s\n", filename);
diff --git a/Tests/BundleUtilities/framework.h b/Tests/BundleUtilities/framework.h
index 343317c..5a3cfc4 100644
--- a/Tests/BundleUtilities/framework.h
+++ b/Tests/BundleUtilities/framework.h
@@ -3,13 +3,13 @@
#define framework_h
#ifdef WIN32
-#ifdef framework_EXPORTS
-#define FRAMEWORK_EXPORT __declspec(dllexport)
+# ifdef framework_EXPORTS
+# define FRAMEWORK_EXPORT __declspec(dllexport)
+# else
+# define FRAMEWORK_EXPORT __declspec(dllimport)
+# endif
#else
-#define FRAMEWORK_EXPORT __declspec(dllimport)
-#endif
-#else
-#define FRAMEWORK_EXPORT
+# define FRAMEWORK_EXPORT
#endif
void FRAMEWORK_EXPORT framework();
diff --git a/Tests/BundleUtilities/shared.h b/Tests/BundleUtilities/shared.h
index 28904fd..5d5b633 100644
--- a/Tests/BundleUtilities/shared.h
+++ b/Tests/BundleUtilities/shared.h
@@ -3,13 +3,13 @@
#define shared_h
#ifdef WIN32
-#ifdef shared_EXPORTS
-#define SHARED_EXPORT __declspec(dllexport)
+# ifdef shared_EXPORTS
+# define SHARED_EXPORT __declspec(dllexport)
+# else
+# define SHARED_EXPORT __declspec(dllimport)
+# endif
#else
-#define SHARED_EXPORT __declspec(dllimport)
-#endif
-#else
-#define SHARED_EXPORT
+# define SHARED_EXPORT
#endif
void SHARED_EXPORT shared();
diff --git a/Tests/BundleUtilities/shared2.h b/Tests/BundleUtilities/shared2.h
index 3f0015c..3f016c8 100644
--- a/Tests/BundleUtilities/shared2.h
+++ b/Tests/BundleUtilities/shared2.h
@@ -3,13 +3,13 @@
#define shared2_h
#ifdef WIN32
-#ifdef shared2_EXPORTS
-#define SHARED2_EXPORT __declspec(dllexport)
+# ifdef shared2_EXPORTS
+# define SHARED2_EXPORT __declspec(dllexport)
+# else
+# define SHARED2_EXPORT __declspec(dllimport)
+# endif
#else
-#define SHARED2_EXPORT __declspec(dllimport)
-#endif
-#else
-#define SHARED2_EXPORT
+# define SHARED2_EXPORT
#endif
void SHARED2_EXPORT shared2();
diff --git a/Tests/BundleUtilities/testbundleutils1.cpp b/Tests/BundleUtilities/testbundleutils1.cpp
index 3eb6a44..080157a 100644
--- a/Tests/BundleUtilities/testbundleutils1.cpp
+++ b/Tests/BundleUtilities/testbundleutils1.cpp
@@ -4,9 +4,9 @@
#include "stdio.h"
#if defined(WIN32)
-#include <windows.h>
+# include <windows.h>
#else
-#include "dlfcn.h"
+# include "dlfcn.h"
#endif
int main(int, char**)
diff --git a/Tests/BundleUtilities/testbundleutils2.cpp b/Tests/BundleUtilities/testbundleutils2.cpp
index c39eb52..e747544 100644
--- a/Tests/BundleUtilities/testbundleutils2.cpp
+++ b/Tests/BundleUtilities/testbundleutils2.cpp
@@ -4,9 +4,9 @@
#include "stdio.h"
#if defined(WIN32)
-#include <windows.h>
+# include <windows.h>
#else
-#include "dlfcn.h"
+# include "dlfcn.h"
#endif
int main(int, char**)
diff --git a/Tests/BundleUtilities/testbundleutils3.cpp b/Tests/BundleUtilities/testbundleutils3.cpp
index 3bc8a83..2dee46f 100644
--- a/Tests/BundleUtilities/testbundleutils3.cpp
+++ b/Tests/BundleUtilities/testbundleutils3.cpp
@@ -4,9 +4,9 @@
#include "stdio.h"
#if defined(WIN32)
-#include <windows.h>
+# include <windows.h>
#else
-#include "dlfcn.h"
+# include "dlfcn.h"
#endif
int main(int, char**)
diff --git a/Tests/CMakeCommands/add_compile_definitions/main.cpp b/Tests/CMakeCommands/add_compile_definitions/main.cpp
index b382922..41ff25f 100644
--- a/Tests/CMakeCommands/add_compile_definitions/main.cpp
+++ b/Tests/CMakeCommands/add_compile_definitions/main.cpp
@@ -1,14 +1,14 @@
#ifndef TEST_DEFINITION
-#error Expected TEST_DEFINITION
+# error Expected TEST_DEFINITION
#endif
#ifndef LANG_CXX
-#error Expected LANG_CXX
+# error Expected LANG_CXX
#endif
#ifdef UNPEXTED_DEFINITION
-#error Unexpected UNPEXTED_DEFINITION
+# error Unexpected UNPEXTED_DEFINITION
#endif
int main(void)
diff --git a/Tests/CMakeCommands/add_compile_options/main.cpp b/Tests/CMakeCommands/add_compile_options/main.cpp
index 1d57021..53f54b7 100644
--- a/Tests/CMakeCommands/add_compile_options/main.cpp
+++ b/Tests/CMakeCommands/add_compile_options/main.cpp
@@ -1,8 +1,8 @@
#ifdef DO_GNU_TESTS
-#ifndef TEST_OPTION
-#error Expected TEST_OPTION
-#endif
+# ifndef TEST_OPTION
+# error Expected TEST_OPTION
+# endif
#endif
int main(void)
diff --git a/Tests/CMakeCommands/target_compile_definitions/consumer.c b/Tests/CMakeCommands/target_compile_definitions/consumer.c
index e134a8b..bacd4c4 100644
--- a/Tests/CMakeCommands/target_compile_definitions/consumer.c
+++ b/Tests/CMakeCommands/target_compile_definitions/consumer.c
@@ -2,37 +2,37 @@
// Visual Studio allows only one set of flags for C and C++.
// In a target using C++ we pick the C++ flags even for C sources.
#ifdef TEST_LANG_DEFINES_FOR_VISUAL_STUDIO_OR_XCODE
-#ifndef CONSUMER_LANG_CXX
-#error Expected CONSUMER_LANG_CXX
-#endif
+# ifndef CONSUMER_LANG_CXX
+# error Expected CONSUMER_LANG_CXX
+# endif
-#ifdef CONSUMER_LANG_C
-#error Unexpected CONSUMER_LANG_C
-#endif
+# ifdef CONSUMER_LANG_C
+# error Unexpected CONSUMER_LANG_C
+# endif
-#if !LANG_IS_CXX
-#error Expected LANG_IS_CXX
-#endif
+# if !LANG_IS_CXX
+# error Expected LANG_IS_CXX
+# endif
-#if LANG_IS_C
-#error Unexpected LANG_IS_C
-#endif
+# if LANG_IS_C
+# error Unexpected LANG_IS_C
+# endif
#else
-#ifdef CONSUMER_LANG_CXX
-#error Unexpected CONSUMER_LANG_CXX
-#endif
+# ifdef CONSUMER_LANG_CXX
+# error Unexpected CONSUMER_LANG_CXX
+# endif
-#ifndef CONSUMER_LANG_C
-#error Expected CONSUMER_LANG_C
-#endif
+# ifndef CONSUMER_LANG_C
+# error Expected CONSUMER_LANG_C
+# endif
-#if !LANG_IS_C
-#error Expected LANG_IS_C
-#endif
+# if !LANG_IS_C
+# error Expected LANG_IS_C
+# endif
-#if LANG_IS_CXX
-#error Unexpected LANG_IS_CXX
-#endif
+# if LANG_IS_CXX
+# error Unexpected LANG_IS_CXX
+# endif
#endif
void consumer_c()
diff --git a/Tests/CMakeCommands/target_compile_definitions/consumer.cpp b/Tests/CMakeCommands/target_compile_definitions/consumer.cpp
index 69ea151..0999526 100644
--- a/Tests/CMakeCommands/target_compile_definitions/consumer.cpp
+++ b/Tests/CMakeCommands/target_compile_definitions/consumer.cpp
@@ -1,34 +1,34 @@
#ifdef MY_PRIVATE_DEFINE
-#error Unexpected MY_PRIVATE_DEFINE
+# error Unexpected MY_PRIVATE_DEFINE
#endif
#ifndef MY_PUBLIC_DEFINE
-#error Expected MY_PUBLIC_DEFINE
+# error Expected MY_PUBLIC_DEFINE
#endif
#ifndef MY_INTERFACE_DEFINE
-#error Expected MY_INTERFACE_DEFINE
+# error Expected MY_INTERFACE_DEFINE
#endif
#ifndef DASH_D_DEFINE
-#error Expected DASH_D_DEFINE
+# error Expected DASH_D_DEFINE
#endif
#ifndef CONSUMER_LANG_CXX
-#error Expected CONSUMER_LANG_CXX
+# error Expected CONSUMER_LANG_CXX
#endif
#ifdef CONSUMER_LANG_C
-#error Unexpected CONSUMER_LANG_C
+# error Unexpected CONSUMER_LANG_C
#endif
#if !LANG_IS_CXX
-#error Expected LANG_IS_CXX
+# error Expected LANG_IS_CXX
#endif
#if LANG_IS_C
-#error Unexpected LANG_IS_C
+# error Unexpected LANG_IS_C
#endif
int main()
diff --git a/Tests/CMakeCommands/target_compile_definitions/main.cpp b/Tests/CMakeCommands/target_compile_definitions/main.cpp
index bf08b45..3f64dc8 100644
--- a/Tests/CMakeCommands/target_compile_definitions/main.cpp
+++ b/Tests/CMakeCommands/target_compile_definitions/main.cpp
@@ -1,14 +1,14 @@
#ifndef MY_PRIVATE_DEFINE
-#error Expected MY_PRIVATE_DEFINE
+# error Expected MY_PRIVATE_DEFINE
#endif
#ifndef MY_PUBLIC_DEFINE
-#error Expected MY_PUBLIC_DEFINE
+# error Expected MY_PUBLIC_DEFINE
#endif
#ifdef MY_INTERFACE_DEFINE
-#error Unexpected MY_INTERFACE_DEFINE
+# error Unexpected MY_INTERFACE_DEFINE
#endif
int main()
diff --git a/Tests/CMakeCommands/target_compile_options/consumer.c b/Tests/CMakeCommands/target_compile_options/consumer.c
index 420b4cc..f9b6654 100644
--- a/Tests/CMakeCommands/target_compile_options/consumer.c
+++ b/Tests/CMakeCommands/target_compile_options/consumer.c
@@ -2,37 +2,37 @@
// Visual Studio allows only one set of flags for C and C++.
// In a target using C++ we pick the C++ flags even for C sources.
#ifdef TEST_LANG_DEFINES_FOR_VISUAL_STUDIO
-#ifndef CONSUMER_LANG_CXX
-#error Expected CONSUMER_LANG_CXX
-#endif
+# ifndef CONSUMER_LANG_CXX
+# error Expected CONSUMER_LANG_CXX
+# endif
-#ifdef CONSUMER_LANG_C
-#error Unexpected CONSUMER_LANG_C
-#endif
+# ifdef CONSUMER_LANG_C
+# error Unexpected CONSUMER_LANG_C
+# endif
-#if !LANG_IS_CXX
-#error Expected LANG_IS_CXX
-#endif
+# if !LANG_IS_CXX
+# error Expected LANG_IS_CXX
+# endif
-#if LANG_IS_C
-#error Unexpected LANG_IS_C
-#endif
+# if LANG_IS_C
+# error Unexpected LANG_IS_C
+# endif
#else
-#ifdef CONSUMER_LANG_CXX
-#error Unexpected CONSUMER_LANG_CXX
-#endif
+# ifdef CONSUMER_LANG_CXX
+# error Unexpected CONSUMER_LANG_CXX
+# endif
-#ifndef CONSUMER_LANG_C
-#error Expected CONSUMER_LANG_C
-#endif
+# ifndef CONSUMER_LANG_C
+# error Expected CONSUMER_LANG_C
+# endif
-#if !LANG_IS_C
-#error Expected LANG_IS_C
-#endif
+# if !LANG_IS_C
+# error Expected LANG_IS_C
+# endif
-#if LANG_IS_CXX
-#error Unexpected LANG_IS_CXX
-#endif
+# if LANG_IS_CXX
+# error Unexpected LANG_IS_CXX
+# endif
#endif
void consumer_c()
diff --git a/Tests/CMakeCommands/target_compile_options/consumer.cpp b/Tests/CMakeCommands/target_compile_options/consumer.cpp
index 7750950..fe79eb5 100644
--- a/Tests/CMakeCommands/target_compile_options/consumer.cpp
+++ b/Tests/CMakeCommands/target_compile_options/consumer.cpp
@@ -1,34 +1,34 @@
#ifdef DO_GNU_TESTS
-#ifdef MY_PRIVATE_DEFINE
-#error Unexpected MY_PRIVATE_DEFINE
-#endif
+# ifdef MY_PRIVATE_DEFINE
+# error Unexpected MY_PRIVATE_DEFINE
+# endif
-#ifndef MY_PUBLIC_DEFINE
-#error Expected MY_PUBLIC_DEFINE
-#endif
+# ifndef MY_PUBLIC_DEFINE
+# error Expected MY_PUBLIC_DEFINE
+# endif
-#ifndef MY_INTERFACE_DEFINE
-#error Expected MY_INTERFACE_DEFINE
-#endif
+# ifndef MY_INTERFACE_DEFINE
+# error Expected MY_INTERFACE_DEFINE
+# endif
#endif
#ifndef CONSUMER_LANG_CXX
-#error Expected CONSUMER_LANG_CXX
+# error Expected CONSUMER_LANG_CXX
#endif
#ifdef CONSUMER_LANG_C
-#error Unexpected CONSUMER_LANG_C
+# error Unexpected CONSUMER_LANG_C
#endif
#if !LANG_IS_CXX
-#error Expected LANG_IS_CXX
+# error Expected LANG_IS_CXX
#endif
#if LANG_IS_C
-#error Unexpected LANG_IS_C
+# error Unexpected LANG_IS_C
#endif
int main()
diff --git a/Tests/CMakeCommands/target_compile_options/main.cpp b/Tests/CMakeCommands/target_compile_options/main.cpp
index ac472ae..829a25e 100644
--- a/Tests/CMakeCommands/target_compile_options/main.cpp
+++ b/Tests/CMakeCommands/target_compile_options/main.cpp
@@ -1,17 +1,17 @@
#ifdef DO_GNU_TESTS
-#ifndef MY_PRIVATE_DEFINE
-#error Expected MY_PRIVATE_DEFINE
-#endif
+# ifndef MY_PRIVATE_DEFINE
+# error Expected MY_PRIVATE_DEFINE
+# endif
-#ifndef MY_PUBLIC_DEFINE
-#error Expected MY_PUBLIC_DEFINE
-#endif
+# ifndef MY_PUBLIC_DEFINE
+# error Expected MY_PUBLIC_DEFINE
+# endif
-#ifdef MY_INTERFACE_DEFINE
-#error Unexpected MY_INTERFACE_DEFINE
-#endif
+# ifdef MY_INTERFACE_DEFINE
+# error Unexpected MY_INTERFACE_DEFINE
+# endif
#endif
diff --git a/Tests/CMakeCommands/target_include_directories/consumer.c b/Tests/CMakeCommands/target_include_directories/consumer.c
index 419c2d2..7fd694b 100644
--- a/Tests/CMakeCommands/target_include_directories/consumer.c
+++ b/Tests/CMakeCommands/target_include_directories/consumer.c
@@ -2,17 +2,17 @@
// Visual Studio allows only one set of flags for C and C++.
// In a target using C++ we pick the C++ flags even for C sources.
#ifdef TEST_LANG_DEFINES_FOR_VISUAL_STUDIO_OR_XCODE
-#include "cxx_only.h"
+# include "cxx_only.h"
-#ifndef CXX_ONLY_DEFINE
-#error Expected CXX_ONLY_DEFINE
-#endif
+# ifndef CXX_ONLY_DEFINE
+# error Expected CXX_ONLY_DEFINE
+# endif
#else
-#include "c_only.h"
+# include "c_only.h"
-#ifndef C_ONLY_DEFINE
-#error Expected C_ONLY_DEFINE
-#endif
+# ifndef C_ONLY_DEFINE
+# error Expected C_ONLY_DEFINE
+# endif
#endif
int consumer_c()
diff --git a/Tests/CMakeCommands/target_include_directories/consumer.cpp b/Tests/CMakeCommands/target_include_directories/consumer.cpp
index 1e018ad..267b0a3 100644
--- a/Tests/CMakeCommands/target_include_directories/consumer.cpp
+++ b/Tests/CMakeCommands/target_include_directories/consumer.cpp
@@ -7,31 +7,31 @@
#include "relative_dir.h"
#ifdef PRIVATEINCLUDE_DEFINE
-#error Unexpected PRIVATEINCLUDE_DEFINE
+# error Unexpected PRIVATEINCLUDE_DEFINE
#endif
#ifndef PUBLICINCLUDE_DEFINE
-#error Expected PUBLICINCLUDE_DEFINE
+# error Expected PUBLICINCLUDE_DEFINE
#endif
#ifndef INTERFACEINCLUDE_DEFINE
-#error Expected INTERFACEINCLUDE_DEFINE
+# error Expected INTERFACEINCLUDE_DEFINE
#endif
#ifndef CURE_DEFINE
-#error Expected CURE_DEFINE
+# error Expected CURE_DEFINE
#endif
#ifndef RELATIVE_DIR_DEFINE
-#error Expected RELATIVE_DIR_DEFINE
+# error Expected RELATIVE_DIR_DEFINE
#endif
#ifndef CONSUMER_DEFINE
-#error Expected CONSUMER_DEFINE
+# error Expected CONSUMER_DEFINE
#endif
#ifndef CXX_ONLY_DEFINE
-#error Expected CXX_ONLY_DEFINE
+# error Expected CXX_ONLY_DEFINE
#endif
int main()
diff --git a/Tests/CMakeCommands/target_include_directories/main.cpp b/Tests/CMakeCommands/target_include_directories/main.cpp
index 71298ce..dd591bf 100644
--- a/Tests/CMakeCommands/target_include_directories/main.cpp
+++ b/Tests/CMakeCommands/target_include_directories/main.cpp
@@ -4,19 +4,19 @@
#include "publicinclude.h"
#ifndef PRIVATEINCLUDE_DEFINE
-#error Expected PRIVATEINCLUDE_DEFINE
+# error Expected PRIVATEINCLUDE_DEFINE
#endif
#ifndef PUBLICINCLUDE_DEFINE
-#error Expected PUBLICINCLUDE_DEFINE
+# error Expected PUBLICINCLUDE_DEFINE
#endif
#ifdef INTERFACEINCLUDE_DEFINE
-#error Unexpected INTERFACEINCLUDE_DEFINE
+# error Unexpected INTERFACEINCLUDE_DEFINE
#endif
#ifndef CURE_DEFINE
-#error Expected CURE_DEFINE
+# error Expected CURE_DEFINE
#endif
int main()
diff --git a/Tests/CMakeCommands/target_link_libraries/libgenex.h b/Tests/CMakeCommands/target_link_libraries/libgenex.h
index 733f9b6..59ac18a 100644
--- a/Tests/CMakeCommands/target_link_libraries/libgenex.h
+++ b/Tests/CMakeCommands/target_link_libraries/libgenex.h
@@ -2,7 +2,7 @@
#include "libgenex_export.h"
#ifndef LIBGENEX_H
-#define LIBGENEX_H
+# define LIBGENEX_H
struct LIBGENEX_EXPORT LibGenex
{
diff --git a/Tests/CMakeCommands/target_link_libraries/targetC.cpp b/Tests/CMakeCommands/target_link_libraries/targetC.cpp
index 7c5c9e4..cae02b9 100644
--- a/Tests/CMakeCommands/target_link_libraries/targetC.cpp
+++ b/Tests/CMakeCommands/target_link_libraries/targetC.cpp
@@ -5,7 +5,7 @@
#include "foo.h"
#ifndef TEST_DEF
-#error Expected TEST_DEF definition
+# error Expected TEST_DEF definition
#endif
int main(int, char**)
diff --git a/Tests/CMakeLib/testEncoding.cxx b/Tests/CMakeLib/testEncoding.cxx
index 11f6409..d608e86 100644
--- a/Tests/CMakeLib/testEncoding.cxx
+++ b/Tests/CMakeLib/testEncoding.cxx
@@ -3,7 +3,7 @@
#include <string>
#ifdef _WIN32
-#include "cmsys/ConsoleBuf.hxx"
+# include "cmsys/ConsoleBuf.hxx"
#endif
#ifdef _WIN32
diff --git a/Tests/CMakeLib/testUVRAII.cxx b/Tests/CMakeLib/testUVRAII.cxx
index 44def25..e165ff7 100644
--- a/Tests/CMakeLib/testUVRAII.cxx
+++ b/Tests/CMakeLib/testUVRAII.cxx
@@ -30,7 +30,8 @@ static bool testAsyncShutdown()
std::thread([&] {
std::this_thread::sleep_for(std::chrono::seconds(2));
signal.send();
- }).detach();
+ })
+ .detach();
if (uv_run(&Loop, UV_RUN_DEFAULT) != 0) {
std::cerr << "Unclean exit state in testAsyncDtor" << std::endl;
diff --git a/Tests/CMakeLib/testVisualStudioSlnParser.cxx b/Tests/CMakeLib/testVisualStudioSlnParser.cxx
index f8bcfae..c7fd585 100644
--- a/Tests/CMakeLib/testVisualStudioSlnParser.cxx
+++ b/Tests/CMakeLib/testVisualStudioSlnParser.cxx
@@ -45,17 +45,55 @@ int testVisualStudioSlnParser(int, char* [])
}
const std::vector<cmSlnProjectEntry>& projects = data.GetProjects();
const char* const names[] = {
- "3rdParty", "ALL_BUILD", "CMakeLib", "CMakeLibTests",
- "CMakePredefinedTargets", "CPackLib", "CTestDashboardTargets",
- "CTestLib", "Continuous", "Documentation", "Experimental", "INSTALL",
- "KWSys", "LIBCURL", "Nightly", "NightlyMemoryCheck", "PACKAGE",
- "RUN_TESTS", "Tests", "Utilities", "Win9xCompat", "ZERO_CHECK",
- "cmIML_test", "cmake", "cmbzip2", "cmcldeps", "cmcompress", "cmcurl",
- "cmexpat", "cmlibarchive", "cmsys", "cmsysEncodeExecutable",
- "cmsysProcessFwd9x", "cmsysTestDynload", "cmsysTestProcess",
- "cmsysTestSharedForward", "cmsysTestsC", "cmsysTestsCxx", "cmsys_c",
- "cmw9xcom", "cmzlib", "cpack", "ctest", "documentation", "memcheck_fail",
- "pseudo_BC", "pseudo_purify", "pseudo_valgrind", "test_clean",
+ "3rdParty",
+ "ALL_BUILD",
+ "CMakeLib",
+ "CMakeLibTests",
+ "CMakePredefinedTargets",
+ "CPackLib",
+ "CTestDashboardTargets",
+ "CTestLib",
+ "Continuous",
+ "Documentation",
+ "Experimental",
+ "INSTALL",
+ "KWSys",
+ "LIBCURL",
+ "Nightly",
+ "NightlyMemoryCheck",
+ "PACKAGE",
+ "RUN_TESTS",
+ "Tests",
+ "Utilities",
+ "Win9xCompat",
+ "ZERO_CHECK",
+ "cmIML_test",
+ "cmake",
+ "cmbzip2",
+ "cmcldeps",
+ "cmcompress",
+ "cmcurl",
+ "cmexpat",
+ "cmlibarchive",
+ "cmsys",
+ "cmsysEncodeExecutable",
+ "cmsysProcessFwd9x",
+ "cmsysTestDynload",
+ "cmsysTestProcess",
+ "cmsysTestSharedForward",
+ "cmsysTestsC",
+ "cmsysTestsCxx",
+ "cmsys_c",
+ "cmw9xcom",
+ "cmzlib",
+ "cpack",
+ "ctest",
+ "documentation",
+ "memcheck_fail",
+ "pseudo_BC",
+ "pseudo_purify",
+ "pseudo_valgrind",
+ "test_clean",
"uninstall"
/* clang-format needs this comment to break after the opening brace */
};
diff --git a/Tests/COnly/libc2.h b/Tests/COnly/libc2.h
index 7bc4fb1..43ebce9 100644
--- a/Tests/COnly/libc2.h
+++ b/Tests/COnly/libc2.h
@@ -1,11 +1,11 @@
#ifdef _WIN32
-#ifdef testc2_EXPORTS
-#define CM_TEST_LIB_EXPORT __declspec(dllexport)
+# ifdef testc2_EXPORTS
+# define CM_TEST_LIB_EXPORT __declspec(dllexport)
+# else
+# define CM_TEST_LIB_EXPORT __declspec(dllimport)
+# endif
#else
-#define CM_TEST_LIB_EXPORT __declspec(dllimport)
-#endif
-#else
-#define CM_TEST_LIB_EXPORT
+# define CM_TEST_LIB_EXPORT
#endif
CM_TEST_LIB_EXPORT float LibC2Func();
diff --git a/Tests/COnly/testCModule.c b/Tests/COnly/testCModule.c
index 4381bd7..edeb2b1 100644
--- a/Tests/COnly/testCModule.c
+++ b/Tests/COnly/testCModule.c
@@ -1,7 +1,7 @@
#ifdef _WIN32
-#define TEST_EXPORT __declspec(dllexport)
+# define TEST_EXPORT __declspec(dllexport)
#else
-#define TEST_EXPORT
+# define TEST_EXPORT
#endif
TEST_EXPORT int testCModule(void)
{
diff --git a/Tests/CTestTestCostSerial/sleep.c b/Tests/CTestTestCostSerial/sleep.c
index b7abe94..8a174c9 100644
--- a/Tests/CTestTestCostSerial/sleep.c
+++ b/Tests/CTestTestCostSerial/sleep.c
@@ -1,7 +1,7 @@
#if defined(_WIN32)
-#include <windows.h>
+# include <windows.h>
#else
-#include <unistd.h>
+# include <unistd.h>
#endif
/* sleeps for 1 second */
diff --git a/Tests/CTestTestFdSetSize/sleep.c b/Tests/CTestTestFdSetSize/sleep.c
index 6676488..2fb6490 100644
--- a/Tests/CTestTestFdSetSize/sleep.c
+++ b/Tests/CTestTestFdSetSize/sleep.c
@@ -1,7 +1,7 @@
#if defined(_WIN32)
-#include <windows.h>
+# include <windows.h>
#else
-#include <unistd.h>
+# include <unistd.h>
#endif
/* sleeps for 0.1 second */
diff --git a/Tests/CTestTestScheduler/sleep.c b/Tests/CTestTestScheduler/sleep.c
index 41a5d45..327bff5 100644
--- a/Tests/CTestTestScheduler/sleep.c
+++ b/Tests/CTestTestScheduler/sleep.c
@@ -1,7 +1,7 @@
#if defined(_WIN32)
-#include <windows.h>
+# include <windows.h>
#else
-#include <unistd.h>
+# include <unistd.h>
#endif
/* sleeps for 4n seconds, where n is the argument to the program */
diff --git a/Tests/CTestTestStopTime/sleep.c b/Tests/CTestTestStopTime/sleep.c
index 3baad9e..b9b6e89 100644
--- a/Tests/CTestTestStopTime/sleep.c
+++ b/Tests/CTestTestStopTime/sleep.c
@@ -1,7 +1,7 @@
#if defined(_WIN32)
-#include <windows.h>
+# include <windows.h>
#else
-#include <unistd.h>
+# include <unistd.h>
#endif
/* sleeps for n seconds, where n is the argument to the program */
diff --git a/Tests/CTestTestTimeout/sleep.c b/Tests/CTestTestTimeout/sleep.c
index a4872b5..ebe1274 100644
--- a/Tests/CTestTestTimeout/sleep.c
+++ b/Tests/CTestTestTimeout/sleep.c
@@ -1,7 +1,7 @@
#if defined(_WIN32)
-#include <windows.h>
+# include <windows.h>
#else
-#include <unistd.h>
+# include <unistd.h>
#endif
#include <stdio.h>
diff --git a/Tests/CTestTestUpload/sleep.c b/Tests/CTestTestUpload/sleep.c
index 3baad9e..b9b6e89 100644
--- a/Tests/CTestTestUpload/sleep.c
+++ b/Tests/CTestTestUpload/sleep.c
@@ -1,7 +1,7 @@
#if defined(_WIN32)
-#include <windows.h>
+# include <windows.h>
#else
-#include <unistd.h>
+# include <unistd.h>
#endif
/* sleeps for n seconds, where n is the argument to the program */
diff --git a/Tests/CTestTestZeroTimeout/sleep.c b/Tests/CTestTestZeroTimeout/sleep.c
index 0be7bbc..5d0b89b 100644
--- a/Tests/CTestTestZeroTimeout/sleep.c
+++ b/Tests/CTestTestZeroTimeout/sleep.c
@@ -1,7 +1,7 @@
#if defined(_WIN32)
-#include <windows.h>
+# include <windows.h>
#else
-#include <unistd.h>
+# include <unistd.h>
#endif
/* sleeps for 5 seconds */
diff --git a/Tests/CompatibleInterface/main.cpp b/Tests/CompatibleInterface/main.cpp
index 93723af..0bccb82 100644
--- a/Tests/CompatibleInterface/main.cpp
+++ b/Tests/CompatibleInterface/main.cpp
@@ -1,26 +1,26 @@
#ifndef BOOL_PROP1
-#error Expected BOOL_PROP1
+# error Expected BOOL_PROP1
#endif
#ifndef BOOL_PROP2
-#error Expected BOOL_PROP2
+# error Expected BOOL_PROP2
#endif
#ifndef BOOL_PROP3
-#error Expected BOOL_PROP3
+# error Expected BOOL_PROP3
#endif
#ifndef STRING_PROP1
-#error Expected STRING_PROP1
+# error Expected STRING_PROP1
#endif
#ifndef STRING_PROP2
-#error Expected STRING_PROP2
+# error Expected STRING_PROP2
#endif
#ifndef STRING_PROP3
-#error Expected STRING_PROP3
+# error Expected STRING_PROP3
#endif
template <bool test>
diff --git a/Tests/CompileCommandOutput/relative.h b/Tests/CompileCommandOutput/relative.h
index 221e354..fa6eeff 100644
--- a/Tests/CompileCommandOutput/relative.h
+++ b/Tests/CompileCommandOutput/relative.h
@@ -1,11 +1,11 @@
#if defined(_WIN32)
-#ifdef test2_EXPORTS
-#define TEST2_EXPORT __declspec(dllexport)
+# ifdef test2_EXPORTS
+# define TEST2_EXPORT __declspec(dllexport)
+# else
+# define TEST2_EXPORT __declspec(dllimport)
+# endif
#else
-#define TEST2_EXPORT __declspec(dllimport)
-#endif
-#else
-#define TEST2_EXPORT
+# define TEST2_EXPORT
#endif
TEST2_EXPORT void relative();
diff --git a/Tests/CompileDefinitions/compiletest.c b/Tests/CompileDefinitions/compiletest.c
index 8871750..6624866 100644
--- a/Tests/CompileDefinitions/compiletest.c
+++ b/Tests/CompileDefinitions/compiletest.c
@@ -1,20 +1,20 @@
#ifndef LINK_C_DEFINE
-#error Expected LINK_C_DEFINE
+# error Expected LINK_C_DEFINE
#endif
#ifndef LINK_LANGUAGE_IS_C
-#error Expected LINK_LANGUAGE_IS_C
+# error Expected LINK_LANGUAGE_IS_C
#endif
#ifdef LINK_CXX_DEFINE
-#error Unexpected LINK_CXX_DEFINE
+# error Unexpected LINK_CXX_DEFINE
#endif
#ifdef LINK_LANGUAGE_IS_CXX
-#error Unexpected LINK_LANGUAGE_IS_CXX
+# error Unexpected LINK_LANGUAGE_IS_CXX
#endif
#ifdef DEBUG_MODE
-#error Unexpected DEBUG_MODE
+# error Unexpected DEBUG_MODE
#endif
int main(void)
diff --git a/Tests/CompileDefinitions/compiletest.cpp b/Tests/CompileDefinitions/compiletest.cpp
index 640e7cf..328e72e 100644
--- a/Tests/CompileDefinitions/compiletest.cpp
+++ b/Tests/CompileDefinitions/compiletest.cpp
@@ -1,10 +1,10 @@
#ifndef CMAKE_IS_FUN
-#error Expect CMAKE_IS_FUN definition
+# error Expect CMAKE_IS_FUN definition
#endif
#if CMAKE_IS != Fun
-#error Expect CMAKE_IS=Fun definition
+# error Expect CMAKE_IS=Fun definition
#endif
template <bool test>
@@ -43,67 +43,67 @@ enum
};
#ifdef TEST_GENERATOR_EXPRESSIONS
-#ifndef CMAKE_IS_DECLARATIVE
-#error Expect declarative definition
-#endif
-#ifdef GE_NOT_DEFINED
-#error Expect not defined generator expression
-#endif
-
-#ifndef ARGUMENT
-#error Expected define expanded from list
-#endif
-#ifndef LIST
-#error Expected define expanded from list
-#endif
-
-#ifndef PREFIX_DEF1
-#error Expect PREFIX_DEF1
-#endif
-
-#ifndef PREFIX_DEF2
-#error Expect PREFIX_DEF2
-#endif
-
-#ifndef LINK_CXX_DEFINE
-#error Expected LINK_CXX_DEFINE
-#endif
-#ifndef LINK_LANGUAGE_IS_CXX
-#error Expected LINK_LANGUAGE_IS_CXX
-#endif
-
-#ifdef LINK_C_DEFINE
-#error Unexpected LINK_C_DEFINE
-#endif
-#ifdef LINK_LANGUAGE_IS_C
-#error Unexpected LINK_LANGUAGE_IS_C
-#endif
+# ifndef CMAKE_IS_DECLARATIVE
+# error Expect declarative definition
+# endif
+# ifdef GE_NOT_DEFINED
+# error Expect not defined generator expression
+# endif
+
+# ifndef ARGUMENT
+# error Expected define expanded from list
+# endif
+# ifndef LIST
+# error Expected define expanded from list
+# endif
+
+# ifndef PREFIX_DEF1
+# error Expect PREFIX_DEF1
+# endif
+
+# ifndef PREFIX_DEF2
+# error Expect PREFIX_DEF2
+# endif
+
+# ifndef LINK_CXX_DEFINE
+# error Expected LINK_CXX_DEFINE
+# endif
+# ifndef LINK_LANGUAGE_IS_CXX
+# error Expected LINK_LANGUAGE_IS_CXX
+# endif
+
+# ifdef LINK_C_DEFINE
+# error Unexpected LINK_C_DEFINE
+# endif
+# ifdef LINK_LANGUAGE_IS_C
+# error Unexpected LINK_LANGUAGE_IS_C
+# endif
// TEST_GENERATOR_EXPRESSIONS
#endif
#ifndef BUILD_IS_DEBUG
-#error "BUILD_IS_DEBUG not defined!"
+# error "BUILD_IS_DEBUG not defined!"
#endif
#ifndef BUILD_IS_NOT_DEBUG
-#error "BUILD_IS_NOT_DEBUG not defined!"
+# error "BUILD_IS_NOT_DEBUG not defined!"
#endif
// Check per-config definitions.
#ifdef TEST_CONFIG_DEBUG
-#if !BUILD_IS_DEBUG
-#error "BUILD_IS_DEBUG false with TEST_CONFIG_DEBUG!"
-#endif
-#if BUILD_IS_NOT_DEBUG
-#error "BUILD_IS_NOT_DEBUG true with TEST_CONFIG_DEBUG!"
-#endif
+# if !BUILD_IS_DEBUG
+# error "BUILD_IS_DEBUG false with TEST_CONFIG_DEBUG!"
+# endif
+# if BUILD_IS_NOT_DEBUG
+# error "BUILD_IS_NOT_DEBUG true with TEST_CONFIG_DEBUG!"
+# endif
#else
-#if BUILD_IS_DEBUG
-#error "BUILD_IS_DEBUG true without TEST_CONFIG_DEBUG!"
-#endif
-#if !BUILD_IS_NOT_DEBUG
-#error "BUILD_IS_NOT_DEBUG false without TEST_CONFIG_DEBUG!"
-#endif
+# if BUILD_IS_DEBUG
+# error "BUILD_IS_DEBUG true without TEST_CONFIG_DEBUG!"
+# endif
+# if !BUILD_IS_NOT_DEBUG
+# error "BUILD_IS_NOT_DEBUG false without TEST_CONFIG_DEBUG!"
+# endif
#endif
int main(int argc, char** argv)
diff --git a/Tests/CompileDefinitions/compiletest_mixed_c.c b/Tests/CompileDefinitions/compiletest_mixed_c.c
index 5fbe45f..e4adef3 100644
--- a/Tests/CompileDefinitions/compiletest_mixed_c.c
+++ b/Tests/CompileDefinitions/compiletest_mixed_c.c
@@ -1,20 +1,20 @@
#ifndef LINK_CXX_DEFINE
-#error Expected LINK_CXX_DEFINE
+# error Expected LINK_CXX_DEFINE
#endif
#ifndef LINK_LANGUAGE_IS_CXX
-#error Expected LINK_LANGUAGE_IS_CXX
+# error Expected LINK_LANGUAGE_IS_CXX
#endif
#ifdef LINK_C_DEFINE
-#error Unexpected LINK_C_DEFINE
+# error Unexpected LINK_C_DEFINE
#endif
#ifdef LINK_LANGUAGE_IS_C
-#error Unexpected LINK_LANGUAGE_IS_C
+# error Unexpected LINK_LANGUAGE_IS_C
#endif
#ifndef C_EXECUTABLE_LINK_LANGUAGE_IS_C
-#error Expected C_EXECUTABLE_LINK_LANGUAGE_IS_C define
+# error Expected C_EXECUTABLE_LINK_LANGUAGE_IS_C define
#endif
void someFunc(void)
diff --git a/Tests/CompileDefinitions/compiletest_mixed_cxx.cpp b/Tests/CompileDefinitions/compiletest_mixed_cxx.cpp
index 4eab099..b50b4bf 100644
--- a/Tests/CompileDefinitions/compiletest_mixed_cxx.cpp
+++ b/Tests/CompileDefinitions/compiletest_mixed_cxx.cpp
@@ -1,20 +1,20 @@
#ifndef LINK_CXX_DEFINE
-#error Expected LINK_CXX_DEFINE
+# error Expected LINK_CXX_DEFINE
#endif
#ifndef LINK_LANGUAGE_IS_CXX
-#error Expected LINK_LANGUAGE_IS_CXX
+# error Expected LINK_LANGUAGE_IS_CXX
#endif
#ifdef LINK_C_DEFINE
-#error Unexpected LINK_C_DEFINE
+# error Unexpected LINK_C_DEFINE
#endif
#ifdef LINK_LANGUAGE_IS_C
-#error Unexpected LINK_LANGUAGE_IS_C
+# error Unexpected LINK_LANGUAGE_IS_C
#endif
#ifndef C_EXECUTABLE_LINK_LANGUAGE_IS_C
-#error Expected C_EXECUTABLE_LINK_LANGUAGE_IS_C define
+# error Expected C_EXECUTABLE_LINK_LANGUAGE_IS_C define
#endif
int main(int argc, char** argv)
diff --git a/Tests/CompileDefinitions/runtest.c b/Tests/CompileDefinitions/runtest.c
index 7c28ab9..c6dac4d 100644
--- a/Tests/CompileDefinitions/runtest.c
+++ b/Tests/CompileDefinitions/runtest.c
@@ -3,7 +3,7 @@
#include <string.h>
#ifndef BUILD_CONFIG_NAME
-#error "BUILD_CONFIG_NAME not defined!"
+# error "BUILD_CONFIG_NAME not defined!"
#endif
int main()
diff --git a/Tests/CompileDefinitions/target_prop/usetgt.c b/Tests/CompileDefinitions/target_prop/usetgt.c
index 8408a90..56823b0 100644
--- a/Tests/CompileDefinitions/target_prop/usetgt.c
+++ b/Tests/CompileDefinitions/target_prop/usetgt.c
@@ -1,11 +1,11 @@
#ifndef TGT_DEF
-#error TGT_DEF incorrectly not defined
+# error TGT_DEF incorrectly not defined
#endif
#ifndef TGT_TYPE_STATIC_LIBRARY
-#error TGT_TYPE_STATIC_LIBRARY incorrectly not defined
+# error TGT_TYPE_STATIC_LIBRARY incorrectly not defined
#endif
#ifdef TGT_TYPE_EXECUTABLE
-#error TGT_TYPE_EXECUTABLE incorrectly defined
+# error TGT_TYPE_EXECUTABLE incorrectly defined
#endif
int main(void)
{
diff --git a/Tests/CompileFeatures/cxx_attribute_deprecated.cpp b/Tests/CompileFeatures/cxx_attribute_deprecated.cpp
index 5482db8..8faeca8 100644
--- a/Tests/CompileFeatures/cxx_attribute_deprecated.cpp
+++ b/Tests/CompileFeatures/cxx_attribute_deprecated.cpp
@@ -1,8 +1,5 @@
-[[deprecated]] int foo()
-{
- return 0;
-}
+[[deprecated]] int foo() { return 0; }
int someFunc()
{
diff --git a/Tests/CompileFeatures/cxx_contextual_conversions.cpp b/Tests/CompileFeatures/cxx_contextual_conversions.cpp
index cbc7304..247f13f 100644
--- a/Tests/CompileFeatures/cxx_contextual_conversions.cpp
+++ b/Tests/CompileFeatures/cxx_contextual_conversions.cpp
@@ -17,6 +17,7 @@ public:
}
operator T&() { return val; }
operator T() const { return val; }
+
private:
T val;
};
diff --git a/Tests/CompileFeatures/cxx_generalized_initializers.cpp b/Tests/CompileFeatures/cxx_generalized_initializers.cpp
index 0df0a33..bfe0d41 100644
--- a/Tests/CompileFeatures/cxx_generalized_initializers.cpp
+++ b/Tests/CompileFeatures/cxx_generalized_initializers.cpp
@@ -1,5 +1,5 @@
#if defined(_MSC_VER) && _MSC_VER == 1800 && _MSC_FULL_VER < 180030723
-#error "VS 2013 safely supports this only with Update 3 or greater"
+# error "VS 2013 safely supports this only with Update 3 or greater"
#endif
// Dummy implementation. Test only the compiler feature.
diff --git a/Tests/CompileFeatures/cxx_lambda_init_captures.cpp b/Tests/CompileFeatures/cxx_lambda_init_captures.cpp
index 46f22cb..7e337fa 100644
--- a/Tests/CompileFeatures/cxx_lambda_init_captures.cpp
+++ b/Tests/CompileFeatures/cxx_lambda_init_captures.cpp
@@ -2,6 +2,5 @@
int someFunc()
{
int a = 0;
- return [b = static_cast<int&&>(a)]() { return b; }
- ();
+ return [b = static_cast<int&&>(a)]() { return b; }();
}
diff --git a/Tests/CompileFeatures/cxx_variadic_templates.cpp b/Tests/CompileFeatures/cxx_variadic_templates.cpp
index 6951230..627b8d9 100644
--- a/Tests/CompileFeatures/cxx_variadic_templates.cpp
+++ b/Tests/CompileFeatures/cxx_variadic_templates.cpp
@@ -1,5 +1,5 @@
#if defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) < 407)
-#define OLD_GNU
+# define OLD_GNU
#endif
#ifdef OLD_GNU
diff --git a/Tests/CompileFeatures/default_dialect.c b/Tests/CompileFeatures/default_dialect.c
index 2b4627c..6160c2f 100644
--- a/Tests/CompileFeatures/default_dialect.c
+++ b/Tests/CompileFeatures/default_dialect.c
@@ -1,20 +1,20 @@
#if DEFAULT_C11
-#if __STDC_VERSION__ < 201112L
-#error Unexpected value for __STDC_VERSION__.
-#endif
+# if __STDC_VERSION__ < 201112L
+# error Unexpected value for __STDC_VERSION__.
+# endif
#elif DEFAULT_C99
-#if __STDC_VERSION__ != 199901L
-#error Unexpected value for __STDC_VERSION__.
-#endif
+# if __STDC_VERSION__ != 199901L
+# error Unexpected value for __STDC_VERSION__.
+# endif
#else
-#if !DEFAULT_C90
-#error Buildsystem error
-#endif
-#if defined(__STDC_VERSION__) && \
- !(defined(__SUNPRO_C) && __STDC_VERSION__ == 199409L)
-#error Unexpected __STDC_VERSION__ definition
-#endif
+# if !DEFAULT_C90
+# error Buildsystem error
+# endif
+# if defined(__STDC_VERSION__) && \
+ !(defined(__SUNPRO_C) && __STDC_VERSION__ == 199409L)
+# error Unexpected __STDC_VERSION__ definition
+# endif
#endif
int main()
diff --git a/Tests/CompileFeatures/default_dialect.cpp b/Tests/CompileFeatures/default_dialect.cpp
index 7ddcfe7..3ee60a6 100644
--- a/Tests/CompileFeatures/default_dialect.cpp
+++ b/Tests/CompileFeatures/default_dialect.cpp
@@ -3,34 +3,35 @@ template <long l>
struct Outputter;
#if defined(_MSC_VER) && defined(_MSVC_LANG)
-#define CXX_STD _MSVC_LANG
+# define CXX_STD _MSVC_LANG
#else
-#define CXX_STD __cplusplus
+# define CXX_STD __cplusplus
#endif
#if DEFAULT_CXX20
-#if CXX_STD <= 201703L
+# if CXX_STD <= 201703L
Outputter<CXX_STD> o;
-#endif
+# endif
#elif DEFAULT_CXX17
-#if CXX_STD <= 201402L
+# if CXX_STD <= 201402L
Outputter<CXX_STD> o;
-#endif
+# endif
#elif DEFAULT_CXX14
-#if CXX_STD != 201402L
+# if CXX_STD != 201402L
Outputter<CXX_STD> o;
-#endif
+# endif
#elif DEFAULT_CXX11
-#if CXX_STD != 201103L
+# if CXX_STD != 201103L
Outputter<CXX_STD> o;
-#endif
+# endif
#else
-#if !DEFAULT_CXX98
-#error Buildsystem error
-#endif
-#if CXX_STD != 199711L && CXX_STD != 1 && !defined(__GXX_EXPERIMENTAL_CXX0X__)
+# if !DEFAULT_CXX98
+# error Buildsystem error
+# endif
+# if CXX_STD != 199711L && CXX_STD != 1 && \
+ !defined(__GXX_EXPERIMENTAL_CXX0X__)
Outputter<CXX_STD> o;
-#endif
+# endif
#endif
int main()
diff --git a/Tests/CompileFeatures/genex_test.c b/Tests/CompileFeatures/genex_test.c
index e58d793..de408ce 100644
--- a/Tests/CompileFeatures/genex_test.c
+++ b/Tests/CompileFeatures/genex_test.c
@@ -1,41 +1,41 @@
#ifndef EXPECT_C_STATIC_ASSERT
-#error EXPECT_C_STATIC_ASSERT not defined
+# error EXPECT_C_STATIC_ASSERT not defined
#endif
#ifndef EXPECT_C_FUNCTION_PROTOTYPES
-#error EXPECT_C_FUNCTION_PROTOTYPES not defined
+# error EXPECT_C_FUNCTION_PROTOTYPES not defined
#endif
#ifndef EXPECT_C_RESTRICT
-#error EXPECT_C_RESTRICT not defined
+# error EXPECT_C_RESTRICT not defined
#endif
#if !HAVE_C_STATIC_ASSERT
-#if EXPECT_C_STATIC_ASSERT
-#error "Expect c_static_assert feature"
-#endif
+# if EXPECT_C_STATIC_ASSERT
+# error "Expect c_static_assert feature"
+# endif
#else
-#if !EXPECT_C_STATIC_ASSERT
-#error "Expect no c_static_assert feature"
-#endif
+# if !EXPECT_C_STATIC_ASSERT
+# error "Expect no c_static_assert feature"
+# endif
#endif
#if !HAVE_C_FUNCTION_PROTOTYPES
-#if EXPECT_C_FUNCTION_PROTOTYPES
-#error Expect c_function_prototypes support
-#endif
+# if EXPECT_C_FUNCTION_PROTOTYPES
+# error Expect c_function_prototypes support
+# endif
#else
-#if !EXPECT_C_FUNCTION_PROTOTYPES
-#error Expect no c_function_prototypes support
-#endif
+# if !EXPECT_C_FUNCTION_PROTOTYPES
+# error Expect no c_function_prototypes support
+# endif
#endif
#if !HAVE_C_RESTRICT
-#if EXPECT_C_RESTRICT
-#error Expect c_restrict support
-#endif
+# if EXPECT_C_RESTRICT
+# error Expect c_restrict support
+# endif
#else
-#if !EXPECT_C_RESTRICT
-#error Expect no c_restrict support
-#endif
+# if !EXPECT_C_RESTRICT
+# error Expect no c_restrict support
+# endif
#endif
int main()
diff --git a/Tests/CompileFeatures/genex_test.cpp b/Tests/CompileFeatures/genex_test.cpp
index 5303e73..59f9006 100644
--- a/Tests/CompileFeatures/genex_test.cpp
+++ b/Tests/CompileFeatures/genex_test.cpp
@@ -1,36 +1,36 @@
#ifndef EXPECT_FINAL
-#error EXPECT_FINAL not defined
+# error EXPECT_FINAL not defined
#endif
#ifndef EXPECT_INHERITING_CONSTRUCTORS
-#error EXPECT_INHERITING_CONSTRUCTORS not defined
+# error EXPECT_INHERITING_CONSTRUCTORS not defined
#endif
#ifndef EXPECT_INHERITING_CONSTRUCTORS_AND_FINAL
-#error EXPECT_INHERITING_CONSTRUCTORS_AND_FINAL not defined
+# error EXPECT_INHERITING_CONSTRUCTORS_AND_FINAL not defined
#endif
#ifndef EXPECT_OVERRIDE_CONTROL
-#error EXPECT_OVERRIDE_CONTROL not defined
+# error EXPECT_OVERRIDE_CONTROL not defined
#endif
#ifdef TEST_CXX_STD
-#if !HAVE_CXX_STD_11
-#error HAVE_CXX_STD_11 is false with CXX_STANDARD == 11
-#endif
-#if HAVE_CXX_STD_14
-#error HAVE_CXX_STD_14 is true with CXX_STANDARD == 11
-#endif
-#if HAVE_CXX_STD_17
-#error HAVE_CXX_STD_17 is true with CXX_STANDARD == 11
-#endif
+# if !HAVE_CXX_STD_11
+# error HAVE_CXX_STD_11 is false with CXX_STANDARD == 11
+# endif
+# if HAVE_CXX_STD_14
+# error HAVE_CXX_STD_14 is true with CXX_STANDARD == 11
+# endif
+# if HAVE_CXX_STD_17
+# error HAVE_CXX_STD_17 is true with CXX_STANDARD == 11
+# endif
#endif
#if !HAVE_OVERRIDE_CONTROL
-#if EXPECT_OVERRIDE_CONTROL
-#error "Expect override control feature"
-#endif
+# if EXPECT_OVERRIDE_CONTROL
+# error "Expect override control feature"
+# endif
#else
-#if !EXPECT_OVERRIDE_CONTROL
-#error "Expect no override control feature"
-#endif
+# if !EXPECT_OVERRIDE_CONTROL
+# error "Expect no override control feature"
+# endif
struct A
{
@@ -45,37 +45,37 @@ struct B final : A
#endif
#if !HAVE_AUTO_TYPE
-#error Expect cxx_auto_type support
+# error Expect cxx_auto_type support
#endif
#if !HAVE_INHERITING_CONSTRUCTORS
-#if EXPECT_INHERITING_CONSTRUCTORS
-#error Expect cxx_inheriting_constructors support
-#endif
+# if EXPECT_INHERITING_CONSTRUCTORS
+# error Expect cxx_inheriting_constructors support
+# endif
#else
-#if !EXPECT_INHERITING_CONSTRUCTORS
-#error Expect no cxx_inheriting_constructors support
-#endif
+# if !EXPECT_INHERITING_CONSTRUCTORS
+# error Expect no cxx_inheriting_constructors support
+# endif
#endif
#if !HAVE_FINAL
-#if EXPECT_FINAL
-#error Expect cxx_final support
-#endif
+# if EXPECT_FINAL
+# error Expect cxx_final support
+# endif
#else
-#if !EXPECT_FINAL
-#error Expect no cxx_final support
-#endif
+# if !EXPECT_FINAL
+# error Expect no cxx_final support
+# endif
#endif
#if !HAVE_INHERITING_CONSTRUCTORS_AND_FINAL
-#if EXPECT_INHERITING_CONSTRUCTORS_AND_FINAL
-#error Expect cxx_inheriting_constructors and cxx_final support
-#endif
+# if EXPECT_INHERITING_CONSTRUCTORS_AND_FINAL
+# error Expect cxx_inheriting_constructors and cxx_final support
+# endif
#else
-#if !EXPECT_INHERITING_CONSTRUCTORS_AND_FINAL
-#error Expect no combined cxx_inheriting_constructors and cxx_final support
-#endif
+# if !EXPECT_INHERITING_CONSTRUCTORS_AND_FINAL
+# error Expect no combined cxx_inheriting_constructors and cxx_final support
+# endif
#endif
int main()
diff --git a/Tests/CompileOptions/main.cpp b/Tests/CompileOptions/main.cpp
index 4779b88..1379940 100644
--- a/Tests/CompileOptions/main.cpp
+++ b/Tests/CompileOptions/main.cpp
@@ -1,37 +1,37 @@
#ifndef TEST_DEFINE
-#error Expected definition TEST_DEFINE
+# error Expected definition TEST_DEFINE
#endif
#ifndef NEEDS_ESCAPE
-#error Expected definition NEEDS_ESCAPE
+# error Expected definition NEEDS_ESCAPE
#endif
#ifdef DO_GNU_TESTS
-#ifndef TEST_DEFINE_GNU
-#error Expected definition TEST_DEFINE_GNU
-#endif
+# ifndef TEST_DEFINE_GNU
+# error Expected definition TEST_DEFINE_GNU
+# endif
#endif
#ifndef NO_DEF_TESTS
-#ifndef DEF_A
-#error Expected definition DEF_A
-#endif
+# ifndef DEF_A
+# error Expected definition DEF_A
+# endif
-#ifndef DEF_B
-#error Expected definition DEF_B
-#endif
+# ifndef DEF_B
+# error Expected definition DEF_B
+# endif
-#ifndef DEF_C
-#error Expected definition DEF_C
-#endif
+# ifndef DEF_C
+# error Expected definition DEF_C
+# endif
-#ifndef DEF_D
-#error Expected definition DEF_D
-#endif
+# ifndef DEF_D
+# error Expected definition DEF_D
+# endif
-#ifndef DEF_STR
-#error Expected definition DEF_STR
-#endif
+# ifndef DEF_STR
+# error Expected definition DEF_STR
+# endif
#endif
#include <string.h>
diff --git a/Tests/Complex/Executable/complex.cxx b/Tests/Complex/Executable/complex.cxx
index ca39870..9ddf005 100644
--- a/Tests/Complex/Executable/complex.cxx
+++ b/Tests/Complex/Executable/complex.cxx
@@ -17,7 +17,7 @@ extern "C" {
#include <stdio.h>
#include <sys/stat.h>
#if !defined(S_ISDIR)
-#define S_ISDIR(mode) ((mode)&_S_IFDIR)
+# define S_ISDIR(mode) ((mode)&_S_IFDIR)
#endif
#ifdef COMPLEX_TEST_LINK_STATIC
@@ -45,23 +45,23 @@ void cmPassed(const char* Message, const char* m2 = "")
}
#ifndef COMPLEX_DEFINED_PRE
-#error "COMPLEX_DEFINED_PRE not defined!"
+# error "COMPLEX_DEFINED_PRE not defined!"
#endif
#ifdef COMPLEX_DEFINED
-#error "COMPLEX_DEFINED is defined but it should not!"
+# error "COMPLEX_DEFINED is defined but it should not!"
#endif
#ifndef COMPLEX_DEFINED_POST
-#error "COMPLEX_DEFINED_POST not defined!"
+# error "COMPLEX_DEFINED_POST not defined!"
#endif
#ifndef CMAKE_IS_REALLY_FUN
-#error This is a problem. Looks like ADD_DEFINITIONS and REMOVE_DEFINITIONS does not work
+# error This is a problem. Looks like ADD_DEFINITIONS and REMOVE_DEFINITIONS does not work
#endif
#if defined(NDEBUG) && !defined(CMAKE_IS_FUN_IN_RELEASE_MODE)
-#error Per-configuration directory-level definition not inherited.
+# error Per-configuration directory-level definition not inherited.
#endif
// ======================================================================
@@ -200,8 +200,8 @@ int main()
cmFailed(msg);
}
-// ----------------------------------------------------------------------
-// Test ADD_DEFINITIONS
+ // ----------------------------------------------------------------------
+ // Test ADD_DEFINITIONS
#ifndef CMAKE_IS_FUN
cmFailed("CMake is not fun, so it is broken and should be fixed.");
@@ -240,8 +240,8 @@ int main()
cmPassed("CMake found the listfile stack properly");
#endif
-// ----------------------------------------------------------------------
-// Test SET, VARIABLE_REQUIRES
+ // ----------------------------------------------------------------------
+ // Test SET, VARIABLE_REQUIRES
#ifdef SHOULD_NOT_BE_DEFINED
cmFailed("IF or SET is broken, SHOULD_NOT_BE_DEFINED is defined.");
@@ -297,8 +297,8 @@ int main()
}
#endif
-// ----------------------------------------------------------------------
-// Test various IF/ELSE combinations
+ // ----------------------------------------------------------------------
+ // Test various IF/ELSE combinations
#ifdef SHOULD_NOT_BE_DEFINED_NOT
cmFailed("IF or SET is broken, SHOULD_NOT_BE_DEFINED_NOT is defined.");
@@ -740,8 +740,8 @@ int main()
cmPassed("SHOULD_BE_DEFINED_STRGREATER_EQUAL3 is defined.");
#endif
-// ----------------------------------------------------------------------
-// Test FOREACH
+ // ----------------------------------------------------------------------
+ // Test FOREACH
#ifndef FOREACH_VAR1
cmFailed("the FOREACH, SET or CONFIGURE_FILE command is broken, "
@@ -791,8 +791,8 @@ int main()
cmPassed("WHILE command is working");
}
-// ----------------------------------------------------------------------
-// Test LOAD_CACHE
+ // ----------------------------------------------------------------------
+ // Test LOAD_CACHE
#ifndef CACHE_TEST_VAR1
cmFailed("the LOAD_CACHE or CONFIGURE_FILE command is broken, "
@@ -901,8 +901,8 @@ int main()
TestAndRemoveFile("Executable/Temp/complex-required.txt");
-// ----------------------------------------------------------------------
-// Test FIND_LIBRARY
+ // ----------------------------------------------------------------------
+ // Test FIND_LIBRARY
#ifndef FIND_DUMMY_LIB
cmFailed("the CONFIGURE_FILE command is broken, "
@@ -917,8 +917,8 @@ int main()
}
#endif
-// ----------------------------------------------------------------------
-// Test SET_SOURCE_FILES_PROPERTIES
+ // ----------------------------------------------------------------------
+ // Test SET_SOURCE_FILES_PROPERTIES
#ifndef FILE_HAS_EXTRA_COMPILE_FLAGS
cmFailed("SET_SOURCE_FILES_PROPERTIES failed at setting "
@@ -929,9 +929,9 @@ int main()
#endif
#if 0 // Disable until implemented everywhere.
-#ifndef FILE_DEFINE_STRING
+# ifndef FILE_DEFINE_STRING
cmFailed("SET_SOURCE_FILES_PROPERTIES failed at setting FILE_DEFINE_STRING flag");
-#else
+# else
if(strcmp(FILE_DEFINE_STRING, "hello") != 0)
{
cmFailed("SET_SOURCE_FILES_PROPERTIES failed at setting FILE_DEFINE_STRING flag correctly");
@@ -940,7 +940,7 @@ int main()
{
cmPassed("SET_SOURCE_FILES_PROPERTIES succeeded in setting FILE_DEFINE_STRING flag");
}
-#endif
+# endif
#endif
#ifndef FILE_HAS_ABSTRACT
@@ -973,10 +973,10 @@ int main()
// ----------------------------------------------------------------------
// Test registry (win32)
#if defined(_WIN32) && !defined(__CYGWIN__)
-#ifndef REGISTRY_TEST_PATH
+# ifndef REGISTRY_TEST_PATH
cmFailed("the CONFIGURE_FILE command is broken, REGISTRY_TEST_PATH is not "
"defined.");
-#else
+# else
std::cout << "REGISTRY_TEST_PATH == " << REGISTRY_TEST_PATH << "\n";
if (stricmp(REGISTRY_TEST_PATH, BINARY_DIR "/registry_dir") != 0) {
cmFailed("the 'read registry value' function or CONFIGURE_FILE command is "
@@ -985,7 +985,7 @@ int main()
} else {
cmPassed("REGISTRY_TEST_PATH == ", REGISTRY_TEST_PATH);
}
-#endif
+# endif
#endif // defined(_WIN32) && !defined(__CYGWIN__)
if (strcmp(CMAKE_MINIMUM_REQUIRED_VERSION, "2.4") == 0) {
diff --git a/Tests/Complex/Executable/complex.file.cxx b/Tests/Complex/Executable/complex.file.cxx
index cfba9ed..5596430 100644
--- a/Tests/Complex/Executable/complex.file.cxx
+++ b/Tests/Complex/Executable/complex.file.cxx
@@ -1,5 +1,5 @@
#if 0
-#include "cmMissingHeader.h"
+# include "cmMissingHeader.h"
#endif
int main(int, char**)
diff --git a/Tests/Complex/Executable/notInAllExe.cxx b/Tests/Complex/Executable/notInAllExe.cxx
index 2685073..2b857b4 100644
--- a/Tests/Complex/Executable/notInAllExe.cxx
+++ b/Tests/Complex/Executable/notInAllExe.cxx
@@ -6,5 +6,5 @@ int main()
}
#if 1
-#error "This target should not be compiled by ALL."
+# error "This target should not be compiled by ALL."
#endif
diff --git a/Tests/Complex/Library/notInAllLib.cxx b/Tests/Complex/Library/notInAllLib.cxx
index e66ea05..033988f 100644
--- a/Tests/Complex/Library/notInAllLib.cxx
+++ b/Tests/Complex/Library/notInAllLib.cxx
@@ -4,5 +4,5 @@ int notInAllLibFunc()
}
#if 1
-#error "This target should not be compiled by ALL."
+# error "This target should not be compiled by ALL."
#endif
diff --git a/Tests/Complex/Library/sharedFile.h b/Tests/Complex/Library/sharedFile.h
index e32fcb7..830cbd5 100644
--- a/Tests/Complex/Library/sharedFile.h
+++ b/Tests/Complex/Library/sharedFile.h
@@ -1,12 +1,12 @@
#if defined(_WIN32) || defined(WIN32) /* Win32 version */
-#ifdef CMakeTestLibraryShared_EXPORTS
-#define CMakeTest_EXPORT __declspec(dllexport)
-#else
-#define CMakeTest_EXPORT __declspec(dllimport)
-#endif
+# ifdef CMakeTestLibraryShared_EXPORTS
+# define CMakeTest_EXPORT __declspec(dllexport)
+# else
+# define CMakeTest_EXPORT __declspec(dllimport)
+# endif
#else
/* unix needs nothing */
-#define CMakeTest_EXPORT
+# define CMakeTest_EXPORT
#endif
CMakeTest_EXPORT int sharedFunction();
diff --git a/Tests/Complex/Library/testConly.h b/Tests/Complex/Library/testConly.h
index 9b0fb73..02b28cc 100644
--- a/Tests/Complex/Library/testConly.h
+++ b/Tests/Complex/Library/testConly.h
@@ -1,12 +1,12 @@
#if defined(_WIN32) || defined(WIN32) /* Win32 version */
-#ifdef CMakeTestCLibraryShared_EXPORTS
-#define CMakeTest_EXPORT __declspec(dllexport)
-#else
-#define CMakeTest_EXPORT __declspec(dllimport)
-#endif
+# ifdef CMakeTestCLibraryShared_EXPORTS
+# define CMakeTest_EXPORT __declspec(dllexport)
+# else
+# define CMakeTest_EXPORT __declspec(dllimport)
+# endif
#else
/* unix needs nothing */
-#define CMakeTest_EXPORT
+# define CMakeTest_EXPORT
#endif
CMakeTest_EXPORT int CsharedFunction();
diff --git a/Tests/ComplexOneConfig/Executable/complex.cxx b/Tests/ComplexOneConfig/Executable/complex.cxx
index 9b94962..5b50899 100644
--- a/Tests/ComplexOneConfig/Executable/complex.cxx
+++ b/Tests/ComplexOneConfig/Executable/complex.cxx
@@ -17,7 +17,7 @@ extern "C" {
#include <stdio.h>
#include <sys/stat.h>
#if !defined(S_ISDIR)
-#define S_ISDIR(mode) ((mode)&_S_IFDIR)
+# define S_ISDIR(mode) ((mode)&_S_IFDIR)
#endif
#ifdef COMPLEX_TEST_LINK_STATIC
@@ -45,23 +45,23 @@ void cmPassed(const char* Message, const char* m2 = "")
}
#ifndef COMPLEX_DEFINED_PRE
-#error "COMPLEX_DEFINED_PRE not defined!"
+# error "COMPLEX_DEFINED_PRE not defined!"
#endif
#ifdef COMPLEX_DEFINED
-#error "COMPLEX_DEFINED is defined but it should not!"
+# error "COMPLEX_DEFINED is defined but it should not!"
#endif
#ifndef COMPLEX_DEFINED_POST
-#error "COMPLEX_DEFINED_POST not defined!"
+# error "COMPLEX_DEFINED_POST not defined!"
#endif
#ifndef CMAKE_IS_REALLY_FUN
-#error This is a problem. Looks like ADD_DEFINITIONS and REMOVE_DEFINITIONS does not work
+# error This is a problem. Looks like ADD_DEFINITIONS and REMOVE_DEFINITIONS does not work
#endif
#if defined(NDEBUG) && !defined(CMAKE_IS_FUN_IN_RELEASE_MODE)
-#error Per-configuration directory-level definition not inherited.
+# error Per-configuration directory-level definition not inherited.
#endif
// ======================================================================
@@ -200,8 +200,8 @@ int main()
cmFailed(msg);
}
-// ----------------------------------------------------------------------
-// Test ADD_DEFINITIONS
+ // ----------------------------------------------------------------------
+ // Test ADD_DEFINITIONS
#ifndef CMAKE_IS_FUN
cmFailed("CMake is not fun, so it is broken and should be fixed.");
@@ -240,8 +240,8 @@ int main()
cmPassed("CMake found the listfile stack properly");
#endif
-// ----------------------------------------------------------------------
-// Test SET, VARIABLE_REQUIRES
+ // ----------------------------------------------------------------------
+ // Test SET, VARIABLE_REQUIRES
#ifdef SHOULD_NOT_BE_DEFINED
cmFailed("IF or SET is broken, SHOULD_NOT_BE_DEFINED is defined.");
@@ -297,8 +297,8 @@ int main()
}
#endif
-// ----------------------------------------------------------------------
-// Test various IF/ELSE combinations
+ // ----------------------------------------------------------------------
+ // Test various IF/ELSE combinations
#ifdef SHOULD_NOT_BE_DEFINED_NOT
cmFailed("IF or SET is broken, SHOULD_NOT_BE_DEFINED_NOT is defined.");
@@ -740,8 +740,8 @@ int main()
cmPassed("SHOULD_BE_DEFINED_STRGREATER_EQUAL3 is defined.");
#endif
-// ----------------------------------------------------------------------
-// Test FOREACH
+ // ----------------------------------------------------------------------
+ // Test FOREACH
#ifndef FOREACH_VAR1
cmFailed("the FOREACH, SET or CONFIGURE_FILE command is broken, "
@@ -791,8 +791,8 @@ int main()
cmPassed("WHILE command is working");
}
-// ----------------------------------------------------------------------
-// Test LOAD_CACHE
+ // ----------------------------------------------------------------------
+ // Test LOAD_CACHE
#ifndef CACHE_TEST_VAR1
cmFailed("the LOAD_CACHE or CONFIGURE_FILE command is broken, "
@@ -901,8 +901,8 @@ int main()
TestAndRemoveFile("Executable/Temp/complex-required.txt");
-// ----------------------------------------------------------------------
-// Test FIND_LIBRARY
+ // ----------------------------------------------------------------------
+ // Test FIND_LIBRARY
#ifndef FIND_DUMMY_LIB
cmFailed("the CONFIGURE_FILE command is broken, "
@@ -917,8 +917,8 @@ int main()
}
#endif
-// ----------------------------------------------------------------------
-// Test SET_SOURCE_FILES_PROPERTIES
+ // ----------------------------------------------------------------------
+ // Test SET_SOURCE_FILES_PROPERTIES
#ifndef FILE_HAS_EXTRA_COMPILE_FLAGS
cmFailed("SET_SOURCE_FILES_PROPERTIES failed at setting "
@@ -929,9 +929,9 @@ int main()
#endif
#if 0 // Disable until implemented everywhere.
-#ifndef FILE_DEFINE_STRING
+# ifndef FILE_DEFINE_STRING
cmFailed("SET_SOURCE_FILES_PROPERTIES failed at setting FILE_DEFINE_STRING flag");
-#else
+# else
if(strcmp(FILE_DEFINE_STRING, "hello") != 0)
{
cmFailed("SET_SOURCE_FILES_PROPERTIES failed at setting FILE_DEFINE_STRING flag correctly");
@@ -940,7 +940,7 @@ int main()
{
cmPassed("SET_SOURCE_FILES_PROPERTIES succeeded in setting FILE_DEFINE_STRING flag");
}
-#endif
+# endif
#endif
#ifndef FILE_HAS_ABSTRACT
@@ -973,10 +973,10 @@ int main()
// ----------------------------------------------------------------------
// Test registry (win32)
#if defined(_WIN32) && !defined(__CYGWIN__)
-#ifndef REGISTRY_TEST_PATH
+# ifndef REGISTRY_TEST_PATH
cmFailed("the CONFIGURE_FILE command is broken, REGISTRY_TEST_PATH is not "
"defined.");
-#else
+# else
std::cout << "REGISTRY_TEST_PATH == " << REGISTRY_TEST_PATH << "\n";
if (stricmp(REGISTRY_TEST_PATH, BINARY_DIR "/registry_dir") != 0) {
cmFailed("the 'read registry value' function or CONFIGURE_FILE command is "
@@ -985,7 +985,7 @@ int main()
} else {
cmPassed("REGISTRY_TEST_PATH == ", REGISTRY_TEST_PATH);
}
-#endif
+# endif
#endif // defined(_WIN32) && !defined(__CYGWIN__)
if (strcmp(CMAKE_MINIMUM_REQUIRED_VERSION, "2.4") == 0) {
diff --git a/Tests/ComplexOneConfig/Executable/complex.file.cxx b/Tests/ComplexOneConfig/Executable/complex.file.cxx
index cfba9ed..5596430 100644
--- a/Tests/ComplexOneConfig/Executable/complex.file.cxx
+++ b/Tests/ComplexOneConfig/Executable/complex.file.cxx
@@ -1,5 +1,5 @@
#if 0
-#include "cmMissingHeader.h"
+# include "cmMissingHeader.h"
#endif
int main(int, char**)
diff --git a/Tests/ComplexOneConfig/Executable/notInAllExe.cxx b/Tests/ComplexOneConfig/Executable/notInAllExe.cxx
index 2685073..2b857b4 100644
--- a/Tests/ComplexOneConfig/Executable/notInAllExe.cxx
+++ b/Tests/ComplexOneConfig/Executable/notInAllExe.cxx
@@ -6,5 +6,5 @@ int main()
}
#if 1
-#error "This target should not be compiled by ALL."
+# error "This target should not be compiled by ALL."
#endif
diff --git a/Tests/ComplexOneConfig/Library/notInAllLib.cxx b/Tests/ComplexOneConfig/Library/notInAllLib.cxx
index e66ea05..033988f 100644
--- a/Tests/ComplexOneConfig/Library/notInAllLib.cxx
+++ b/Tests/ComplexOneConfig/Library/notInAllLib.cxx
@@ -4,5 +4,5 @@ int notInAllLibFunc()
}
#if 1
-#error "This target should not be compiled by ALL."
+# error "This target should not be compiled by ALL."
#endif
diff --git a/Tests/ComplexOneConfig/Library/sharedFile.h b/Tests/ComplexOneConfig/Library/sharedFile.h
index e32fcb7..830cbd5 100644
--- a/Tests/ComplexOneConfig/Library/sharedFile.h
+++ b/Tests/ComplexOneConfig/Library/sharedFile.h
@@ -1,12 +1,12 @@
#if defined(_WIN32) || defined(WIN32) /* Win32 version */
-#ifdef CMakeTestLibraryShared_EXPORTS
-#define CMakeTest_EXPORT __declspec(dllexport)
-#else
-#define CMakeTest_EXPORT __declspec(dllimport)
-#endif
+# ifdef CMakeTestLibraryShared_EXPORTS
+# define CMakeTest_EXPORT __declspec(dllexport)
+# else
+# define CMakeTest_EXPORT __declspec(dllimport)
+# endif
#else
/* unix needs nothing */
-#define CMakeTest_EXPORT
+# define CMakeTest_EXPORT
#endif
CMakeTest_EXPORT int sharedFunction();
diff --git a/Tests/ComplexOneConfig/Library/testConly.h b/Tests/ComplexOneConfig/Library/testConly.h
index 9b0fb73..02b28cc 100644
--- a/Tests/ComplexOneConfig/Library/testConly.h
+++ b/Tests/ComplexOneConfig/Library/testConly.h
@@ -1,12 +1,12 @@
#if defined(_WIN32) || defined(WIN32) /* Win32 version */
-#ifdef CMakeTestCLibraryShared_EXPORTS
-#define CMakeTest_EXPORT __declspec(dllexport)
-#else
-#define CMakeTest_EXPORT __declspec(dllimport)
-#endif
+# ifdef CMakeTestCLibraryShared_EXPORTS
+# define CMakeTest_EXPORT __declspec(dllexport)
+# else
+# define CMakeTest_EXPORT __declspec(dllimport)
+# endif
#else
/* unix needs nothing */
-#define CMakeTest_EXPORT
+# define CMakeTest_EXPORT
#endif
CMakeTest_EXPORT int CsharedFunction();
diff --git a/Tests/Cuda/Complex/dynamic.cpp b/Tests/Cuda/Complex/dynamic.cpp
index 3848ce7..38da6a6 100644
--- a/Tests/Cuda/Complex/dynamic.cpp
+++ b/Tests/Cuda/Complex/dynamic.cpp
@@ -1,8 +1,8 @@
#ifdef _WIN32
-#define EXPORT __declspec(dllexport)
+# define EXPORT __declspec(dllexport)
#else
-#define EXPORT
+# define EXPORT
#endif
EXPORT int dynamic_base_func(int x)
diff --git a/Tests/Cuda/Complex/dynamic.cu b/Tests/Cuda/Complex/dynamic.cu
index a76973d..c3d8aff 100644
--- a/Tests/Cuda/Complex/dynamic.cu
+++ b/Tests/Cuda/Complex/dynamic.cu
@@ -4,9 +4,9 @@
#include <string>
#ifdef _WIN32
-#define EXPORT __declspec(dllexport)
+# define EXPORT __declspec(dllexport)
#else
-#define EXPORT
+# define EXPORT
#endif
int dynamic_base_func(int);
diff --git a/Tests/Cuda/Complex/main.cpp b/Tests/Cuda/Complex/main.cpp
index 2498235..6ca5952 100644
--- a/Tests/Cuda/Complex/main.cpp
+++ b/Tests/Cuda/Complex/main.cpp
@@ -4,9 +4,9 @@
#include "file2.h"
#ifdef _WIN32
-#define IMPORT __declspec(dllimport)
+# define IMPORT __declspec(dllimport)
#else
-#define IMPORT
+# define IMPORT
#endif
IMPORT int choose_cuda_device();
diff --git a/Tests/Cuda/Complex/mixed.cpp b/Tests/Cuda/Complex/mixed.cpp
index bd32e51..38a1f0c 100644
--- a/Tests/Cuda/Complex/mixed.cpp
+++ b/Tests/Cuda/Complex/mixed.cpp
@@ -1,10 +1,10 @@
#ifdef _WIN32
-#define EXPORT __declspec(dllexport)
-#define IMPORT __declspec(dllimport)
+# define EXPORT __declspec(dllexport)
+# define IMPORT __declspec(dllimport)
#else
-#define EXPORT
-#define IMPORT
+# define EXPORT
+# define IMPORT
#endif
int dynamic_base_func(int);
diff --git a/Tests/Cuda/Complex/mixed.cu b/Tests/Cuda/Complex/mixed.cu
index a81ccb7..5b85aec 100644
--- a/Tests/Cuda/Complex/mixed.cu
+++ b/Tests/Cuda/Complex/mixed.cu
@@ -5,11 +5,11 @@
#include "file2.h"
#ifdef _WIN32
-#define EXPORT __declspec(dllexport)
-#define IMPORT __declspec(dllimport)
+# define EXPORT __declspec(dllexport)
+# define IMPORT __declspec(dllimport)
#else
-#define EXPORT
-#define IMPORT
+# define EXPORT
+# define IMPORT
#endif
result_type __device__ file1_func(int x);
diff --git a/Tests/Cuda/WithC/main.c b/Tests/Cuda/WithC/main.c
index cb5fddc..5f3c781 100644
--- a/Tests/Cuda/WithC/main.c
+++ b/Tests/Cuda/WithC/main.c
@@ -1,7 +1,7 @@
extern int use_cuda(void);
#ifdef _WIN32
-#include <windows.h>
+# include <windows.h>
#endif
int main()
diff --git a/Tests/CudaOnly/EnableStandard/main.cu b/Tests/CudaOnly/EnableStandard/main.cu
index f219583..740c832 100644
--- a/Tests/CudaOnly/EnableStandard/main.cu
+++ b/Tests/CudaOnly/EnableStandard/main.cu
@@ -2,9 +2,9 @@
#include <iostream>
#ifdef _WIN32
-#define IMPORT __declspec(dllimport)
+# define IMPORT __declspec(dllimport)
#else
-#define IMPORT
+# define IMPORT
#endif
int static_cuda11_func(int);
diff --git a/Tests/CudaOnly/EnableStandard/shared.cu b/Tests/CudaOnly/EnableStandard/shared.cu
index ccdd0b2..004cb83 100644
--- a/Tests/CudaOnly/EnableStandard/shared.cu
+++ b/Tests/CudaOnly/EnableStandard/shared.cu
@@ -2,9 +2,9 @@
#include <type_traits>
#ifdef _WIN32
-#define EXPORT __declspec(dllexport)
+# define EXPORT __declspec(dllexport)
#else
-#define EXPORT
+# define EXPORT
#endif
using tt = std::true_type;
diff --git a/Tests/CudaOnly/WithDefs/main.notcu b/Tests/CudaOnly/WithDefs/main.notcu
index 3793d74..98f73ce 100644
--- a/Tests/CudaOnly/WithDefs/main.notcu
+++ b/Tests/CudaOnly/WithDefs/main.notcu
@@ -4,39 +4,39 @@
#include <inc_cuda.h>
#ifndef INC_CUDA
-#error "INC_CUDA not defined!"
+# error "INC_CUDA not defined!"
#endif
#ifndef HOST_DEFINE
-#error "HOST_DEFINE not defined!"
+# error "HOST_DEFINE not defined!"
#endif
#ifndef PACKED_DEFINE
-#error "PACKED_DEFINE not defined!"
+# error "PACKED_DEFINE not defined!"
#endif
#ifndef FLAG_COMPILE_LANG_CUDA
-#error "FLAG_COMPILE_LANG_CUDA not defined!"
+# error "FLAG_COMPILE_LANG_CUDA not defined!"
#endif
#ifndef FLAG_LANG_IS_CUDA
-#error "FLAG_LANG_IS_CUDA not defined!"
+# error "FLAG_LANG_IS_CUDA not defined!"
#endif
#if !FLAG_LANG_IS_CUDA
-#error "Expected FLAG_LANG_IS_CUDA"
+# error "Expected FLAG_LANG_IS_CUDA"
#endif
#ifndef DEF_COMPILE_LANG_CUDA
-#error "DEF_COMPILE_LANG_CUDA not defined!"
+# error "DEF_COMPILE_LANG_CUDA not defined!"
#endif
#ifndef DEF_LANG_IS_CUDA
-#error "DEF_LANG_IS_CUDA not defined!"
+# error "DEF_LANG_IS_CUDA not defined!"
#endif
#if !DEF_LANG_IS_CUDA
-#error "Expected DEF_LANG_IS_CUDA"
+# error "Expected DEF_LANG_IS_CUDA"
#endif
static __global__ void DetermineIfValidCudaDevice()
@@ -44,20 +44,20 @@ static __global__ void DetermineIfValidCudaDevice()
}
#ifdef _MSC_VER
-#pragma pack(push, 1)
-#undef PACKED_DEFINE
-#define PACKED_DEFINE
+# pragma pack(push, 1)
+# undef PACKED_DEFINE
+# define PACKED_DEFINE
#endif
struct PACKED_DEFINE result_type
{
bool valid;
int value;
#if defined(NDEBUG) && !defined(DEFREL)
-#error missing DEFREL flag
+# error missing DEFREL flag
#endif
};
#ifdef _MSC_VER
-#pragma pack(pop)
+# pragma pack(pop)
#endif
result_type can_launch_kernel()
diff --git a/Tests/CustComDepend/bar.h b/Tests/CustComDepend/bar.h
index c072b81..b0a690b 100644
--- a/Tests/CustComDepend/bar.h
+++ b/Tests/CustComDepend/bar.h
@@ -1,9 +1,9 @@
#ifdef _WIN32
-#ifdef bar_EXPORTS
-#define BAR_EXPORT __declspec(dllexport)
+# ifdef bar_EXPORTS
+# define BAR_EXPORT __declspec(dllexport)
+# else
+# define BAR_EXPORT __declspec(dllimport)
+# endif
#else
-#define BAR_EXPORT __declspec(dllimport)
-#endif
-#else
-#define BAR_EXPORT
+# define BAR_EXPORT
#endif
diff --git a/Tests/CustomCommand/wrapper.cxx b/Tests/CustomCommand/wrapper.cxx
index c380938..33412f8 100644
--- a/Tests/CustomCommand/wrapper.cxx
+++ b/Tests/CustomCommand/wrapper.cxx
@@ -17,9 +17,10 @@ int main(int argc, char* argv[])
#ifdef CMAKE_INTDIR
const char* cfg = (argc >= 4) ? argv[3] : "";
if (strcmp(cfg, CMAKE_INTDIR) != 0) {
- fprintf(stderr, "Did not receive expected configuration argument:\n"
- " expected [" CMAKE_INTDIR "]\n"
- " received [%s]\n",
+ fprintf(stderr,
+ "Did not receive expected configuration argument:\n"
+ " expected [" CMAKE_INTDIR "]\n"
+ " received [%s]\n",
cfg);
return 1;
}
diff --git a/Tests/CxxOnly/libcxx2.h b/Tests/CxxOnly/libcxx2.h
index 1d97fa0..774e4e8 100644
--- a/Tests/CxxOnly/libcxx2.h
+++ b/Tests/CxxOnly/libcxx2.h
@@ -1,11 +1,11 @@
#ifdef _WIN32
-#ifdef testcxx2_EXPORTS
-#define CM_TEST_LIB_EXPORT __declspec(dllexport)
+# ifdef testcxx2_EXPORTS
+# define CM_TEST_LIB_EXPORT __declspec(dllexport)
+# else
+# define CM_TEST_LIB_EXPORT __declspec(dllimport)
+# endif
#else
-#define CM_TEST_LIB_EXPORT __declspec(dllimport)
-#endif
-#else
-#define CM_TEST_LIB_EXPORT
+# define CM_TEST_LIB_EXPORT
#endif
class CM_TEST_LIB_EXPORT LibCxx2Class
diff --git a/Tests/CxxOnly/testCxxModule.cxx b/Tests/CxxOnly/testCxxModule.cxx
index 039e8bb..5015d07 100644
--- a/Tests/CxxOnly/testCxxModule.cxx
+++ b/Tests/CxxOnly/testCxxModule.cxx
@@ -1,7 +1,7 @@
#ifdef _WIN32
-#define TEST_EXPORT __declspec(dllexport)
+# define TEST_EXPORT __declspec(dllexport)
#else
-#define TEST_EXPORT
+# define TEST_EXPORT
#endif
TEST_EXPORT int testCxxModule(void)
{
diff --git a/Tests/ExportImport/Export/Interface/source_target.cpp b/Tests/ExportImport/Export/Interface/source_target.cpp
index 037191c..1eb5b13 100644
--- a/Tests/ExportImport/Export/Interface/source_target.cpp
+++ b/Tests/ExportImport/Export/Interface/source_target.cpp
@@ -1,10 +1,10 @@
#ifndef USE_FROM_BUILD_DIR
-#error Expected define USE_FROM_BUILD_DIR
+# error Expected define USE_FROM_BUILD_DIR
#endif
#ifdef USE_FROM_INSTALL_DIR
-#error Unexpected define USE_FROM_INSTALL_DIR
+# error Unexpected define USE_FROM_INSTALL_DIR
#endif
int source_symbol()
diff --git a/Tests/ExportImport/Export/Interface/source_target_for_install.cpp b/Tests/ExportImport/Export/Interface/source_target_for_install.cpp
index 64514ed..2f88190 100644
--- a/Tests/ExportImport/Export/Interface/source_target_for_install.cpp
+++ b/Tests/ExportImport/Export/Interface/source_target_for_install.cpp
@@ -1,10 +1,10 @@
#ifdef USE_FROM_BUILD_DIR
-#error Unexpected define USE_FROM_BUILD_DIR
+# error Unexpected define USE_FROM_BUILD_DIR
#endif
#ifndef USE_FROM_INSTALL_DIR
-#error Expected define USE_FROM_INSTALL_DIR
+# error Expected define USE_FROM_INSTALL_DIR
#endif
int source_symbol()
diff --git a/Tests/ExportImport/Export/systemlib.h b/Tests/ExportImport/Export/systemlib.h
index 6fd00d5..8ec055b 100644
--- a/Tests/ExportImport/Export/systemlib.h
+++ b/Tests/ExportImport/Export/systemlib.h
@@ -3,9 +3,9 @@
#define SYSTEMLIB_H
#if defined(_WIN32) || defined(__CYGWIN__)
-#define systemlib_EXPORT __declspec(dllexport)
+# define systemlib_EXPORT __declspec(dllexport)
#else
-#define systemlib_EXPORT
+# define systemlib_EXPORT
#endif
struct systemlib_EXPORT SystemStruct
diff --git a/Tests/ExportImport/Export/testExe2.c b/Tests/ExportImport/Export/testExe2.c
index f8976c4..958e4d2 100644
--- a/Tests/ExportImport/Export/testExe2.c
+++ b/Tests/ExportImport/Export/testExe2.c
@@ -1,7 +1,7 @@
#if defined(_WIN32) || defined(__CYGWIN__)
-#define testExe2_EXPORT __declspec(dllexport)
+# define testExe2_EXPORT __declspec(dllexport)
#else
-#define testExe2_EXPORT
+# define testExe2_EXPORT
#endif
testExe2_EXPORT int testExe2Func(void)
diff --git a/Tests/ExportImport/Export/testExe2lib.c b/Tests/ExportImport/Export/testExe2lib.c
index 2a5a77b..905e6c7 100644
--- a/Tests/ExportImport/Export/testExe2lib.c
+++ b/Tests/ExportImport/Export/testExe2lib.c
@@ -1,9 +1,9 @@
#if defined(_WIN32) || defined(__CYGWIN__)
-#define testExe2lib_EXPORT __declspec(dllexport)
-#define testExe2libImp_IMPORT __declspec(dllimport)
+# define testExe2lib_EXPORT __declspec(dllexport)
+# define testExe2libImp_IMPORT __declspec(dllimport)
#else
-#define testExe2lib_EXPORT
-#define testExe2libImp_IMPORT
+# define testExe2lib_EXPORT
+# define testExe2libImp_IMPORT
#endif
testExe2libImp_IMPORT int testExe2libImp(void);
diff --git a/Tests/ExportImport/Export/testExe2libImp.c b/Tests/ExportImport/Export/testExe2libImp.c
index aba914b..8892c85 100644
--- a/Tests/ExportImport/Export/testExe2libImp.c
+++ b/Tests/ExportImport/Export/testExe2libImp.c
@@ -1,7 +1,7 @@
#if defined(_WIN32) || defined(__CYGWIN__)
-#define testExe2libImp_EXPORT __declspec(dllexport)
+# define testExe2libImp_EXPORT __declspec(dllexport)
#else
-#define testExe2libImp_EXPORT
+# define testExe2libImp_EXPORT
#endif
testExe2libImp_EXPORT int testExe2libImp(void)
diff --git a/Tests/ExportImport/Export/testLib3.c b/Tests/ExportImport/Export/testLib3.c
index cacac81..016fae0 100644
--- a/Tests/ExportImport/Export/testLib3.c
+++ b/Tests/ExportImport/Export/testLib3.c
@@ -1,9 +1,9 @@
#if defined(_WIN32) || defined(__CYGWIN__)
-#define testLib3_EXPORT __declspec(dllexport)
-#define testLib3Imp_IMPORT __declspec(dllimport)
+# define testLib3_EXPORT __declspec(dllexport)
+# define testLib3Imp_IMPORT __declspec(dllimport)
#else
-#define testLib3_EXPORT
-#define testLib3Imp_IMPORT
+# define testLib3_EXPORT
+# define testLib3Imp_IMPORT
#endif
testLib3Imp_IMPORT int testLib3Imp(void);
diff --git a/Tests/ExportImport/Export/testLib3Imp.c b/Tests/ExportImport/Export/testLib3Imp.c
index 3d836da..877d0b6 100644
--- a/Tests/ExportImport/Export/testLib3Imp.c
+++ b/Tests/ExportImport/Export/testLib3Imp.c
@@ -1,9 +1,9 @@
#if defined(_WIN32) || defined(__CYGWIN__)
-#define testLib3Imp_EXPORT __declspec(dllexport)
-#define testLib3ImpDep_IMPORT __declspec(dllimport)
+# define testLib3Imp_EXPORT __declspec(dllexport)
+# define testLib3ImpDep_IMPORT __declspec(dllimport)
#else
-#define testLib3Imp_EXPORT
-#define testLib3ImpDep_IMPORT
+# define testLib3Imp_EXPORT
+# define testLib3ImpDep_IMPORT
#endif
testLib3ImpDep_IMPORT int testLib3ImpDep(void);
diff --git a/Tests/ExportImport/Export/testLib3ImpDep.c b/Tests/ExportImport/Export/testLib3ImpDep.c
index b824e03..4fc9783 100644
--- a/Tests/ExportImport/Export/testLib3ImpDep.c
+++ b/Tests/ExportImport/Export/testLib3ImpDep.c
@@ -1,7 +1,7 @@
#if defined(_WIN32) || defined(__CYGWIN__)
-#define testLib3ImpDep_EXPORT __declspec(dllexport)
+# define testLib3ImpDep_EXPORT __declspec(dllexport)
#else
-#define testLib3ImpDep_EXPORT
+# define testLib3ImpDep_EXPORT
#endif
testLib3ImpDep_EXPORT int testLib3ImpDep(void)
diff --git a/Tests/ExportImport/Export/testLib4.c b/Tests/ExportImport/Export/testLib4.c
index 0e583b1..2031a4f 100644
--- a/Tests/ExportImport/Export/testLib4.c
+++ b/Tests/ExportImport/Export/testLib4.c
@@ -1,7 +1,7 @@
#if defined(_WIN32) || defined(__CYGWIN__)
-#define testLib4_EXPORT __declspec(dllexport)
+# define testLib4_EXPORT __declspec(dllexport)
#else
-#define testLib4_EXPORT
+# define testLib4_EXPORT
#endif
testLib4_EXPORT int testLib4(void)
diff --git a/Tests/ExportImport/Export/testLib5.c b/Tests/ExportImport/Export/testLib5.c
index 7c61fc0..edd02eb 100644
--- a/Tests/ExportImport/Export/testLib5.c
+++ b/Tests/ExportImport/Export/testLib5.c
@@ -1,7 +1,7 @@
#if defined(_WIN32) || defined(__CYGWIN__)
-#define testLib5_EXPORT __declspec(dllexport)
+# define testLib5_EXPORT __declspec(dllexport)
#else
-#define testLib5_EXPORT
+# define testLib5_EXPORT
#endif
testLib5_EXPORT int testLib5(void)
diff --git a/Tests/ExportImport/Export/testLib9.c b/Tests/ExportImport/Export/testLib9.c
index fe8610b..2f6f8eb 100644
--- a/Tests/ExportImport/Export/testLib9.c
+++ b/Tests/ExportImport/Export/testLib9.c
@@ -1,11 +1,11 @@
#ifndef testLib9ObjPub_USED
-#error "testLib9ObjPub_USED not defined!"
+# error "testLib9ObjPub_USED not defined!"
#endif
#ifndef testLib9ObjPriv_USED
-#error "testLib9ObjPriv_USED not defined!"
+# error "testLib9ObjPriv_USED not defined!"
#endif
#ifdef testLib9ObjIface_USED
-#error "testLib9ObjIface_USED defined but should not be!"
+# error "testLib9ObjIface_USED defined but should not be!"
#endif
int testLib9ObjPub(void);
int testLib9ObjPriv(void);
diff --git a/Tests/ExportImport/Export/testLibDepends.c b/Tests/ExportImport/Export/testLibDepends.c
index c896c10..6100da1 100644
--- a/Tests/ExportImport/Export/testLibDepends.c
+++ b/Tests/ExportImport/Export/testLibDepends.c
@@ -4,15 +4,15 @@
#include "testLibIncludeRequired4.h"
#ifndef testLibRequired_IFACE_DEFINE
-#error Expected testLibRequired_IFACE_DEFINE
+# error Expected testLibRequired_IFACE_DEFINE
#endif
#ifndef BuildOnly_DEFINE
-#error Expected BuildOnly_DEFINE
+# error Expected BuildOnly_DEFINE
#endif
#ifdef InstallOnly_DEFINE
-#error Unexpected InstallOnly_DEFINE
+# error Unexpected InstallOnly_DEFINE
#endif
extern int testLibRequired(void);
diff --git a/Tests/ExportImport/Export/testLibNoSONAME.c b/Tests/ExportImport/Export/testLibNoSONAME.c
index 4d98562..9552848 100644
--- a/Tests/ExportImport/Export/testLibNoSONAME.c
+++ b/Tests/ExportImport/Export/testLibNoSONAME.c
@@ -1,7 +1,7 @@
#if defined(_WIN32) || defined(__CYGWIN__)
-#define testLibNoSONAME_EXPORT __declspec(dllexport)
+# define testLibNoSONAME_EXPORT __declspec(dllexport)
#else
-#define testLibNoSONAME_EXPORT
+# define testLibNoSONAME_EXPORT
#endif
testLibNoSONAME_EXPORT int testLibNoSoName(void)
diff --git a/Tests/ExportImport/Import/A/cmp0022NEW_test.cpp b/Tests/ExportImport/Import/A/cmp0022NEW_test.cpp
index 5878349..778b828 100644
--- a/Tests/ExportImport/Import/A/cmp0022NEW_test.cpp
+++ b/Tests/ExportImport/Import/A/cmp0022NEW_test.cpp
@@ -1,9 +1,9 @@
#ifndef USING_TESTLIB2
-#error Expected USING_TESTLIB2
+# error Expected USING_TESTLIB2
#endif
#ifdef USING_TESTLIB3
-#error Unexpected USING_TESTLIB3
+# error Unexpected USING_TESTLIB3
#endif
int main(void)
diff --git a/Tests/ExportImport/Import/A/cmp0022OLD_test.cpp b/Tests/ExportImport/Import/A/cmp0022OLD_test.cpp
index e50158b..9eaaee9 100644
--- a/Tests/ExportImport/Import/A/cmp0022OLD_test.cpp
+++ b/Tests/ExportImport/Import/A/cmp0022OLD_test.cpp
@@ -1,9 +1,9 @@
#ifdef USING_TESTLIB2
-#error Unexpected USING_TESTLIB2
+# error Unexpected USING_TESTLIB2
#endif
#ifndef USING_TESTLIB3
-#error Expected USING_TESTLIB3
+# error Expected USING_TESTLIB3
#endif
int main(void)
diff --git a/Tests/ExportImport/Import/A/deps_iface.c b/Tests/ExportImport/Import/A/deps_iface.c
index 1539bcb..e2d973c 100644
--- a/Tests/ExportImport/Import/A/deps_iface.c
+++ b/Tests/ExportImport/Import/A/deps_iface.c
@@ -14,15 +14,15 @@
#include "installIncludesTest8.h"
#ifndef testLibRequired_IFACE_DEFINE
-#error Expected testLibRequired_IFACE_DEFINE
+# error Expected testLibRequired_IFACE_DEFINE
#endif
#ifdef BuildOnly_DEFINE
-#error Unexpected BuildOnly_DEFINE
+# error Unexpected BuildOnly_DEFINE
#endif
#ifndef InstallOnly_DEFINE
-#error Expected InstallOnly_DEFINE
+# error Expected InstallOnly_DEFINE
#endif
extern int testLibDepends(void);
diff --git a/Tests/ExportImport/Import/A/deps_shared_iface.cpp b/Tests/ExportImport/Import/A/deps_shared_iface.cpp
index 3658ab5..d239fb4 100644
--- a/Tests/ExportImport/Import/A/deps_shared_iface.cpp
+++ b/Tests/ExportImport/Import/A/deps_shared_iface.cpp
@@ -3,32 +3,32 @@
#include "testSharedLibDepends.h"
#ifdef CHECK_PIC_WORKS
-#if defined(__ELF__) && !defined(__PIC__) && !defined(__PIE__)
-#error Expected by INTERFACE_POSITION_INDEPENDENT_CODE property of dependency
-#endif
+# if defined(__ELF__) && !defined(__PIC__) && !defined(__PIE__)
+# error Expected by INTERFACE_POSITION_INDEPENDENT_CODE property of dependency
+# endif
#endif
#ifndef PIC_PROPERTY_IS_ON
-#error Expected PIC_PROPERTY_IS_ON
+# error Expected PIC_PROPERTY_IS_ON
#endif
#ifndef CUSTOM_PROPERTY_IS_ON
-#error Expected CUSTOM_PROPERTY_IS_ON
+# error Expected CUSTOM_PROPERTY_IS_ON
#endif
#ifndef CUSTOM_STRING_IS_MATCH
-#error Expected CUSTOM_STRING_IS_MATCH
+# error Expected CUSTOM_STRING_IS_MATCH
#endif
#ifdef TEST_SUBDIR_LIB
-#include "renamed.h"
-#include "subdir.h"
+# include "renamed.h"
+# include "subdir.h"
#endif
#ifdef DO_GNU_TESTS
-#ifndef CUSTOM_COMPILE_OPTION
-#error Expected CUSTOM_COMPILE_OPTION
-#endif
+# ifndef CUSTOM_COMPILE_OPTION
+# error Expected CUSTOM_COMPILE_OPTION
+# endif
#endif
int main(int, char**)
diff --git a/Tests/ExportImport/Import/A/framework_interface/framework_test.cpp b/Tests/ExportImport/Import/A/framework_interface/framework_test.cpp
index 357f64f..ddb8c4b 100644
--- a/Tests/ExportImport/Import/A/framework_interface/framework_test.cpp
+++ b/Tests/ExportImport/Import/A/framework_interface/framework_test.cpp
@@ -2,5 +2,5 @@
#include <testLib4/testLib4.h>
#ifndef TESTLIB4_H
-#error Expected define TESTLIB4_H
+# error Expected define TESTLIB4_H
#endif
diff --git a/Tests/ExportImport/Import/A/iface_test.cpp b/Tests/ExportImport/Import/A/iface_test.cpp
index fa4474b..4428c1c 100644
--- a/Tests/ExportImport/Import/A/iface_test.cpp
+++ b/Tests/ExportImport/Import/A/iface_test.cpp
@@ -1,6 +1,6 @@
#ifndef USING_TESTSHAREDLIBREQUIRED
-#error Expected USING_TESTSHAREDLIBREQUIRED
+# error Expected USING_TESTSHAREDLIBREQUIRED
#endif
#include "excludedFromAll.h"
diff --git a/Tests/ExportImport/Import/A/imp_mod1.c b/Tests/ExportImport/Import/A/imp_mod1.c
index 89d7545..9385d55 100644
--- a/Tests/ExportImport/Import/A/imp_mod1.c
+++ b/Tests/ExportImport/Import/A/imp_mod1.c
@@ -1,7 +1,7 @@
#if defined(_WIN32) || defined(__CYGWIN__)
-#define testExe2_IMPORT __declspec(dllimport)
+# define testExe2_IMPORT __declspec(dllimport)
#else
-#define testExe2_IMPORT
+# define testExe2_IMPORT
#endif
testExe2_IMPORT int testExe2Func(void);
diff --git a/Tests/ExportImport/Import/A/imp_testExe1.c b/Tests/ExportImport/Import/A/imp_testExe1.c
index 3488439..8173557 100644
--- a/Tests/ExportImport/Import/A/imp_testExe1.c
+++ b/Tests/ExportImport/Import/A/imp_testExe1.c
@@ -14,9 +14,9 @@ extern int testLibPerConfigDest(void);
/* Switch a symbol between debug and optimized builds to make sure the
proper library is found from the testLib4 link interface. */
#ifdef EXE_DBG
-#define testLib4libcfg testLib4libdbg
+# define testLib4libcfg testLib4libdbg
#else
-#define testLib4libcfg testLib4libopt
+# define testLib4libcfg testLib4libopt
#endif
extern testLib4libcfg(void);
diff --git a/Tests/ExportImport/Import/A/imp_testExeAbs1.c b/Tests/ExportImport/Import/A/imp_testExeAbs1.c
index 629b891..fd05242 100644
--- a/Tests/ExportImport/Import/A/imp_testExeAbs1.c
+++ b/Tests/ExportImport/Import/A/imp_testExeAbs1.c
@@ -2,10 +2,10 @@
#include "testLibAbs1a.h"
#include "testLibAbs1b.h"
#ifndef testLibAbs1a
-#error "testLibAbs1a not defined"
+# error "testLibAbs1a not defined"
#endif
#ifndef testLibAbs1b
-#error "testLibAbs1b not defined"
+# error "testLibAbs1b not defined"
#endif
int main()
{
diff --git a/Tests/ExportImport/Import/A/imp_testLib9.c b/Tests/ExportImport/Import/A/imp_testLib9.c
index f9c05fd..e014857 100644
--- a/Tests/ExportImport/Import/A/imp_testLib9.c
+++ b/Tests/ExportImport/Import/A/imp_testLib9.c
@@ -1,11 +1,11 @@
#ifndef testLib9ObjPub_USED
-#error "testLib9ObjPub_USED not defined!"
+# error "testLib9ObjPub_USED not defined!"
#endif
#ifdef testLib9ObjPriv_USED
-#error "testLib9ObjPriv_USED defined but should not be!"
+# error "testLib9ObjPriv_USED defined but should not be!"
#endif
#ifndef testLib9ObjIface_USED
-#error "testLib9ObjIface_USED not defined!"
+# error "testLib9ObjIface_USED not defined!"
#endif
int testLib9(void);
diff --git a/Tests/ExportImport/Import/Interface/headeronlytest.cpp b/Tests/ExportImport/Import/Interface/headeronlytest.cpp
index 0e754e9..7b63a04 100644
--- a/Tests/ExportImport/Import/Interface/headeronlytest.cpp
+++ b/Tests/ExportImport/Import/Interface/headeronlytest.cpp
@@ -2,11 +2,11 @@
#include "headeronly.h"
#ifndef HEADERONLY_DEFINE
-#error Expected HEADERONLY_DEFINE
+# error Expected HEADERONLY_DEFINE
#endif
#ifdef SHAREDLIB_DEFINE
-#error Unexpected SHAREDLIB_DEFINE
+# error Unexpected SHAREDLIB_DEFINE
#endif
int main(int, char**)
diff --git a/Tests/ExportImport/Import/Interface/interfacetest.cpp b/Tests/ExportImport/Import/Interface/interfacetest.cpp
index 7be8162..c1e29c2 100644
--- a/Tests/ExportImport/Import/Interface/interfacetest.cpp
+++ b/Tests/ExportImport/Import/Interface/interfacetest.cpp
@@ -2,15 +2,15 @@
#include "sharedlib.h"
#ifndef SHAREDLIB_DEFINE
-#error Expected SHAREDLIB_DEFINE
+# error Expected SHAREDLIB_DEFINE
#endif
#ifdef HEADERONLY_DEFINE
-#error Unexpected HEADERONLY_DEFINE
+# error Unexpected HEADERONLY_DEFINE
#endif
#ifndef DEFINE_IFACE_DEFINE
-#error Expected DEFINE_IFACE_DEFINE
+# error Expected DEFINE_IFACE_DEFINE
#endif
int main(int, char**)
diff --git a/Tests/FindGTK2/cairomm/main.cpp b/Tests/FindGTK2/cairomm/main.cpp
index 1a669c3..4432601 100644
--- a/Tests/FindGTK2/cairomm/main.cpp
+++ b/Tests/FindGTK2/cairomm/main.cpp
@@ -5,7 +5,7 @@
* et. al.
*/
#if defined(_MSC_VER)
-#define _USE_MATH_DEFINES
+# define _USE_MATH_DEFINES
#endif
#include <cairomm/context.h>
diff --git a/Tests/FindLTTngUST/Test/main.c b/Tests/FindLTTngUST/Test/main.c
index 1f313c1..01d73cb 100644
--- a/Tests/FindLTTngUST/Test/main.c
+++ b/Tests/FindLTTngUST/Test/main.c
@@ -4,11 +4,11 @@
#include <string.h>
#ifdef CMAKE_LTTNGUST_HAS_TRACEF
-#include <lttng/tracef.h>
+# include <lttng/tracef.h>
#endif
#ifdef CMAKE_LTTNGUST_HAS_TRACELOG
-#include <lttng/tracelog.h>
+# include <lttng/tracelog.h>
#endif
int main(void)
diff --git a/Tests/FindODBC/Test/main.c b/Tests/FindODBC/Test/main.c
index 917167b..34f279c 100644
--- a/Tests/FindODBC/Test/main.c
+++ b/Tests/FindODBC/Test/main.c
@@ -1,5 +1,5 @@
#ifdef WIN32
-#include <windows.h>
+# include <windows.h>
#endif
#include <sql.h>
diff --git a/Tests/FindOpenCL/Test/main.c b/Tests/FindOpenCL/Test/main.c
index dc77636..2fe949b 100644
--- a/Tests/FindOpenCL/Test/main.c
+++ b/Tests/FindOpenCL/Test/main.c
@@ -1,7 +1,7 @@
#ifdef __APPLE__
-#include <OpenCL/opencl.h>
+# include <OpenCL/opencl.h>
#else
-#include <CL/cl.h>
+# include <CL/cl.h>
#endif
int main()
diff --git a/Tests/FindOpenGL/Test/main.c b/Tests/FindOpenGL/Test/main.c
index bca3d7e..e1f25c6 100644
--- a/Tests/FindOpenGL/Test/main.c
+++ b/Tests/FindOpenGL/Test/main.c
@@ -1,10 +1,10 @@
#ifdef _WIN32
-#include <windows.h>
+# include <windows.h>
#endif
#ifdef __APPLE__
-#include <OpenGL/gl.h>
+# include <OpenGL/gl.h>
#else
-#include <GL/gl.h>
+# include <GL/gl.h>
#endif
#include <stdio.h>
diff --git a/Tests/FindOpenMP/Test/scaltest.c b/Tests/FindOpenMP/Test/scaltest.c
index 2ee57f8..4678b87 100644
--- a/Tests/FindOpenMP/Test/scaltest.c
+++ b/Tests/FindOpenMP/Test/scaltest.c
@@ -1,8 +1,8 @@
#ifdef __cplusplus
-#include <iostream>
+# include <iostream>
extern "C"
#else
-#include <stdio.h>
+# include <stdio.h>
#endif
int scalprod(int n, double* x, double* y, double* res);
diff --git a/Tests/ForceInclude/foo.c b/Tests/ForceInclude/foo.c
index 7f550d0..2a26c6f 100644
--- a/Tests/ForceInclude/foo.c
+++ b/Tests/ForceInclude/foo.c
@@ -1,8 +1,8 @@
#ifndef FOO_1
-#error "foo1.h not included by /FI"
+# error "foo1.h not included by /FI"
#endif
#ifndef FOO_2
-#error "foo2.h not included by /FI"
+# error "foo2.h not included by /FI"
#endif
int main(void)
{
diff --git a/Tests/Framework/foo.cxx b/Tests/Framework/foo.cxx
index c3520c1..a4d15f6 100644
--- a/Tests/Framework/foo.cxx
+++ b/Tests/Framework/foo.cxx
@@ -1,8 +1,8 @@
#include <stdio.h>
#if defined(_WIN32) && defined(foo_EXPORTS)
-#define CM_TEST_LIB_EXPORT __declspec(dllexport)
+# define CM_TEST_LIB_EXPORT __declspec(dllexport)
#else
-#define CM_TEST_LIB_EXPORT
+# define CM_TEST_LIB_EXPORT
#endif
CM_TEST_LIB_EXPORT void foo()
{
diff --git a/Tests/GeneratorExpression/CMP0044/cmp0044-check.cpp b/Tests/GeneratorExpression/CMP0044/cmp0044-check.cpp
index 233eb57..2812b0d 100644
--- a/Tests/GeneratorExpression/CMP0044/cmp0044-check.cpp
+++ b/Tests/GeneratorExpression/CMP0044/cmp0044-check.cpp
@@ -1,24 +1,24 @@
#ifdef Type_Is_
-#if !Result
-#error Result should be 1 in WARN mode
-#endif
+# if !Result
+# error Result should be 1 in WARN mode
+# endif
#endif
#ifdef Type_Is_NEW
-#if Result
-#error Result should be 0 in NEW mode
-#endif
+# if Result
+# error Result should be 0 in NEW mode
+# endif
#endif
#ifdef Type_Is_OLD
-#if !Result
-#error Result should be 1 in OLD mode
-#endif
+# if !Result
+# error Result should be 1 in OLD mode
+# endif
#endif
#if !defined(Type_Is_) && !defined(Type_Is_OLD) && !defined(Type_Is_NEW)
-#error No expected definition present
+# error No expected definition present
#endif
void foo(void)
diff --git a/Tests/GeneratorExpression/pwd.c b/Tests/GeneratorExpression/pwd.c
index ed23043..31ebe49 100644
--- a/Tests/GeneratorExpression/pwd.c
+++ b/Tests/GeneratorExpression/pwd.c
@@ -3,11 +3,11 @@
#include <stdlib.h>
#ifdef _WIN32
-#include <direct.h>
-#define getcurdir _getcwd
+# include <direct.h>
+# define getcurdir _getcwd
#else
-#include <unistd.h>
-#define getcurdir getcwd
+# include <unistd.h>
+# define getcurdir getcwd
#endif
int main(int argc, char* argv[])
diff --git a/Tests/IncludeDirectories/CMP0021/main.cpp b/Tests/IncludeDirectories/CMP0021/main.cpp
index f638ed1..0f87dd9 100644
--- a/Tests/IncludeDirectories/CMP0021/main.cpp
+++ b/Tests/IncludeDirectories/CMP0021/main.cpp
@@ -2,7 +2,7 @@
#include "cmp0021.h"
#ifndef CMP0021_DEFINE
-#error Expected CMP0021_DEFINE
+# error Expected CMP0021_DEFINE
#endif
int main(int, char**)
diff --git a/Tests/InterfaceLibrary/definetestexe.cpp b/Tests/InterfaceLibrary/definetestexe.cpp
index 098502c..9156426 100644
--- a/Tests/InterfaceLibrary/definetestexe.cpp
+++ b/Tests/InterfaceLibrary/definetestexe.cpp
@@ -1,18 +1,18 @@
#ifndef IFACE_DEFINE
-#error Expected IFACE_DEFINE
+# error Expected IFACE_DEFINE
#endif
#include "iface_header.h"
#ifndef IFACE_HEADER_SRCDIR
-#error Expected IFACE_HEADER_SRCDIR
+# error Expected IFACE_HEADER_SRCDIR
#endif
#include "iface_header_builddir.h"
#ifndef IFACE_HEADER_BUILDDIR
-#error Expected IFACE_HEADER_BUILDDIR
+# error Expected IFACE_HEADER_BUILDDIR
#endif
extern int obj();
diff --git a/Tests/InterfaceLibrary/map_config.cpp b/Tests/InterfaceLibrary/map_config.cpp
index 232a18e..d035632 100644
--- a/Tests/InterfaceLibrary/map_config.cpp
+++ b/Tests/InterfaceLibrary/map_config.cpp
@@ -1,12 +1,12 @@
#ifdef DEBUG_MODE
-#ifndef SPECIAL_MODE
-#error Special configuration should be mapped to debug configuration.
-#endif
+# ifndef SPECIAL_MODE
+# error Special configuration should be mapped to debug configuration.
+# endif
#else
-#ifdef SPECIAL_MODE
-#error Special configuration should not be enabled if not debug configuration
-#endif
+# ifdef SPECIAL_MODE
+# error Special configuration should not be enabled if not debug configuration
+# endif
#endif
int main(int, char**)
diff --git a/Tests/InterfaceLibrary/sharedlibtestexe.cpp b/Tests/InterfaceLibrary/sharedlibtestexe.cpp
index 44f160d..97b5aa9 100644
--- a/Tests/InterfaceLibrary/sharedlibtestexe.cpp
+++ b/Tests/InterfaceLibrary/sharedlibtestexe.cpp
@@ -1,14 +1,14 @@
#ifndef SHAREDLIB_DEFINE
-#error Expected SHAREDLIB_DEFINE
+# error Expected SHAREDLIB_DEFINE
#endif
#ifndef SHAREDDEPENDLIB_DEFINE
-#error Expected SHAREDDEPENDLIB_DEFINE
+# error Expected SHAREDDEPENDLIB_DEFINE
#endif
-#include "sharedlib.h"
#include "shareddependlib.h"
+#include "sharedlib.h"
int main(int, char**)
{
diff --git a/Tests/InterfaceLinkLibraries/bang.cpp b/Tests/InterfaceLinkLibraries/bang.cpp
index 2e95098..722af9f 100644
--- a/Tests/InterfaceLinkLibraries/bang.cpp
+++ b/Tests/InterfaceLinkLibraries/bang.cpp
@@ -1,10 +1,10 @@
#ifdef FOO_LIBRARY
-#error Unexpected FOO_LIBRARY
+# error Unexpected FOO_LIBRARY
#endif
#ifdef BAR_LIBRARY
-#error Unexpected BAR_LIBRARY
+# error Unexpected BAR_LIBRARY
#endif
#include "bang.h"
diff --git a/Tests/InterfaceLinkLibraries/bar.cpp b/Tests/InterfaceLinkLibraries/bar.cpp
index 228ed80..c1d95ab 100644
--- a/Tests/InterfaceLinkLibraries/bar.cpp
+++ b/Tests/InterfaceLinkLibraries/bar.cpp
@@ -1,17 +1,17 @@
#ifdef FOO_LIBRARY
-#error Unexpected FOO_LIBRARY
+# error Unexpected FOO_LIBRARY
#endif
#ifdef BAR_USE_BANG
-#ifndef BANG_LIBRARY
-#error Expected BANG_LIBRARY
-#endif
-#include "bang.h"
+# ifndef BANG_LIBRARY
+# error Expected BANG_LIBRARY
+# endif
+# include "bang.h"
#else
-#ifdef BANG_LIBRARY
-#error Unexpected BANG_LIBRARY
-#endif
+# ifdef BANG_LIBRARY
+# error Unexpected BANG_LIBRARY
+# endif
#endif
#include "bar.h"
diff --git a/Tests/InterfaceLinkLibraries/foo.cpp b/Tests/InterfaceLinkLibraries/foo.cpp
index 5295707..c1e93e8 100644
--- a/Tests/InterfaceLinkLibraries/foo.cpp
+++ b/Tests/InterfaceLinkLibraries/foo.cpp
@@ -1,10 +1,10 @@
#ifdef BAR_LIBRARY
-#error Unexpected BAR_LIBRARY
+# error Unexpected BAR_LIBRARY
#endif
#ifdef BANG_LIBRARY
-#error Unexpected BANG_LIBRARY
+# error Unexpected BANG_LIBRARY
#endif
#include "foo.h"
diff --git a/Tests/InterfaceLinkLibraries/main.cpp b/Tests/InterfaceLinkLibraries/main.cpp
index 6e1295a..e8298d4 100644
--- a/Tests/InterfaceLinkLibraries/main.cpp
+++ b/Tests/InterfaceLinkLibraries/main.cpp
@@ -1,18 +1,18 @@
#ifndef FOO_LIBRARY
-#error Expected FOO_LIBRARY
+# error Expected FOO_LIBRARY
#endif
#ifndef BAR_LIBRARY
-#error Expected BAR_LIBRARY
+# error Expected BAR_LIBRARY
#endif
#ifdef BANG_LIBRARY
-#error Unexpected BANG_LIBRARY
+# error Unexpected BANG_LIBRARY
#endif
#ifdef ZOT_LIBRARY
-#error Unexpected ZOT_LIBRARY
+# error Unexpected ZOT_LIBRARY
#endif
#include "zot.h"
diff --git a/Tests/Jump/Executable/jumpExecutable.cxx b/Tests/Jump/Executable/jumpExecutable.cxx
index 6fa2683..2c5961c 100644
--- a/Tests/Jump/Executable/jumpExecutable.cxx
+++ b/Tests/Jump/Executable/jumpExecutable.cxx
@@ -1,7 +1,7 @@
#ifdef _WIN32
-#define JUMP_IMPORT __declspec(dllimport)
+# define JUMP_IMPORT __declspec(dllimport)
#else
-#define JUMP_IMPORT extern
+# define JUMP_IMPORT extern
#endif
extern int jumpStatic();
diff --git a/Tests/Jump/Library/Shared/jumpShared.cxx b/Tests/Jump/Library/Shared/jumpShared.cxx
index 7c4dee9..87484b7 100644
--- a/Tests/Jump/Library/Shared/jumpShared.cxx
+++ b/Tests/Jump/Library/Shared/jumpShared.cxx
@@ -1,7 +1,7 @@
#ifdef _WIN32
-#define JUMP_EXPORT __declspec(dllexport)
+# define JUMP_EXPORT __declspec(dllexport)
#else
-#define JUMP_EXPORT
+# define JUMP_EXPORT
#endif
JUMP_EXPORT int jumpShared()
diff --git a/Tests/LinkFlags/LinkFlagsExe.c b/Tests/LinkFlags/LinkFlagsExe.c
index 4d44146..202d34d 100644
--- a/Tests/LinkFlags/LinkFlagsExe.c
+++ b/Tests/LinkFlags/LinkFlagsExe.c
@@ -5,5 +5,5 @@ int main(void)
/* Intel compiler does not reject bad flags or objects! */
#if defined(__INTEL_COMPILER)
-#error BADFLAG
+# error BADFLAG
#endif
diff --git a/Tests/LinkFlags/LinkFlagsLib.c b/Tests/LinkFlags/LinkFlagsLib.c
index f354206..bd288e9 100644
--- a/Tests/LinkFlags/LinkFlagsLib.c
+++ b/Tests/LinkFlags/LinkFlagsLib.c
@@ -5,5 +5,5 @@ int flags_lib(void)
/* Intel compiler does not reject bad flags or objects! */
#if defined(__INTEL_COMPILER)
-#error BADFLAG
+# error BADFLAG
#endif
diff --git a/Tests/MFC/mfc1/ChildFrm.cpp b/Tests/MFC/mfc1/ChildFrm.cpp
index ddb19c6..a415229 100644
--- a/Tests/MFC/mfc1/ChildFrm.cpp
+++ b/Tests/MFC/mfc1/ChildFrm.cpp
@@ -8,7 +8,7 @@
#include "ChildFrm.h"
#ifdef _DEBUG
-#define new DEBUG_NEW
+# define new DEBUG_NEW
#endif
// CChildFrame
diff --git a/Tests/MFC/mfc1/MainFrm.cpp b/Tests/MFC/mfc1/MainFrm.cpp
index c551065..6bd2b3d 100644
--- a/Tests/MFC/mfc1/MainFrm.cpp
+++ b/Tests/MFC/mfc1/MainFrm.cpp
@@ -8,7 +8,7 @@
#include "MainFrm.h"
#ifdef _DEBUG
-#define new DEBUG_NEW
+# define new DEBUG_NEW
#endif
// CMainFrame
@@ -21,7 +21,9 @@ END_MESSAGE_MAP()
static UINT indicators[] = {
ID_SEPARATOR, // status line indicator
- ID_INDICATOR_CAPS, ID_INDICATOR_NUM, ID_INDICATOR_SCRL,
+ ID_INDICATOR_CAPS,
+ ID_INDICATOR_NUM,
+ ID_INDICATOR_SCRL,
};
// CMainFrame construction/destruction
@@ -40,9 +42,10 @@ int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
if (CMDIFrameWnd::OnCreate(lpCreateStruct) == -1)
return -1;
- if (!m_wndToolBar.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE |
- CBRS_TOP | CBRS_GRIPPER | CBRS_TOOLTIPS |
- CBRS_FLYBY | CBRS_SIZE_DYNAMIC) ||
+ if (!m_wndToolBar.CreateEx(this, TBSTYLE_FLAT,
+ WS_CHILD | WS_VISIBLE | CBRS_TOP | CBRS_GRIPPER |
+ CBRS_TOOLTIPS | CBRS_FLYBY |
+ CBRS_SIZE_DYNAMIC) ||
!m_wndToolBar.LoadToolBar(IDR_MAINFRAME)) {
TRACE0("Failed to create toolbar\n");
return -1; // fail to create
diff --git a/Tests/MFC/mfc1/Resource.h b/Tests/MFC/mfc1/Resource.h
index 7184e30..e3a04f1 100644
--- a/Tests/MFC/mfc1/Resource.h
+++ b/Tests/MFC/mfc1/Resource.h
@@ -11,10 +11,10 @@
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
-#ifndef APSTUDIO_READONLY_SYMBOLS
-#define _APS_NEXT_RESOURCE_VALUE 130
-#define _APS_NEXT_CONTROL_VALUE 1000
-#define _APS_NEXT_SYMED_VALUE 101
-#define _APS_NEXT_COMMAND_VALUE 32771
-#endif
+# ifndef APSTUDIO_READONLY_SYMBOLS
+# define _APS_NEXT_RESOURCE_VALUE 130
+# define _APS_NEXT_CONTROL_VALUE 1000
+# define _APS_NEXT_SYMED_VALUE 101
+# define _APS_NEXT_COMMAND_VALUE 32771
+# endif
#endif
diff --git a/Tests/MFC/mfc1/mfc1.cpp b/Tests/MFC/mfc1/mfc1.cpp
index 664c6c4..892a89d 100644
--- a/Tests/MFC/mfc1/mfc1.cpp
+++ b/Tests/MFC/mfc1/mfc1.cpp
@@ -11,7 +11,7 @@
#include "mfc1View.h"
#ifdef _DEBUG
-#define new DEBUG_NEW
+# define new DEBUG_NEW
#endif
// Cmfc1App
diff --git a/Tests/MFC/mfc1/mfc1.h b/Tests/MFC/mfc1/mfc1.h
index 15e970b..f4fcadb 100644
--- a/Tests/MFC/mfc1/mfc1.h
+++ b/Tests/MFC/mfc1/mfc1.h
@@ -3,7 +3,7 @@
#pragma once
#ifndef __AFXWIN_H__
-#error include 'stdafx.h' before including this file for PCH
+# error include 'stdafx.h' before including this file for PCH
#endif
#include "resource.h" // main symbols
diff --git a/Tests/MFC/mfc1/mfc1Doc.cpp b/Tests/MFC/mfc1/mfc1Doc.cpp
index 08ab158..e69b61c 100644
--- a/Tests/MFC/mfc1/mfc1Doc.cpp
+++ b/Tests/MFC/mfc1/mfc1Doc.cpp
@@ -8,7 +8,7 @@
#include "mfc1Doc.h"
#ifdef _DEBUG
-#define new DEBUG_NEW
+# define new DEBUG_NEW
#endif
// Cmfc1Doc
diff --git a/Tests/MFC/mfc1/mfc1View.cpp b/Tests/MFC/mfc1/mfc1View.cpp
index 6169ce5..3de55cf 100644
--- a/Tests/MFC/mfc1/mfc1View.cpp
+++ b/Tests/MFC/mfc1/mfc1View.cpp
@@ -9,7 +9,7 @@
#include "mfc1View.h"
#ifdef _DEBUG
-#define new DEBUG_NEW
+# define new DEBUG_NEW
#endif
// Cmfc1View
diff --git a/Tests/MFC/mfc1/stdafx.h b/Tests/MFC/mfc1/stdafx.h
index 56f8a6a..2680f26 100644
--- a/Tests/MFC/mfc1/stdafx.h
+++ b/Tests/MFC/mfc1/stdafx.h
@@ -5,7 +5,7 @@
#pragma once
#ifndef VC_EXTRALEAN
-#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
+# define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
#endif
// See http://msdn.microsoft.com/en-us/library/6sehtctf.aspx for more info
@@ -17,39 +17,41 @@
// platforms.
#ifndef WINVER // Allow use of features specific to Windows 95 and Windows NT 4
// or later.
-#if _MSC_VER < 1600
-#define WINVER \
- 0x0400 // Change this to the appropriate value to target Windows 98 and
- // Windows 2000 or later.
-#else
-#define WINVER 0x0501 // Target Windows XP and later with VS 10 and later
-#endif
+# if _MSC_VER < 1600
+# define WINVER \
+ 0x0400 // Change this to the appropriate value to target Windows 98 and
+ // Windows 2000 or later.
+# else
+# define WINVER 0x0501 // Target Windows XP and later with VS 10 and later
+# endif
#endif
#ifndef _WIN32_WINNT // Allow use of features specific to Windows NT 4 or
// later.
-#if _MSC_VER < 1600
-#define _WIN32_WINNT \
- 0x0400 // Change this to the appropriate value to target Windows 98 and
- // Windows 2000 or later.
-#else
-#define _WIN32_WINNT 0x0501 // Target Windows XP and later with VS 10 and later
-#endif
+# if _MSC_VER < 1600
+# define _WIN32_WINNT \
+ 0x0400 // Change this to the appropriate value to target Windows 98 and
+ // Windows 2000 or later.
+# else
+# define _WIN32_WINNT \
+ 0x0501 // Target Windows XP and later with VS 10 and later
+# endif
#endif
#ifndef _WIN32_WINDOWS // Allow use of features specific to Windows 98 or
// later.
-#if _MSC_VER < 1600
-#define _WIN32_WINDOWS \
- 0x0410 // Change this to the appropriate value to target Windows Me or later.
-#endif
+# if _MSC_VER < 1600
+# define _WIN32_WINDOWS \
+ 0x0410 // Change this to the appropriate value to target Windows Me or
+ // later.
+# endif
#endif
#ifndef _WIN32_IE // Allow use of features specific to IE 4.0 or later.
-#if _MSC_VER < 1600
-#define _WIN32_IE \
- 0x0400 // Change this to the appropriate value to target IE 5.0 or later.
-#endif
+# if _MSC_VER < 1600
+# define _WIN32_IE \
+ 0x0400 // Change this to the appropriate value to target IE 5.0 or later.
+# endif
#endif
#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be
@@ -65,5 +67,5 @@
#include <afxdtctl.h> // MFC support for Internet Explorer 4 Common Controls
#ifndef _AFX_NO_AFXCMN_SUPPORT
-#include <afxcmn.h> // MFC support for Windows Common Controls
-#endif // _AFX_NO_AFXCMN_SUPPORT
+# include <afxcmn.h> // MFC support for Windows Common Controls
+#endif // _AFX_NO_AFXCMN_SUPPORT
diff --git a/Tests/MacRuntimePath/A/framework.h b/Tests/MacRuntimePath/A/framework.h
index 343317c..5a3cfc4 100644
--- a/Tests/MacRuntimePath/A/framework.h
+++ b/Tests/MacRuntimePath/A/framework.h
@@ -3,13 +3,13 @@
#define framework_h
#ifdef WIN32
-#ifdef framework_EXPORTS
-#define FRAMEWORK_EXPORT __declspec(dllexport)
+# ifdef framework_EXPORTS
+# define FRAMEWORK_EXPORT __declspec(dllexport)
+# else
+# define FRAMEWORK_EXPORT __declspec(dllimport)
+# endif
#else
-#define FRAMEWORK_EXPORT __declspec(dllimport)
-#endif
-#else
-#define FRAMEWORK_EXPORT
+# define FRAMEWORK_EXPORT
#endif
void FRAMEWORK_EXPORT framework();
diff --git a/Tests/MacRuntimePath/A/framework2.h b/Tests/MacRuntimePath/A/framework2.h
index 7f45f4d..2562396 100644
--- a/Tests/MacRuntimePath/A/framework2.h
+++ b/Tests/MacRuntimePath/A/framework2.h
@@ -3,13 +3,13 @@
#define framework2_h
#ifdef WIN32
-#ifdef framework2_EXPORTS
-#define FRAMEWORK2_EXPORT __declspec(dllexport)
+# ifdef framework2_EXPORTS
+# define FRAMEWORK2_EXPORT __declspec(dllexport)
+# else
+# define FRAMEWORK2_EXPORT __declspec(dllimport)
+# endif
#else
-#define FRAMEWORK2_EXPORT __declspec(dllimport)
-#endif
-#else
-#define FRAMEWORK2_EXPORT
+# define FRAMEWORK2_EXPORT
#endif
void FRAMEWORK2_EXPORT framework2();
diff --git a/Tests/MacRuntimePath/A/shared.h b/Tests/MacRuntimePath/A/shared.h
index 28904fd..5d5b633 100644
--- a/Tests/MacRuntimePath/A/shared.h
+++ b/Tests/MacRuntimePath/A/shared.h
@@ -3,13 +3,13 @@
#define shared_h
#ifdef WIN32
-#ifdef shared_EXPORTS
-#define SHARED_EXPORT __declspec(dllexport)
+# ifdef shared_EXPORTS
+# define SHARED_EXPORT __declspec(dllexport)
+# else
+# define SHARED_EXPORT __declspec(dllimport)
+# endif
#else
-#define SHARED_EXPORT __declspec(dllimport)
-#endif
-#else
-#define SHARED_EXPORT
+# define SHARED_EXPORT
#endif
void SHARED_EXPORT shared();
diff --git a/Tests/Module/CheckTypeSize/CheckTypeSize.c b/Tests/Module/CheckTypeSize/CheckTypeSize.c
index 05c798b..adfd2fc 100644
--- a/Tests/Module/CheckTypeSize/CheckTypeSize.c
+++ b/Tests/Module/CheckTypeSize/CheckTypeSize.c
@@ -2,13 +2,13 @@
#include "somestruct.h"
#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
+# include <sys/types.h>
#endif
#ifdef HAVE_STDINT_H
-#include <stdint.h>
+# include <stdint.h>
#endif
#ifdef HAVE_STDDEF_H
-#include <stddef.h>
+# include <stddef.h>
#endif
#include <stdio.h>
@@ -86,17 +86,17 @@ int main()
/* long long */
#if defined(SIZEOF_LONG_LONG)
CHECK(long long, SIZEOF_LONG_LONG);
-#if !defined(HAVE_SIZEOF_LONG_LONG)
+# if !defined(HAVE_SIZEOF_LONG_LONG)
NODEF(HAVE_SIZEOF_LONG_LONG);
-#endif
+# endif
#endif
/* __int64 */
#if defined(SIZEOF___INT64)
CHECK(__int64, SIZEOF___INT64);
-#if !defined(HAVE_SIZEOF___INT64)
+# if !defined(HAVE_SIZEOF___INT64)
NODEF(HAVE_SIZEOF___INT64);
-#endif
+# endif
#elif defined(HAVE_SIZEOF___INT64)
NODEF(SIZEOF___INT64);
#endif
@@ -114,9 +114,9 @@ int main()
/* ssize_t */
#if defined(SIZEOF_SSIZE_T)
CHECK(ssize_t, SIZEOF_SSIZE_T);
-#if !defined(HAVE_SIZEOF_SSIZE_T)
+# if !defined(HAVE_SIZEOF_SSIZE_T)
NODEF(HAVE_SIZEOF_SSIZE_T);
-#endif
+# endif
#elif defined(HAVE_SIZEOF_SSIZE_T)
NODEF(SIZEOF_SSIZE_T);
#endif
@@ -125,9 +125,9 @@ int main()
#if defined(SIZEOF_STRUCTMEMBER_INT)
CHECK(x.someint, SIZEOF_STRUCTMEMBER_INT);
CHECK(x.someint, SIZEOF_INT);
-#if !defined(HAVE_SIZEOF_STRUCTMEMBER_INT)
+# if !defined(HAVE_SIZEOF_STRUCTMEMBER_INT)
NODEF(HAVE_SIZEOF_STRUCTMEMBER_INT);
-#endif
+# endif
#elif defined(HAVE_SIZEOF_STRUCTMEMBER_INT)
NODEF(SIZEOF_STRUCTMEMBER_INT);
#endif
@@ -136,9 +136,9 @@ int main()
#if defined(SIZEOF_STRUCTMEMBER_PTR)
CHECK(x.someptr, SIZEOF_STRUCTMEMBER_PTR);
CHECK(x.someptr, SIZEOF_DATA_PTR);
-#if !defined(HAVE_SIZEOF_STRUCTMEMBER_PTR)
+# if !defined(HAVE_SIZEOF_STRUCTMEMBER_PTR)
NODEF(HAVE_SIZEOF_STRUCTMEMBER_PTR);
-#endif
+# endif
#elif defined(HAVE_SIZEOF_STRUCTMEMBER_PTR)
NODEF(SIZEOF_STRUCTMEMBER_PTR);
#endif
@@ -147,9 +147,9 @@ int main()
#if defined(SIZEOF_STRUCTMEMBER_CHAR)
CHECK(x.somechar, SIZEOF_STRUCTMEMBER_CHAR);
CHECK(x.somechar, SIZEOF_CHAR);
-#if !defined(HAVE_SIZEOF_STRUCTMEMBER_CHAR)
+# if !defined(HAVE_SIZEOF_STRUCTMEMBER_CHAR)
NODEF(HAVE_SIZEOF_STRUCTMEMBER_CHAR);
-#endif
+# endif
#elif defined(HAVE_SIZEOF_STRUCTMEMBER_CHAR)
NODEF(SIZEOF_STRUCTMEMBER_CHAR);
#endif
diff --git a/Tests/Module/CheckTypeSize/CheckTypeSize.cxx b/Tests/Module/CheckTypeSize/CheckTypeSize.cxx
index 2ae84a3..15dc890 100644
--- a/Tests/Module/CheckTypeSize/CheckTypeSize.cxx
+++ b/Tests/Module/CheckTypeSize/CheckTypeSize.cxx
@@ -3,13 +3,13 @@
#include "someclass.hxx"
#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
+# include <sys/types.h>
#endif
#ifdef HAVE_STDINT_H
-#include <stdint.h>
+# include <stdint.h>
#endif
#ifdef HAVE_STDDEF_H
-#include <stddef.h>
+# include <stddef.h>
#endif
#include <stdio.h>
@@ -87,17 +87,17 @@ int main()
/* long long */
#if defined(SIZEOF_LONG_LONG)
CHECK(long long, SIZEOF_LONG_LONG);
-#if !defined(HAVE_SIZEOF_LONG_LONG)
+# if !defined(HAVE_SIZEOF_LONG_LONG)
NODEF(HAVE_SIZEOF_LONG_LONG);
-#endif
+# endif
#endif
/* __int64 */
#if defined(SIZEOF___INT64)
CHECK(__int64, SIZEOF___INT64);
-#if !defined(HAVE_SIZEOF___INT64)
+# if !defined(HAVE_SIZEOF___INT64)
NODEF(HAVE_SIZEOF___INT64);
-#endif
+# endif
#elif defined(HAVE_SIZEOF___INT64)
NODEF(SIZEOF___INT64);
#endif
@@ -115,9 +115,9 @@ int main()
/* ssize_t */
#if defined(SIZEOF_SSIZE_T)
CHECK(ssize_t, SIZEOF_SSIZE_T);
-#if !defined(HAVE_SIZEOF_SSIZE_T)
+# if !defined(HAVE_SIZEOF_SSIZE_T)
NODEF(HAVE_SIZEOF_SSIZE_T);
-#endif
+# endif
#elif defined(HAVE_SIZEOF_SSIZE_T)
NODEF(SIZEOF_SSIZE_T);
#endif
@@ -126,9 +126,9 @@ int main()
#if defined(SIZEOF_NS_CLASSMEMBER_INT)
CHECK(y.someint, SIZEOF_NS_CLASSMEMBER_INT);
CHECK(y.someint, SIZEOF_INT);
-#if !defined(HAVE_SIZEOF_NS_CLASSMEMBER_INT)
+# if !defined(HAVE_SIZEOF_NS_CLASSMEMBER_INT)
NODEF(HAVE_SIZEOF_STRUCTMEMBER_INT);
-#endif
+# endif
#elif defined(HAVE_SIZEOF_STRUCTMEMBER_INT)
NODEF(SIZEOF_STRUCTMEMBER_INT);
#endif
@@ -137,9 +137,9 @@ int main()
#if defined(SIZEOF_NS_CLASSMEMBER_PTR)
CHECK(y.someptr, SIZEOF_NS_CLASSMEMBER_PTR);
CHECK(y.someptr, SIZEOF_DATA_PTR);
-#if !defined(HAVE_SIZEOF_NS_CLASSMEMBER_PTR)
+# if !defined(HAVE_SIZEOF_NS_CLASSMEMBER_PTR)
NODEF(HAVE_SIZEOF_NS_CLASSMEMBER_PTR);
-#endif
+# endif
#elif defined(HAVE_SIZEOF_NS_CLASSMEMBER_PTR)
NODEF(SIZEOF_NS_CLASSMEMBER_PTR);
#endif
@@ -148,9 +148,9 @@ int main()
#if defined(SIZEOF_NS_CLASSMEMBER_CHAR)
CHECK(y.somechar, SIZEOF_NS_CLASSMEMBER_CHAR);
CHECK(y.somechar, SIZEOF_CHAR);
-#if !defined(HAVE_SIZEOF_NS_CLASSMEMBER_CHAR)
+# if !defined(HAVE_SIZEOF_NS_CLASSMEMBER_CHAR)
NODEF(HAVE_SIZEOF_NS_CLASSMEMBER_CHAR);
-#endif
+# endif
#elif defined(HAVE_SIZEOF_NS_CLASSMEMBER_CHAR)
NODEF(SIZEOF_NS_CLASSMEMBER_CHAR);
#endif
@@ -159,9 +159,9 @@ int main()
#if defined(SIZEOF_NS_CLASSMEMBER_BOOL)
CHECK(y.somechar, SIZEOF_NS_CLASSMEMBER_BOOL);
CHECK(y.somechar, SIZEOF_BOOL);
-#if !defined(HAVE_SIZEOF_NS_CLASSMEMBER_BOOL)
+# if !defined(HAVE_SIZEOF_NS_CLASSMEMBER_BOOL)
NODEF(HAVE_SIZEOF_NS_CLASSMEMBER_BOOL);
-#endif
+# endif
#elif defined(HAVE_SIZEOF_NS_CLASSMEMBER_BOOL)
NODEF(SIZEOF_NS_CLASSMEMBER_BOOL);
#endif
diff --git a/Tests/Module/FindDependency/main.cpp b/Tests/Module/FindDependency/main.cpp
index 50c5958..1df4cb5 100644
--- a/Tests/Module/FindDependency/main.cpp
+++ b/Tests/Module/FindDependency/main.cpp
@@ -1,26 +1,26 @@
#ifndef HAVE_PACK1
-#error Expected HAVE_PACK1
+# error Expected HAVE_PACK1
#endif
#ifndef HAVE_PACK2
-#error Expected HAVE_PACK2
+# error Expected HAVE_PACK2
#endif
#ifndef HAVE_PACK3
-#error Expected HAVE_PACK3
+# error Expected HAVE_PACK3
#endif
#ifndef HAVE_PACK4
-#error Expected HAVE_PACK4
+# error Expected HAVE_PACK4
#endif
#ifndef HAVE_PACK5
-#error Expected HAVE_PACK5
+# error Expected HAVE_PACK5
#endif
#ifndef HAVE_PACK6
-#error Expected HAVE_PACK6
+# error Expected HAVE_PACK6
#endif
int main(int argc, char** argv)
diff --git a/Tests/Module/WriteCompilerDetectionHeader/compile_tests.h b/Tests/Module/WriteCompilerDetectionHeader/compile_tests.h
index d3c2a2d..0da8bab 100644
--- a/Tests/Module/WriteCompilerDetectionHeader/compile_tests.h
+++ b/Tests/Module/WriteCompilerDetectionHeader/compile_tests.h
@@ -7,21 +7,21 @@
JOIN(EXPECTED_COMPILER_, FEATURE))
#if !CHECK(CXX_DELEGATING_CONSTRUCTORS)
-#error cxx_delegating_constructors expected availability did not match.
+# error cxx_delegating_constructors expected availability did not match.
#endif
#if !CHECK(CXX_VARIADIC_TEMPLATES)
-#error cxx_variadic_templates expected availability did not match.
+# error cxx_variadic_templates expected availability did not match.
#endif
#if !CHECK(VERSION_MAJOR)
-#error Compiler major version did not match.
+# error Compiler major version did not match.
#endif
#if !CHECK(VERSION_MINOR)
-#error Compiler minor version did not match.
+# error Compiler minor version did not match.
#endif
#if !CHECK(VERSION_PATCH)
-#error Compiler patch version did not match.
+# error Compiler patch version did not match.
#endif
diff --git a/Tests/Module/WriteCompilerDetectionHeader/main.c b/Tests/Module/WriteCompilerDetectionHeader/main.c
index ee6abdb..3420c67 100644
--- a/Tests/Module/WriteCompilerDetectionHeader/main.c
+++ b/Tests/Module/WriteCompilerDetectionHeader/main.c
@@ -3,25 +3,25 @@
#if !defined(TEST_COMPILER_C_FUNCTION_PROTOTYPES) || \
!TEST_COMPILER_C_FUNCTION_PROTOTYPES
-#error Expected TEST_COMPILER_C_FUNCTION_PROTOTYPES
+# error Expected TEST_COMPILER_C_FUNCTION_PROTOTYPES
#endif
#if !EXPECTED_COMPILER_C_FUNCTION_PROTOTYPES
-#error Expected EXPECTED_COMPILER_C_FUNCTION_PROTOTYPES
+# error Expected EXPECTED_COMPILER_C_FUNCTION_PROTOTYPES
#endif
#if !defined(TEST_COMPILER_C_RESTRICT) || !TEST_COMPILER_C_RESTRICT
-#if EXPECTED_COMPILER_C_RESTRICT
-#error Expected TEST_COMPILER_C_RESTRICT
-#endif
+# if EXPECTED_COMPILER_C_RESTRICT
+# error Expected TEST_COMPILER_C_RESTRICT
+# endif
#else
-#if !EXPECTED_COMPILER_C_RESTRICT
-#error Expect no TEST_COMPILER_C_RESTRICT
-#endif
+# if !EXPECTED_COMPILER_C_RESTRICT
+# error Expect no TEST_COMPILER_C_RESTRICT
+# endif
#endif
#ifdef TEST_COMPILER_CXX_STATIC_ASSERT
-#error Expect no CXX features defined
+# error Expect no CXX features defined
#endif
int main()
diff --git a/Tests/Module/WriteCompilerDetectionHeader/main.cpp b/Tests/Module/WriteCompilerDetectionHeader/main.cpp
index 9979cba..97116a5 100644
--- a/Tests/Module/WriteCompilerDetectionHeader/main.cpp
+++ b/Tests/Module/WriteCompilerDetectionHeader/main.cpp
@@ -5,7 +5,7 @@
#include "compile_tests.h"
#ifdef TEST_COMPILER_C_STATIC_ASSERT
-#error Expect no C features defined
+# error Expect no C features defined
#endif
TEST_STATIC_ASSERT(true);
diff --git a/Tests/Module/WriteCompilerDetectionHeader/main_multi.c b/Tests/Module/WriteCompilerDetectionHeader/main_multi.c
index 6e13fd7..28f9dae 100644
--- a/Tests/Module/WriteCompilerDetectionHeader/main_multi.c
+++ b/Tests/Module/WriteCompilerDetectionHeader/main_multi.c
@@ -3,25 +3,25 @@
#if !defined(MULTI_COMPILER_C_FUNCTION_PROTOTYPES) || \
!MULTI_COMPILER_C_FUNCTION_PROTOTYPES
-#error Expected MULTI_COMPILER_C_FUNCTION_PROTOTYPES
+# error Expected MULTI_COMPILER_C_FUNCTION_PROTOTYPES
#endif
#if !EXPECTED_COMPILER_C_FUNCTION_PROTOTYPES
-#error Expected EXPECTED_COMPILER_C_FUNCTION_PROTOTYPES
+# error Expected EXPECTED_COMPILER_C_FUNCTION_PROTOTYPES
#endif
#if !defined(MULTI_COMPILER_C_RESTRICT) || !MULTI_COMPILER_C_RESTRICT
-#if EXPECTED_COMPILER_C_RESTRICT
-#error Expected MULTI_COMPILER_C_RESTRICT
-#endif
+# if EXPECTED_COMPILER_C_RESTRICT
+# error Expected MULTI_COMPILER_C_RESTRICT
+# endif
#else
-#if !EXPECTED_COMPILER_C_RESTRICT
-#error Expect no MULTI_COMPILER_C_RESTRICT
-#endif
+# if !EXPECTED_COMPILER_C_RESTRICT
+# error Expect no MULTI_COMPILER_C_RESTRICT
+# endif
#endif
#ifdef MULTI_COMPILER_CXX_STATIC_ASSERT
-#error Expect no CXX features defined
+# error Expect no CXX features defined
#endif
int main()
diff --git a/Tests/Module/WriteCompilerDetectionHeader/multi_files.cpp b/Tests/Module/WriteCompilerDetectionHeader/multi_files.cpp
index d1f178f..44f4d17 100644
--- a/Tests/Module/WriteCompilerDetectionHeader/multi_files.cpp
+++ b/Tests/Module/WriteCompilerDetectionHeader/multi_files.cpp
@@ -5,7 +5,7 @@
#include "compile_tests.h"
#ifdef MULTI_COMPILER_C_STATIC_ASSERT
-#error Expect no C features defined
+# error Expect no C features defined
#endif
MULTI_STATIC_ASSERT(true);
diff --git a/Tests/ModuleDefinition/example_mod_1.c b/Tests/ModuleDefinition/example_mod_1.c
index 6b355cf..8afdb31 100644
--- a/Tests/ModuleDefinition/example_mod_1.c
+++ b/Tests/ModuleDefinition/example_mod_1.c
@@ -1,7 +1,7 @@
#ifdef __WATCOMC__
-#define MODULE_CCONV __cdecl
+# define MODULE_CCONV __cdecl
#else
-#define MODULE_CCONV
+# define MODULE_CCONV
#endif
int __declspec(dllimport) example_exe_function(void);
diff --git a/Tests/NewlineArgs/libcxx1.cxx b/Tests/NewlineArgs/libcxx1.cxx
index 72f171d..b3c2192 100644
--- a/Tests/NewlineArgs/libcxx1.cxx
+++ b/Tests/NewlineArgs/libcxx1.cxx
@@ -1,10 +1,10 @@
#include "libcxx1.h"
#ifdef TEST_FLAG_1
-#ifdef TEST_FLAG_2
+# ifdef TEST_FLAG_2
float LibCxx1Class::Method()
{
return 2.0;
}
-#endif
+# endif
#endif
diff --git a/Tests/NewlineArgs/libcxx1.h b/Tests/NewlineArgs/libcxx1.h
index ea094d7..8bb09cd 100644
--- a/Tests/NewlineArgs/libcxx1.h
+++ b/Tests/NewlineArgs/libcxx1.h
@@ -2,8 +2,8 @@ class LibCxx1Class
{
public:
#ifdef TEST_FLAG_1
-#ifdef TEST_FLAG_2
+# ifdef TEST_FLAG_2
static float Method();
-#endif
+# endif
#endif
};
diff --git a/Tests/ObjectLibrary/A/a.h b/Tests/ObjectLibrary/A/a.h
index b1fd42f..184df3c 100644
--- a/Tests/ObjectLibrary/A/a.h
+++ b/Tests/ObjectLibrary/A/a.h
@@ -1,6 +1,6 @@
#ifndef A_DEF
-#error "A_DEF not defined"
+# error "A_DEF not defined"
#endif
#ifdef B_DEF
-#error "B_DEF must not be defined"
+# error "B_DEF must not be defined"
#endif
diff --git a/Tests/ObjectLibrary/B/b.h b/Tests/ObjectLibrary/B/b.h
index a7bd352..de81d69 100644
--- a/Tests/ObjectLibrary/B/b.h
+++ b/Tests/ObjectLibrary/B/b.h
@@ -1,18 +1,18 @@
#ifdef A_DEF
-#error "A_DEF must not be defined"
+# error "A_DEF must not be defined"
#endif
#ifndef B_DEF
-#error "B_DEF not defined"
+# error "B_DEF not defined"
#endif
#if defined(_WIN32) && defined(Bexport)
-#define EXPORT_B __declspec(dllexport)
+# define EXPORT_B __declspec(dllexport)
#else
-#define EXPORT_B
+# define EXPORT_B
#endif
#if defined(_WIN32) && defined(SHARED_B)
-#define IMPORT_B __declspec(dllimport)
+# define IMPORT_B __declspec(dllimport)
#else
-#define IMPORT_B
+# define IMPORT_B
#endif
diff --git a/Tests/ObjectLibrary/c.c b/Tests/ObjectLibrary/c.c
index 4c37e38..2692899 100644
--- a/Tests/ObjectLibrary/c.c
+++ b/Tests/ObjectLibrary/c.c
@@ -1,7 +1,7 @@
#if defined(_WIN32) && defined(Cshared_EXPORTS)
-#define EXPORT_C __declspec(dllexport)
+# define EXPORT_C __declspec(dllexport)
#else
-#define EXPORT_C
+# define EXPORT_C
#endif
extern int a1(void);
diff --git a/Tests/ObjectLibrary/main.c b/Tests/ObjectLibrary/main.c
index b2f1d44..cc75685 100644
--- a/Tests/ObjectLibrary/main.c
+++ b/Tests/ObjectLibrary/main.c
@@ -1,7 +1,7 @@
#if defined(_WIN32) && defined(SHARED_C)
-#define IMPORT_C __declspec(dllimport)
+# define IMPORT_C __declspec(dllimport)
#else
-#define IMPORT_C
+# define IMPORT_C
#endif
extern IMPORT_C int b1(void);
extern IMPORT_C int b2(void);
diff --git a/Tests/OutOfSource/OutOfSourceSubdir/testlib.h b/Tests/OutOfSource/OutOfSourceSubdir/testlib.h
index bacf5a1..3e012d2 100644
--- a/Tests/OutOfSource/OutOfSourceSubdir/testlib.h
+++ b/Tests/OutOfSource/OutOfSourceSubdir/testlib.h
@@ -1,11 +1,11 @@
#ifdef _WIN32
-#ifdef testlib_EXPORTS
-#define CM_TEST_LIB_EXPORT __declspec(dllexport)
+# ifdef testlib_EXPORTS
+# define CM_TEST_LIB_EXPORT __declspec(dllexport)
+# else
+# define CM_TEST_LIB_EXPORT __declspec(dllimport)
+# endif
#else
-#define CM_TEST_LIB_EXPORT __declspec(dllimport)
-#endif
-#else
-#define CM_TEST_LIB_EXPORT
+# define CM_TEST_LIB_EXPORT
#endif
CM_TEST_LIB_EXPORT float TestLib();
diff --git a/Tests/PerConfig/pcShared.h b/Tests/PerConfig/pcShared.h
index 031cd79..2ae66cd 100644
--- a/Tests/PerConfig/pcShared.h
+++ b/Tests/PerConfig/pcShared.h
@@ -2,13 +2,13 @@
#define pcShared_h
#ifdef _WIN32
-#ifdef pcShared_EXPORTS
-#define PC_EXPORT __declspec(dllexport)
+# ifdef pcShared_EXPORTS
+# define PC_EXPORT __declspec(dllexport)
+# else
+# define PC_EXPORT __declspec(dllimport)
+# endif
#else
-#define PC_EXPORT __declspec(dllimport)
-#endif
-#else
-#define PC_EXPORT
+# define PC_EXPORT
#endif
PC_EXPORT const char* pcShared(void);
diff --git a/Tests/Plugin/include/example.h b/Tests/Plugin/include/example.h
index 87d992e..cbcb3dc 100644
--- a/Tests/Plugin/include/example.h
+++ b/Tests/Plugin/include/example.h
@@ -2,13 +2,13 @@
#define example_h
#if defined(_WIN32) || defined(__CYGWIN__)
-#if defined(example_exe_EXPORTS)
-#define EXAMPLE_EXPORT __declspec(dllexport)
+# if defined(example_exe_EXPORTS)
+# define EXAMPLE_EXPORT __declspec(dllexport)
+# else
+# define EXAMPLE_EXPORT __declspec(dllimport)
+# endif
#else
-#define EXAMPLE_EXPORT __declspec(dllimport)
-#endif
-#else
-#define EXAMPLE_EXPORT
+# define EXAMPLE_EXPORT
#endif
#ifdef __cplusplus
diff --git a/Tests/Plugin/src/example_exe.cxx b/Tests/Plugin/src/example_exe.cxx
index 017fbf6..257a35c 100644
--- a/Tests/Plugin/src/example_exe.cxx
+++ b/Tests/Plugin/src/example_exe.cxx
@@ -17,9 +17,9 @@ extern "C" int example_exe_function()
}
#ifdef CMAKE_INTDIR
-#define CONFIG_DIR "/" CMAKE_INTDIR
+# define CONFIG_DIR "/" CMAKE_INTDIR
#else
-#define CONFIG_DIR ""
+# define CONFIG_DIR ""
#endif
int main()
diff --git a/Tests/Plugin/src/example_mod_1.c b/Tests/Plugin/src/example_mod_1.c
index a5dd984..87b559d 100644
--- a/Tests/Plugin/src/example_mod_1.c
+++ b/Tests/Plugin/src/example_mod_1.c
@@ -3,15 +3,15 @@
#include <stdio.h>
#if defined(_WIN32)
-#define MODULE_EXPORT __declspec(dllexport)
+# define MODULE_EXPORT __declspec(dllexport)
#else
-#define MODULE_EXPORT
+# define MODULE_EXPORT
#endif
#ifdef __WATCOMC__
-#define MODULE_CCONV __cdecl
+# define MODULE_CCONV __cdecl
#else
-#define MODULE_CCONV
+# define MODULE_CCONV
#endif
MODULE_EXPORT int MODULE_CCONV example_mod_1_function(int n)
diff --git a/Tests/PrecompiledHeader/foo1.c b/Tests/PrecompiledHeader/foo1.c
index 77172ba..fef2586 100644
--- a/Tests/PrecompiledHeader/foo1.c
+++ b/Tests/PrecompiledHeader/foo1.c
@@ -1,5 +1,5 @@
#ifndef foo_h
-#error "Precompiled header foo_precompiled.h has not been loaded."
+# error "Precompiled header foo_precompiled.h has not been loaded."
#endif
int main()
diff --git a/Tests/PrecompiledHeader/foo2.c b/Tests/PrecompiledHeader/foo2.c
index f192e16..3ed04ed 100644
--- a/Tests/PrecompiledHeader/foo2.c
+++ b/Tests/PrecompiledHeader/foo2.c
@@ -1,6 +1,6 @@
#ifndef foo_h
-#include "foo.h"
-#error "Precompiled header foo_precompiled.h has not been loaded."
+# include "foo.h"
+# error "Precompiled header foo_precompiled.h has not been loaded."
#endif
int foo()
diff --git a/Tests/Preprocess/preprocess.c b/Tests/Preprocess/preprocess.c
index 1b038b0..2913f93 100644
--- a/Tests/Preprocess/preprocess.c
+++ b/Tests/Preprocess/preprocess.c
@@ -33,117 +33,117 @@ int check_defines_C(void)
}
}
#ifdef NDEBUG
-#ifdef FILE_DEF_DEBUG
+# ifdef FILE_DEF_DEBUG
{
fprintf(stderr, "FILE_DEF_DEBUG should not be defined in C\n");
result = 0;
}
-#endif
-#ifdef TARGET_DEF_DEBUG
+# endif
+# ifdef TARGET_DEF_DEBUG
{
fprintf(stderr, "TARGET_DEF_DEBUG should not be defined in C\n");
result = 0;
}
-#endif
-#ifdef DIRECTORY_DEF_DEBUG
+# endif
+# ifdef DIRECTORY_DEF_DEBUG
{
fprintf(stderr, "DIRECTORY_DEF_DEBUG should not be defined in C\n");
result = 0;
}
-#endif
-#ifndef FILE_DEF_RELEASE
-#ifndef PREPROCESS_XCODE
+# endif
+# ifndef FILE_DEF_RELEASE
+# ifndef PREPROCESS_XCODE
{
fprintf(stderr, "FILE_DEF_RELEASE should be defined in C\n");
result = 0;
}
-#endif
-#endif
-#ifndef TARGET_DEF_RELEASE
+# endif
+# endif
+# ifndef TARGET_DEF_RELEASE
{
fprintf(stderr, "TARGET_DEF_RELEASE should be defined in C\n");
result = 0;
}
-#endif
-#ifndef DIRECTORY_DEF_RELEASE
+# endif
+# ifndef DIRECTORY_DEF_RELEASE
{
fprintf(stderr, "DIRECTORY_DEF_RELEASE should be defined in C\n");
result = 0;
}
-#endif
+# endif
#endif
#ifdef PREPROCESS_DEBUG
-#ifndef FILE_DEF_DEBUG
-#ifndef PREPROCESS_XCODE
+# ifndef FILE_DEF_DEBUG
+# ifndef PREPROCESS_XCODE
{
fprintf(stderr, "FILE_DEF_DEBUG should be defined in C\n");
result = 0;
}
-#endif
-#endif
-#ifndef TARGET_DEF_DEBUG
+# endif
+# endif
+# ifndef TARGET_DEF_DEBUG
{
fprintf(stderr, "TARGET_DEF_DEBUG should be defined in C\n");
result = 0;
}
-#endif
-#ifndef DIRECTORY_DEF_DEBUG
+# endif
+# ifndef DIRECTORY_DEF_DEBUG
{
fprintf(stderr, "DIRECTORY_DEF_DEBUG should be defined in C\n");
result = 0;
}
-#endif
-#ifdef FILE_DEF_RELEASE
+# endif
+# ifdef FILE_DEF_RELEASE
{
fprintf(stderr, "FILE_DEF_RELEASE should not be defined in C\n");
result = 0;
}
-#endif
-#ifdef TARGET_DEF_RELEASE
+# endif
+# ifdef TARGET_DEF_RELEASE
{
fprintf(stderr, "TARGET_DEF_RELEASE should not be defined in C\n");
result = 0;
}
-#endif
-#ifdef DIRECTORY_DEF_RELEASE
+# endif
+# ifdef DIRECTORY_DEF_RELEASE
{
fprintf(stderr, "DIRECTORY_DEF_RELEASE should not be defined in C\n");
result = 0;
}
-#endif
+# endif
#endif
#if defined(FILE_DEF_DEBUG) || defined(TARGET_DEF_DEBUG)
-#if !defined(FILE_DEF_DEBUG) || !defined(TARGET_DEF_DEBUG)
-#ifndef PREPROCESS_XCODE
+# if !defined(FILE_DEF_DEBUG) || !defined(TARGET_DEF_DEBUG)
+# ifndef PREPROCESS_XCODE
{
fprintf(stderr, "FILE_DEF_DEBUG and TARGET_DEF_DEBUG inconsistent in C\n");
result = 0;
}
-#endif
-#endif
-#if defined(FILE_DEF_RELEASE) || defined(TARGET_DEF_RELEASE)
+# endif
+# endif
+# if defined(FILE_DEF_RELEASE) || defined(TARGET_DEF_RELEASE)
{
fprintf(stderr, "DEBUG and RELEASE definitions inconsistent in C\n");
result = 0;
}
-#endif
+# endif
#endif
#if defined(FILE_DEF_RELEASE) || defined(TARGET_DEF_RELEASE)
-#if !defined(FILE_DEF_RELEASE) || !defined(TARGET_DEF_RELEASE)
-#ifndef PREPROCESS_XCODE
+# if !defined(FILE_DEF_RELEASE) || !defined(TARGET_DEF_RELEASE)
+# ifndef PREPROCESS_XCODE
{
fprintf(stderr,
"FILE_DEF_RELEASE and TARGET_DEF_RELEASE inconsistent in C\n");
result = 0;
}
-#endif
-#endif
-#if defined(FILE_DEF_DEBUG) || defined(TARGET_DEF_DEBUG)
+# endif
+# endif
+# if defined(FILE_DEF_DEBUG) || defined(TARGET_DEF_DEBUG)
{
fprintf(stderr, "RELEASE and DEBUG definitions inconsistent in C\n");
result = 0;
}
-#endif
+# endif
#endif
#ifndef FILE_PATH_DEF
{
diff --git a/Tests/Preprocess/preprocess.cxx b/Tests/Preprocess/preprocess.cxx
index 0fab785..34a69c6 100644
--- a/Tests/Preprocess/preprocess.cxx
+++ b/Tests/Preprocess/preprocess.cxx
@@ -35,118 +35,118 @@ int check_defines_CXX()
}
}
#ifdef NDEBUG
-#ifdef FILE_DEF_DEBUG
+# ifdef FILE_DEF_DEBUG
{
fprintf(stderr, "FILE_DEF_DEBUG should not be defined in CXX\n");
result = 0;
}
-#endif
-#ifdef TARGET_DEF_DEBUG
+# endif
+# ifdef TARGET_DEF_DEBUG
{
fprintf(stderr, "TARGET_DEF_DEBUG should not be defined in CXX\n");
result = 0;
}
-#endif
-#ifdef DIRECTORY_DEF_DEBUG
+# endif
+# ifdef DIRECTORY_DEF_DEBUG
{
fprintf(stderr, "DIRECTORY_DEF_DEBUG should not be defined in CXX\n");
result = 0;
}
-#endif
-#ifndef FILE_DEF_RELEASE
-#ifndef PREPROCESS_XCODE
+# endif
+# ifndef FILE_DEF_RELEASE
+# ifndef PREPROCESS_XCODE
{
fprintf(stderr, "FILE_DEF_RELEASE should be defined in CXX\n");
result = 0;
}
-#endif
-#endif
-#ifndef TARGET_DEF_RELEASE
+# endif
+# endif
+# ifndef TARGET_DEF_RELEASE
{
fprintf(stderr, "TARGET_DEF_RELEASE should be defined in CXX\n");
result = 0;
}
-#endif
-#ifndef DIRECTORY_DEF_RELEASE
+# endif
+# ifndef DIRECTORY_DEF_RELEASE
{
fprintf(stderr, "DIRECTORY_DEF_RELEASE should be defined in CXX\n");
result = 0;
}
-#endif
+# endif
#endif
#ifdef PREPROCESS_DEBUG
-#ifndef FILE_DEF_DEBUG
-#ifndef PREPROCESS_XCODE
+# ifndef FILE_DEF_DEBUG
+# ifndef PREPROCESS_XCODE
{
fprintf(stderr, "FILE_DEF_DEBUG should be defined in CXX\n");
result = 0;
}
-#endif
-#endif
-#ifndef TARGET_DEF_DEBUG
+# endif
+# endif
+# ifndef TARGET_DEF_DEBUG
{
fprintf(stderr, "TARGET_DEF_DEBUG should be defined in CXX\n");
result = 0;
}
-#endif
-#ifndef DIRECTORY_DEF_DEBUG
+# endif
+# ifndef DIRECTORY_DEF_DEBUG
{
fprintf(stderr, "DIRECTORY_DEF_DEBUG should be defined in CXX\n");
result = 0;
}
-#endif
-#ifdef FILE_DEF_RELEASE
+# endif
+# ifdef FILE_DEF_RELEASE
{
fprintf(stderr, "FILE_DEF_RELEASE should not be defined in CXX\n");
result = 0;
}
-#endif
-#ifdef TARGET_DEF_RELEASE
+# endif
+# ifdef TARGET_DEF_RELEASE
{
fprintf(stderr, "TARGET_DEF_RELEASE should not be defined in CXX\n");
result = 0;
}
-#endif
-#ifdef DIRECTORY_DEF_RELEASE
+# endif
+# ifdef DIRECTORY_DEF_RELEASE
{
fprintf(stderr, "DIRECTORY_DEF_RELEASE should not be defined in CXX\n");
result = 0;
}
-#endif
+# endif
#endif
#if defined(FILE_DEF_DEBUG) || defined(TARGET_DEF_DEBUG)
-#if !defined(FILE_DEF_DEBUG) || !defined(TARGET_DEF_DEBUG)
-#ifndef PREPROCESS_XCODE
+# if !defined(FILE_DEF_DEBUG) || !defined(TARGET_DEF_DEBUG)
+# ifndef PREPROCESS_XCODE
{
fprintf(stderr,
"FILE_DEF_DEBUG and TARGET_DEF_DEBUG inconsistent in CXX\n");
result = 0;
}
-#endif
-#endif
-#if defined(FILE_DEF_RELEASE) || defined(TARGET_DEF_RELEASE)
+# endif
+# endif
+# if defined(FILE_DEF_RELEASE) || defined(TARGET_DEF_RELEASE)
{
fprintf(stderr, "DEBUG and RELEASE definitions inconsistent in CXX\n");
result = 0;
}
-#endif
+# endif
#endif
#if defined(FILE_DEF_RELEASE) || defined(TARGET_DEF_RELEASE)
-#if !defined(FILE_DEF_RELEASE) || !defined(TARGET_DEF_RELEASE)
-#ifndef PREPROCESS_XCODE
+# if !defined(FILE_DEF_RELEASE) || !defined(TARGET_DEF_RELEASE)
+# ifndef PREPROCESS_XCODE
{
fprintf(stderr,
"FILE_DEF_RELEASE and TARGET_DEF_RELEASE inconsistent in CXX\n");
result = 0;
}
-#endif
-#endif
-#if defined(FILE_DEF_DEBUG) || defined(TARGET_DEF_DEBUG)
+# endif
+# endif
+# if defined(FILE_DEF_DEBUG) || defined(TARGET_DEF_DEBUG)
{
fprintf(stderr, "RELEASE and DEBUG definitions inconsistent in CXX\n");
result = 0;
}
-#endif
+# endif
#endif
#ifndef FILE_PATH_DEF
{
diff --git a/Tests/Properties/subdirtest.cxx b/Tests/Properties/subdirtest.cxx
index 02d8f3d..23f1048 100644
--- a/Tests/Properties/subdirtest.cxx
+++ b/Tests/Properties/subdirtest.cxx
@@ -1,6 +1,6 @@
#ifndef SUBDIR_TEST
-#error Expected SUBDIR_TEST
+# error Expected SUBDIR_TEST
#endif
int main(int, char**)
diff --git a/Tests/Qt4Targets/activeqtexe.cpp b/Tests/Qt4Targets/activeqtexe.cpp
index f17b0a6..98176f1 100644
--- a/Tests/Qt4Targets/activeqtexe.cpp
+++ b/Tests/Qt4Targets/activeqtexe.cpp
@@ -2,7 +2,7 @@
#include <QApplication>
#ifndef QT_QAXSERVER_LIB
-#error Expected QT_QAXSERVER_LIB
+# error Expected QT_QAXSERVER_LIB
#endif
#include <QAxFactory>
diff --git a/Tests/Qt4Targets/main.cpp b/Tests/Qt4Targets/main.cpp
index 07443b0..f8eacdc 100644
--- a/Tests/Qt4Targets/main.cpp
+++ b/Tests/Qt4Targets/main.cpp
@@ -5,11 +5,11 @@
#include <QString>
#ifndef QT_CORE_LIB
-#error Expected QT_CORE_LIB
+# error Expected QT_CORE_LIB
#endif
#ifndef QT_GUI_LIB
-#error Expected QT_GUI_LIB
+# error Expected QT_GUI_LIB
#endif
int main(int argc, char** argv)
diff --git a/Tests/Qt4Targets/main_gen_test.cpp b/Tests/Qt4Targets/main_gen_test.cpp
index 1ea390b..6616e84 100644
--- a/Tests/Qt4Targets/main_gen_test.cpp
+++ b/Tests/Qt4Targets/main_gen_test.cpp
@@ -3,7 +3,9 @@
#include "myinterface.h"
-class MyObject : public QObject, MyInterface
+class MyObject
+ : public QObject
+ , MyInterface
{
Q_OBJECT
Q_INTERFACES(MyInterface)
diff --git a/Tests/Qt4Targets/mywrapobject.h b/Tests/Qt4Targets/mywrapobject.h
index 5d4e52a..231a1fe 100644
--- a/Tests/Qt4Targets/mywrapobject.h
+++ b/Tests/Qt4Targets/mywrapobject.h
@@ -6,7 +6,9 @@
#include "myinterface.h"
-class MyWrapObject : public QObject, MyInterface
+class MyWrapObject
+ : public QObject
+ , MyInterface
{
Q_OBJECT
Q_INTERFACES(MyInterface)
diff --git a/Tests/QtAutogen/Complex/calwidget.cpp b/Tests/QtAutogen/Complex/calwidget.cpp
index 380e982..8ce53f1 100644
--- a/Tests/QtAutogen/Complex/calwidget.cpp
+++ b/Tests/QtAutogen/Complex/calwidget.cpp
@@ -51,7 +51,7 @@
#include "ui_calwidget.h"
#ifdef UI_CALWIDGET_H
-#error Definition of UI_CALWIDGET_H should be disabled by file option.
+# error Definition of UI_CALWIDGET_H should be disabled by file option.
#endif
Window::Window()
diff --git a/Tests/QtAutogen/Complex/generated.h b/Tests/QtAutogen/Complex/generated.h
index 62e1607..cac14de 100644
--- a/Tests/QtAutogen/Complex/generated.h
+++ b/Tests/QtAutogen/Complex/generated.h
@@ -7,7 +7,10 @@
#include "myinterface.h"
#include "myotherinterface.h"
-class Generated : public QObject, MyInterface, MyOtherInterface
+class Generated
+ : public QObject
+ , MyInterface
+ , MyOtherInterface
{
Q_OBJECT
Q_INTERFACES(MyInterface MyOtherInterface)
diff --git a/Tests/QtAutogen/Complex/main.cpp b/Tests/QtAutogen/Complex/main.cpp
index d557c70..b5b6ed1 100644
--- a/Tests/QtAutogen/Complex/main.cpp
+++ b/Tests/QtAutogen/Complex/main.cpp
@@ -52,8 +52,8 @@
#include "xyz.h"
#include "yaf.h"
#ifdef TEST_DEBUG_CLASS
-#include "debug_class.h"
-#include <iostream>
+# include "debug_class.h"
+# include <iostream>
#endif
int main(int argv, char** args)
diff --git a/Tests/QtAutogen/DefinesTest/defines_test.cpp b/Tests/QtAutogen/DefinesTest/defines_test.cpp
index cf4e9cb..a533622 100644
--- a/Tests/QtAutogen/DefinesTest/defines_test.cpp
+++ b/Tests/QtAutogen/DefinesTest/defines_test.cpp
@@ -2,7 +2,7 @@
#include <QObject>
#ifdef QT_GUI_LIB
-#include <QTextDocument>
+# include <QTextDocument>
class SomeDocument : public QTextDocument
{
diff --git a/Tests/QtAutogen/UicInterface/libwidget.h b/Tests/QtAutogen/UicInterface/libwidget.h
index b6f3e82..a7ad14f 100644
--- a/Tests/QtAutogen/UicInterface/libwidget.h
+++ b/Tests/QtAutogen/UicInterface/libwidget.h
@@ -6,7 +6,7 @@
#include <memory>
#if QT_VERSION < QT_VERSION_CHECK(5, 3, 0)
-#include <klocalizedstring.h>
+# include <klocalizedstring.h>
#endif
#include "ui_libwidget.h"
diff --git a/Tests/QtAutogen/UicInterface/mywidget.h b/Tests/QtAutogen/UicInterface/mywidget.h
index c23e55d..1d31ce7 100644
--- a/Tests/QtAutogen/UicInterface/mywidget.h
+++ b/Tests/QtAutogen/UicInterface/mywidget.h
@@ -6,7 +6,7 @@
#include <memory>
#if QT_VERSION < QT_VERSION_CHECK(5, 3, 0)
-#include <klocalizedstring.h>
+# include <klocalizedstring.h>
#endif
#include "ui_mywidget.h"
diff --git a/Tests/RunCMake/Android/android.cxx b/Tests/RunCMake/Android/android.cxx
index 2dee8f9..a6d8c55 100644
--- a/Tests/RunCMake/Android/android.cxx
+++ b/Tests/RunCMake/Android/android.cxx
@@ -1,19 +1,19 @@
#include "android.h"
#ifndef STL_NONE
-#include <cmath>
-#include <cstdio>
-#ifndef STL_SYSTEM
-#include <exception>
-#include <typeinfo>
-#ifndef STL_STLPORT
-#include <cxxabi.h>
-#endif
-#ifndef STL_GABI
-#include <iostream>
-#include <string>
-#endif
-#endif
+# include <cmath>
+# include <cstdio>
+# ifndef STL_SYSTEM
+# include <exception>
+# include <typeinfo>
+# ifndef STL_STLPORT
+# include <cxxabi.h>
+# endif
+# ifndef STL_GABI
+# include <iostream>
+# include <string>
+# endif
+# endif
#endif
int main()
@@ -30,19 +30,19 @@ int main()
try {
delete (new int);
} catch (std::exception const& e) {
-#if defined(STL_GABI)
+# if defined(STL_GABI)
e.what();
typeid(e).name();
-#else
+# else
std::cerr << e.what() << std::endl;
std::cerr << typeid(e).name() << std::endl;
-#endif
+# endif
}
-#if defined(STL_GABI)
+# if defined(STL_GABI)
return 0;
-#else
+# else
std::string s;
return static_cast<int>(s.size());
-#endif
+# endif
#endif
}
diff --git a/Tests/RunCMake/Android/android.h b/Tests/RunCMake/Android/android.h
index a5fd67e..2c5cd95 100644
--- a/Tests/RunCMake/Android/android.h
+++ b/Tests/RunCMake/Android/android.h
@@ -1,103 +1,103 @@
#ifndef __ANDROID__
-#error "__ANDROID__ not defined"
+# error "__ANDROID__ not defined"
#endif
#include <android/api-level.h>
#if API_LEVEL != __ANDROID_API__
-#error "API levels do not match"
+# error "API levels do not match"
#endif
#ifdef COMPILER_IS_CLANG
-#ifndef __clang__
-#error "COMPILER_IS_CLANG but __clang__ is not defined"
-#endif
+# ifndef __clang__
+# error "COMPILER_IS_CLANG but __clang__ is not defined"
+# endif
#else
-#ifdef __clang__
-#error "!COMPILER_IS_CLANG but __clang__ is defined"
-#endif
+# ifdef __clang__
+# error "!COMPILER_IS_CLANG but __clang__ is defined"
+# endif
#endif
#ifdef ARM_MODE
-#if ARM_MODE == 1 && defined(__thumb__)
-#error "ARM_MODE==1 but __thumb__ is defined"
-#elif ARM_MODE == 0 && !defined(__thumb__)
-#error "ARM_MODE==0 but __thumb__ is not defined"
-#endif
+# if ARM_MODE == 1 && defined(__thumb__)
+# error "ARM_MODE==1 but __thumb__ is defined"
+# elif ARM_MODE == 0 && !defined(__thumb__)
+# error "ARM_MODE==0 but __thumb__ is not defined"
+# endif
#endif
#ifdef ARM_NEON
-#if ARM_NEON == 0 && defined(__ARM_NEON__)
-#error "ARM_NEON==0 but __ARM_NEON__ is defined"
-#elif ARM_NEON == 1 && !defined(__ARM_NEON__)
-#error "ARM_NEON==1 but __ARM_NEON__ is not defined"
-#endif
+# if ARM_NEON == 0 && defined(__ARM_NEON__)
+# error "ARM_NEON==0 but __ARM_NEON__ is defined"
+# elif ARM_NEON == 1 && !defined(__ARM_NEON__)
+# error "ARM_NEON==1 but __ARM_NEON__ is not defined"
+# endif
#endif
#ifdef ABI_armeabi
-#ifndef __ARM_EABI__
-#error "ABI_armeabi: __ARM_EABI__ not defined"
-#endif
-#if __ARM_ARCH != 5
-#error "ABI_armeabi: __ARM_ARCH is not 5"
-#endif
+# ifndef __ARM_EABI__
+# error "ABI_armeabi: __ARM_EABI__ not defined"
+# endif
+# if __ARM_ARCH != 5
+# error "ABI_armeabi: __ARM_ARCH is not 5"
+# endif
#endif
#ifdef ABI_armeabi_v6
-#ifndef __ARM_EABI__
-#error "ABI_armeabi_v6: __ARM_EABI__ not defined"
-#endif
-#if __ARM_ARCH != 6
-#error "ABI_armeabi_v6: __ARM_ARCH is not 6"
-#endif
+# ifndef __ARM_EABI__
+# error "ABI_armeabi_v6: __ARM_EABI__ not defined"
+# endif
+# if __ARM_ARCH != 6
+# error "ABI_armeabi_v6: __ARM_ARCH is not 6"
+# endif
#endif
#ifdef ABI_armeabi_v7a
-#ifndef __ARM_EABI__
-#error "ABI_armeabi_v7a: __ARM_EABI__ not defined"
-#endif
-#if __ARM_ARCH != 7
-#error "ABI_armeabi_v7a: __ARM_ARCH is not 7"
-#endif
+# ifndef __ARM_EABI__
+# error "ABI_armeabi_v7a: __ARM_EABI__ not defined"
+# endif
+# if __ARM_ARCH != 7
+# error "ABI_armeabi_v7a: __ARM_ARCH is not 7"
+# endif
#endif
#ifdef ABI_arm64_v8a
-#ifdef __ARM_EABI__
-#error "ABI_arm64_v8a: __ARM_EABI__ defined"
-#endif
-#ifndef __aarch64__
-#error "ABI_arm64_v8a: __aarch64__ not defined"
-#endif
+# ifdef __ARM_EABI__
+# error "ABI_arm64_v8a: __ARM_EABI__ defined"
+# endif
+# ifndef __aarch64__
+# error "ABI_arm64_v8a: __aarch64__ not defined"
+# endif
#endif
#ifdef ABI_mips
-#if __mips != 32
-#error "ABI_mips: __mips != 32"
-#endif
-#ifndef _ABIO32
-#error "ABI_mips: _ABIO32 not defined"
-#endif
+# if __mips != 32
+# error "ABI_mips: __mips != 32"
+# endif
+# ifndef _ABIO32
+# error "ABI_mips: _ABIO32 not defined"
+# endif
#endif
#ifdef ABI_mips64
-#if __mips != 64
-#error "ABI_mips64: __mips != 64"
-#endif
-#ifndef _ABI64
-#error "ABI_mips: _ABI64 not defined"
-#endif
+# if __mips != 64
+# error "ABI_mips64: __mips != 64"
+# endif
+# ifndef _ABI64
+# error "ABI_mips: _ABI64 not defined"
+# endif
#endif
#ifdef ABI_x86
-#ifndef __i686__
-#error "ABI_x86: __i686__ not defined"
-#endif
+# ifndef __i686__
+# error "ABI_x86: __i686__ not defined"
+# endif
#endif
#ifdef ABI_x86_64
-#ifndef __x86_64__
-#error "ABI_x86_64: __x86_64__ not defined"
-#endif
+# ifndef __x86_64__
+# error "ABI_x86_64: __x86_64__ not defined"
+# endif
#endif
#include <stddef.h>
diff --git a/Tests/RunCMake/Android/android_sysinc.c b/Tests/RunCMake/Android/android_sysinc.c
index 18d73db..f7cc6f0 100644
--- a/Tests/RunCMake/Android/android_sysinc.c
+++ b/Tests/RunCMake/Android/android_sysinc.c
@@ -1,7 +1,7 @@
#include <dlfcn.h>
#ifndef NOT_SYSTEM_DLFCN_HEADER
-#error "sysroot /usr/include appears too early"
+# error "sysroot /usr/include appears too early"
#endif
#include "android.c"
diff --git a/Tests/RunCMake/Android/android_sysinc.cxx b/Tests/RunCMake/Android/android_sysinc.cxx
index 5c5694b..9379f14 100644
--- a/Tests/RunCMake/Android/android_sysinc.cxx
+++ b/Tests/RunCMake/Android/android_sysinc.cxx
@@ -1,7 +1,7 @@
#include <dlfcn.h>
#ifndef NOT_SYSTEM_DLFCN_HEADER
-#error "sysroot /usr/include appears too early"
+# error "sysroot /usr/include appears too early"
#endif
#include "android.cxx"
diff --git a/Tests/RunCMake/AutoExportDll/foo.c b/Tests/RunCMake/AutoExportDll/foo.c
index 4b1318b..d13bc3e 100644
--- a/Tests/RunCMake/AutoExportDll/foo.c
+++ b/Tests/RunCMake/AutoExportDll/foo.c
@@ -1,7 +1,7 @@
#ifdef _MSC_VER
-#include "windows.h"
+# include "windows.h"
#else
-#define WINAPI
+# define WINAPI
#endif
int WINAPI foo()
diff --git a/Tests/RunCMake/AutoExportDll/hello.h b/Tests/RunCMake/AutoExportDll/hello.h
index 3749b97..7192f65 100644
--- a/Tests/RunCMake/AutoExportDll/hello.h
+++ b/Tests/RunCMake/AutoExportDll/hello.h
@@ -1,11 +1,11 @@
#ifndef _MSC_VER
-#define winexport
+# define winexport
#else
-#ifdef autoexport_EXPORTS
-#define winexport
-#else
-#define winexport __declspec(dllimport)
-#endif
+# ifdef autoexport_EXPORTS
+# define winexport
+# else
+# define winexport __declspec(dllimport)
+# endif
#endif
class Hello
diff --git a/Tests/RunCMake/AutoExportDll/say.cxx b/Tests/RunCMake/AutoExportDll/say.cxx
index 51060e8..c8bfcc7 100644
--- a/Tests/RunCMake/AutoExportDll/say.cxx
+++ b/Tests/RunCMake/AutoExportDll/say.cxx
@@ -1,9 +1,9 @@
#include "hello.h"
#include <stdio.h>
#ifdef _MSC_VER
-#include "windows.h"
+# include "windows.h"
#else
-#define WINAPI
+# define WINAPI
#endif
extern "C" {
diff --git a/Tests/RunCMake/CSharpReferenceImport/ImportLibMixedNative.h b/Tests/RunCMake/CSharpReferenceImport/ImportLibMixedNative.h
index 8d5eb62..76b97c4 100644
--- a/Tests/RunCMake/CSharpReferenceImport/ImportLibMixedNative.h
+++ b/Tests/RunCMake/CSharpReferenceImport/ImportLibMixedNative.h
@@ -1,9 +1,9 @@
#pragma once
#ifdef ImportLibMixed_EXPORTS
-#define mixedAPI __declspec(dllexport)
+# define mixedAPI __declspec(dllexport)
#else
-#define mixedAPI __declspec(dllimport)
+# define mixedAPI __declspec(dllimport)
#endif
class mixedAPI ImportLibMixedNative
diff --git a/Tests/RunCMake/CSharpReferenceImport/ImportLibNative.h b/Tests/RunCMake/CSharpReferenceImport/ImportLibNative.h
index 7c85626..77bcb82 100644
--- a/Tests/RunCMake/CSharpReferenceImport/ImportLibNative.h
+++ b/Tests/RunCMake/CSharpReferenceImport/ImportLibNative.h
@@ -1,9 +1,9 @@
#pragma once
#ifdef ImportLibNative_EXPORTS
-#define nativeAPI __declspec(dllexport)
+# define nativeAPI __declspec(dllexport)
#else
-#define nativeAPI __declspec(dllimport)
+# define nativeAPI __declspec(dllimport)
#endif
class nativeAPI ImportLibNative
diff --git a/Tests/RunCMake/GenerateExportHeader/lib_shared_and_static/libshared_and_static.cpp b/Tests/RunCMake/GenerateExportHeader/lib_shared_and_static/libshared_and_static.cpp
index 9ac8381..752b49e 100644
--- a/Tests/RunCMake/GenerateExportHeader/lib_shared_and_static/libshared_and_static.cpp
+++ b/Tests/RunCMake/GenerateExportHeader/lib_shared_and_static/libshared_and_static.cpp
@@ -1,7 +1,7 @@
#include "libshared_and_static.h"
#ifndef MY_CUSTOM_CONTENT_ADDED
-#error "MY_CUSTOM_CONTENT_ADDED not defined!"
+# error "MY_CUSTOM_CONTENT_ADDED not defined!"
#endif
int libshared_and_static::Class::method() const
diff --git a/Tests/RunCMake/GoogleTest/timeout_test.cpp b/Tests/RunCMake/GoogleTest/timeout_test.cpp
index 9162dcf..b8ad055 100644
--- a/Tests/RunCMake/GoogleTest/timeout_test.cpp
+++ b/Tests/RunCMake/GoogleTest/timeout_test.cpp
@@ -1,7 +1,7 @@
#if defined(_WIN32)
-#include <windows.h>
+# include <windows.h>
#else
-#include <unistd.h>
+# include <unistd.h>
#endif
#include <iostream>
diff --git a/Tests/RunCMake/ObjectLibrary/a.c b/Tests/RunCMake/ObjectLibrary/a.c
index 5beb3f1..8e490f3 100644
--- a/Tests/RunCMake/ObjectLibrary/a.c
+++ b/Tests/RunCMake/ObjectLibrary/a.c
@@ -1,7 +1,7 @@
#if defined(_WIN32) && defined(COMPILE_FOR_SHARED_LIB)
-#define EXPORT __declspec(dllexport)
+# define EXPORT __declspec(dllexport)
#else
-#define EXPORT
+# define EXPORT
#endif
EXPORT int a(void)
diff --git a/Tests/RunCMake/ObjectLibrary/b.c b/Tests/RunCMake/ObjectLibrary/b.c
index 7549abf..220ce03 100644
--- a/Tests/RunCMake/ObjectLibrary/b.c
+++ b/Tests/RunCMake/ObjectLibrary/b.c
@@ -1,7 +1,7 @@
#if defined(_WIN32) && defined(COMPILE_FOR_SHARED_LIB)
-#define EXPORT __declspec(dllexport)
+# define EXPORT __declspec(dllexport)
#else
-#define EXPORT
+# define EXPORT
#endif
extern int a(void);
@@ -10,5 +10,5 @@ EXPORT int b()
return a();
}
#ifndef REQUIRED
-#error "REQUIRED needs to be defined"
+# error "REQUIRED needs to be defined"
#endif
diff --git a/Tests/RunCMake/ObjectLibrary/exe.c b/Tests/RunCMake/ObjectLibrary/exe.c
index 6efdae7..2e08700 100644
--- a/Tests/RunCMake/ObjectLibrary/exe.c
+++ b/Tests/RunCMake/ObjectLibrary/exe.c
@@ -1,7 +1,7 @@
#if defined(_WIN32) && defined(COMPILE_FOR_SHARED_LIB)
-#define IMPORT __declspec(dllimport)
+# define IMPORT __declspec(dllimport)
#else
-#define IMPORT
+# define IMPORT
#endif
extern IMPORT int b(void);
@@ -10,5 +10,5 @@ int main()
return b();
}
#ifndef REQUIRED
-#error "REQUIRED needs to be defined"
+# error "REQUIRED needs to be defined"
#endif
diff --git a/Tests/RunCMake/ObjectLibrary/requires.c b/Tests/RunCMake/ObjectLibrary/requires.c
index d524952..685632b 100644
--- a/Tests/RunCMake/ObjectLibrary/requires.c
+++ b/Tests/RunCMake/ObjectLibrary/requires.c
@@ -4,5 +4,5 @@ int required()
return 0;
}
#else
-#error "REQUIRED not defined"
+# error "REQUIRED not defined"
#endif
diff --git a/Tests/RunCMake/XcodeProject/DeploymentTarget.c b/Tests/RunCMake/XcodeProject/DeploymentTarget.c
index 51af046..5e0f40f 100644
--- a/Tests/RunCMake/XcodeProject/DeploymentTarget.c
+++ b/Tests/RunCMake/XcodeProject/DeploymentTarget.c
@@ -2,23 +2,23 @@
#include <TargetConditionals.h>
#if TARGET_OS_OSX
-#if __MAC_OS_X_VERSION_MIN_REQUIRED != __MAC_10_11
-#error macOS deployment version mismatch
-#endif
+# if __MAC_OS_X_VERSION_MIN_REQUIRED != __MAC_10_11
+# error macOS deployment version mismatch
+# endif
#elif TARGET_OS_IOS
-#if __IPHONE_OS_VERSION_MIN_REQUIRED != __IPHONE_9_1
-#error iOS deployment version mismatch
-#endif
+# if __IPHONE_OS_VERSION_MIN_REQUIRED != __IPHONE_9_1
+# error iOS deployment version mismatch
+# endif
#elif TARGET_OS_WATCH
-#if __WATCH_OS_VERSION_MIN_REQUIRED != __WATCHOS_2_0
-#error watchOS deployment version mismatch
-#endif
+# if __WATCH_OS_VERSION_MIN_REQUIRED != __WATCHOS_2_0
+# error watchOS deployment version mismatch
+# endif
#elif TARGET_OS_TV
-#if __TV_OS_VERSION_MIN_REQUIRED != __TVOS_9_0
-#error tvOS deployment version mismatch
-#endif
+# if __TV_OS_VERSION_MIN_REQUIRED != __TVOS_9_0
+# error tvOS deployment version mismatch
+# endif
#else
-#error unknown OS
+# error unknown OS
#endif
void foo()
diff --git a/Tests/RunCMake/pseudo_cppcheck.c b/Tests/RunCMake/pseudo_cppcheck.c
index 8667e5e..75f3cec 100644
--- a/Tests/RunCMake/pseudo_cppcheck.c
+++ b/Tests/RunCMake/pseudo_cppcheck.c
@@ -16,17 +16,21 @@ int main(int argc, char* argv[])
fprintf(stderr,
"[/foo/bar.c:2]: (error) Array 'abc[10]' accessed at index 12,"
" which is out of bounds.\n");
- fprintf(stderr, "[/foo/bar.c:2]: (warning) Member variable 'foo::bar' is "
- "not initialized in the constructor.\n");
+ fprintf(stderr,
+ "[/foo/bar.c:2]: (warning) Member variable 'foo::bar' is "
+ "not initialized in the constructor.\n");
fprintf(stderr, "[/foo/bar.c:2]: (style) C-style pointer casting.\n");
- fprintf(stderr, "[/foo/bar.c:2]: (performance) Variable 'm_message' is "
- "assigned in constructor body. Consider performing "
- "initialization in initialization list.\n");
- fprintf(stderr, "[/foo/bar.c:2]: (portability) scanf without field width "
- "limits can crash with huge input data on some versions of "
- "libc\n");
- fprintf(stderr, "[/foo/bar.c:2]: (information) cannot find all the include "
- "files (use --check-config for details)\n");
+ fprintf(stderr,
+ "[/foo/bar.c:2]: (performance) Variable 'm_message' is "
+ "assigned in constructor body. Consider performing "
+ "initialization in initialization list.\n");
+ fprintf(stderr,
+ "[/foo/bar.c:2]: (portability) scanf without field width "
+ "limits can crash with huge input data on some versions of "
+ "libc\n");
+ fprintf(stderr,
+ "[/foo/bar.c:2]: (information) cannot find all the include "
+ "files (use --check-config for details)\n");
// we allow this to return 1 as we ignore it
return 1;
}
diff --git a/Tests/RunCMake/try_compile/CStandardGNU.c b/Tests/RunCMake/try_compile/CStandardGNU.c
index ac26c15..f7ddff4 100644
--- a/Tests/RunCMake/try_compile/CStandardGNU.c
+++ b/Tests/RunCMake/try_compile/CStandardGNU.c
@@ -1,8 +1,8 @@
#if __STDC_VERSION__ != 199901L
-#error "Not GNU C 99 mode!"
+# error "Not GNU C 99 mode!"
#endif
#ifndef __STRICT_ANSI__
-#error "Not GNU C strict ANSI!"
+# error "Not GNU C strict ANSI!"
#endif
int main(void)
{
diff --git a/Tests/RunCMake/try_compile/CxxStandardGNU.cxx b/Tests/RunCMake/try_compile/CxxStandardGNU.cxx
index 7990a78..ef65e26 100644
--- a/Tests/RunCMake/try_compile/CxxStandardGNU.cxx
+++ b/Tests/RunCMake/try_compile/CxxStandardGNU.cxx
@@ -1,9 +1,9 @@
#if __cplusplus != 201103L && \
!(__cplusplus < 201103L && defined(__GXX_EXPERIMENTAL_CXX0X__))
-#error "Not GNU C++ 11 mode!"
+# error "Not GNU C++ 11 mode!"
#endif
#ifndef __STRICT_ANSI__
-#error "Not GNU C++ strict ANSI!"
+# error "Not GNU C++ strict ANSI!"
#endif
int main()
{
diff --git a/Tests/RunCMake/try_compile/src.c b/Tests/RunCMake/try_compile/src.c
index 5e51382..beed9b1 100644
--- a/Tests/RunCMake/try_compile/src.c
+++ b/Tests/RunCMake/try_compile/src.c
@@ -3,5 +3,5 @@ int main(void)
return 0;
}
#ifdef PP_ERROR
-#error PP_ERROR is defined
+# error PP_ERROR is defined
#endif
diff --git a/Tests/SimpleInstall/inst.cxx b/Tests/SimpleInstall/inst.cxx
index ecf061c..7815f86 100644
--- a/Tests/SimpleInstall/inst.cxx
+++ b/Tests/SimpleInstall/inst.cxx
@@ -1,14 +1,14 @@
#include "foo.h"
#ifdef STAGE_2
-#include <foo/lib1.h>
-#include <foo/lib2renamed.h>
-#include <lib3.h>
-#include <old/lib2.h>
-#include <old/lib3.h>
+# include <foo/lib1.h>
+# include <foo/lib2renamed.h>
+# include <lib3.h>
+# include <old/lib2.h>
+# include <old/lib3.h>
#else
-#include "lib1.h"
-#include "lib2.h"
+# include "lib1.h"
+# include "lib2.h"
#endif
#include "lib4.h"
diff --git a/Tests/SimpleInstall/lib2.h b/Tests/SimpleInstall/lib2.h
index a3ed758..044e775 100644
--- a/Tests/SimpleInstall/lib2.h
+++ b/Tests/SimpleInstall/lib2.h
@@ -1,11 +1,11 @@
#ifdef _WIN32
-#ifdef test2_EXPORTS
-#define CM_TEST_LIB_EXPORT __declspec(dllexport)
+# ifdef test2_EXPORTS
+# define CM_TEST_LIB_EXPORT __declspec(dllexport)
+# else
+# define CM_TEST_LIB_EXPORT __declspec(dllimport)
+# endif
#else
-#define CM_TEST_LIB_EXPORT __declspec(dllimport)
-#endif
-#else
-#define CM_TEST_LIB_EXPORT
+# define CM_TEST_LIB_EXPORT
#endif
CM_TEST_LIB_EXPORT float Lib2Func();
diff --git a/Tests/SimpleInstall/lib3.h b/Tests/SimpleInstall/lib3.h
index df11327..e02bbc4 100644
--- a/Tests/SimpleInstall/lib3.h
+++ b/Tests/SimpleInstall/lib3.h
@@ -1,11 +1,11 @@
#ifdef _WIN32
-#ifdef test3_EXPORTS
-#define CM_TEST_LIB_EXPORT __declspec(dllexport)
+# ifdef test3_EXPORTS
+# define CM_TEST_LIB_EXPORT __declspec(dllexport)
+# else
+# define CM_TEST_LIB_EXPORT __declspec(dllimport)
+# endif
#else
-#define CM_TEST_LIB_EXPORT __declspec(dllimport)
-#endif
-#else
-#define CM_TEST_LIB_EXPORT
+# define CM_TEST_LIB_EXPORT
#endif
CM_TEST_LIB_EXPORT float Lib3Func();
diff --git a/Tests/SimpleInstall/lib4.h b/Tests/SimpleInstall/lib4.h
index 71425a5..e1a221e 100644
--- a/Tests/SimpleInstall/lib4.h
+++ b/Tests/SimpleInstall/lib4.h
@@ -1,11 +1,11 @@
#ifdef _WIN32
-#ifdef test4_EXPORTS
-#define CM_TEST_LIB_EXPORT __declspec(dllexport)
+# ifdef test4_EXPORTS
+# define CM_TEST_LIB_EXPORT __declspec(dllexport)
+# else
+# define CM_TEST_LIB_EXPORT __declspec(dllimport)
+# endif
#else
-#define CM_TEST_LIB_EXPORT __declspec(dllimport)
-#endif
-#else
-#define CM_TEST_LIB_EXPORT
+# define CM_TEST_LIB_EXPORT
#endif
CM_TEST_LIB_EXPORT float Lib4Func();
diff --git a/Tests/SimpleInstallS2/inst.cxx b/Tests/SimpleInstallS2/inst.cxx
index ecf061c..7815f86 100644
--- a/Tests/SimpleInstallS2/inst.cxx
+++ b/Tests/SimpleInstallS2/inst.cxx
@@ -1,14 +1,14 @@
#include "foo.h"
#ifdef STAGE_2
-#include <foo/lib1.h>
-#include <foo/lib2renamed.h>
-#include <lib3.h>
-#include <old/lib2.h>
-#include <old/lib3.h>
+# include <foo/lib1.h>
+# include <foo/lib2renamed.h>
+# include <lib3.h>
+# include <old/lib2.h>
+# include <old/lib3.h>
#else
-#include "lib1.h"
-#include "lib2.h"
+# include "lib1.h"
+# include "lib2.h"
#endif
#include "lib4.h"
diff --git a/Tests/SimpleInstallS2/lib2.h b/Tests/SimpleInstallS2/lib2.h
index a3ed758..044e775 100644
--- a/Tests/SimpleInstallS2/lib2.h
+++ b/Tests/SimpleInstallS2/lib2.h
@@ -1,11 +1,11 @@
#ifdef _WIN32
-#ifdef test2_EXPORTS
-#define CM_TEST_LIB_EXPORT __declspec(dllexport)
+# ifdef test2_EXPORTS
+# define CM_TEST_LIB_EXPORT __declspec(dllexport)
+# else
+# define CM_TEST_LIB_EXPORT __declspec(dllimport)
+# endif
#else
-#define CM_TEST_LIB_EXPORT __declspec(dllimport)
-#endif
-#else
-#define CM_TEST_LIB_EXPORT
+# define CM_TEST_LIB_EXPORT
#endif
CM_TEST_LIB_EXPORT float Lib2Func();
diff --git a/Tests/SimpleInstallS2/lib3.h b/Tests/SimpleInstallS2/lib3.h
index df11327..e02bbc4 100644
--- a/Tests/SimpleInstallS2/lib3.h
+++ b/Tests/SimpleInstallS2/lib3.h
@@ -1,11 +1,11 @@
#ifdef _WIN32
-#ifdef test3_EXPORTS
-#define CM_TEST_LIB_EXPORT __declspec(dllexport)
+# ifdef test3_EXPORTS
+# define CM_TEST_LIB_EXPORT __declspec(dllexport)
+# else
+# define CM_TEST_LIB_EXPORT __declspec(dllimport)
+# endif
#else
-#define CM_TEST_LIB_EXPORT __declspec(dllimport)
-#endif
-#else
-#define CM_TEST_LIB_EXPORT
+# define CM_TEST_LIB_EXPORT
#endif
CM_TEST_LIB_EXPORT float Lib3Func();
diff --git a/Tests/SimpleInstallS2/lib4.h b/Tests/SimpleInstallS2/lib4.h
index 71425a5..e1a221e 100644
--- a/Tests/SimpleInstallS2/lib4.h
+++ b/Tests/SimpleInstallS2/lib4.h
@@ -1,11 +1,11 @@
#ifdef _WIN32
-#ifdef test4_EXPORTS
-#define CM_TEST_LIB_EXPORT __declspec(dllexport)
+# ifdef test4_EXPORTS
+# define CM_TEST_LIB_EXPORT __declspec(dllexport)
+# else
+# define CM_TEST_LIB_EXPORT __declspec(dllimport)
+# endif
#else
-#define CM_TEST_LIB_EXPORT __declspec(dllimport)
-#endif
-#else
-#define CM_TEST_LIB_EXPORT
+# define CM_TEST_LIB_EXPORT
#endif
CM_TEST_LIB_EXPORT float Lib4Func();
diff --git a/Tests/SubDir/Executable/test.cxx b/Tests/SubDir/Executable/test.cxx
index 06aed01..01d9280 100644
--- a/Tests/SubDir/Executable/test.cxx
+++ b/Tests/SubDir/Executable/test.cxx
@@ -1,19 +1,19 @@
#include <stdio.h>
#include <stdlib.h>
#ifdef _WIN32
-#include <io.h>
+# include <io.h>
#else
-#include <unistd.h>
+# include <unistd.h>
#endif
// return true if the file exists
int FileExists(const char* filename)
{
#ifdef _MSC_VER
-#define access _access
+# define access _access
#endif
#ifndef F_OK
-#define F_OK 0
+# define F_OK 0
#endif
if (access(filename, F_OK) != 0) {
return false;
diff --git a/Tests/SubDirSpaces/Executable Sources/test.cxx b/Tests/SubDirSpaces/Executable Sources/test.cxx
index 06aed01..01d9280 100644
--- a/Tests/SubDirSpaces/Executable Sources/test.cxx
+++ b/Tests/SubDirSpaces/Executable Sources/test.cxx
@@ -1,19 +1,19 @@
#include <stdio.h>
#include <stdlib.h>
#ifdef _WIN32
-#include <io.h>
+# include <io.h>
#else
-#include <unistd.h>
+# include <unistd.h>
#endif
// return true if the file exists
int FileExists(const char* filename)
{
#ifdef _MSC_VER
-#define access _access
+# define access _access
#endif
#ifndef F_OK
-#define F_OK 0
+# define F_OK 0
#endif
if (access(filename, F_OK) != 0) {
return false;
diff --git a/Tests/SubDirSpaces/Executable/test.cxx b/Tests/SubDirSpaces/Executable/test.cxx
index 06aed01..01d9280 100644
--- a/Tests/SubDirSpaces/Executable/test.cxx
+++ b/Tests/SubDirSpaces/Executable/test.cxx
@@ -1,19 +1,19 @@
#include <stdio.h>
#include <stdlib.h>
#ifdef _WIN32
-#include <io.h>
+# include <io.h>
#else
-#include <unistd.h>
+# include <unistd.h>
#endif
// return true if the file exists
int FileExists(const char* filename)
{
#ifdef _MSC_VER
-#define access _access
+# define access _access
#endif
#ifndef F_OK
-#define F_OK 0
+# define F_OK 0
#endif
if (access(filename, F_OK) != 0) {
return false;
diff --git a/Tests/TestsWorkingDirectory/main.c b/Tests/TestsWorkingDirectory/main.c
index 11dd4ff..8755c0e 100644
--- a/Tests/TestsWorkingDirectory/main.c
+++ b/Tests/TestsWorkingDirectory/main.c
@@ -3,16 +3,17 @@
#include <stdlib.h>
#include <string.h>
-#if defined(_WIN32) && (defined(_MSC_VER) || defined(__WATCOMC__) || \
- defined(__BORLANDC__) || defined(__MINGW32__))
+#if defined(_WIN32) && \
+ (defined(_MSC_VER) || defined(__WATCOMC__) || defined(__BORLANDC__) || \
+ defined(__MINGW32__))
-#include <direct.h>
-#include <io.h>
+# include <direct.h>
+# include <io.h>
-#if defined(__WATCOMC__)
-#include <direct.h>
-#define _getcwd getcwd
-#endif
+# if defined(__WATCOMC__)
+# include <direct.h>
+# define _getcwd getcwd
+# endif
static const char* Getcwd(char* buf, unsigned int len)
{
@@ -35,9 +36,9 @@ static const char* Getcwd(char* buf, unsigned int len)
}
#else
-#include <fcntl.h>
-#include <sys/types.h>
-#include <unistd.h>
+# include <fcntl.h>
+# include <sys/types.h>
+# include <unistd.h>
static const char* Getcwd(char* buf, unsigned int len)
{
diff --git a/Tests/TryCompile/testdef.c b/Tests/TryCompile/testdef.c
index b05f070..72301dd 100644
--- a/Tests/TryCompile/testdef.c
+++ b/Tests/TryCompile/testdef.c
@@ -1,5 +1,5 @@
#ifndef TESTDEF
-#error "TESTDEF should be defined!"
+# error "TESTDEF should be defined!"
#endif
int main(void)
{
diff --git a/Tests/Tutorial/Step2/tutorial.cxx b/Tests/Tutorial/Step2/tutorial.cxx
index 2fae364..37f6ac4 100644
--- a/Tests/Tutorial/Step2/tutorial.cxx
+++ b/Tests/Tutorial/Step2/tutorial.cxx
@@ -5,7 +5,7 @@
#include <stdlib.h>
#ifdef USE_MYMATH
-#include "MathFunctions.h"
+# include "MathFunctions.h"
#endif
int main(int argc, char* argv[])
diff --git a/Tests/Tutorial/Step3/tutorial.cxx b/Tests/Tutorial/Step3/tutorial.cxx
index 2fae364..37f6ac4 100644
--- a/Tests/Tutorial/Step3/tutorial.cxx
+++ b/Tests/Tutorial/Step3/tutorial.cxx
@@ -5,7 +5,7 @@
#include <stdlib.h>
#ifdef USE_MYMATH
-#include "MathFunctions.h"
+# include "MathFunctions.h"
#endif
int main(int argc, char* argv[])
diff --git a/Tests/Tutorial/Step4/tutorial.cxx b/Tests/Tutorial/Step4/tutorial.cxx
index 2fae364..37f6ac4 100644
--- a/Tests/Tutorial/Step4/tutorial.cxx
+++ b/Tests/Tutorial/Step4/tutorial.cxx
@@ -5,7 +5,7 @@
#include <stdlib.h>
#ifdef USE_MYMATH
-#include "MathFunctions.h"
+# include "MathFunctions.h"
#endif
int main(int argc, char* argv[])
diff --git a/Tests/Tutorial/Step5/tutorial.cxx b/Tests/Tutorial/Step5/tutorial.cxx
index 2fae364..37f6ac4 100644
--- a/Tests/Tutorial/Step5/tutorial.cxx
+++ b/Tests/Tutorial/Step5/tutorial.cxx
@@ -5,7 +5,7 @@
#include <stdlib.h>
#ifdef USE_MYMATH
-#include "MathFunctions.h"
+# include "MathFunctions.h"
#endif
int main(int argc, char* argv[])
diff --git a/Tests/Tutorial/Step6/tutorial.cxx b/Tests/Tutorial/Step6/tutorial.cxx
index 2fae364..37f6ac4 100644
--- a/Tests/Tutorial/Step6/tutorial.cxx
+++ b/Tests/Tutorial/Step6/tutorial.cxx
@@ -5,7 +5,7 @@
#include <stdlib.h>
#ifdef USE_MYMATH
-#include "MathFunctions.h"
+# include "MathFunctions.h"
#endif
int main(int argc, char* argv[])
diff --git a/Tests/Tutorial/Step7/tutorial.cxx b/Tests/Tutorial/Step7/tutorial.cxx
index 2fae364..37f6ac4 100644
--- a/Tests/Tutorial/Step7/tutorial.cxx
+++ b/Tests/Tutorial/Step7/tutorial.cxx
@@ -5,7 +5,7 @@
#include <stdlib.h>
#ifdef USE_MYMATH
-#include "MathFunctions.h"
+# include "MathFunctions.h"
#endif
int main(int argc, char* argv[])
diff --git a/Tests/VSWinStorePhone/Direct3DApp1/Direct3DBase.cpp b/Tests/VSWinStorePhone/Direct3DApp1/Direct3DBase.cpp
index 8f3452c..0662fbe 100644
--- a/Tests/VSWinStorePhone/Direct3DApp1/Direct3DBase.cpp
+++ b/Tests/VSWinStorePhone/Direct3DApp1/Direct3DBase.cpp
@@ -101,12 +101,12 @@ void Direct3DBase::CreateWindowSizeDependentResources()
#if WINVER > 0x0602
m_orientation = DisplayInformation::GetForCurrentView()->CurrentOrientation;
#else
-#if PHONE
+# if PHONE
// WP8 doesn't support rotations so always make it landscape
m_orientation = DisplayOrientations::Landscape;
-#else
+# else
m_orientation = DisplayProperties::CurrentOrientation;
-#endif
+# endif
#endif
bool swapDimensions = m_orientation == DisplayOrientations::Portrait ||
m_orientation == DisplayOrientations::PortraitFlipped;
diff --git a/Tests/Wrapping/fakefluid.cxx b/Tests/Wrapping/fakefluid.cxx
index a118bbd..f5fb3fb 100644
--- a/Tests/Wrapping/fakefluid.cxx
+++ b/Tests/Wrapping/fakefluid.cxx
@@ -6,9 +6,10 @@ int main(int ac, char** av)
if (strcmp(av[i], "-o") == 0 || strcmp(av[i], "-h") == 0) {
fprintf(stdout, "fakefluid is creating file \"%s\"\n", av[i + 1]);
FILE* file = fopen(av[i + 1], "w");
- fprintf(file, "// Solaris needs non-empty content so ensure\n"
- "// we have at least one symbol\n"
- "int Solaris_requires_a_symbol_here = 0;\n");
+ fprintf(file,
+ "// Solaris needs non-empty content so ensure\n"
+ "// we have at least one symbol\n"
+ "int Solaris_requires_a_symbol_here = 0;\n");
fclose(file);
}
}
diff --git a/Tests/Wrapping/qtwrappingmain.cxx b/Tests/Wrapping/qtwrappingmain.cxx
index 37234d9..d4951ee 100644
--- a/Tests/Wrapping/qtwrappingmain.cxx
+++ b/Tests/Wrapping/qtwrappingmain.cxx
@@ -2,8 +2,8 @@
#include <qapplication.h>
#ifndef _WIN32
-#include <stdio.h>
-#include <stdlib.h>
+# include <stdio.h>
+# include <stdlib.h>
#endif
int main(int argc, char* argv[])
diff --git a/Tests/X11/HelloWorldX11.cxx b/Tests/X11/HelloWorldX11.cxx
index 0863f7b..e59248b 100644
--- a/Tests/X11/HelloWorldX11.cxx
+++ b/Tests/X11/HelloWorldX11.cxx
@@ -11,15 +11,15 @@
*/
#ifndef MAIN_H
-#define MAIN_H 1
+# define MAIN_H 1
-#include <iostream>
-#include <stdlib.h>
+# include <iostream>
+# include <stdlib.h>
/* include the X library headers */
-#include <X11/Xlib.h>
-#include <X11/Xos.h>
-#include <X11/Xutil.h>
+# include <X11/Xlib.h>
+# include <X11/Xos.h>
+# include <X11/Xutil.h>
class Main
{
diff --git a/Tests/X11/X11.c b/Tests/X11/X11.c
index b802ed8..3a6f9f0 100644
--- a/Tests/X11/X11.c
+++ b/Tests/X11/X11.c
@@ -1,8 +1,8 @@
#include "stdio.h"
#ifdef CMAKE_HAS_X
-#include <X11/Xlib.h>
-#include <X11/Xutil.h>
+# include <X11/Xlib.h>
+# include <X11/Xutil.h>
int main()
{
diff --git a/Utilities/cm_bzlib.h b/Utilities/cm_bzlib.h
index e7f6d89..8669e9e 100644
--- a/Utilities/cm_bzlib.h
+++ b/Utilities/cm_bzlib.h
@@ -6,9 +6,9 @@
/* Use the bzip2 library configured for CMake. */
#include "cmThirdParty.h"
#ifdef CMAKE_USE_SYSTEM_BZIP2
-#include <bzlib.h>
+# include <bzlib.h>
#else
-#include <cmbzip2/bzlib.h>
+# include <cmbzip2/bzlib.h>
#endif
#endif
diff --git a/Utilities/cm_curl.h b/Utilities/cm_curl.h
index fc2b8ab..673f8ad 100644
--- a/Utilities/cm_curl.h
+++ b/Utilities/cm_curl.h
@@ -6,9 +6,9 @@
/* Use the curl library configured for CMake. */
#include "cmThirdParty.h"
#ifdef CMAKE_USE_SYSTEM_CURL
-#include <curl/curl.h>
+# include <curl/curl.h>
#else
-#include <cmcurl/include/curl/curl.h>
+# include <cmcurl/include/curl/curl.h>
#endif
#endif
diff --git a/Utilities/cm_expat.h b/Utilities/cm_expat.h
index d879337..fc5b39a 100644
--- a/Utilities/cm_expat.h
+++ b/Utilities/cm_expat.h
@@ -6,9 +6,9 @@
/* Use the expat library configured for CMake. */
#include "cmThirdParty.h"
#ifdef CMAKE_USE_SYSTEM_EXPAT
-#include <expat.h>
+# include <expat.h>
#else
-#include <cmexpat/lib/expat.h>
+# include <cmexpat/lib/expat.h>
#endif
#endif
diff --git a/Utilities/cm_jsoncpp_reader.h b/Utilities/cm_jsoncpp_reader.h
index e78ec1e..23af65c 100644
--- a/Utilities/cm_jsoncpp_reader.h
+++ b/Utilities/cm_jsoncpp_reader.h
@@ -6,9 +6,9 @@
/* Use the jsoncpp library configured for CMake. */
#include "cmThirdParty.h"
#ifdef CMAKE_USE_SYSTEM_JSONCPP
-#include <json/reader.h>
+# include <json/reader.h>
#else
-#include <cmjsoncpp/include/json/reader.h>
+# include <cmjsoncpp/include/json/reader.h>
#endif
#endif
diff --git a/Utilities/cm_jsoncpp_value.h b/Utilities/cm_jsoncpp_value.h
index cf37758..742d99a 100644
--- a/Utilities/cm_jsoncpp_value.h
+++ b/Utilities/cm_jsoncpp_value.h
@@ -6,9 +6,9 @@
/* Use the jsoncpp library configured for CMake. */
#include "cmThirdParty.h"
#ifdef CMAKE_USE_SYSTEM_JSONCPP
-#include <json/value.h>
+# include <json/value.h>
#else
-#include <cmjsoncpp/include/json/value.h>
+# include <cmjsoncpp/include/json/value.h>
#endif
#endif
diff --git a/Utilities/cm_jsoncpp_writer.h b/Utilities/cm_jsoncpp_writer.h
index 33b2468..d9e5d82 100644
--- a/Utilities/cm_jsoncpp_writer.h
+++ b/Utilities/cm_jsoncpp_writer.h
@@ -6,9 +6,9 @@
/* Use the jsoncpp library configured for CMake. */
#include "cmThirdParty.h"
#ifdef CMAKE_USE_SYSTEM_JSONCPP
-#include <json/writer.h>
+# include <json/writer.h>
#else
-#include <cmjsoncpp/include/json/writer.h>
+# include <cmjsoncpp/include/json/writer.h>
#endif
#endif
diff --git a/Utilities/cm_kwiml.h b/Utilities/cm_kwiml.h
index 65cb35f..566f67e 100644
--- a/Utilities/cm_kwiml.h
+++ b/Utilities/cm_kwiml.h
@@ -6,11 +6,11 @@
/* Use the KWIML library configured for CMake. */
#include "cmThirdParty.h"
#ifdef CMAKE_USE_SYSTEM_KWIML
-#include <kwiml/abi.h>
-#include <kwiml/int.h>
+# include <kwiml/abi.h>
+# include <kwiml/int.h>
#else
-#include "KWIML/include/kwiml/abi.h"
-#include "KWIML/include/kwiml/int.h"
+# include "KWIML/include/kwiml/abi.h"
+# include "KWIML/include/kwiml/int.h"
#endif
#endif
diff --git a/Utilities/cm_libarchive.h b/Utilities/cm_libarchive.h
index 2269526..ea8e9db 100644
--- a/Utilities/cm_libarchive.h
+++ b/Utilities/cm_libarchive.h
@@ -6,11 +6,11 @@
/* Use the libarchive configured for CMake. */
#include "cmThirdParty.h"
#ifdef CMAKE_USE_SYSTEM_LIBARCHIVE
-#include <archive.h>
-#include <archive_entry.h>
+# include <archive.h>
+# include <archive_entry.h>
#else
-#include <cmlibarchive/libarchive/archive.h>
-#include <cmlibarchive/libarchive/archive_entry.h>
+# include <cmlibarchive/libarchive/archive.h>
+# include <cmlibarchive/libarchive/archive_entry.h>
#endif
#endif
diff --git a/Utilities/cm_lzma.h b/Utilities/cm_lzma.h
index 013c724..0526036 100644
--- a/Utilities/cm_lzma.h
+++ b/Utilities/cm_lzma.h
@@ -6,9 +6,9 @@
/* Use the liblzma configured for CMake. */
#include "cmThirdParty.h"
#ifdef CMAKE_USE_SYSTEM_LIBLZMA
-#include <lzma.h>
+# include <lzma.h>
#else
-#include <cmliblzma/liblzma/api/lzma.h>
+# include <cmliblzma/liblzma/api/lzma.h>
#endif
#endif
diff --git a/Utilities/cm_rhash.h b/Utilities/cm_rhash.h
index c793627..03d9871 100644
--- a/Utilities/cm_rhash.h
+++ b/Utilities/cm_rhash.h
@@ -6,9 +6,9 @@
/* Use the LibRHash library configured for CMake. */
#include "cmThirdParty.h"
#ifdef CMAKE_USE_SYSTEM_LIBRHASH
-#include <rhash.h>
+# include <rhash.h>
#else
-#include <cmlibrhash/librhash/rhash.h>
+# include <cmlibrhash/librhash/rhash.h>
#endif
#endif
diff --git a/Utilities/cm_uv.h b/Utilities/cm_uv.h
index 6d4813d..448f30d 100644
--- a/Utilities/cm_uv.h
+++ b/Utilities/cm_uv.h
@@ -6,9 +6,9 @@
/* Use the libuv library configured for CMake. */
#include "cmThirdParty.h"
#ifdef CMAKE_USE_SYSTEM_LIBUV
-#include <uv.h>
+# include <uv.h>
#else
-#include <cmlibuv/include/uv.h>
+# include <cmlibuv/include/uv.h>
#endif
#endif
diff --git a/Utilities/cm_xmlrpc.h b/Utilities/cm_xmlrpc.h
index 08db89f..932066a 100644
--- a/Utilities/cm_xmlrpc.h
+++ b/Utilities/cm_xmlrpc.h
@@ -6,8 +6,8 @@
/* Use the xmlrpc library configured for CMake. */
#include "cmThirdParty.h"
#ifdef CTEST_USE_XMLRPC
-#include <xmlrpc.h>
-#include <xmlrpc_client.h>
+# include <xmlrpc.h>
+# include <xmlrpc_client.h>
#endif
#endif
diff --git a/Utilities/cm_zlib.h b/Utilities/cm_zlib.h
index 2aee9f1..2314183 100644
--- a/Utilities/cm_zlib.h
+++ b/Utilities/cm_zlib.h
@@ -6,9 +6,9 @@
/* Use the zlib library configured for CMake. */
#include "cmThirdParty.h"
#ifdef CMAKE_USE_SYSTEM_ZLIB
-#include <zlib.h>
+# include <zlib.h>
#else
-#include <cmzlib/zlib.h>
+# include <cmzlib/zlib.h>
#endif
#endif