diff options
author | Alex Turbov <i.zaufi@gmail.com> | 2019-06-30 09:23:35 (GMT) |
---|---|---|
committer | Alex Turbov <i.zaufi@gmail.com> | 2019-06-30 10:15:29 (GMT) |
commit | 822abf1265eacdffee37d3ed55e41425b6602e27 (patch) | |
tree | d816805907e666fd8ad962e90d4170bdb0f2c0e5 /Tests/RunCMake/list | |
parent | 753373579e3dd8cf19f0fc18f4d9bec43a2d82e8 (diff) | |
download | CMake-822abf1265eacdffee37d3ed55e41425b6602e27.zip CMake-822abf1265eacdffee37d3ed55e41425b6602e27.tar.gz CMake-822abf1265eacdffee37d3ed55e41425b6602e27.tar.bz2 |
list(POP_FRONT): Fix always assigning first item to output vars
Fixes: #19436
Diffstat (limited to 'Tests/RunCMake/list')
-rw-r--r-- | Tests/RunCMake/list/POP_FRONT.cmake | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Tests/RunCMake/list/POP_FRONT.cmake b/Tests/RunCMake/list/POP_FRONT.cmake index a2f8f3c..70f757a 100644 --- a/Tests/RunCMake/list/POP_FRONT.cmake +++ b/Tests/RunCMake/list/POP_FRONT.cmake @@ -77,3 +77,16 @@ endif() if(NOT test STREQUAL "two") message(FATAL_ERROR "`test` has unexpected value `${test}`") endif() + +# BUG 19436 +set(myList a b c) +list(POP_FRONT myList first second) +if(NOT first STREQUAL "a") + message(FATAL_ERROR "BUG#19436: `first` has unexpected value `${first}`") +endif() +if(NOT second STREQUAL "b") + message(FATAL_ERROR "BUG#19436: `second` has unexpected value `${second}`") +endif() +if(NOT myList STREQUAL "c") + message(FATAL_ERROR "BUG#19436: `myList` has unexpected value `${myList}`") +endif() |