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/WiX | |
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/WiX')
-rw-r--r-- | Source/CPack/WiX/cmCPackWIXGenerator.cxx | 12 | ||||
-rw-r--r-- | Source/CPack/WiX/cmCPackWIXGenerator.h | 2 | ||||
-rw-r--r-- | Source/CPack/WiX/cmWIXAccessControlList.h | 2 | ||||
-rw-r--r-- | Source/CPack/WiX/cmWIXFilesSourceWriter.h | 2 | ||||
-rw-r--r-- | Source/CPack/WiX/cmWIXPatch.h | 2 | ||||
-rw-r--r-- | Source/CPack/WiX/cmWIXShortcut.h | 2 | ||||
-rw-r--r-- | Source/CPack/WiX/cmWIXSourceWriter.h | 2 |
7 files changed, 12 insertions, 12 deletions
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 |