summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-02-28 17:15:34 (GMT)
committerBrad King <brad.king@kitware.com>2015-02-28 17:15:34 (GMT)
commit6b6852a0ebe6d2c05ea500f78349e4fdbadcecd9 (patch)
tree9ed829e490d49db5636dce9d98420f42c250fb44 /Tests
parent4932f59b4cd903169f691f708949ea2afb595492 (diff)
parent00d66557d49989f9813ba9f04beaa0a984699cf0 (diff)
downloadCMake-6b6852a0ebe6d2c05ea500f78349e4fdbadcecd9.zip
CMake-6b6852a0ebe6d2c05ea500f78349e4fdbadcecd9.tar.gz
CMake-6b6852a0ebe6d2c05ea500f78349e4fdbadcecd9.tar.bz2
Merge branch 'fix-crash-on-bad-LANG_STANDARD' into release
Diffstat (limited to 'Tests')
-rw-r--r--Tests/RunCMake/CompileFeatures/NotAStandard-result.txt1
-rw-r--r--Tests/RunCMake/CompileFeatures/NotAStandard-stderr.txt4
-rw-r--r--Tests/RunCMake/CompileFeatures/NotAStandard.cmake2
-rw-r--r--Tests/RunCMake/CompileFeatures/RunCMakeTest.cmake2
4 files changed, 9 insertions, 0 deletions
diff --git a/Tests/RunCMake/CompileFeatures/NotAStandard-result.txt b/Tests/RunCMake/CompileFeatures/NotAStandard-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/CompileFeatures/NotAStandard-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CompileFeatures/NotAStandard-stderr.txt b/Tests/RunCMake/CompileFeatures/NotAStandard-stderr.txt
new file mode 100644
index 0000000..deab12f
--- /dev/null
+++ b/Tests/RunCMake/CompileFeatures/NotAStandard-stderr.txt
@@ -0,0 +1,4 @@
+CMake Error at NotAStandard.cmake:[0-9]+ \(add_library\):
+ CXX_STANDARD is set to invalid value 'bad'
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/CompileFeatures/NotAStandard.cmake b/Tests/RunCMake/CompileFeatures/NotAStandard.cmake
new file mode 100644
index 0000000..11529d8
--- /dev/null
+++ b/Tests/RunCMake/CompileFeatures/NotAStandard.cmake
@@ -0,0 +1,2 @@
+set(CMAKE_CXX_STANDARD bad)
+add_library(somelib STATIC empty.cpp)
diff --git a/Tests/RunCMake/CompileFeatures/RunCMakeTest.cmake b/Tests/RunCMake/CompileFeatures/RunCMakeTest.cmake
index 833a315..c1b2227 100644
--- a/Tests/RunCMake/CompileFeatures/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CompileFeatures/RunCMakeTest.cmake
@@ -43,6 +43,8 @@ else()
endif()
if(CXX_STANDARD_DEFAULT)
+ run_cmake(NotAStandard)
+
foreach(standard 98 11)
file(READ
"${RunCMake_BINARY_DIR}/generate_feature_list-build/cxx${standard}_flag.txt"