summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-09-07 13:48:32 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2016-09-07 13:48:32 (GMT)
commit85bfec7572f84ba259e0eabe383f6dcb0bd45d9b (patch)
tree6ee25d3e327ac5d8cca14f07e7c55acc749e317d /Tests
parent4469e986ee2189378f9054231b796249e6db54e1 (diff)
parentf1ad71d7f8c066a7e0d0c11bb1ce9d5a5719ec5e (diff)
downloadCMake-85bfec7572f84ba259e0eabe383f6dcb0bd45d9b.zip
CMake-85bfec7572f84ba259e0eabe383f6dcb0bd45d9b.tar.gz
CMake-85bfec7572f84ba259e0eabe383f6dcb0bd45d9b.tar.bz2
Merge topic 'fix-continue-after-error'
f1ad71d7 cmMakefile: Restore nested error logic use of cmExecutionStatus
Diffstat (limited to 'Tests')
-rw-r--r--Tests/RunCMake/Configure/ContinueAfterError-result.txt1
-rw-r--r--Tests/RunCMake/Configure/ContinueAfterError-stderr.txt13
-rw-r--r--Tests/RunCMake/Configure/ContinueAfterError-stdout.txt11
-rw-r--r--Tests/RunCMake/Configure/ContinueAfterError.cmake19
-rw-r--r--Tests/RunCMake/Configure/RunCMakeTest.cmake1
5 files changed, 45 insertions, 0 deletions
diff --git a/Tests/RunCMake/Configure/ContinueAfterError-result.txt b/Tests/RunCMake/Configure/ContinueAfterError-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/Configure/ContinueAfterError-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/Configure/ContinueAfterError-stderr.txt b/Tests/RunCMake/Configure/ContinueAfterError-stderr.txt
new file mode 100644
index 0000000..f40a3ef
--- /dev/null
+++ b/Tests/RunCMake/Configure/ContinueAfterError-stderr.txt
@@ -0,0 +1,13 @@
+^CMake Error at ContinueAfterError.cmake:[0-9]+ \(message\):
+ error in loop body
+Call Stack \(most recent call first\):
+ ContinueAfterError.cmake:[0-9]+ \(m\)
+ ContinueAfterError.cmake:[0-9]+ \(f\)
+ CMakeLists.txt:[0-9]+ \(include\)
++
+CMake Error at ContinueAfterError.cmake:[0-9]+ \(message\):
+ error in loop body
+Call Stack \(most recent call first\):
+ ContinueAfterError.cmake:[0-9]+ \(m\)
+ ContinueAfterError.cmake:[0-9]+ \(f\)
+ CMakeLists.txt:[0-9]+ \(include\)$
diff --git a/Tests/RunCMake/Configure/ContinueAfterError-stdout.txt b/Tests/RunCMake/Configure/ContinueAfterError-stdout.txt
new file mode 100644
index 0000000..f03aa07
--- /dev/null
+++ b/Tests/RunCMake/Configure/ContinueAfterError-stdout.txt
@@ -0,0 +1,11 @@
+-- before f
+-- start f
+-- start m
+-- start loop body
+-- end loop body
+-- start loop body
+-- end loop body
+-- end m
+-- end f
+-- after f
+-- Configuring incomplete, errors occurred!
diff --git a/Tests/RunCMake/Configure/ContinueAfterError.cmake b/Tests/RunCMake/Configure/ContinueAfterError.cmake
new file mode 100644
index 0000000..d094390
--- /dev/null
+++ b/Tests/RunCMake/Configure/ContinueAfterError.cmake
@@ -0,0 +1,19 @@
+macro(m)
+ message(STATUS " start m")
+ foreach(i 1 2)
+ message(STATUS " start loop body")
+ message(SEND_ERROR "error in loop body")
+ message(STATUS " end loop body")
+ endforeach()
+ message(STATUS " end m")
+endmacro()
+
+function(f)
+ message(STATUS " start f")
+ m()
+ message(STATUS " end f")
+endfunction()
+
+message(STATUS "before f")
+f()
+message(STATUS "after f")
diff --git a/Tests/RunCMake/Configure/RunCMakeTest.cmake b/Tests/RunCMake/Configure/RunCMakeTest.cmake
index 58e1a2a..91adb4e 100644
--- a/Tests/RunCMake/Configure/RunCMakeTest.cmake
+++ b/Tests/RunCMake/Configure/RunCMakeTest.cmake
@@ -1,5 +1,6 @@
include(RunCMake)
+run_cmake(ContinueAfterError)
run_cmake(CustomTargetAfterError)
run_cmake(ErrorLogs)
run_cmake(FailCopyFileABI)