1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-10-19 02:17:27 +08:00
Commit Graph

14 Commits

Author SHA1 Message Date
Kitware Robot
0b96ae1f6a Revise C++ coding style using clang-format with "east const"
Run the `clang-format.bash` script to update all our C and C++ code to a
new style defined by `.clang-format`, now with "east const" enforcement.
Use `clang-format` version 18.

* 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.

Issue: #26123
2025-01-23 13:09:50 -05:00
Alex Turbov
cc20644c71 testCommon.h: Introduce ASSERT_EQUAL(actual, expected) macro
Performs `==` on given arguments and print an error if they are
not equal also printing their values.

Both arguments must be printable to `std::ostream`!
2024-08-21 02:24:16 +04:00
Alex Turbov
0146fca12d CMakeLibTests: include testCommon.h for ASSERT_TRUE
And remove duplicate definitions.
2024-08-14 01:04:15 +04:00
Brad King
241ee252ce IWYU: Update for Debian 12 CI job
`include-what-you-use` diagnostics, in practice, are specific to
the environment's compiler and standard library.  Update includes
to satisfy IWYU for our CI job under Debian 12.
2023-07-28 09:14:08 -04:00
Kitware Robot
33abef7416 Revise C++ coding style using clang-format-15
Run the `clang-format.bash` script to update all our C and C++ code to a
new style defined by `.clang-format`.  Use `clang-format` version 15.

* 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.

Fixes: #24315
2023-01-18 16:20:47 -05:00
Sean McBride
1cf14f8c03 Source: fix many -Wmissing-prototypes warnings by marking functions static 2021-10-25 12:27:09 -04:00
Brad King
b6c4d93dcd clang-analyzer: Suppress warnings in intentional use-after-move cases 2021-06-03 14:59:55 -04:00
Kyle Edwards
0668120398 cm::optional: Fix move assignment 2020-10-21 14:23:43 -04:00
Kyle Edwards
7e1304c6e6 cm::optional: Add comparison operators 2020-09-07 08:50:09 -04:00
Kyle Edwards
c854e9eba5 Refactor: Add ASSERT_TRUE() macro to testOptional.cxx 2020-09-06 17:39:27 -04:00
Kyle Edwards
e8bd920df1 Tests: Fix reliance on undefined behavior of cm::optional
The test for cm::optional assumed that *opt would return a reference
to a non-constructed object if opt.has_value() is false. However, on
certain systems that build CMake with flags to harden the build,
this condition aborts rather than returning the invalid reference.
Fix this by getting the reference only when the cm::optional is
known to actually have a value.

Fixes: #19964
2019-11-13 13:56:22 -05:00
Kitware Robot
ed98209ddc Revise include order using clang-format-6.0
Run the `clang-format.bash` script to update our C and C++ code to a new
include order `.clang-format`.  Use `clang-format` version 6.0.
2019-10-01 12:26:36 -04:00
Marc Chevrier
c688b401d3 cmstd: Modernize CMake system headers
Provide a standardized way to handle the C++ "standard" headers
customized to be used with current CMake C++ standard constraints.
Offer under directory `cm` headers which can be used as direct
replacements of the standard ones.  For example:

    #include <cm/string_view>

can be used safely for CMake development in place of the `<string_view>`
standard header.

Fixes: #19491
2019-09-20 10:01:37 -04:00
Kyle Edwards
197c5e12ad Source: Add cm::optional 2019-08-23 08:43:35 -04:00