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 /Tests | |
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 'Tests')
65 files changed, 105 insertions, 106 deletions
diff --git a/Tests/BuildDepends/Project/bar.cxx b/Tests/BuildDepends/Project/bar.cxx index dadf93d..c4adbf8 100644 --- a/Tests/BuildDepends/Project/bar.cxx +++ b/Tests/BuildDepends/Project/bar.cxx @@ -1,7 +1,7 @@ +#include <noregen.h> +#include <regen.h> #include <stdio.h> #include <string.h> -#include <regen.h> -#include <noregen.h> int main(int argc, char** argv) { diff --git a/Tests/BuildDepends/Project/ninjadep.cpp b/Tests/BuildDepends/Project/ninjadep.cpp index 8d61336..5498b17 100644 --- a/Tests/BuildDepends/Project/ninjadep.cpp +++ b/Tests/BuildDepends/Project/ninjadep.cpp @@ -1,5 +1,5 @@ -#include <stdio.h> #include "dir/header.h" +#include <stdio.h> int main() { printf("HEADER_STRING: %s\n", HEADER_STRING); diff --git a/Tests/BuildDepends/Project/zot.cxx b/Tests/BuildDepends/Project/zot.cxx index 775fd3b..186554b 100644 --- a/Tests/BuildDepends/Project/zot.cxx +++ b/Tests/BuildDepends/Project/zot.cxx @@ -1,6 +1,6 @@ +#include <stdio.h> #include <zot.hxx> #include <zot_custom.hxx> -#include <stdio.h> const char* zot_macro_dir_f(); const char* zot_macro_tgt_f(); diff --git a/Tests/BundleTest/BundleLib.cxx b/Tests/BundleTest/BundleLib.cxx index 37bc178..54f9534 100644 --- a/Tests/BundleTest/BundleLib.cxx +++ b/Tests/BundleTest/BundleLib.cxx @@ -1,6 +1,6 @@ #include <stdio.h> -#include <string.h> #include <stdlib.h> +#include <string.h> #include <unistd.h> #include <CoreFoundation/CoreFoundation.h> diff --git a/Tests/BundleUtilities/module.cpp b/Tests/BundleUtilities/module.cpp index ee1b542..51730d9 100644 --- a/Tests/BundleUtilities/module.cpp +++ b/Tests/BundleUtilities/module.cpp @@ -1,7 +1,7 @@ #include "module.h" -#include "stdio.h" #include "shared2.h" +#include "stdio.h" void module() { diff --git a/Tests/CMakeCommands/target_include_directories/consumer.cpp b/Tests/CMakeCommands/target_include_directories/consumer.cpp index 649510c..9e1656a 100644 --- a/Tests/CMakeCommands/target_include_directories/consumer.cpp +++ b/Tests/CMakeCommands/target_include_directories/consumer.cpp @@ -1,9 +1,9 @@ +#include "consumer.h" #include "common.h" -#include "publicinclude.h" #include "interfaceinclude.h" +#include "publicinclude.h" #include "relative_dir.h" -#include "consumer.h" #ifdef TEST_LANG_DEFINES #include "cxx_only.h" #endif diff --git a/Tests/CMakeCommands/target_link_libraries/targetC.cpp b/Tests/CMakeCommands/target_link_libraries/targetC.cpp index a4ef636..3542660 100644 --- a/Tests/CMakeCommands/target_link_libraries/targetC.cpp +++ b/Tests/CMakeCommands/target_link_libraries/targetC.cpp @@ -1,8 +1,8 @@ #include "depG.h" -#include "foo.h" #include "bar.h" +#include "foo.h" #ifndef TEST_DEF #error Expected TEST_DEF definition diff --git a/Tests/CMakeLib/testUTF8.cxx b/Tests/CMakeLib/testUTF8.cxx index 4ab96cf..204a717 100644 --- a/Tests/CMakeLib/testUTF8.cxx +++ b/Tests/CMakeLib/testUTF8.cxx @@ -11,8 +11,8 @@ ============================================================================*/ #include <cm_utf8.h> -#include <string.h> #include <stdio.h> +#include <string.h> typedef char test_utf8_char[5]; diff --git a/Tests/CompileDefinitions/runtest.c b/Tests/CompileDefinitions/runtest.c index 02d2cad..c2d51aa 100644 --- a/Tests/CompileDefinitions/runtest.c +++ b/Tests/CompileDefinitions/runtest.c @@ -1,6 +1,6 @@ -#include <string.h> -#include <stdio.h> #include <ctype.h> +#include <stdio.h> +#include <string.h> #ifndef BUILD_CONFIG_NAME # error "BUILD_CONFIG_NAME not defined!" diff --git a/Tests/Complex/Executable/complex.cxx b/Tests/Complex/Executable/complex.cxx index ec222a5..8d538db 100644 --- a/Tests/Complex/Executable/complex.cxx +++ b/Tests/Complex/Executable/complex.cxx @@ -1,18 +1,18 @@ +#include "Aout.h" +#include "ExtraSources/file1.h" #include "cmTestConfigure.h" #include "cmTestConfigureEscape.h" #include "cmTestGeneratedHeader.h" #include "cmVersion.h" -#include "ExtraSources/file1.h" -#include "Aout.h" #include "file2.h" #include "sharedFile.h" extern "C" { #include "testConly.h" } -#include <vector> -#include <string> #include <iostream> #include <string.h> +#include <string> +#include <vector> #include <stdio.h> #include <sys/stat.h> diff --git a/Tests/ComplexOneConfig/Executable/complex.cxx b/Tests/ComplexOneConfig/Executable/complex.cxx index ec222a5..8d538db 100644 --- a/Tests/ComplexOneConfig/Executable/complex.cxx +++ b/Tests/ComplexOneConfig/Executable/complex.cxx @@ -1,18 +1,18 @@ +#include "Aout.h" +#include "ExtraSources/file1.h" #include "cmTestConfigure.h" #include "cmTestConfigureEscape.h" #include "cmTestGeneratedHeader.h" #include "cmVersion.h" -#include "ExtraSources/file1.h" -#include "Aout.h" #include "file2.h" #include "sharedFile.h" extern "C" { #include "testConly.h" } -#include <vector> -#include <string> #include <iostream> #include <string.h> +#include <string> +#include <vector> #include <stdio.h> #include <sys/stat.h> diff --git a/Tests/ExportImport/Export/testSharedLibDepends.h b/Tests/ExportImport/Export/testSharedLibDepends.h index 8b2f84e..e84fb54 100644 --- a/Tests/ExportImport/Export/testSharedLibDepends.h +++ b/Tests/ExportImport/Export/testSharedLibDepends.h @@ -4,8 +4,8 @@ #include "testsharedlibdepends_export.h" -#include "testSharedLibRequired.h" #include "renamed.h" +#include "testSharedLibRequired.h" struct TESTSHAREDLIBDEPENDS_EXPORT TestSharedLibDepends { diff --git a/Tests/ExportImport/Import/A/deps_shared_iface.cpp b/Tests/ExportImport/Import/A/deps_shared_iface.cpp index d5e4de3..0c5cb7f 100644 --- a/Tests/ExportImport/Import/A/deps_shared_iface.cpp +++ b/Tests/ExportImport/Import/A/deps_shared_iface.cpp @@ -21,8 +21,8 @@ #endif #ifdef TEST_SUBDIR_LIB -#include "subdir.h" #include "renamed.h" +#include "subdir.h" #endif #ifdef DO_GNU_TESTS diff --git a/Tests/FindGSL/rng/main.cc b/Tests/FindGSL/rng/main.cc index 72543be..e1e0a47 100644 --- a/Tests/FindGSL/rng/main.cc +++ b/Tests/FindGSL/rng/main.cc @@ -1,5 +1,5 @@ -#include <math.h> #include "gsl/gsl_rng.h" +#include <math.h> int main() { diff --git a/Tests/FindGTK2/cairomm/main.cpp b/Tests/FindGTK2/cairomm/main.cpp index ea8f106..0db3a04 100644 --- a/Tests/FindGTK2/cairomm/main.cpp +++ b/Tests/FindGTK2/cairomm/main.cpp @@ -8,11 +8,11 @@ #define _USE_MATH_DEFINES #endif -#include <string> -#include <iostream> -#include <cairommconfig.h> #include <cairomm/context.h> #include <cairomm/surface.h> +#include <cairommconfig.h> +#include <iostream> +#include <string> #include <cmath> diff --git a/Tests/FindGTK2/gtkmm/main.cpp b/Tests/FindGTK2/gtkmm/main.cpp index 5ff64d1..566a4bd 100644 --- a/Tests/FindGTK2/gtkmm/main.cpp +++ b/Tests/FindGTK2/gtkmm/main.cpp @@ -1,5 +1,5 @@ -#include <gtkmm.h> #include "helloworld.h" +#include <gtkmm.h> int main(int argc, char *argv[]) { diff --git a/Tests/FindGTK2/sigc++/main.cpp b/Tests/FindGTK2/sigc++/main.cpp index 78428e7..ccf415e 100644 --- a/Tests/FindGTK2/sigc++/main.cpp +++ b/Tests/FindGTK2/sigc++/main.cpp @@ -1,8 +1,7 @@ // Taken from https://developer.gnome.org/libsigc++-tutorial/stable/ch02.html - -#include <sigc++/sigc++.h> #include <iostream> +#include <sigc++/sigc++.h> class AlienDetector { diff --git a/Tests/FindLTTngUST/Test/main.c b/Tests/FindLTTngUST/Test/main.c index ac775a0..1f313c1 100644 --- a/Tests/FindLTTngUST/Test/main.c +++ b/Tests/FindLTTngUST/Test/main.c @@ -1,7 +1,7 @@ #include <assert.h> -#include <string.h> -#include <stdio.h> #include <lttng/ust-version.h> +#include <stdio.h> +#include <string.h> #ifdef CMAKE_LTTNGUST_HAS_TRACEF #include <lttng/tracef.h> diff --git a/Tests/FindPNG/Test/main.c b/Tests/FindPNG/Test/main.c index 27e1478..06d943d 100644 --- a/Tests/FindPNG/Test/main.c +++ b/Tests/FindPNG/Test/main.c @@ -1,6 +1,6 @@ #include <assert.h> -#include <string.h> #include <png.h> +#include <string.h> int main() { diff --git a/Tests/FindPackageModeMakefileTest/main.cpp b/Tests/FindPackageModeMakefileTest/main.cpp index e5f9134..db1ffb1 100644 --- a/Tests/FindPackageModeMakefileTest/main.cpp +++ b/Tests/FindPackageModeMakefileTest/main.cpp @@ -1,5 +1,5 @@ -#include <stdio.h> #include <foo.h> +#include <stdio.h> int main() { diff --git a/Tests/FindXalanC/Test/main.cxx b/Tests/FindXalanC/Test/main.cxx index 3b4a2df..7d0f42c 100644 --- a/Tests/FindXalanC/Test/main.cxx +++ b/Tests/FindXalanC/Test/main.cxx @@ -1,5 +1,5 @@ -#include <xercesc/util/PlatformUtils.hpp> #include <xalanc/XalanTransformer/XalanTransformer.hpp> +#include <xercesc/util/PlatformUtils.hpp> int main() { diff --git a/Tests/IncludeDirectories/TargetIncludeDirectories/main.cpp b/Tests/IncludeDirectories/TargetIncludeDirectories/main.cpp index aed0bde..2ee05e2 100644 --- a/Tests/IncludeDirectories/TargetIncludeDirectories/main.cpp +++ b/Tests/IncludeDirectories/TargetIncludeDirectories/main.cpp @@ -1,17 +1,17 @@ +#include "arguments.h" +#include "bang.h" #include "bar.h" #include "bat.h" -#include "foo.h" #include "baz.h" -#include "bang.h" #include "bing.h" #include "bung.h" -#include "ting.h" -#include "arguments.h" +#include "common.h" +#include "foo.h" #include "list.h" -#include "target.h" #include "prefix_foo_bar_bat.h" -#include "common.h" +#include "target.h" +#include "ting.h" int main(int, char**) { diff --git a/Tests/LoadCommand/CMakeCommands/cmTestCommand.c b/Tests/LoadCommand/CMakeCommands/cmTestCommand.c index fc04934..eac121d 100644 --- a/Tests/LoadCommand/CMakeCommands/cmTestCommand.c +++ b/Tests/LoadCommand/CMakeCommands/cmTestCommand.c @@ -1,7 +1,7 @@ #include "cmCPluginAPI.h" -#include <string.h> -#include <stdlib.h> #include <stdio.h> +#include <stdlib.h> +#include <string.h> typedef struct { diff --git a/Tests/LoadCommandOneConfig/CMakeCommands/cmTestCommand.c b/Tests/LoadCommandOneConfig/CMakeCommands/cmTestCommand.c index fc04934..eac121d 100644 --- a/Tests/LoadCommandOneConfig/CMakeCommands/cmTestCommand.c +++ b/Tests/LoadCommandOneConfig/CMakeCommands/cmTestCommand.c @@ -1,7 +1,7 @@ #include "cmCPluginAPI.h" -#include <string.h> -#include <stdlib.h> #include <stdio.h> +#include <stdlib.h> +#include <string.h> typedef struct { diff --git a/Tests/MFC/mfc1/mfc1.cpp b/Tests/MFC/mfc1/mfc1.cpp index 057e1d5..1777d7f 100644 --- a/Tests/MFC/mfc1/mfc1.cpp +++ b/Tests/MFC/mfc1/mfc1.cpp @@ -3,8 +3,8 @@ #include "stdafx.h" -#include "mfc1.h" #include "MainFrm.h" +#include "mfc1.h" #include "ChildFrm.h" #include "mfc1Doc.h" diff --git a/Tests/MFC/mfc1/stdafx.h b/Tests/MFC/mfc1/stdafx.h index 35a678d..654a23f 100644 --- a/Tests/MFC/mfc1/stdafx.h +++ b/Tests/MFC/mfc1/stdafx.h @@ -46,9 +46,9 @@ // turns off MFC's hiding of some common and often safely ignored warning messages #define _AFX_ALL_WARNINGS -#include <afxwin.h> // MFC core and standard components -#include <afxext.h> // MFC extensions -#include <afxdisp.h> // MFC Automation classes +#include <afxdisp.h> // MFC Automation classes +#include <afxext.h> // MFC extensions +#include <afxwin.h> // MFC core and standard components #include <afxdtctl.h> // MFC support for Internet Explorer 4 Common Controls #ifndef _AFX_NO_AFXCMN_SUPPORT diff --git a/Tests/OutOfSource/OutOfSourceSubdir/simple.cxx b/Tests/OutOfSource/OutOfSourceSubdir/simple.cxx index d88c311..69d7c82 100644 --- a/Tests/OutOfSource/OutOfSourceSubdir/simple.cxx +++ b/Tests/OutOfSource/OutOfSourceSubdir/simple.cxx @@ -1,8 +1,8 @@ #include <stdio.h> #include <string.h> -#include "testlib.h" #include "testdp.h" +#include "testlib.h" extern int simple(); #ifndef NO_DEEPSRC diff --git a/Tests/Plugin/src/example_exe.cxx b/Tests/Plugin/src/example_exe.cxx index 12d9204..393bb68 100644 --- a/Tests/Plugin/src/example_exe.cxx +++ b/Tests/Plugin/src/example_exe.cxx @@ -2,8 +2,8 @@ #include <example_exe.h> -#include <kwsys/DynamicLoader.hxx> #include <iostream> +#include <kwsys/DynamicLoader.hxx> #include <string> #include <stdio.h> diff --git a/Tests/Preprocess/preprocess.c b/Tests/Preprocess/preprocess.c index 16209ac..af5eae6 100644 --- a/Tests/Preprocess/preprocess.c +++ b/Tests/Preprocess/preprocess.c @@ -3,8 +3,8 @@ #include FILE_PATH #include TARGET_PATH -#include <string.h> #include <stdio.h> +#include <string.h> int check_defines_C(void) { diff --git a/Tests/Preprocess/preprocess.cxx b/Tests/Preprocess/preprocess.cxx index 27b6ac8..d168103 100644 --- a/Tests/Preprocess/preprocess.cxx +++ b/Tests/Preprocess/preprocess.cxx @@ -3,8 +3,8 @@ #include FILE_PATH #include TARGET_PATH -#include <string.h> #include <stdio.h> +#include <string.h> extern "C" int check_defines_C(void); diff --git a/Tests/Qt4Deploy/testdeploy.cpp b/Tests/Qt4Deploy/testdeploy.cpp index 8b9c8d6..255453a 100644 --- a/Tests/Qt4Deploy/testdeploy.cpp +++ b/Tests/Qt4Deploy/testdeploy.cpp @@ -1,7 +1,7 @@ #include <QCoreApplication> -#include <QSqlDatabase> -#include <QLibraryInfo> #include <QDebug> +#include <QLibraryInfo> +#include <QSqlDatabase> #include <QStringList> int main(int argc, char** argv) diff --git a/Tests/QtAutogen/Bdir/libB.h b/Tests/QtAutogen/Bdir/libB.h index 510c17f..746b67a 100644 --- a/Tests/QtAutogen/Bdir/libB.h +++ b/Tests/QtAutogen/Bdir/libB.h @@ -4,8 +4,8 @@ #include "libb_export.h" -#include <QObject> #include "libA.h" +#include <QObject> class LIBB_EXPORT LibB : public QObject { diff --git a/Tests/QtAutogen/calwidget.cpp b/Tests/QtAutogen/calwidget.cpp index 5f59994..0e314cd 100644 --- a/Tests/QtAutogen/calwidget.cpp +++ b/Tests/QtAutogen/calwidget.cpp @@ -38,13 +38,13 @@ ** ****************************************************************************/ + #include <QCalendarWidget> + #include <QCheckBox> #include <QComboBox> + #include <QDateEdit> #include <QGridLayout> - #include <QLabel> #include <QGroupBox> - #include <QCheckBox> - #include <QDateEdit> - #include <QCalendarWidget> + #include <QLabel> #include <QTextCharFormat> #include "calwidget.h" diff --git a/Tests/QtAutogen/codeeditor.h b/Tests/QtAutogen/codeeditor.h index 56e9e792..fd79a2a 100644 --- a/Tests/QtAutogen/codeeditor.h +++ b/Tests/QtAutogen/codeeditor.h @@ -41,8 +41,8 @@ #ifndef CODEEDITOR_H #define CODEEDITOR_H - #include <QPlainTextEdit> #include <QObject> + #include <QPlainTextEdit> class QPaintEvent; class QResizeEvent; diff --git a/Tests/QtAutogen/libC.h b/Tests/QtAutogen/libC.h index 4fb4a2c..6682576 100644 --- a/Tests/QtAutogen/libC.h +++ b/Tests/QtAutogen/libC.h @@ -4,8 +4,8 @@ #include "libc_export.h" -#include <QObject> #include "libB.h" +#include <QObject> class LIBC_EXPORT LibC : public QObject { diff --git a/Tests/QtAutogen/main.cpp b/Tests/QtAutogen/main.cpp index eb59665..1636cd4 100644 --- a/Tests/QtAutogen/main.cpp +++ b/Tests/QtAutogen/main.cpp @@ -41,16 +41,16 @@ #include <QCoreApplication> #include <QTimer> -#include "codeeditor.h" +#include "abc.h" +#include "blub.h" #include "calwidget.h" +#include "codeeditor.h" #include "foo.h" -#include "blub.h" +#include "libC.h" +#include "resourcetester.h" #include "sub/bar.h" -#include "abc.h" #include "xyz.h" #include "yaf.h" -#include "libC.h" -#include "resourcetester.h" #ifdef TEST_DEBUG_CLASS #include "debug_class.h" #include <iostream> diff --git a/Tests/QtAutogen/resourcetester.cpp b/Tests/QtAutogen/resourcetester.cpp index 043ec75..75ae28f 100644 --- a/Tests/QtAutogen/resourcetester.cpp +++ b/Tests/QtAutogen/resourcetester.cpp @@ -1,8 +1,8 @@ #include "resourcetester.h" -#include <QDebug> #include <QApplication> +#include <QDebug> #include <QFile> #include <QTimer> diff --git a/Tests/QtAutogen/same_name/ccc/item.cpp b/Tests/QtAutogen/same_name/ccc/item.cpp index 2584881..12c71d0 100644 --- a/Tests/QtAutogen/same_name/ccc/item.cpp +++ b/Tests/QtAutogen/same_name/ccc/item.cpp @@ -22,5 +22,5 @@ MocTest::go() } // Include own moc files -#include "moc_item.cpp" #include "item.moc" +#include "moc_item.cpp" diff --git a/Tests/QtAutogen/same_name/main.cpp b/Tests/QtAutogen/same_name/main.cpp index 166466e..fc77a99 100644 --- a/Tests/QtAutogen/same_name/main.cpp +++ b/Tests/QtAutogen/same_name/main.cpp @@ -1,7 +1,7 @@ -#include "aaa/item.hpp" #include "aaa/bbb/item.hpp" -#include "bbb/item.hpp" +#include "aaa/item.hpp" #include "bbb/aaa/item.hpp" +#include "bbb/item.hpp" #include "ccc/item.hpp" int main(int argv, char **args) diff --git a/Tests/RunCMake/AutoExportDll/hello.cxx b/Tests/RunCMake/AutoExportDll/hello.cxx index 3933fc1..4196948 100644 --- a/Tests/RunCMake/AutoExportDll/hello.cxx +++ b/Tests/RunCMake/AutoExportDll/hello.cxx @@ -1,5 +1,5 @@ -#include <stdio.h> #include "hello.h" +#include <stdio.h> int Hello::Data = 0; void Hello::real() { diff --git a/Tests/RunCMake/AutoExportDll/say.cxx b/Tests/RunCMake/AutoExportDll/say.cxx index 655b3c2..0d78d4b 100644 --- a/Tests/RunCMake/AutoExportDll/say.cxx +++ b/Tests/RunCMake/AutoExportDll/say.cxx @@ -1,5 +1,5 @@ -#include <stdio.h> #include "hello.h" +#include <stdio.h> #ifdef _MSC_VER #include "windows.h" #else diff --git a/Tests/StagingPrefix/Consumer/main.cpp b/Tests/StagingPrefix/Consumer/main.cpp index 612ee05..5c0202d 100644 --- a/Tests/StagingPrefix/Consumer/main.cpp +++ b/Tests/StagingPrefix/Consumer/main.cpp @@ -1,6 +1,6 @@ -#include "foo.h" #include "bar.h" +#include "foo.h" int main(int, char **) { diff --git a/Tests/TestsWorkingDirectory/main.c b/Tests/TestsWorkingDirectory/main.c index 19f2f14..3616f8e 100644 --- a/Tests/TestsWorkingDirectory/main.c +++ b/Tests/TestsWorkingDirectory/main.c @@ -5,8 +5,8 @@ #if defined(_WIN32) && (defined(_MSC_VER) || defined(__WATCOMC__) || defined(__BORLANDC__) || defined(__MINGW32__)) -#include <io.h> #include <direct.h> +#include <io.h> #if defined(__WATCOMC__) #include <direct.h> diff --git a/Tests/Tutorial/Step1/tutorial.cxx b/Tests/Tutorial/Step1/tutorial.cxx index 8ab6dc3..a3584c4 100644 --- a/Tests/Tutorial/Step1/tutorial.cxx +++ b/Tests/Tutorial/Step1/tutorial.cxx @@ -1,8 +1,8 @@ // A simple program that computes the square root of a number +#include "TutorialConfig.h" +#include <math.h> #include <stdio.h> #include <stdlib.h> -#include <math.h> -#include "TutorialConfig.h" int main (int argc, char *argv[]) { diff --git a/Tests/Tutorial/Step2/MathFunctions/mysqrt.cxx b/Tests/Tutorial/Step2/MathFunctions/mysqrt.cxx index 62523f6..0f7c106 100644 --- a/Tests/Tutorial/Step2/MathFunctions/mysqrt.cxx +++ b/Tests/Tutorial/Step2/MathFunctions/mysqrt.cxx @@ -1,5 +1,5 @@ -#include <stdio.h> #include "MathFunctions.h" +#include <stdio.h> // a hack square root calculation using simple operations double mysqrt(double x) diff --git a/Tests/Tutorial/Step2/tutorial.cxx b/Tests/Tutorial/Step2/tutorial.cxx index c27da0b..af88dad 100644 --- a/Tests/Tutorial/Step2/tutorial.cxx +++ b/Tests/Tutorial/Step2/tutorial.cxx @@ -1,8 +1,8 @@ // A simple program that computes the square root of a number +#include "TutorialConfig.h" +#include <math.h> #include <stdio.h> #include <stdlib.h> -#include <math.h> -#include "TutorialConfig.h" #ifdef USE_MYMATH #include "MathFunctions.h" diff --git a/Tests/Tutorial/Step3/MathFunctions/mysqrt.cxx b/Tests/Tutorial/Step3/MathFunctions/mysqrt.cxx index 62523f6..0f7c106 100644 --- a/Tests/Tutorial/Step3/MathFunctions/mysqrt.cxx +++ b/Tests/Tutorial/Step3/MathFunctions/mysqrt.cxx @@ -1,5 +1,5 @@ -#include <stdio.h> #include "MathFunctions.h" +#include <stdio.h> // a hack square root calculation using simple operations double mysqrt(double x) diff --git a/Tests/Tutorial/Step3/tutorial.cxx b/Tests/Tutorial/Step3/tutorial.cxx index c27da0b..af88dad 100644 --- a/Tests/Tutorial/Step3/tutorial.cxx +++ b/Tests/Tutorial/Step3/tutorial.cxx @@ -1,8 +1,8 @@ // A simple program that computes the square root of a number +#include "TutorialConfig.h" +#include <math.h> #include <stdio.h> #include <stdlib.h> -#include <math.h> -#include "TutorialConfig.h" #ifdef USE_MYMATH #include "MathFunctions.h" diff --git a/Tests/Tutorial/Step4/MathFunctions/mysqrt.cxx b/Tests/Tutorial/Step4/MathFunctions/mysqrt.cxx index d081d11..bbd08fa 100644 --- a/Tests/Tutorial/Step4/MathFunctions/mysqrt.cxx +++ b/Tests/Tutorial/Step4/MathFunctions/mysqrt.cxx @@ -1,6 +1,6 @@ -#include <stdio.h> #include "MathFunctions.h" #include "TutorialConfig.h" +#include <stdio.h> #include <math.h> diff --git a/Tests/Tutorial/Step4/tutorial.cxx b/Tests/Tutorial/Step4/tutorial.cxx index c27da0b..af88dad 100644 --- a/Tests/Tutorial/Step4/tutorial.cxx +++ b/Tests/Tutorial/Step4/tutorial.cxx @@ -1,8 +1,8 @@ // A simple program that computes the square root of a number +#include "TutorialConfig.h" +#include <math.h> #include <stdio.h> #include <stdlib.h> -#include <math.h> -#include "TutorialConfig.h" #ifdef USE_MYMATH #include "MathFunctions.h" diff --git a/Tests/Tutorial/Step5/MathFunctions/MakeTable.cxx b/Tests/Tutorial/Step5/MathFunctions/MakeTable.cxx index ef98d5f..a23feeb 100644 --- a/Tests/Tutorial/Step5/MathFunctions/MakeTable.cxx +++ b/Tests/Tutorial/Step5/MathFunctions/MakeTable.cxx @@ -1,6 +1,6 @@ // A simple program that builds a sqrt table -#include <stdio.h> #include <math.h> +#include <stdio.h> int main (int argc, char *argv[]) { diff --git a/Tests/Tutorial/Step5/MathFunctions/mysqrt.cxx b/Tests/Tutorial/Step5/MathFunctions/mysqrt.cxx index 1f9b887..a488af6 100644 --- a/Tests/Tutorial/Step5/MathFunctions/mysqrt.cxx +++ b/Tests/Tutorial/Step5/MathFunctions/mysqrt.cxx @@ -1,6 +1,6 @@ -#include <stdio.h> #include "MathFunctions.h" #include "TutorialConfig.h" +#include <stdio.h> // include the generated table #include "Table.h" diff --git a/Tests/Tutorial/Step5/tutorial.cxx b/Tests/Tutorial/Step5/tutorial.cxx index c27da0b..af88dad 100644 --- a/Tests/Tutorial/Step5/tutorial.cxx +++ b/Tests/Tutorial/Step5/tutorial.cxx @@ -1,8 +1,8 @@ // A simple program that computes the square root of a number +#include "TutorialConfig.h" +#include <math.h> #include <stdio.h> #include <stdlib.h> -#include <math.h> -#include "TutorialConfig.h" #ifdef USE_MYMATH #include "MathFunctions.h" diff --git a/Tests/Tutorial/Step6/MathFunctions/MakeTable.cxx b/Tests/Tutorial/Step6/MathFunctions/MakeTable.cxx index ef98d5f..a23feeb 100644 --- a/Tests/Tutorial/Step6/MathFunctions/MakeTable.cxx +++ b/Tests/Tutorial/Step6/MathFunctions/MakeTable.cxx @@ -1,6 +1,6 @@ // A simple program that builds a sqrt table -#include <stdio.h> #include <math.h> +#include <stdio.h> int main (int argc, char *argv[]) { diff --git a/Tests/Tutorial/Step6/MathFunctions/mysqrt.cxx b/Tests/Tutorial/Step6/MathFunctions/mysqrt.cxx index 1f9b887..a488af6 100644 --- a/Tests/Tutorial/Step6/MathFunctions/mysqrt.cxx +++ b/Tests/Tutorial/Step6/MathFunctions/mysqrt.cxx @@ -1,6 +1,6 @@ -#include <stdio.h> #include "MathFunctions.h" #include "TutorialConfig.h" +#include <stdio.h> // include the generated table #include "Table.h" diff --git a/Tests/Tutorial/Step6/tutorial.cxx b/Tests/Tutorial/Step6/tutorial.cxx index c27da0b..af88dad 100644 --- a/Tests/Tutorial/Step6/tutorial.cxx +++ b/Tests/Tutorial/Step6/tutorial.cxx @@ -1,8 +1,8 @@ // A simple program that computes the square root of a number +#include "TutorialConfig.h" +#include <math.h> #include <stdio.h> #include <stdlib.h> -#include <math.h> -#include "TutorialConfig.h" #ifdef USE_MYMATH #include "MathFunctions.h" diff --git a/Tests/Tutorial/Step7/MathFunctions/MakeTable.cxx b/Tests/Tutorial/Step7/MathFunctions/MakeTable.cxx index ef98d5f..a23feeb 100644 --- a/Tests/Tutorial/Step7/MathFunctions/MakeTable.cxx +++ b/Tests/Tutorial/Step7/MathFunctions/MakeTable.cxx @@ -1,6 +1,6 @@ // A simple program that builds a sqrt table -#include <stdio.h> #include <math.h> +#include <stdio.h> int main (int argc, char *argv[]) { diff --git a/Tests/Tutorial/Step7/MathFunctions/mysqrt.cxx b/Tests/Tutorial/Step7/MathFunctions/mysqrt.cxx index 1f9b887..a488af6 100644 --- a/Tests/Tutorial/Step7/MathFunctions/mysqrt.cxx +++ b/Tests/Tutorial/Step7/MathFunctions/mysqrt.cxx @@ -1,6 +1,6 @@ -#include <stdio.h> #include "MathFunctions.h" #include "TutorialConfig.h" +#include <stdio.h> // include the generated table #include "Table.h" diff --git a/Tests/Tutorial/Step7/tutorial.cxx b/Tests/Tutorial/Step7/tutorial.cxx index c27da0b..af88dad 100644 --- a/Tests/Tutorial/Step7/tutorial.cxx +++ b/Tests/Tutorial/Step7/tutorial.cxx @@ -1,8 +1,8 @@ // A simple program that computes the square root of a number +#include "TutorialConfig.h" +#include <math.h> #include <stdio.h> #include <stdlib.h> -#include <math.h> -#include "TutorialConfig.h" #ifdef USE_MYMATH #include "MathFunctions.h" diff --git a/Tests/VSResource/main.cpp b/Tests/VSResource/main.cpp index ccf700c..f8372b7 100644 --- a/Tests/VSResource/main.cpp +++ b/Tests/VSResource/main.cpp @@ -1,5 +1,5 @@ -#include <windows.h> #include <stdio.h> +#include <windows.h> extern int lib(); diff --git a/Tests/VSWinStorePhone/Direct3DApp1/Direct3DApp1.cpp b/Tests/VSWinStorePhone/Direct3DApp1/Direct3DApp1.cpp index 3cfc589..41ca124 100644 --- a/Tests/VSWinStorePhone/Direct3DApp1/Direct3DApp1.cpp +++ b/Tests/VSWinStorePhone/Direct3DApp1/Direct3DApp1.cpp @@ -1,7 +1,7 @@ #include "pch.h" -#include "Direct3DApp1.h" #include "BasicTimer.h" +#include "Direct3DApp1.h" using namespace Windows::ApplicationModel; using namespace Windows::ApplicationModel::Core; diff --git a/Tests/VSWinStorePhone/Direct3DApp1/DirectXHelper.h b/Tests/VSWinStorePhone/Direct3DApp1/DirectXHelper.h index d411a9b..3434ba9 100644 --- a/Tests/VSWinStorePhone/Direct3DApp1/DirectXHelper.h +++ b/Tests/VSWinStorePhone/Direct3DApp1/DirectXHelper.h @@ -1,8 +1,8 @@ #pragma once -#include <wrl/client.h> #include <ppl.h> #include <ppltasks.h> +#include <wrl/client.h> namespace DX { diff --git a/Tests/VSWinStorePhone/Direct3DApp1/pch.h b/Tests/VSWinStorePhone/Direct3DApp1/pch.h index 2302e66..78ebea3 100644 --- a/Tests/VSWinStorePhone/Direct3DApp1/pch.h +++ b/Tests/VSWinStorePhone/Direct3DApp1/pch.h @@ -1,7 +1,7 @@ #pragma once -#include <wrl/client.h> -#include <d3d11_1.h> #include <DirectXMath.h> -#include <memory> #include <agile.h> +#include <d3d11_1.h> +#include <memory> +#include <wrl/client.h> diff --git a/Tests/Wrapping/qtwrappingmain.cxx b/Tests/Wrapping/qtwrappingmain.cxx index fabecfc..55c7952 100644 --- a/Tests/Wrapping/qtwrappingmain.cxx +++ b/Tests/Wrapping/qtwrappingmain.cxx @@ -1,9 +1,9 @@ -#include <qapplication.h> #include "qtwrapping.h" +#include <qapplication.h> #ifndef _WIN32 -# 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 f2b8bdd..27ab843 100644 --- a/Tests/X11/HelloWorldX11.cxx +++ b/Tests/X11/HelloWorldX11.cxx @@ -19,8 +19,8 @@ /* include the X library headers */ #include <X11/Xlib.h> -#include <X11/Xutil.h> #include <X11/Xos.h> +#include <X11/Xutil.h> class Main { |