mirror of
https://github.com/Kitware/CMake.git
synced 2026-11-06 05:16:58 +00:00
Merge topic 'genex-out-of-range'
25abbc4ad4 Genex: Fix crash on out of range LIST index
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12759
This commit is contained in:
commit
eb1e97c362
5 files changed
+14
No files matched your search
@@ -973,6 +973,8 @@ bool GetNumericArgument(std::string const& arg, IndexType& value)
|
||||
}
|
||||
} catch (std::invalid_argument const&) {
|
||||
return false;
|
||||
} catch (std::out_of_range const&) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
1
|
||||
@@ -0,0 +1,8 @@
|
||||
CMake Error at INSERT-wrong-index3\.cmake:[0-9]+ \(file\):
|
||||
Error evaluating generator expression:
|
||||
|
||||
\$<LIST:INSERT,a;b;c,34337407431768211457,d>
|
||||
|
||||
index: "34337407431768211457" is not a valid index
|
||||
Call Stack \(most recent call first\):
|
||||
CMakeLists\.txt:[0-9]+ \(include\)
|
||||
@@ -0,0 +1,2 @@
|
||||
|
||||
file(GENERATE OUTPUT result.txt CONTENT "$<LIST:INSERT,a;b;c,34337407431768211457,d>")
|
||||
@@ -69,6 +69,7 @@ run_cmake(SUBLIST-wrong-argument1)
|
||||
run_cmake(SUBLIST-wrong-argument2)
|
||||
run_cmake(INSERT-wrong-index1)
|
||||
run_cmake(INSERT-wrong-index2)
|
||||
run_cmake(INSERT-wrong-index3)
|
||||
run_cmake(REMOVE_AT-wrong-index1)
|
||||
run_cmake(REMOVE_AT-wrong-index2)
|
||||
run_cmake(REMOVE_AT-wrong-index3)
|
||||
|
||||
Reference in new issue
Block a user