Commit Graph

16 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
Stephen Kelly 4959f3413c cmSourceFileLocation: Collapse full path for directory comparisons.
Otherwise Matches() ends up doing a comparison of
the directories

 /path/to/dir/subdir/..

and

 /path/to/dir

as strings and not matching where it should.
2014-03-31 23:18:43 +02:00
Marcin Wojdyr 84b49be8f0 Remove CMake multiline block-end command arguments
removing arguments omitted in 9db3116226
2012-08-15 16:50:29 -04: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 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
Alex Neundorf 9dbba1b464 Fix #12342: Add APPEND_STRING option to set_property()
set_property() has APPEND, which creates a list. E.g. when
appending to COMPILE_FLAGS a string is needed, not a list.
With the APPEND_STRING option the value is append as string,
not as list.

Alex
2011-07-15 20:57:33 +02:00
Brad King 819b0742c6 Test cache entry property "STRINGS"
The STRINGS property tells cmake-gui to create a drop-down selection
list.  This teaches the Properties test to set and verify its value.
2009-07-29 08:39:50 -04:00
Brad King e5e91d6179 ENH: Teach set/get_property about CACHE properties
This adds the CACHE option to set_property and get_property commands.
This allows full control over cache entry information, so advanced users
can tweak their project cache as desired.  The set_property command
allows only pre-defined CACHE properties to be set since others would
not persist anyway.
2009-03-10 11:10:59 -04:00
Ken Martin 16f1cc9b59 ENH: support unset of properties 2008-04-01 14:22:09 -04:00
Ken Martin ce8810c4e7 ENH: preclean some warnings 2008-03-25 11:27:18 -04:00
Brad King b459ec9f57 ENH: Updated DEFINE_PROPERTY command to be more extendible and more consistent with new SET_PROPERTY and GET_PROPERTY signatures. 2008-02-14 13:36:23 -05:00
Brad King 669db35aa4 ENH: Changed signature of GET_PROPERTY command to be more powerful and extendible. 2008-01-17 17:19:13 -05:00
Brad King b8357db11d ENH: Rename SET_PROPERITES command to SET_PROPERTY and give it a more powerful signature. 2008-01-17 15:54:49 -05:00
Brad King 8506938407 ENH: Added SOURCES property to targets. This is based on patch from issues #6137. 2007-12-17 10:12:22 -05:00
Ken Martin 509f1fb9cb ENH: some property cleanup and added GetProperty 2007-06-25 09:51:37 -04:00
Ken Martin 2f07e8e8f8 ENH: added new test for SourceFile objects and properties 2007-05-31 10:29:13 -04:00