Commit Graph

15 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
Rolf Eike Beer 3a71d34cf3 Use CMAKE_SYSTEM_NAME instead of CMAKE_SYSTEM where sufficient 2014-04-14 18:17:18 +02:00
Kitware Robot 9db3116226 Remove CMake-language block-end command arguments
Ancient versions of CMake required else(), endif(), and similar block
termination commands to have arguments matching the command starting the
block.  This is no longer the preferred style.

Run the following shell code:

for c in else endif endforeach endfunction endmacro endwhile; do
    echo 's/\b'"$c"'\(\s*\)(.\+)/'"$c"'\1()/'
done >convert.sed &&
git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' '*CMakeLists.txt' |
egrep -z -v '^(Utilities/cm|Source/kwsys/)' |
egrep -z -v 'Tests/CMakeTests/While-Endwhile-' |
xargs -0 sed -i -f convert.sed &&
rm convert.sed
2012-08-13 14:19:16 -04:00
Kitware Robot 77543bde41 Convert CMake-language commands to lower case
Ancient CMake versions required upper-case commands.  Later command
names became case-insensitive.  Now the preferred style is lower-case.

Run the following shell code:

cmake --help-command-list |
grep -v "cmake version" |
while read c; do
    echo 's/\b'"$(echo $c | tr '[:lower:]' '[:upper:]')"'\(\s*\)(/'"$c"'\1(/g'
done >convert.sed &&
git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' '*CMakeLists.txt' |
egrep -z -v '^(Utilities/cm|Source/kwsys/)' |
xargs -0 sed -i -f convert.sed &&
rm convert.sed
2012-08-13 14:19:16 -04:00
Kitware Robot 7bbaa4283d Remove trailing whitespace from most CMake and C/C++ code
Our Git commit hooks disallow modification or addition of lines with
trailing whitespace.  Wipe out all remnants of trailing whitespace
everywhere except third-party code.

Run the following shell code:

git ls-files -z -- \
 bootstrap doxygen.config '*.readme' \
 '*.c' '*.cmake' '*.cpp' '*.cxx' \
 '*.el' '*.f' '*.f90' '*.h' '*.in' '*.in.l' '*.java' \
 '*.mm' '*.pike' '*.py' '*.txt' '*.vim' |
egrep -z -v '^(Utilities/cm|Source/(kwsys|CursesDialog/form)/)' |
egrep -z -v '^(Modules/CPack\..*\.in)' |
xargs -0 sed -i 's/ \+$//'
2012-08-13 14:18:39 -04:00
Brad King 19cb2ca47f Disable SubDirSpaces parens with GNU Make 3.82 (#11654)
GNU Make 3.82 incorrectly parses make dependencies involving parentheses
in path names.  See related upstream issue:

  http://savannah.gnu.org/bugs/?30612

Skip testing the ()-named subdirectory.
2011-01-11 10:01:30 -05:00
Ken Martin ce8810c4e7 ENH: preclean some warnings 2008-03-25 11:27:18 -04:00
Bill Hoffman 73818126f3 ENH: watcom wmake can not handle () in the path with cd command 2007-02-27 15:11:47 -05:00
Brad King cca4801fa7 COMP: Disable rpath with spaces on some systems. 2007-02-26 10:46:19 -05:00
Bill Hoffman d93265b8fa ENH: add a comment 2007-02-22 17:15:13 -05:00
Bill Hoffman d51fef92b4 ENH: show make results on the dashboard 2007-02-22 15:43:35 -05:00
Bill Hoffman 5647e6e254 ENH: fix parens in the path with spaces in the path 2007-02-21 21:24:17 -05:00
Ken Martin 245e7c3482 ENH: make the test really test targets with spaces 2007-02-19 14:48:04 -05:00
Ken Martin 3e82b9ee51 ENH: added used sources with a path that has spaces 2007-02-19 14:26:50 -05:00
Ken Martin 83b5890a2f ENH: new test for spaces in the tree structure 2007-02-19 12:23:37 -05:00