| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
Use an iterator-based implementation with range-based one simply
deferring to it.
Also optimize a little by storing iterators to unique values to prevent
creating value copies.
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| | |
6fc3382944 Update logic for sysroot in detected implicit include directories
2ad14ef4ea cmAlgorithms: Add cmHasPrefix to match existing cmHasSuffix
557b2d6e65 Fix regression in -I/usr/include exclusion logic
017598a444 macOS: Fix addition of <sdk>/usr/include to default implicit include dirs
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2957
|
| | |
|
|/
|
|
|
|
|
| |
In rvalue context these functions have to return cmRange
by copy instead of reference to temporary object
It allows to use ranged-for over cmMakeRange(xxx).advance(yyy)
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 6.0.
* 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.
|
|
|
|
|
|
| |
Use a hash table instead of a sorted vector to track entries.
Co-authored-by: Chu Qinghao <me@qinghao1.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
std::{begin,end} are part of C++11, std::{cbegin,cend} are part of C++14
and an standard compliant implementation has been introduced within the
'cm' namespace: cm::{cbegin,cend}.
std::size is only part of C++17, hence exposing a compliant implementation
within namespace cm (cm::size).
where possible, the standard implementations are reused.
|
|
|
|
| |
Use a lambda instead now that we require C++11.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Automate with:
git grep -l '#include <cm_' -- Source \
| xargs sed -i 's/#include <\(cm_.*\)>/#include "\1"/g'
git grep -l '#include <cmsys/' -- Source \
| xargs sed -i 's/#include <\(cmsys\/.*\)>/#include "\1"/g'
git grep -l '#include <cm[A-Z]' -- Source \
| xargs sed -i 's/#include <\(cm[A-Z].*\)>/#include "\1"/g'
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Per-source copyright/license notice headers that spell out copyright holder
names and years are hard to maintain and often out-of-date or plain wrong.
Precise contributor information is already maintained automatically by the
version control tool. Ultimately it is the receiver of a file who is
responsible for determining its licensing status, and per-source notices are
merely a convenience. Therefore it is simpler and more accurate for
each source to have a generic notice of the license name and references to
more detailed information on copyright holders and full license terms.
Our `Copyright.txt` file now contains a list of Contributors whose names
appeared source-level copyright notices. It also references version control
history for more precise information. Therefore we no longer need to spell
out the list of Contributors in each source file notice.
Replace CMake per-source copyright/license notice headers with a short
description of the license and links to `Copyright.txt` and online information
available from "https://cmake.org/licensing". The online URL also handles
cases of modules being copied out of our source into other projects, so we
can drop our notices about replacing links with full license text.
Run the `Utilities/Scripts/filter-notices.bash` script to perform the majority
of the replacements mechanically. Manually fix up shebang lines and trailing
newlines in a few files. Manually update the notices in a few files that the
script does not handle.
|
| |
|
|
|
|
|
|
| |
Add a `CMAKE_NINJA_OUTPUT_PATH_PREFIX` variable. When it is set, CMake
generates a `build.ninja` file suitable for embedding into another ninja
project potentially generated by an alien generator.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Run the `Utilities/Scripts/clang-format.bash` script to update
all our C++ code to a new style defined by `.clang-format`.
Use `clang-format` version 3.8.
* 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.
|
| |
|
|
|
|
|
|
|
|
|
| |
When the first argument passed is a std::string, we need to take it
by const&, otherwise we copy the string and trigger a temporary
allocation. This patch removes a few 10k temporary allocations when
running the CMake daemon on the KDevelop build dir.
This hotspot was found with heaptrack.
|
|
|
|
| |
KWIML no longer uses a configured prefix.
|
| |
|
| |
|
| |
|
| |
|
|\
| |
| |
| |
| |
| |
| | |
8701a3f4 cmRemoveDuplicates: Partially specialize the API for pointer types.
eec7091d cmRemoveDuplicates: Type-parameterize all uniq-operations
7cbafa8c cmRemoveDuplicates: Store unique iterators instead of values.
|
| |
| |
| |
| |
| |
| |
| |
| | |
If de-duplicating a container of pointers, there is no need to
store iterators to them, as that is just more 'pointer chasing'.
Store the pointers themselves and use API which compares the pointers
in the specialization.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
There is no need to copy all of the values in the container in
order to determine uniqueness. Iterators can be stored instead
and can be used with standard algorithms with custom comparison
methods.
This also means that we use less space in case the value_type size
is greater than sizeof(iterator). That is common for std::string
which may require up to 32 bytes (libstdc++ 5.0 and MSVC at least).
With libstdc++ 4.9 and older, std::string is 8 bytes, so we likely
don't gain anything here.
Inspired-by: Daniel Pfeifer <daniel@pfeifer-mail.de>
|
|\ \
| |/
| |
| |
| |
| |
| | |
95dd238f cmRemoveDuplicates: Fix iterator -> const_iterator.
4448f175 cmInstalledFile: Move Property implementation out of line.
7916d7ba Include cmAlgorithms where it is used.
|
| | |
|
|/
|
|
|
| |
Avoid derefencing the iterator and segfaulting if the range
is empty.
|
| |
|
| |
|
|
|
|
|
| |
Avoid the algorithm of 'Schlemiel the painter' in the case of
iterators which are not RandomAccess.
|
|
|
|
| |
Require only forward iterators from the range.
|
|
|
|
|
| |
Remove the accidental requirement that the input range must be a
std::vector.
|
| |
|
|
|
|
| |
cmRotate already requires only FwdIter.
|
|
|
|
|
| |
size() is already used by cmRemoveDuplicates, which is designed to
accept a cmRange.
|
|
|
|
| |
It may be any range, not only a container.
|
| |
|
|
|
|
| |
Use it to implement list(REVERSE).
|
| |
|
| |
|