summaryrefslogtreecommitdiffstats
path: root/Source/cmListCommand.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Port to static cmPolicies API.Stephen Kelly2015-05-041-4/+2
|
* Include cmAlgorithms where it is used.Stephen Kelly2015-03-101-0/+1
|
* cmAlgorithms: Add cmReverseRange adaptor.Stephen Kelly2015-02-201-2/+1
| | | | Use it to implement list(REVERSE).
* cmListCommand: Move size variable out of loop.Stephen Kelly2015-02-171-6/+6
| | | | Re-use it where possible in two instances.
* cmListCommand: Avoid needlessly erasing from vectors.Stephen Kelly2015-02-151-17/+21
| | | | | | The entire vector will be destroyed at once at the end of the scope, and the remove algorithms already give us the end of the range of interesting values, so just use those sentinals.
* cmListCommand: Replace remove duplicates loop with algorithm.Stephen Kelly2015-02-151-18/+3
|
* cmListCommand: Implement REMOVE_ITEM in terms of cmRemoveMatching.Stephen Kelly2015-02-151-16/+6
|
* cmListCommand: Replace joining loop with cmJoin algorithm.Stephen Kelly2015-02-151-8/+2
|
* cmListCommand: Use cmRemoveIndices for REMOVE_AT subcommand.Stephen Kelly2015-02-151-16/+9
| | | | | Avoid repeatedly looping over the indices to process elements (even without breaking out of the loop when the element is found).
* cmListCommand: Convert loop to find algorithm.Stephen Kelly2015-02-151-12/+1
|
* cmListCommand: Implement REVERSE subcommand with std::reverse.Stephen Kelly2015-02-151-9/+2
|
* cmListCommand: Use std::find algorithm for FIND subcommand.Stephen Kelly2015-02-151-11/+7
| | | | | | Use a ostringstream to account for the input being a variable of type size_t as a result of using std::distance. There is no single format string which portably accepts a size_t.
* Convert loops to cmJoin algorithm with cmRange.Stephen Kelly2015-02-111-8/+1
|
* Convert loops populating maybe-empty content into the common pattern.Stephen Kelly2015-02-111-4/+8
|
* Merge topic 'consistent-empty-method'Brad King2015-01-191-5/+5
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | 5f69314e Replace foo.length() pattern with !foo.empty(). fd0c036c Replace 'foo.length() >= 1' pattern with !foo.empty() f09fde2d Replace 'foo.length() > 0' pattern with !foo.empty(). 86b5bdfa Replace 'foo.length() == 0' pattern with foo.empty(). fd7b3712 Replace foo.size() pattern with !foo.empty(). aa773035 Replace !foo.size() pattern with foo.empty(). 64592633 cmListCommand: Use empty() and expand whitespace. 607e1938 Replace 'foo.size() != 0' pattern with !foo.empty(). 930bd478 Replace 'foo.size() == 0' pattern with foo.empty(). d92887ef Replace 'foo.size() > 0' pattern with !foo.empty().
| * Replace foo.size() pattern with !foo.empty().Stephen Kelly2015-01-181-1/+1
| |
| * cmListCommand: Use empty() and expand whitespace.Stephen Kelly2015-01-181-1/+1
| |
| * Replace 'foo.size() != 0' pattern with !foo.empty().Stephen Kelly2015-01-181-1/+1
| |
| * Replace 'foo.size() == 0' pattern with foo.empty().Stephen Kelly2015-01-181-2/+2
| |
* | cmListCommand: Replace loop with member algorithm.Stephen Kelly2015-01-181-7/+3
|/
* Merge topic 'join-algorithm'Brad King2015-01-121-27/+3
|\ | | | | | | | | | | | | 55a73e6b Use the cmJoin algorithm where possible. 8dc8d756 cmStandardIncludes: Add a join algorithm for string containers. b5813cee cmInstallCommand: Remove unused variable.
| * Use the cmJoin algorithm where possible.Stephen Kelly2015-01-081-27/+3
| |
* | Port all cmOStringStream to std::ostringstream.Stephen Kelly2015-01-111-4/+4
|/ | | | All compilers hosting CMake support the std class.
* Remove some c_str() calls.Stephen Kelly2014-03-111-28/+28
| | | | | | Use the clang RemoveCStrCalls tool to automatically migrate the code. This was only run on linux, so does not have any positive or negative effect on other platforms.
* stringapi: Use strings for variable namesBen Boeckel2014-03-081-6/+4
| | | | Variable names are always generated by CMake and should never be NULL.
* Consolidate list() argument count testingPetr Kmoch2012-11-021-26/+10
| | | | Move test for list() argument count >= 2 to InitialPass().
* list command: error on too many argumentsRolf Eike Beer2012-08-151-0/+18
| | | | | SORT, REVERSE, and REMOVE_DUPLICATES can only operate on exactly one argument. Until now all other arguments were silently ignored. Give an error instead.
* Remove trailing whitespace from most CMake and C/C++ codeKitware Robot2012-08-131-4/+4
| | | | | | | | | | | | | | | | | Our Git commit hooks disallow modification or addition of lines with trailing whitespace. Wipe out all remnants of trailing whitespace everywhere except third-party code. Run the following shell code: git ls-files -z -- \ bootstrap doxygen.config '*.readme' \ '*.c' '*.cmake' '*.cpp' '*.cxx' \ '*.el' '*.f' '*.f90' '*.h' '*.in' '*.in.l' '*.java' \ '*.mm' '*.pike' '*.py' '*.txt' '*.vim' | egrep -z -v '^(Utilities/cm|Source/(kwsys|CursesDialog/form)/)' | egrep -z -v '^(Modules/CPack\..*\.in)' | xargs -0 sed -i 's/ \+$//'
* list: Handle errors on empty lists more gracefully (#13138)Brad King2012-04-171-1/+14
| | | | | | | | | | | | Since commit ed1ea24c (Fix INSERT to allow inserting to empty list, 2006-05-15) the list command allows insertion into an empty list at index 0. Fix rejection of insertion at non-zero (negative) indices to present an error message instead of crashing. While at it, fix the error message of the GET and REMOVE_AT operations when the list is empty to not present a bogus allowed range. Add a "RunCMake.list" test to cover failure cases on empty lists.
* Convert CMake to OSI-approved BSD LicenseBrad King2009-09-281-14/+9
| | | | | | | This converts the CMake license to a pure 3-clause OSI-approved BSD License. We drop the previous license clause requiring modified versions to be plainly marked. We also update the CMake copyright to cover the full development time range.
* BUG: fix failing testBill Hoffman2008-05-201-3/+4
|
* BUG: fix bugs in new style list command that handles empty stuffBill Hoffman2008-05-201-57/+24
|
* ENH: fix sort to work with CMP0007Bill Hoffman2008-05-071-0/+6
|
* ENH: handle empty lists correctlyBill Hoffman2008-04-231-0/+5
|
* ENH: fix list command with empty elementsBill Hoffman2008-04-211-2/+56
|
* STYLE: yeah yeah.Sebastien Barre2008-03-141-2/+4
|
* ENH: add REMOVE_DUPLICATES subcommand to LIST command (and test). Remove ↵Sebastien Barre2008-03-121-0/+66
| | | | duplicates from a list (keep the ordering)
* ENH: add return and break support to cmake, also change basic command ↵Ken Martin2008-01-231-1/+2
| | | | invocation signature to be able to return extra informaiton via the cmExecutionStatus class
* ENH: Allow LIST(APPEND) command to append nothing.Brad King2008-01-161-2/+8
|
* ENH: change LIST(CONTAINS ...) TO LIST(FIND ...), which returns the indexAlexander Neundorf2007-08-151-7/+11
| | | | | | | | and which is more useful, because then you can also access the item behind the one you were looking, useful for writing macros with optional keywords with parameters Alex
* ENH: add LIST(CONTAINS ...) patch from "Miguel A. Figueroa-Villanueva, ↵Alexander Neundorf2007-07-121-0/+37
| | | | | | | | miguelf (AT) ieee.org added tests for LIST(CONTAINS, SORT, REVERSE) Alex
* STYLE: Fixed line-too-long.Brad King2006-08-261-1/+1
|
* BUG: Add missing APIAndy Cedilnik2006-08-221-0/+78
|
* BUG: Fix error messages and fix remove item to actually remove all instances ↵Andy Cedilnik2006-08-221-3/+8
| | | | of the item
* STYLE: Fix styleAndy Cedilnik2006-05-161-11/+12
|
* ENH: Fix INSERT to allow inserting to empty listAndy Cedilnik2006-05-151-14/+17
|
* ENH: Change REMOVE and REMOVE_ITEM to REMOVE_AT and REMOVE_ITEMAndy Cedilnik2006-05-151-5/+5
|
* ENH: Remove some errors, fix append to work on nonexisting listsAndy Cedilnik2006-05-151-17/+15
|
* STYLE: fix line lengthKen Martin2006-05-121-5/+13
|
* ENH: Some documentation and add APPENDAndy Cedilnik2006-05-111-1/+1
|