mirror of
https://github.com/Kitware/CMake.git
synced 2026-02-21 14:40:26 -06:00
@@ -428,6 +428,7 @@ bool cmForEachCommand(std::vector<std::string> const& args,
|
||||
status.SetError(
|
||||
cmStrCat("called with incorrect range specification: start ", start,
|
||||
", stop ", stop, ", step ", step));
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -18,3 +18,4 @@ run_cmake(foreach-RANGE-non-int-test-2-2)
|
||||
run_cmake(foreach-RANGE-non-int-test-3-1)
|
||||
run_cmake(foreach-RANGE-non-int-test-3-2)
|
||||
run_cmake(foreach-RANGE-non-int-test-3-3)
|
||||
run_cmake(foreach-RANGE-invalid-test)
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
1
|
||||
@@ -0,0 +1,4 @@
|
||||
^CMake Error at foreach-RANGE-invalid-test\.cmake:[0-9]+ \(foreach\):
|
||||
foreach called with incorrect range specification: start 2, stop 1, step 1
|
||||
Call Stack \(most recent call first\):
|
||||
CMakeLists\.txt:3 \(include\)$
|
||||
2
Tests/RunCMake/foreach/foreach-RANGE-invalid-test.cmake
Normal file
2
Tests/RunCMake/foreach/foreach-RANGE-invalid-test.cmake
Normal file
@@ -0,0 +1,2 @@
|
||||
foreach(a RANGE 2 1 1)
|
||||
endforeach()
|
||||
Reference in New Issue
Block a user