diff options
author | Brad King <brad.king@kitware.com> | 2024-12-04 14:47:18 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2024-12-04 15:16:56 (GMT) |
commit | 76f4fc7dd0d4fcd50368d725358960cf6accc57e (patch) | |
tree | 2b58eb86b49fdcb14cf20e71046e4111e277f05c /Tests | |
parent | bf9b13920db341ef84f198719aa081db0d10e7a1 (diff) | |
download | CMake-76f4fc7dd0d4fcd50368d725358960cf6accc57e.zip CMake-76f4fc7dd0d4fcd50368d725358960cf6accc57e.tar.gz CMake-76f4fc7dd0d4fcd50368d725358960cf6accc57e.tar.bz2 |
LINK_OPTIONS: Fix crash on empty LINKER: prefix
Since commit e3895f4a8b (Linking: Preserve nested LINKER: prefixes as
written, 2024-09-17, v3.31.0-rc1~60^2) we may increment an iterator past
the end. Revise logic to avoid that.
Fixes: #26499
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/RunCMake/target_link_options/LINKER_expansion.cmake | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Tests/RunCMake/target_link_options/LINKER_expansion.cmake b/Tests/RunCMake/target_link_options/LINKER_expansion.cmake index 2219218..7a2ffa1 100644 --- a/Tests/RunCMake/target_link_options/LINKER_expansion.cmake +++ b/Tests/RunCMake/target_link_options/LINKER_expansion.cmake @@ -26,6 +26,7 @@ endfunction() # Use LINKER alone add_test_library(linker) target_link_options(linker PRIVATE "LINKER:-foo,bar") +target_link_options(linker PRIVATE "LINKER:") # empty # Use LINKER with SHELL add_test_library(linker_shell) |