diff options
author | Brad King <brad.king@kitware.com> | 2016-04-29 14:53:13 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-04-29 17:58:54 (GMT) |
commit | e1c7747253ac71a5215dd32a910b62a1fd8c561a (patch) | |
tree | dd4f8bf9663bf7a64c01d9391c3559f7b419dcb7 /Source/CPack | |
parent | 180538c70634dd6dc7fc68b4afbc1cd288c5b5c6 (diff) | |
download | CMake-e1c7747253ac71a5215dd32a910b62a1fd8c561a.zip CMake-e1c7747253ac71a5215dd32a910b62a1fd8c561a.tar.gz CMake-e1c7747253ac71a5215dd32a910b62a1fd8c561a.tar.bz2 |
Format include directive blocks and ordering with clang-format
Sort include directives within each block (separated by a blank line) in
lexicographic order (except to prioritize `sys/types.h` first). First
run `clang-format` with the config file:
---
SortIncludes: false
...
Commit the result temporarily. Then run `clang-format` again with:
---
SortIncludes: true
IncludeCategories:
- Regex: 'sys/types.h'
Priority: -1
...
Commit the result temporarily. Start a new branch and cherry-pick the
second commit. Manually resolve conflicts to preserve indentation of
re-ordered includes. This cleans up the include ordering without
changing any other style.
Use the following command to run `clang-format`:
$ git ls-files -z -- \
'*.c' '*.cc' '*.cpp' '*.cxx' '*.h' '*.hh' '*.hpp' '*.hxx' |
egrep -z -v '(Lexer|Parser|ParserHelper)\.' |
egrep -z -v '^Source/cm_sha2' |
egrep -z -v '^Source/(kwsys|CursesDialog/form)/' |
egrep -z -v '^Utilities/(KW|cm).*/' |
egrep -z -v '^Tests/Module/GenerateExportHeader' |
egrep -z -v '^Tests/RunCMake/CommandLine/cmake_depends/test_UTF-16LE.h' |
xargs -0 clang-format -i
This selects source files that do not come from a third-party.
Inspired-by: Daniel Pfeifer <daniel@pfeifer-mail.de>
Diffstat (limited to 'Source/CPack')
23 files changed, 90 insertions, 90 deletions
diff --git a/Source/CPack/IFW/cmCPackIFWGenerator.cxx b/Source/CPack/IFW/cmCPackIFWGenerator.cxx index 50ac971..c10803c 100644 --- a/Source/CPack/IFW/cmCPackIFWGenerator.cxx +++ b/Source/CPack/IFW/cmCPackIFWGenerator.cxx @@ -12,24 +12,24 @@ #include "cmCPackIFWGenerator.h" -#include "cmCPackIFWPackage.h" #include "cmCPackIFWInstaller.h" +#include "cmCPackIFWPackage.h" -#include <CPack/cmCPackLog.h> #include <CPack/cmCPackComponentGroup.h> +#include <CPack/cmCPackLog.h> -#include <cmsys/SystemTools.hxx> -#include <cmsys/Glob.hxx> #include <cmsys/Directory.hxx> +#include <cmsys/Glob.hxx> #include <cmsys/RegularExpression.hxx> +#include <cmsys/SystemTools.hxx> +#include <cmGeneratedFileStream.h> #include <cmGlobalGenerator.h> -#include <cmSystemTools.h> #include <cmMakefile.h> -#include <cmGeneratedFileStream.h> -#include <cmXMLWriter.h> -#include <cmVersionConfig.h> +#include <cmSystemTools.h> #include <cmTimestamp.h> +#include <cmVersionConfig.h> +#include <cmXMLWriter.h> //---------------------------------------------------------------------------- cmCPackIFWGenerator::cmCPackIFWGenerator() diff --git a/Source/CPack/IFW/cmCPackIFWGenerator.h b/Source/CPack/IFW/cmCPackIFWGenerator.h index 5770451..001c8c7 100644 --- a/Source/CPack/IFW/cmCPackIFWGenerator.h +++ b/Source/CPack/IFW/cmCPackIFWGenerator.h @@ -15,8 +15,8 @@ #include <CPack/cmCPackGenerator.h> -#include "cmCPackIFWPackage.h" #include "cmCPackIFWInstaller.h" +#include "cmCPackIFWPackage.h" class cmXMLWriter; diff --git a/Source/CPack/OSXScriptLauncher.cxx b/Source/CPack/OSXScriptLauncher.cxx index c271517..b3ddeee 100644 --- a/Source/CPack/OSXScriptLauncher.cxx +++ b/Source/CPack/OSXScriptLauncher.cxx @@ -9,9 +9,9 @@ implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the License for more information. ============================================================================*/ -#include <cmsys/SystemTools.hxx> -#include <cmsys/Process.h> #include <cmsys/FStream.hxx> +#include <cmsys/Process.h> +#include <cmsys/SystemTools.hxx> #include <iostream> diff --git a/Source/CPack/WiX/cmCPackWIXGenerator.cxx b/Source/CPack/WiX/cmCPackWIXGenerator.cxx index ece327a..a98c684 100644 --- a/Source/CPack/WiX/cmCPackWIXGenerator.cxx +++ b/Source/CPack/WiX/cmCPackWIXGenerator.cxx @@ -12,23 +12,23 @@ #include "cmCPackWIXGenerator.h" -#include <cmSystemTools.h> -#include <cmGeneratedFileStream.h> +#include <CPack/cmCPackComponentGroup.h> +#include <CPack/cmCPackLog.h> #include <cmCryptoHash.h> +#include <cmGeneratedFileStream.h> #include <cmInstalledFile.h> -#include <CPack/cmCPackLog.h> -#include <CPack/cmCPackComponentGroup.h> +#include <cmSystemTools.h> -#include "cmWIXSourceWriter.h" #include "cmWIXDirectoriesSourceWriter.h" #include "cmWIXFeaturesSourceWriter.h" #include "cmWIXFilesSourceWriter.h" #include "cmWIXRichTextFormatWriter.h" +#include "cmWIXSourceWriter.h" -#include <cmsys/SystemTools.hxx> #include <cmsys/Directory.hxx> #include <cmsys/Encoding.hxx> #include <cmsys/FStream.hxx> +#include <cmsys/SystemTools.hxx> #include <rpc.h> // for GUID generation diff --git a/Source/CPack/WiX/cmCPackWIXGenerator.h b/Source/CPack/WiX/cmCPackWIXGenerator.h index 8372cd6..871527b 100644 --- a/Source/CPack/WiX/cmCPackWIXGenerator.h +++ b/Source/CPack/WiX/cmCPackWIXGenerator.h @@ -18,8 +18,8 @@ #include "cmWIXPatch.h" #include "cmWIXShortcut.h" -#include <string> #include <map> +#include <string> class cmWIXSourceWriter; class cmWIXDirectoriesSourceWriter; diff --git a/Source/CPack/WiX/cmWIXAccessControlList.h b/Source/CPack/WiX/cmWIXAccessControlList.h index 54c2c19..7293995 100644 --- a/Source/CPack/WiX/cmWIXAccessControlList.h +++ b/Source/CPack/WiX/cmWIXAccessControlList.h @@ -15,8 +15,8 @@ #include "cmWIXSourceWriter.h" -#include <cmInstalledFile.h> #include <CPack/cmCPackLog.h> +#include <cmInstalledFile.h> class cmWIXAccessControlList { diff --git a/Source/CPack/WiX/cmWIXFilesSourceWriter.h b/Source/CPack/WiX/cmWIXFilesSourceWriter.h index 9df955b..734f901 100644 --- a/Source/CPack/WiX/cmWIXFilesSourceWriter.h +++ b/Source/CPack/WiX/cmWIXFilesSourceWriter.h @@ -15,8 +15,8 @@ #include "cmWIXSourceWriter.h" -#include "cmWIXShortcut.h" #include "cmWIXPatch.h" +#include "cmWIXShortcut.h" #include <CPack/cmCPackGenerator.h> diff --git a/Source/CPack/WiX/cmWIXPatch.h b/Source/CPack/WiX/cmWIXPatch.h index 2f31a01..5b0eb3b 100644 --- a/Source/CPack/WiX/cmWIXPatch.h +++ b/Source/CPack/WiX/cmWIXPatch.h @@ -13,8 +13,8 @@ #ifndef cmWIXPatch_h #define cmWIXPatch_h -#include "cmWIXSourceWriter.h" #include "cmWIXPatchParser.h" +#include "cmWIXSourceWriter.h" #include <string> diff --git a/Source/CPack/WiX/cmWIXShortcut.h b/Source/CPack/WiX/cmWIXShortcut.h index 2a72394..598aa0d 100644 --- a/Source/CPack/WiX/cmWIXShortcut.h +++ b/Source/CPack/WiX/cmWIXShortcut.h @@ -15,9 +15,9 @@ #include <cmInstalledFile.h> -#include <string> #include <map> #include <set> +#include <string> #include <vector> class cmWIXFilesSourceWriter; diff --git a/Source/CPack/WiX/cmWIXSourceWriter.h b/Source/CPack/WiX/cmWIXSourceWriter.h index be0c169..2bf9674 100644 --- a/Source/CPack/WiX/cmWIXSourceWriter.h +++ b/Source/CPack/WiX/cmWIXSourceWriter.h @@ -17,8 +17,8 @@ #include <cmsys/FStream.hxx> -#include <vector> #include <string> +#include <vector> /** \class cmWIXSourceWriter * \brief Helper class to generate XML WiX source files diff --git a/Source/CPack/cmCPackArchiveGenerator.cxx b/Source/CPack/cmCPackArchiveGenerator.cxx index db985db..37e8bf0 100644 --- a/Source/CPack/cmCPackArchiveGenerator.cxx +++ b/Source/CPack/cmCPackArchiveGenerator.cxx @@ -12,17 +12,17 @@ #include "cmCPackArchiveGenerator.h" -#include "cmake.h" +#include "cmCPackLog.h" +#include "cmGeneratedFileStream.h" #include "cmGlobalGenerator.h" -#include "cmSystemTools.h" #include "cmMakefile.h" -#include "cmGeneratedFileStream.h" -#include "cmCPackLog.h" +#include "cmSystemTools.h" +#include "cmake.h" #include <errno.h> -#include <cmsys/SystemTools.hxx> -#include <cmsys/Directory.hxx> #include <cm_libarchive.h> +#include <cmsys/Directory.hxx> +#include <cmsys/SystemTools.hxx> //---------------------------------------------------------------------- cmCPackArchiveGenerator::cmCPackArchiveGenerator(cmArchiveWrite::Compress t, diff --git a/Source/CPack/cmCPackComponentGroup.cxx b/Source/CPack/cmCPackComponentGroup.cxx index 2d41e59..b847589 100644 --- a/Source/CPack/cmCPackComponentGroup.cxx +++ b/Source/CPack/cmCPackComponentGroup.cxx @@ -14,8 +14,8 @@ #include "cmSystemTools.h" -#include <vector> #include <string> +#include <vector> //---------------------------------------------------------------------- unsigned long cmCPackComponent::GetInstalledSize( diff --git a/Source/CPack/cmCPackCygwinBinaryGenerator.cxx b/Source/CPack/cmCPackCygwinBinaryGenerator.cxx index 1f905c0..687689c 100644 --- a/Source/CPack/cmCPackCygwinBinaryGenerator.cxx +++ b/Source/CPack/cmCPackCygwinBinaryGenerator.cxx @@ -12,12 +12,12 @@ #include "cmCPackCygwinBinaryGenerator.h" -#include "cmake.h" +#include "cmCPackLog.h" +#include "cmGeneratedFileStream.h" #include "cmGlobalGenerator.h" -#include "cmSystemTools.h" #include "cmMakefile.h" -#include "cmGeneratedFileStream.h" -#include "cmCPackLog.h" +#include "cmSystemTools.h" +#include "cmake.h" #include <cmsys/SystemTools.hxx> diff --git a/Source/CPack/cmCPackCygwinSourceGenerator.cxx b/Source/CPack/cmCPackCygwinSourceGenerator.cxx index f5cb53c..d84b1ee 100644 --- a/Source/CPack/cmCPackCygwinSourceGenerator.cxx +++ b/Source/CPack/cmCPackCygwinSourceGenerator.cxx @@ -12,12 +12,12 @@ #include "cmCPackCygwinSourceGenerator.h" -#include "cmake.h" +#include "cmCPackLog.h" +#include "cmGeneratedFileStream.h" #include "cmGlobalGenerator.h" -#include "cmSystemTools.h" #include "cmMakefile.h" -#include "cmGeneratedFileStream.h" -#include "cmCPackLog.h" +#include "cmSystemTools.h" +#include "cmake.h" #include <cmsys/SystemTools.hxx> @@ -25,8 +25,8 @@ // system tools because it is not implemented robustly enough to move // files across directories. #ifdef _WIN32 -# include <windows.h> # include <sys/stat.h> +# include <windows.h> #endif //---------------------------------------------------------------------- diff --git a/Source/CPack/cmCPackDebGenerator.cxx b/Source/CPack/cmCPackDebGenerator.cxx index 9673942..9e17bc8 100644 --- a/Source/CPack/cmCPackDebGenerator.cxx +++ b/Source/CPack/cmCPackDebGenerator.cxx @@ -12,14 +12,14 @@ #include "cmCPackDebGenerator.h" -#include "cmSystemTools.h" -#include "cmMakefile.h" -#include "cmGeneratedFileStream.h" -#include "cmCPackLog.h" #include "cmArchiveWrite.h" +#include "cmCPackLog.h" +#include "cmGeneratedFileStream.h" +#include "cmMakefile.h" +#include "cmSystemTools.h" -#include <cmsys/SystemTools.hxx> #include <cmsys/Glob.hxx> +#include <cmsys/SystemTools.hxx> #include <limits.h> // USHRT_MAX #include <sys/stat.h> @@ -764,8 +764,8 @@ std::string cmCPackDebGenerator::GetComponentInstallDirNameSuffix( #include <sys/stat.h> #include <stdio.h> -#include <string.h> #include <stdlib.h> +#include <string.h> #define ARMAG "!<arch>\n" /* ar "magic number" */ #define SARMAG 8 /* strlen(ARMAG); */ diff --git a/Source/CPack/cmCPackDragNDropGenerator.cxx b/Source/CPack/cmCPackDragNDropGenerator.cxx index eccc5cf..b9c9c85 100644 --- a/Source/CPack/cmCPackDragNDropGenerator.cxx +++ b/Source/CPack/cmCPackDragNDropGenerator.cxx @@ -13,11 +13,11 @@ #include "cmCPackDragNDropGenerator.h" #include "cmCPackLog.h" -#include "cmSystemTools.h" #include "cmGeneratedFileStream.h" +#include "cmSystemTools.h" -#include <cmsys/RegularExpression.hxx> #include <cmsys/FStream.hxx> +#include <cmsys/RegularExpression.hxx> #include <iomanip> diff --git a/Source/CPack/cmCPackGenerator.cxx b/Source/CPack/cmCPackGenerator.cxx index 3eca280..6cc67e7 100644 --- a/Source/CPack/cmCPackGenerator.cxx +++ b/Source/CPack/cmCPackGenerator.cxx @@ -12,18 +12,18 @@ #include "cmCPackGenerator.h" -#include "cmMakefile.h" +#include "cmCPackComponentGroup.h" #include "cmCPackLog.h" -#include "cmake.h" -#include "cmGlobalGenerator.h" #include "cmGeneratedFileStream.h" -#include "cmCPackComponentGroup.h" +#include "cmGlobalGenerator.h" +#include "cmMakefile.h" #include "cmXMLSafe.h" +#include "cmake.h" -#include <cmsys/SystemTools.hxx> -#include <cmsys/Glob.hxx> -#include <cmsys/FStream.hxx> #include <algorithm> +#include <cmsys/FStream.hxx> +#include <cmsys/Glob.hxx> +#include <cmsys/SystemTools.hxx> #include <list> #if defined(__HAIKU__) diff --git a/Source/CPack/cmCPackGeneratorFactory.cxx b/Source/CPack/cmCPackGeneratorFactory.cxx index 4626142..669964d 100644 --- a/Source/CPack/cmCPackGeneratorFactory.cxx +++ b/Source/CPack/cmCPackGeneratorFactory.cxx @@ -12,22 +12,22 @@ #include "cmCPackGeneratorFactory.h" +#include "IFW/cmCPackIFWGenerator.h" +#include "cmCPack7zGenerator.h" #include "cmCPackGenerator.h" +#include "cmCPackNSISGenerator.h" +#include "cmCPackSTGZGenerator.h" #include "cmCPackTGZGenerator.h" #include "cmCPackTXZGenerator.h" #include "cmCPackTarBZip2Generator.h" #include "cmCPackTarCompressGenerator.h" #include "cmCPackZIPGenerator.h" -#include "cmCPack7zGenerator.h" -#include "cmCPackSTGZGenerator.h" -#include "cmCPackNSISGenerator.h" -#include "IFW/cmCPackIFWGenerator.h" #ifdef __APPLE__ -# include "cmCPackDragNDropGenerator.h" -# include "cmCPackBundleGenerator.h" -# include "cmCPackPackageMakerGenerator.h" -# include "cmCPackOSXX11Generator.h" +# include "cmCPackBundleGenerator.h" +# include "cmCPackDragNDropGenerator.h" +# include "cmCPackOSXX11Generator.h" +# include "cmCPackPackageMakerGenerator.h" #endif #ifdef __CYGWIN__ @@ -45,8 +45,8 @@ # include "WiX/cmCPackWIXGenerator.h" #endif -#include "cmCPackLog.h" #include "cmAlgorithms.h" +#include "cmCPackLog.h" //---------------------------------------------------------------------- diff --git a/Source/CPack/cmCPackNSISGenerator.cxx b/Source/CPack/cmCPackNSISGenerator.cxx index 5ba639f..eeb46fd 100644 --- a/Source/CPack/cmCPackNSISGenerator.cxx +++ b/Source/CPack/cmCPackNSISGenerator.cxx @@ -12,17 +12,17 @@ #include "cmCPackNSISGenerator.h" +#include "cmCPackComponentGroup.h" +#include "cmCPackLog.h" +#include "cmGeneratedFileStream.h" #include "cmGlobalGenerator.h" -#include "cmSystemTools.h" #include "cmMakefile.h" -#include "cmGeneratedFileStream.h" -#include "cmCPackLog.h" -#include "cmCPackComponentGroup.h" +#include "cmSystemTools.h" -#include <cmsys/SystemTools.hxx> -#include <cmsys/Glob.hxx> #include <cmsys/Directory.hxx> +#include <cmsys/Glob.hxx> #include <cmsys/RegularExpression.hxx> +#include <cmsys/SystemTools.hxx> /* NSIS uses different command line syntax on Windows and others */ #ifdef _WIN32 diff --git a/Source/CPack/cmCPackOSXX11Generator.cxx b/Source/CPack/cmCPackOSXX11Generator.cxx index cde08b1..1d7ef69 100644 --- a/Source/CPack/cmCPackOSXX11Generator.cxx +++ b/Source/CPack/cmCPackOSXX11Generator.cxx @@ -12,15 +12,15 @@ #include "cmCPackOSXX11Generator.h" -#include "cmake.h" +#include "cmCPackLog.h" +#include "cmGeneratedFileStream.h" #include "cmGlobalGenerator.h" -#include "cmSystemTools.h" #include "cmMakefile.h" -#include "cmGeneratedFileStream.h" -#include "cmCPackLog.h" +#include "cmSystemTools.h" +#include "cmake.h" -#include <cmsys/SystemTools.hxx> #include <cmsys/Glob.hxx> +#include <cmsys/SystemTools.hxx> #include <sys/stat.h> //---------------------------------------------------------------------- diff --git a/Source/CPack/cmCPackPackageMakerGenerator.cxx b/Source/CPack/cmCPackPackageMakerGenerator.cxx index 8fdc036..4f6238e 100644 --- a/Source/CPack/cmCPackPackageMakerGenerator.cxx +++ b/Source/CPack/cmCPackPackageMakerGenerator.cxx @@ -11,17 +11,17 @@ ============================================================================*/ #include "cmCPackPackageMakerGenerator.h" -#include "cmake.h" -#include "cmGlobalGenerator.h" -#include "cmSystemTools.h" -#include "cmMakefile.h" -#include "cmGeneratedFileStream.h" #include "cmCPackComponentGroup.h" #include "cmCPackLog.h" +#include "cmGeneratedFileStream.h" +#include "cmGlobalGenerator.h" +#include "cmMakefile.h" +#include "cmSystemTools.h" +#include "cmake.h" -#include <cmsys/SystemTools.hxx> -#include <cmsys/Glob.hxx> #include <cmsys/FStream.hxx> +#include <cmsys/Glob.hxx> +#include <cmsys/SystemTools.hxx> #include <assert.h> diff --git a/Source/CPack/cmCPackSTGZGenerator.cxx b/Source/CPack/cmCPackSTGZGenerator.cxx index 68b893f..8a83666 100644 --- a/Source/CPack/cmCPackSTGZGenerator.cxx +++ b/Source/CPack/cmCPackSTGZGenerator.cxx @@ -12,14 +12,14 @@ #include "cmCPackSTGZGenerator.h" -#include "cmake.h" +#include "cmCPackLog.h" #include "cmGlobalGenerator.h" -#include "cmSystemTools.h" #include "cmMakefile.h" -#include "cmCPackLog.h" +#include "cmSystemTools.h" +#include "cmake.h" -#include <cmsys/FStream.hxx> #include <sys/types.h> +#include <cmsys/FStream.hxx> #include <sys/stat.h> //---------------------------------------------------------------------- diff --git a/Source/CPack/cpack.cxx b/Source/CPack/cpack.cxx index c08897f..813fb01 100644 --- a/Source/CPack/cpack.cxx +++ b/Source/CPack/cpack.cxx @@ -12,19 +12,19 @@ #include "cmSystemTools.h" // Need these for documentation support. -#include "cmake.h" -#include "cmDocumentation.h" -#include "cmCPackGeneratorFactory.h" #include "cmCPackGenerator.h" -#include "cmake.h" +#include "cmCPackGeneratorFactory.h" +#include "cmDocumentation.h" #include "cmGlobalGenerator.h" #include "cmMakefile.h" +#include "cmake.h" +#include "cmake.h" #include "cmCPackLog.h" #include <cmsys/CommandLineArguments.hxx> -#include <cmsys/SystemTools.hxx> #include <cmsys/Encoding.hxx> +#include <cmsys/SystemTools.hxx> //---------------------------------------------------------------------------- static const char * cmDocumentationName[][2] = |