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

7 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
Sean McBride
e2a4718d18 Source: Fix Clang -Wdeprecated warnings
Applied C++ 'rule of three'.
2021-10-15 11:23:12 -04:00
Marc Chevrier
b4c994f69c cmFileTime: Fix overflow on time computation
On Windows, time starting point is Januray, 1st of 1601.
So computing number of nanoseconds from this date exceeds 64bit
capabilities.
2020-11-23 15:03:25 +01:00
Kitware Robot
bdca8b01d2 Modernize: Use #pragma once in all header files
#pragma once is a widely supported compiler pragma, even though it is
not part of the C++ standard. Many of the issues keeping #pragma once
from being standardized (distributed filesystems, build farms, hard
links, etc.) do not apply to CMake - it is easy to build CMake on a
single machine. CMake also does not install any header files which can
be consumed by other projects (though cmCPluginAPI.h has been
deliberately omitted from this conversion in case anyone is still using
it.) Finally, #pragma once has been required to build CMake since at
least August 2017 (7f29bbe6 enabled server mode unconditionally, which
had been using #pragma once since September 2016 (b13d3e0d)). The fact
that we now require C++11 filters out old compilers, and it is unlikely
that there is a compiler which supports C++11 but does not support
#pragma once.
2020-09-03 09:30:21 -04:00
Regina Pfeifer
62e5f72289 clang-tidy: Replace typedef with using 2019-09-03 13:21:26 -04:00
Sebastian Holtermann
18c30786a9 cmFileTime: Make cmFileTime::Compare method const 2019-03-27 18:09:53 +01:00
Sebastian Holtermann
6f24c4e93f New cmFileTime class
The new cmFileTime class stores the file modification time as an OS independent
nanosecond count.  Its main use is to load and compare file modification times
in nanosecond and second resolution.
2019-03-18 15:09:10 +01:00