summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/list
Commit message (Collapse)AuthorAgeFilesLines
* Clarify advice given by compatibility deprecation message for CMake < 3.10Brad King2024-11-141-2/+3
| | | | | | | | | Since commit 84db8506ff (Deprecate compatibility with CMake versions older than 3.10, 2024-10-03, v3.31.0-rc1~23^2) the `cmake_minimum_required` and `cmake_policy` commands warn if the project does not enable policies as of 3.10 or higher. Clarify the advice given in the warning message about how to update the version specification, particularly without actually requiring a newer minimum version of CMake.
* Deprecate compatibility with CMake versions older than 3.10Brad King2024-10-031-1/+1
| | | | | | | | Issue a deprecation warning on calls to `cmake_minimum_required` or `cmake_policy` that set policies based on versions older than 3.10. Note that the effective policy version includes `...<max>` treatment. Update the check from commit 3a4791548d (Deprecate compatibility with CMake versions older than 3.5, 2023-02-09, v3.27.0-rc1~508^2).
* Tests/RunCMake: Update cmake_minimum_required versions to 3.10Brad King2024-10-031-1/+1
| | | | | For policy-specific tests, use the version before the policy was introduced. Otherwise, use 3.10 where possible.
* list(): restore SUBLIST behaviorMarc Chevrier2023-06-161-0/+51
| | | | Fixes: #25002
* Deprecate compatibility with CMake versions older than 3.5Brad King2023-02-111-6/+6
| | | | | | | | Issue a deprecation warning on calls to `cmake_minimum_required` or `cmake_policy` that set policies based on versions older than 3.5. Note that the effective policy version includes `...<max>` treatment. Update the check from commit 5845c218d7 (Deprecate compatibility with CMake versions older than 2.8.12, 2020-06-12, v3.19.0-rc1~629^2).
* Tests/RunCMake: Update cmake_minimum_required versionsBrad King2023-02-111-1/+1
| | | | | | | | For policy-specific tests, use the version before the policy was introduced. Otherwise, use 3.5 where possible. Also, remove `cmake_minimum_required()` and `project()` calls from individual cases where they are handled by `CMakeLists.txt`.
* Tests: add tests to check claims in the documentationAdriaan de Groot2021-12-212-0/+48
| | | | | | - list commands APPEND, PREPEND, INSERT treat non-existent lists as empty and use that value, creating a new list variable in the process.
* cmListCommand: Handle invalid FOR selector rangesNick Muggio2021-12-0910-0/+27
| | | | | | | | | Fixes crashes involving invalid ranges specified in list(TRANSFORM ... FOR ...) calls. * Report error when step is not positive * Report error when start is after stop Fixes: #22985
* list(REMOVE_ITEM): Make removal of an empty item a no-op.Asit Dhal2021-01-122-0/+6
| | | | Fixes: #21663
* Deprecate compatibility with CMake versions older than 2.8.12Brad King2020-06-181-1/+10
| | | | | | | | Issue a deprecation warning on calls to `cmake_minimum_required` or `cmake_policy` that set policies based on versions older than 2.8.12. Note that the effective policy version includes `...<max>` treatment. This is important in combination with commit ca24b70d31 (Export: Specify a policy range in exported files, 2020-05-16, v3.18.0-rc1~133^2).
* Tests/RunCMake: Update cmake_minimum_required versionsBrad King2020-06-181-1/+1
| | | | Use 3.3 or 2.8.12 where possible.
* list(POP_FRONT): Fix always assigning first item to output varsAlex Turbov2019-06-301-0/+13
| | | | Fixes: #19436
* Help: Clarify ordering of list(REMOVE_DUPLICATES)Kyle Edwards2019-02-272-0/+7
| | | | | This also adds a test to enforce the order behavior of list(REMOVE_DUPLICATES).
* list: add sub-commands PREPEND, POP_BACK, POP_FRONTAlex Turbov2019-02-1913-0/+212
|
* cmListCommand: handle empty lists for list(REMOVE_AT)Ben Boeckel2018-10-167-2/+19
| | | | | Treat an empty list as a list with no valid bounds and return an error message indicating that any given indices are out-of-bounds.
* cmListCommand: make list(ACTION not_a_list) succeed when idempotentBen Boeckel2018-10-1615-25/+20
| | | | | | | | | | | The operations changed here all are no-ops on empty lists anyways, so just have them succeed when given non-extant lists. - `list(REMOVE_ITEM)` - `list(REMOVE_DUPLICATES)` - `list(SORT)` - `list(FILTER)` - `list(REVERSE)`
* list: Allow inserting at the end of a listDaniel Chabrowski2018-07-052-2/+2
| | | | Fixes: #18069
* list: Add options to control the SORT comparison operationDaniel Franke2018-06-1327-5/+178
|
* list: Add TRANSFORM sub-commandMarc Chevrier2018-04-1696-0/+589
| | | | Issue: #17823
* list: Add SUBLIST sub-commandMarc Chevrier2018-03-2117-0/+86
| | | | Issue: #17823
* list(): add `JOIN` sub-commandMarc Chevrier2018-03-2011-0/+41
|
* list: Add FILTER subcommand (#3986)Ashley Whetter2016-02-0325-0/+61
| | | | Create a `list(FILTER)` command to filter lists by regular expression.
* Tests: Move command failure cases into RunCMake infrastructureBrad King2015-07-1445-0/+126
| | | | | | | Move failure cases from the CMake.{If,List,While,GetProperty} tests over to the RunCMake.{if,list,while,get_property} tests to use the more modern infrastructure. This also avoids using REGEX_ESCAPE_STRING to try to regex-match full paths.
* Cygwin: Avoid legacy warnings in RunCMake.* testsBrad King2013-08-131-1/+1
| | | | | | Set the minimum required version of CMake high enough to avoid the warning for CMAKE_LEGACY_CYGWIN_WIN32. The warning appears on stderr and breaks the expected output matching.
* list: Handle errors on empty lists more gracefully (#13138)Brad King2012-04-1711-0/+29
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.