Commit Graph

5 Commits

Author SHA1 Message Date
Brad King e1c7747253 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>
2016-04-29 13:58:54 -04:00
Brad King e4114ee9e9 Tests/BuildDepends: Make 3-second delay more robust
Use "cmake -E sleep 3" instead of execute_process with a TIMEOUT of 3.
This avoids using a busy loop or depending on a timeout to kill it.
2014-05-19 10:51:16 -04:00
Alexander Neundorf 92270d5bf8 COMP: fix test, in some cases stdout from bar was not captured correctly,
probably because the process was killed before the fflush() worked because
the busy loop blocked the processor (failing midworld test)

Alex
2007-06-13 16:26:50 -04:00
Brad King c288da754a BUG: Target names in the COMMAND part of a custom command should not create a file-level dependency that forces the command to rerun when the executable target rebuilds, but the target-level dependency should still be created. Target names in a DEPENDS should do both a target-level and file-level dependency. Updated the BuildDepends test to check that this works. 2007-05-23 13:27:00 -04:00
Andy Cedilnik 9338803697 BUG: fix test for hp move to c++ to avoid ansi issues and produce a message if the compile fails, (really checked in by Bill H.) 2007-05-16 07:55:00 -04:00