diff options
Diffstat (limited to 'Tests/RunCMake/foreach')
-rw-r--r-- | Tests/RunCMake/foreach/BadRangeInFunction-result.txt | 1 | ||||
-rw-r--r-- | Tests/RunCMake/foreach/BadRangeInFunction-stderr.txt | 5 | ||||
-rw-r--r-- | Tests/RunCMake/foreach/BadRangeInFunction.cmake | 5 | ||||
-rw-r--r-- | Tests/RunCMake/foreach/CMakeLists.txt | 3 | ||||
-rw-r--r-- | Tests/RunCMake/foreach/RunCMakeTest.cmake | 3 |
5 files changed, 17 insertions, 0 deletions
diff --git a/Tests/RunCMake/foreach/BadRangeInFunction-result.txt b/Tests/RunCMake/foreach/BadRangeInFunction-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/foreach/BadRangeInFunction-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/foreach/BadRangeInFunction-stderr.txt b/Tests/RunCMake/foreach/BadRangeInFunction-stderr.txt new file mode 100644 index 0000000..e16a0f1 --- /dev/null +++ b/Tests/RunCMake/foreach/BadRangeInFunction-stderr.txt @@ -0,0 +1,5 @@ +^CMake Error at BadRangeInFunction.cmake:2 \(foreach\): + foreach called with incorrect range specification: start 2, stop 1, step 1 +Call Stack \(most recent call first\): + BadRangeInFunction.cmake:5 \(func\) + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/foreach/BadRangeInFunction.cmake b/Tests/RunCMake/foreach/BadRangeInFunction.cmake new file mode 100644 index 0000000..f51cbbf --- /dev/null +++ b/Tests/RunCMake/foreach/BadRangeInFunction.cmake @@ -0,0 +1,5 @@ +function(func) + foreach(bad_range RANGE 2 1 1) + endforeach() +endfunction() +func() diff --git a/Tests/RunCMake/foreach/CMakeLists.txt b/Tests/RunCMake/foreach/CMakeLists.txt new file mode 100644 index 0000000..bf2ef15 --- /dev/null +++ b/Tests/RunCMake/foreach/CMakeLists.txt @@ -0,0 +1,3 @@ +cmake_minimum_required(VERSION 3.10) +project(${RunCMake_TEST} NONE) +include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/foreach/RunCMakeTest.cmake b/Tests/RunCMake/foreach/RunCMakeTest.cmake new file mode 100644 index 0000000..4b74cfe --- /dev/null +++ b/Tests/RunCMake/foreach/RunCMakeTest.cmake @@ -0,0 +1,3 @@ +include(RunCMake) + +run_cmake(BadRangeInFunction) |