1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-05-09 14:57:08 +08:00

15 Commits

Author SHA1 Message Date
Brad King
e641442149 clang-format.bash: update to clang-format-18
The `.clang-format` configuration needs no changes to make the
version 18 format close to what version 15 produced before.

Issue: #26123
2025-01-23 11:42:52 -05:00
Brad King
6739d57948 clang-format.bash: update to clang-format-15
The `.clang-format` configuration needs no changes to make the
version 15 format close to what version 6.0 produced before.

Issue: #24315
2023-01-18 16:20:02 -05:00
Brad King
48639aa8fc clang-format.bash: Use generic clang-format attribute
Specify the clang-format version in the attribute value instead of its
name.

Issue: #24315
2023-01-18 11:48:49 -05:00
Brad King
523c443d13 clang-format.bash: update to clang-format-6.0
Update `.clang-format` with configuration to make the 6.0 format as
close as possible to what 3.8 produced before.  Then revise the style:

* Indent preprocessor directives (a feature new since 3.8)
* Add a newline and indentation before inheritance `:` and `,`

Rename the Git attribute identifying the format to include the
clang-format version number: `format.clang-format-6.0`.  This will aid
external infrastructure in knowing what version of the tool to run.
2018-06-01 09:52:02 -04:00
Brad King
8cfc45f6bd clang-format: Explicitly require version 3.8 of the tool
Versions of clang-format newer than 3.8 produce different output.
Our source code guide says that version 3.8 exactly must be used.
Update the comment in our `.clang-format` config file accordingly.
Add a check to our formatting script to verify the version.
Also update its tool search to look for the explicitly-named
3.8 variant first.
2018-05-18 09:19:10 -04:00
Matthias Maennich
574d694337 clang-format.bash: minor fixes to support MacOS
- sed on Mac does not support embedded sed statements, hence eliminating
  the non-matches via grep

- xargs on Mac does not support -d, but does support -0, hence replacing
2017-10-03 22:16:07 +02:00
Brad King
16d495253b clang-format.bash: Fix error message when clang-format is not found
Do not refer to a variable we just determined is empty to get the
name of the tool for the error message.  Just hard-code the name.
2017-07-05 12:55:03 -04:00
Brad King
d5f39a56a4 clang-format.bash: Use Git attributes to mark files for formatting 2017-02-22 16:59:26 -05:00
Brad King
592e3d2f96 clang-format.bash: Format CUDA source files too
Add `.clang-format` configuration files for Cuda test directories that
use `Standard: Cpp11`.  Otherwise clang-format splits the triple angle
brackets used for CUDA kernels.
2017-02-14 10:20:23 -05:00
Brad King
3216e94cef Remove unused cm_sha2 infrastructure
All clients of `cm_sha2` have been ported to `cmCryptoHash`, which now
uses librhash internally.
2016-11-10 08:29:38 -05:00
Alex Wang
68e7250a9f Features: Fix cxx_right_angle_brackets compiler feature test
The clang-format pass in commit v3.6.0-rc1~54^2~1 (Revise C++ coding
style using clang-format, 2016-05-16) changed the template right angle
brackets from `>>` to `> >`, which defeats the purpose of this test.
Change it back and exclude this content from formatting.
2016-10-25 13:38:12 -04:00
Brad King
fc3dab0ea9 Tests: Port GenerateExportHeader test to RunCMake infrastructure
This will allow build failure cases to be added later.
2016-09-05 09:45:42 -04:00
Brad King
a77d597b86 clang-format.bash: Fix filter-branch example documentation
Inside `git filter-branch --tree-filter` we must format all tracked
files because formatting of the tree for each commit is independent
from earlier commits.
2016-06-30 16:11:36 -04:00
Brad King
2f2117e7d4 clang-format.bash: Limit formatting to files selected by options
Now that our one-shot clang-format run is complete we rarely need to
filter the entire tree anymore.  Filter nothing if no options are given
and just print the usage message.  Offer options to specify selection of
some set of files from Git as needed for various workflows.
2016-05-20 13:57:25 -04:00
Brad King
bf451d9ff9 Add a script to run clang-format on the entire source tree
List all sources in version control and filter out those that we should
not format for various reasons.  Then run the clang-format tool to do an
in-place update.
2016-05-16 16:04:46 -04:00