mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-04 04:40:56 -06:00
The `cmArgumentList` has been turned into a class (forward declared in the header). It inherits from the `std::list` (yeah, but we don't intend to store polymorphic classes in it). In addition to the standard methods, now it's possible to move `HandlePredicate` (renamed to `ReduceOneArg`) and `HandleBinaryOp` (renamed to `ReduceTwoArgs`) as its members. Additionally, iterators managements (`IncrementArguments`) have been refactored into two separate classes mimicking iterators. This also allows having a uniform `for` loop and concentrates the logic of iterators advancing in it instead of the loop's body. The arguments processing algorithms operate with "windows" over a collection of arguments. Hence there are two kinds of "iteration windows" -- allowing to observe 2 or 3 elements per loop iteration. These iteration "windows" also passed to reducers.
37 lines
650 B
CMake
37 lines
650 B
CMake
if(MATCHES)
|
|
message(SEND_ERROR "Test #1 failed")
|
|
else()
|
|
message(STATUS "Test #1 passed")
|
|
endif()
|
|
|
|
if("" MATCHES "")
|
|
message(STATUS "Test #2 passed")
|
|
else()
|
|
message(SEND_ERROR "Test #2 failed")
|
|
endif()
|
|
|
|
if(MATCHES RHS)
|
|
message(SEND_ERROR "Test #3 failed")
|
|
else()
|
|
message(STATUS "Test #3 passed")
|
|
endif()
|
|
|
|
set(RHS "")
|
|
if(MATCHES RHS)
|
|
message(SEND_ERROR "Test #4 failed")
|
|
else()
|
|
message(STATUS "Test #4 passed")
|
|
endif()
|
|
|
|
if(MATCHES "^$")
|
|
message(SEND_ERROR "Test #5 failed")
|
|
else()
|
|
message(STATUS "Test #5 passed")
|
|
endif()
|
|
|
|
if("" MATCHES "^$")
|
|
message(STATUS "Test #6 passed")
|
|
else()
|
|
message(SEND_ERROR "Test #6 failed")
|
|
endif()
|