summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/GeneratorToolset
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-02-15 13:14:25 (GMT)
committerBrad King <brad.king@kitware.com>2017-02-15 13:15:00 (GMT)
commitd9e2b9a909b5f5b51ef3a106ed1d60a8d4cb795a (patch)
tree521be8b44e0268715cd674fe6ee4f6cda30157c9 /Tests/RunCMake/GeneratorToolset
parent34ce3017b530595753b5987bd0702aceded683be (diff)
downloadCMake-d9e2b9a909b5f5b51ef3a106ed1d60a8d4cb795a.zip
CMake-d9e2b9a909b5f5b51ef3a106ed1d60a8d4cb795a.tar.gz
CMake-d9e2b9a909b5f5b51ef3a106ed1d60a8d4cb795a.tar.bz2
Tests: Split out RunCMake.GeneratorToolset Xcode checks
This will allow the behavior of VS and Xcode generators to differ.
Diffstat (limited to 'Tests/RunCMake/GeneratorToolset')
-rw-r--r--Tests/RunCMake/GeneratorToolset/BadToolsetHostArchXcode-result.txt1
-rw-r--r--Tests/RunCMake/GeneratorToolset/BadToolsetHostArchXcode-stderr.txt10
-rw-r--r--Tests/RunCMake/GeneratorToolset/BadToolsetHostArchXcode.cmake1
-rw-r--r--Tests/RunCMake/GeneratorToolset/RunCMakeTest.cmake7
4 files changed, 18 insertions, 1 deletions
diff --git a/Tests/RunCMake/GeneratorToolset/BadToolsetHostArchXcode-result.txt b/Tests/RunCMake/GeneratorToolset/BadToolsetHostArchXcode-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/GeneratorToolset/BadToolsetHostArchXcode-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GeneratorToolset/BadToolsetHostArchXcode-stderr.txt b/Tests/RunCMake/GeneratorToolset/BadToolsetHostArchXcode-stderr.txt
new file mode 100644
index 0000000..5737e95
--- /dev/null
+++ b/Tests/RunCMake/GeneratorToolset/BadToolsetHostArchXcode-stderr.txt
@@ -0,0 +1,10 @@
+CMake Error at CMakeLists.txt:[0-9]+ \(project\):
+ Generator
+
+ .*
+
+ does not recognize the toolset
+
+ Test Toolset,host=x6[45]
+
+ that was specified\.$
diff --git a/Tests/RunCMake/GeneratorToolset/BadToolsetHostArchXcode.cmake b/Tests/RunCMake/GeneratorToolset/BadToolsetHostArchXcode.cmake
new file mode 100644
index 0000000..2fc38e5
--- /dev/null
+++ b/Tests/RunCMake/GeneratorToolset/BadToolsetHostArchXcode.cmake
@@ -0,0 +1 @@
+message(FATAL_ERROR "This should not be reached!")
diff --git a/Tests/RunCMake/GeneratorToolset/RunCMakeTest.cmake b/Tests/RunCMake/GeneratorToolset/RunCMakeTest.cmake
index e8ce47d..3c3d974 100644
--- a/Tests/RunCMake/GeneratorToolset/RunCMakeTest.cmake
+++ b/Tests/RunCMake/GeneratorToolset/RunCMakeTest.cmake
@@ -3,7 +3,7 @@ include(RunCMake)
set(RunCMake_GENERATOR_TOOLSET "")
run_cmake(NoToolset)
-if("${RunCMake_GENERATOR}" MATCHES "Visual Studio 1[01245]|Xcode" AND NOT XCODE_BELOW_3)
+if("${RunCMake_GENERATOR}" MATCHES "Visual Studio 1[01245]")
set(RunCMake_GENERATOR_TOOLSET "Test Toolset")
run_cmake(TestToolset)
if("${RunCMake_GENERATOR}" MATCHES "Visual Studio 1[245]")
@@ -21,6 +21,11 @@ if("${RunCMake_GENERATOR}" MATCHES "Visual Studio 1[01245]|Xcode" AND NOT XCODE_
set(RunCMake_GENERATOR_TOOLSET "Test Toolset,host=x64")
run_cmake(BadToolsetHostArch)
endif()
+elseif("${RunCMake_GENERATOR}" STREQUAL "Xcode" AND NOT XCODE_BELOW_3)
+ set(RunCMake_GENERATOR_TOOLSET "Test Toolset")
+ run_cmake(TestToolset)
+ set(RunCMake_GENERATOR_TOOLSET "Test Toolset,host=x64")
+ run_cmake(BadToolsetHostArchXcode)
else()
set(RunCMake_GENERATOR_TOOLSET "Bad Toolset")
run_cmake(BadToolset)