Commit Graph

8 Commits

Author SHA1 Message Date
Kitware Robot d9fd2f5402 Revise C++ coding style using clang-format
Run the `Utilities/Scripts/clang-format.bash` script to update
all our C++ code to a new style defined by `.clang-format`.
Use `clang-format` version 3.8.

* If you reached this commit for a line in `git blame`, re-run the blame
  operation starting at the parent of this commit to see older history
  for the content.

* See the parent commit for instructions to rebase a change across this
  style transition commit.
2016-05-16 16:05:19 -04:00
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 d25dbc9059 Tests/BundleTest: Drop use of ChangeLog.txt
The test just wants a source file from outside its tree.
Use README.rst instead.
2014-02-07 13:35:31 -05:00
Sean McBride 0037dcb6af Removed most usage of Carbon in favour of CoreFoundation 2011-01-31 18:21:20 -05:00
David Cole a54e97cf94 ENH: Add indirect dependency to Carbon and call a Carbon function from executable. This will allow detecting broken dependency chaining for '-framework blah' style lib dependencies. 2008-09-02 11:07:04 -04:00
Andy Cedilnik 24e6ffae36 BUG: If the source file specified is not in a source tree, do not use full path to the file 2006-07-05 16:27:44 -04:00
Andy Cedilnik 09b4b2d62c ENH: Check if files exist 2006-03-28 13:23:10 -05:00
Brad King 93c95f1cc5 BUG: Fixed installation of MacOSX Bundle executables and the corresponding install_name remapping support. Extended the BundleTest test to check that this all works. Part of these fixes required changing the signature of AppendDirectoryForConfig in all generators. It now accepts prefix and suffix strings to deal with whether leading or trailing slashes should be included with the configuration subdirectory. 2006-03-03 12:58:48 -05:00