Commit Graph

22 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
Marc Chevrier
4d48958965 enum_set enhancements, step 3 2025-02-14 10:38:34 +01:00
Marc Chevrier
77ab2446d4 enum_set enhancements, step 2
* remove support of size computation based on "magic" enum element because
  Oracle SunPro compilers crash on it.
* enhance handling of enum_set with explicit size.
2025-01-31 19:14:36 +01:00
Marc Chevrier
35dafcb5a1 cmext/enum_set: add various enhancements to increase usability 2025-01-29 16:42:52 +01:00
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
Kitware Robot
b2ba64add9 Revise C++ coding style using clang-format-18
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 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.

Fixes: #26123
2025-01-23 11:43:06 -05:00
Vito Gamberini
e0f9d81f09
STL: extend type_traits to deal with member pointers 2024-07-02 09:30:55 -04:00
Marc Chevrier
45f17e5a85 cmList: Add container conversion to string 2023-06-22 15:44:17 +02:00
Kyle Edwards
3b6c5efc08 cm::append: Add support for std::basic_string on SPARC/SunPro 2023-06-14 11:53:55 -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
Marc Chevrier
02c067dee5 cm::enum_set: fix various bugs 2022-08-22 16:25:53 +02:00
Marc Chevrier
f42d0c9322 cm::enum_set: fix compilation warning 2022-04-29 16:49:14 +02:00
Marc Chevrier
b13eef5a90 cm::enum_set: container that contains a set of unique enum values.
The enum must be an `enum class` with an unsigned integer as base type.
2022-04-27 19:40:40 +02: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
8d4a9ee398 Refactoring: rename "cm_static_string_view.hxx" as <cmext/string_view> 2020-04-30 09:53:27 +02:00
Marc Chevrier
aacd4e4a90 Refactoring: add cm::contains to <cmext/algorithm> 2020-04-17 10:00:03 +02:00
Marc Chevrier
73d1da4f86 Stl support: cm::append now supports any sequential container 2020-01-24 15:55:32 +01: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
04c2f67492 STL Support: extends type_traits for future developments 2020-01-17 11:09:48 +01:00
Marc Chevrier
a38d04c076 Refactoring: introduce header cmext/algorithm with append functions 2019-12-17 10:43:58 +01:00
Marc Chevrier
fc3b4caa2e Memory management: cast functions for managed pointers 2019-11-27 16:03:04 +01:00