summaryrefslogtreecommitdiffstats
path: root/Modules/FindDoxygen.cmake
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-02-15 18:08:12 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-02-15 19:46:25 (GMT)
commitcebeed248606ba92597b7e32a5b0be1f474f7a91 (patch)
tree93c29d507ff241ae5669233eccae7d9ca76270cd /Modules/FindDoxygen.cmake
parent3cfe7a4ca876c496f9b491e4175fd1c9be24f3d7 (diff)
downloadCMake-cebeed248606ba92597b7e32a5b0be1f474f7a91.zip
CMake-cebeed248606ba92597b7e32a5b0be1f474f7a91.tar.gz
CMake-cebeed248606ba92597b7e32a5b0be1f474f7a91.tar.bz2
cmAlgorithms: Add cmRemoveDuplicates algorithm.
Start by creating a vector to hold a unique values of the input range. We expect that in most cases, there will be relatively few duplicates, so reserving enough memory for a complete copy is worthwhile. Unlike a solution involving a std::set, this algorithm allocates all the memory it needs in one go and in one place, so it is more cache friendly. Populate the unique copy with a lower_bound insert algorithm and record the indices of duplicates. This is the same complexity as the std::set insert algorithm, but without the need to allocate memory on the heap and other disadvantages of std::set. Remove the duplicates with the cmRemoveIndices algorithm.
Diffstat (limited to 'Modules/FindDoxygen.cmake')
0 files changed, 0 insertions, 0 deletions