summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/RunCMake')
-rw-r--r--Tests/RunCMake/CMakeLists.txt1
-rw-r--r--Tests/RunCMake/message/CMakeLists.txt3
-rw-r--r--Tests/RunCMake/message/RunCMakeTest.cmake5
-rw-r--r--Tests/RunCMake/message/errormessage-result.txt1
-rw-r--r--Tests/RunCMake/message/errormessage-stderr.txt4
-rw-r--r--Tests/RunCMake/message/errormessage.cmake4
-rw-r--r--Tests/RunCMake/message/nomessage-result.txt1
-rw-r--r--Tests/RunCMake/message/nomessage-stderr.txt1
-rw-r--r--Tests/RunCMake/message/nomessage.cmake2
-rw-r--r--Tests/RunCMake/message/warnmessage-result.txt1
-rw-r--r--Tests/RunCMake/message/warnmessage-stderr.txt4
-rw-r--r--Tests/RunCMake/message/warnmessage.cmake4
12 files changed, 31 insertions, 0 deletions
diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt
index ee490b8..4fbc3b0 100644
--- a/Tests/RunCMake/CMakeLists.txt
+++ b/Tests/RunCMake/CMakeLists.txt
@@ -95,6 +95,7 @@ add_RunCMake_test(if)
add_RunCMake_test(include)
add_RunCMake_test(include_directories)
add_RunCMake_test(list)
+add_RunCMake_test(message)
add_RunCMake_test(try_compile)
add_RunCMake_test(variable_watch)
add_RunCMake_test(CMP0004)
diff --git a/Tests/RunCMake/message/CMakeLists.txt b/Tests/RunCMake/message/CMakeLists.txt
new file mode 100644
index 0000000..12cd3c7
--- /dev/null
+++ b/Tests/RunCMake/message/CMakeLists.txt
@@ -0,0 +1,3 @@
+cmake_minimum_required(VERSION 2.8.4)
+project(${RunCMake_TEST} NONE)
+include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/message/RunCMakeTest.cmake b/Tests/RunCMake/message/RunCMakeTest.cmake
new file mode 100644
index 0000000..d2bc0c3
--- /dev/null
+++ b/Tests/RunCMake/message/RunCMakeTest.cmake
@@ -0,0 +1,5 @@
+include(RunCMake)
+
+run_cmake(nomessage)
+run_cmake(warnmessage)
+run_cmake(errormessage)
diff --git a/Tests/RunCMake/message/errormessage-result.txt b/Tests/RunCMake/message/errormessage-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/message/errormessage-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/message/errormessage-stderr.txt b/Tests/RunCMake/message/errormessage-stderr.txt
new file mode 100644
index 0000000..49e7ca9
--- /dev/null
+++ b/Tests/RunCMake/message/errormessage-stderr.txt
@@ -0,0 +1,4 @@
+CMake Deprecation Error at errormessage.cmake:4 \(message\):
+ This is an error
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/message/errormessage.cmake b/Tests/RunCMake/message/errormessage.cmake
new file mode 100644
index 0000000..7d3b779
--- /dev/null
+++ b/Tests/RunCMake/message/errormessage.cmake
@@ -0,0 +1,4 @@
+
+set(CMAKE_ERROR_DEPRECATED ON)
+
+message(DEPRECATION "This is an error")
diff --git a/Tests/RunCMake/message/nomessage-result.txt b/Tests/RunCMake/message/nomessage-result.txt
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/Tests/RunCMake/message/nomessage-result.txt
@@ -0,0 +1 @@
+0
diff --git a/Tests/RunCMake/message/nomessage-stderr.txt b/Tests/RunCMake/message/nomessage-stderr.txt
new file mode 100644
index 0000000..10f3293
--- /dev/null
+++ b/Tests/RunCMake/message/nomessage-stderr.txt
@@ -0,0 +1 @@
+^$
diff --git a/Tests/RunCMake/message/nomessage.cmake b/Tests/RunCMake/message/nomessage.cmake
new file mode 100644
index 0000000..bcc97be
--- /dev/null
+++ b/Tests/RunCMake/message/nomessage.cmake
@@ -0,0 +1,2 @@
+
+message(DEPRECATION "This is not issued")
diff --git a/Tests/RunCMake/message/warnmessage-result.txt b/Tests/RunCMake/message/warnmessage-result.txt
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/Tests/RunCMake/message/warnmessage-result.txt
@@ -0,0 +1 @@
+0
diff --git a/Tests/RunCMake/message/warnmessage-stderr.txt b/Tests/RunCMake/message/warnmessage-stderr.txt
new file mode 100644
index 0000000..5c44566
--- /dev/null
+++ b/Tests/RunCMake/message/warnmessage-stderr.txt
@@ -0,0 +1,4 @@
+CMake Deprecation Warning at warnmessage.cmake:4 \(message\):
+ This is a warning
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/message/warnmessage.cmake b/Tests/RunCMake/message/warnmessage.cmake
new file mode 100644
index 0000000..4c421a1
--- /dev/null
+++ b/Tests/RunCMake/message/warnmessage.cmake
@@ -0,0 +1,4 @@
+
+set(CMAKE_WARN_DEPRECATED ON)
+
+message(DEPRECATION "This is a warning")