1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-10-19 11:18:40 +08:00
Commit Graph

5 Commits

Author SHA1 Message Date
Kitware Robot
1772622772 LICENSE: Replace references to Copyright.txt with LICENSE.rst
```
git grep -lz 'Copyright.txt or https://cmake.org/licensing ' |
  while IFS= read -r -d $'\0' f ; do
    sed -i '/Copyright.txt or https:\/\/cmake.org\/licensing / {
              s/Copyright.txt/LICENSE.rst/
            }' "$f" ; done
```
2025-03-03 10:43:35 -05: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
Sumit Bhardwaj
782d7387d5 Implement cm::static_reference_cast by declval
Previously, cm::static_reference_cast used invoke_result_t and took the
address of O::get. This is not in complete conformance with standard.

This MR changes the implementation to use std::declval<O>.get() which is
always well-defined.
2020-07-04 11:03:46 -07:00
Marc Chevrier
b9a3f2e7e2 STL Support: enhance behavior of cm::dynamic_reference_cast
Ensure cm::dynamic_reference_cast has same behavior as dynamic_cast
on reference: raise std::bad_cast if dynamic_cast is not possible.
2020-01-17 11:09:53 +01:00
Marc Chevrier
fc3b4caa2e Memory management: cast functions for managed pointers 2019-11-27 16:03:04 +01:00