summaryrefslogtreecommitdiff
path: root/Tests/RunCMake/GeneratorToolset
diff options
context:
space:
mode:
authorMyungJoo Ham <myungjoo.ham@samsung.com>2017-10-11 15:16:57 +0900
committerMyungJoo Ham <myungjoo.ham@samsung.com>2017-10-11 15:16:57 +0900
commit915c76ded744c0f5f151402b9fa69f3fd8452573 (patch)
treeca6a387466543248890f346847acaa8343989b22 /Tests/RunCMake/GeneratorToolset
parent317dbdb79761ef65e45c7358cfc7571c6afa54ad (diff)
downloadcmake-915c76ded744c0f5f151402b9fa69f3fd8452573.tar.gz
cmake-915c76ded744c0f5f151402b9fa69f3fd8452573.tar.bz2
cmake-915c76ded744c0f5f151402b9fa69f3fd8452573.zip
Imported Upstream version 3.9.4upstream/3.9.4
Diffstat (limited to 'Tests/RunCMake/GeneratorToolset')
-rw-r--r--Tests/RunCMake/GeneratorToolset/BadToolset-stderr.txt2
-rw-r--r--Tests/RunCMake/GeneratorToolset/BadToolset-toolchain.cmake1
-rw-r--r--Tests/RunCMake/GeneratorToolset/BadToolsetFormat-result.txt1
-rw-r--r--Tests/RunCMake/GeneratorToolset/BadToolsetFormat-stderr.txt10
-rw-r--r--Tests/RunCMake/GeneratorToolset/BadToolsetFormat.cmake1
-rw-r--r--Tests/RunCMake/GeneratorToolset/BadToolsetHostArch-result.txt1
-rw-r--r--Tests/RunCMake/GeneratorToolset/BadToolsetHostArch-stderr.txt10
-rw-r--r--Tests/RunCMake/GeneratorToolset/BadToolsetHostArch.cmake1
-rw-r--r--Tests/RunCMake/GeneratorToolset/BadToolsetHostArchTwice-result.txt1
-rw-r--r--Tests/RunCMake/GeneratorToolset/BadToolsetHostArchTwice-stderr.txt10
-rw-r--r--Tests/RunCMake/GeneratorToolset/BadToolsetHostArchTwice.cmake1
-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/BadToolsetToolchain-result.txt1
-rw-r--r--Tests/RunCMake/GeneratorToolset/BadToolsetToolchain-stderr.txt10
-rw-r--r--Tests/RunCMake/GeneratorToolset/BadToolsetToolchain.cmake1
-rw-r--r--Tests/RunCMake/GeneratorToolset/RunCMakeTest.cmake43
-rw-r--r--Tests/RunCMake/GeneratorToolset/TestToolset-toolchain.cmake1
-rw-r--r--Tests/RunCMake/GeneratorToolset/TestToolsetCudaBoth-stdout.txt2
-rw-r--r--Tests/RunCMake/GeneratorToolset/TestToolsetCudaBoth.cmake2
-rw-r--r--Tests/RunCMake/GeneratorToolset/TestToolsetCudaOnly-stdout.txt2
-rw-r--r--Tests/RunCMake/GeneratorToolset/TestToolsetCudaOnly.cmake2
-rw-r--r--Tests/RunCMake/GeneratorToolset/TestToolsetHostArchBoth-stdout.txt2
-rw-r--r--Tests/RunCMake/GeneratorToolset/TestToolsetHostArchBoth.cmake2
-rw-r--r--Tests/RunCMake/GeneratorToolset/TestToolsetHostArchNone-stdout.txt2
-rw-r--r--Tests/RunCMake/GeneratorToolset/TestToolsetHostArchNone.cmake2
-rw-r--r--Tests/RunCMake/GeneratorToolset/TestToolsetHostArchOnly-stdout.txt2
-rw-r--r--Tests/RunCMake/GeneratorToolset/TestToolsetHostArchOnly.cmake2
-rw-r--r--Tests/RunCMake/GeneratorToolset/TestToolsetToolchain-result.txt1
-rw-r--r--Tests/RunCMake/GeneratorToolset/TestToolsetToolchain-stderr.txt9
-rw-r--r--Tests/RunCMake/GeneratorToolset/TestToolsetToolchain.cmake25
32 files changed, 160 insertions, 2 deletions
diff --git a/Tests/RunCMake/GeneratorToolset/BadToolset-stderr.txt b/Tests/RunCMake/GeneratorToolset/BadToolset-stderr.txt
index bf1f19018..d0d526c68 100644
--- a/Tests/RunCMake/GeneratorToolset/BadToolset-stderr.txt
+++ b/Tests/RunCMake/GeneratorToolset/BadToolset-stderr.txt
@@ -1,4 +1,4 @@
-CMake Error:
+CMake Error at CMakeLists.txt:[0-9]+ \(project\):
Generator
.*
diff --git a/Tests/RunCMake/GeneratorToolset/BadToolset-toolchain.cmake b/Tests/RunCMake/GeneratorToolset/BadToolset-toolchain.cmake
new file mode 100644
index 000000000..7bbf32757
--- /dev/null
+++ b/Tests/RunCMake/GeneratorToolset/BadToolset-toolchain.cmake
@@ -0,0 +1 @@
+set(CMAKE_GENERATOR_TOOLSET "Bad Toolset")
diff --git a/Tests/RunCMake/GeneratorToolset/BadToolsetFormat-result.txt b/Tests/RunCMake/GeneratorToolset/BadToolsetFormat-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/GeneratorToolset/BadToolsetFormat-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GeneratorToolset/BadToolsetFormat-stderr.txt b/Tests/RunCMake/GeneratorToolset/BadToolsetFormat-stderr.txt
new file mode 100644
index 000000000..ab3a98fc8
--- /dev/null
+++ b/Tests/RunCMake/GeneratorToolset/BadToolsetFormat-stderr.txt
@@ -0,0 +1,10 @@
+CMake Error at CMakeLists.txt:[0-9]+ \(project\):
+ Generator
+
+ .*
+
+ given toolset specification
+
+ Test Toolset,not_a_key
+
+ that contains a field after the first ',' with no '='\.$
diff --git a/Tests/RunCMake/GeneratorToolset/BadToolsetFormat.cmake b/Tests/RunCMake/GeneratorToolset/BadToolsetFormat.cmake
new file mode 100644
index 000000000..2fc38e5c5
--- /dev/null
+++ b/Tests/RunCMake/GeneratorToolset/BadToolsetFormat.cmake
@@ -0,0 +1 @@
+message(FATAL_ERROR "This should not be reached!")
diff --git a/Tests/RunCMake/GeneratorToolset/BadToolsetHostArch-result.txt b/Tests/RunCMake/GeneratorToolset/BadToolsetHostArch-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/GeneratorToolset/BadToolsetHostArch-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GeneratorToolset/BadToolsetHostArch-stderr.txt b/Tests/RunCMake/GeneratorToolset/BadToolsetHostArch-stderr.txt
new file mode 100644
index 000000000..bd0063a29
--- /dev/null
+++ b/Tests/RunCMake/GeneratorToolset/BadToolsetHostArch-stderr.txt
@@ -0,0 +1,10 @@
+CMake Error at CMakeLists.txt:[0-9]+ \(project\):
+ Generator
+
+ .*
+
+ given toolset specification
+
+ Test Toolset,host=x6[45]
+
+ that contains invalid field 'host=x6[45]'\.$
diff --git a/Tests/RunCMake/GeneratorToolset/BadToolsetHostArch.cmake b/Tests/RunCMake/GeneratorToolset/BadToolsetHostArch.cmake
new file mode 100644
index 000000000..2fc38e5c5
--- /dev/null
+++ b/Tests/RunCMake/GeneratorToolset/BadToolsetHostArch.cmake
@@ -0,0 +1 @@
+message(FATAL_ERROR "This should not be reached!")
diff --git a/Tests/RunCMake/GeneratorToolset/BadToolsetHostArchTwice-result.txt b/Tests/RunCMake/GeneratorToolset/BadToolsetHostArchTwice-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/GeneratorToolset/BadToolsetHostArchTwice-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GeneratorToolset/BadToolsetHostArchTwice-stderr.txt b/Tests/RunCMake/GeneratorToolset/BadToolsetHostArchTwice-stderr.txt
new file mode 100644
index 000000000..164d3aa79
--- /dev/null
+++ b/Tests/RunCMake/GeneratorToolset/BadToolsetHostArchTwice-stderr.txt
@@ -0,0 +1,10 @@
+CMake Error at CMakeLists.txt:[0-9]+ \(project\):
+ Generator
+
+ .*
+
+ given toolset specification
+
+ Test Toolset,host=x64,host=x64
+
+ that contains duplicate field key 'host'\.$
diff --git a/Tests/RunCMake/GeneratorToolset/BadToolsetHostArchTwice.cmake b/Tests/RunCMake/GeneratorToolset/BadToolsetHostArchTwice.cmake
new file mode 100644
index 000000000..2fc38e5c5
--- /dev/null
+++ b/Tests/RunCMake/GeneratorToolset/BadToolsetHostArchTwice.cmake
@@ -0,0 +1 @@
+message(FATAL_ERROR "This should not be reached!")
diff --git a/Tests/RunCMake/GeneratorToolset/BadToolsetHostArchXcode-result.txt b/Tests/RunCMake/GeneratorToolset/BadToolsetHostArchXcode-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /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 000000000..5737e953e
--- /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 000000000..2fc38e5c5
--- /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/BadToolsetToolchain-result.txt b/Tests/RunCMake/GeneratorToolset/BadToolsetToolchain-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/GeneratorToolset/BadToolsetToolchain-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GeneratorToolset/BadToolsetToolchain-stderr.txt b/Tests/RunCMake/GeneratorToolset/BadToolsetToolchain-stderr.txt
new file mode 100644
index 000000000..d0d526c68
--- /dev/null
+++ b/Tests/RunCMake/GeneratorToolset/BadToolsetToolchain-stderr.txt
@@ -0,0 +1,10 @@
+CMake Error at CMakeLists.txt:[0-9]+ \(project\):
+ Generator
+
+ .*
+
+ does not support toolset specification, but toolset
+
+ Bad Toolset
+
+ was specified.$
diff --git a/Tests/RunCMake/GeneratorToolset/BadToolsetToolchain.cmake b/Tests/RunCMake/GeneratorToolset/BadToolsetToolchain.cmake
new file mode 100644
index 000000000..2fc38e5c5
--- /dev/null
+++ b/Tests/RunCMake/GeneratorToolset/BadToolsetToolchain.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 1ccc1adb2..f89100e84 100644
--- a/Tests/RunCMake/GeneratorToolset/RunCMakeTest.cmake
+++ b/Tests/RunCMake/GeneratorToolset/RunCMakeTest.cmake
@@ -3,15 +3,56 @@ include(RunCMake)
set(RunCMake_GENERATOR_TOOLSET "")
run_cmake(NoToolset)
-if("${RunCMake_GENERATOR}" MATCHES "Visual Studio 1[012]|Xcode" AND NOT XCODE_BELOW_3)
+if("${RunCMake_GENERATOR}" MATCHES "Visual Studio 1[01245]")
set(RunCMake_GENERATOR_TOOLSET "Test Toolset")
run_cmake(TestToolset)
+ set(RunCMake_GENERATOR_TOOLSET "Test Toolset,cuda=Test Cuda")
+ run_cmake(TestToolsetCudaBoth)
+ set(RunCMake_GENERATOR_TOOLSET ",cuda=Test Cuda")
+ run_cmake(TestToolsetCudaOnly)
+ set(RunCMake_GENERATOR_TOOLSET "cuda=Test Cuda")
+ run_cmake(TestToolsetCudaOnly)
+ if("${RunCMake_GENERATOR}" MATCHES "Visual Studio 1[245]")
+ set(RunCMake_GENERATOR_TOOLSET "Test Toolset,host=x64")
+ run_cmake(TestToolsetHostArchBoth)
+ set(RunCMake_GENERATOR_TOOLSET ",host=x64")
+ run_cmake(TestToolsetHostArchOnly)
+ set(RunCMake_GENERATOR_TOOLSET "host=x64")
+ run_cmake(TestToolsetHostArchOnly)
+ set(RunCMake_GENERATOR_TOOLSET "Test Toolset")
+ run_cmake(TestToolsetHostArchNone)
+ set(RunCMake_GENERATOR_TOOLSET "Test Toolset,host=x65")
+ run_cmake(BadToolsetHostArch)
+ set(RunCMake_GENERATOR_TOOLSET "Test Toolset,host=x64,host=x64")
+ run_cmake(BadToolsetHostArchTwice)
+ else()
+ set(RunCMake_GENERATOR_TOOLSET "Test Toolset,host=x64")
+ run_cmake(BadToolsetHostArch)
+ endif()
+ set(RunCMake_GENERATOR_TOOLSET "Test Toolset,not_a_key")
+ run_cmake(BadToolsetFormat)
+elseif("${RunCMake_GENERATOR}" STREQUAL "Xcode")
+ 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)
endif()
set(RunCMake_GENERATOR_TOOLSET "")
+
set(RunCMake_TEST_OPTIONS -T "Extra Toolset")
run_cmake(TwoToolsets)
unset(RunCMake_TEST_OPTIONS)
+
+if("${RunCMake_GENERATOR}" MATCHES "Visual Studio 1[01245]|Xcode")
+ set(RunCMake_TEST_OPTIONS -DCMAKE_TOOLCHAIN_FILE=${RunCMake_SOURCE_DIR}/TestToolset-toolchain.cmake)
+ run_cmake(TestToolsetToolchain)
+ unset(RunCMake_TEST_OPTIONS)
+else()
+ set(RunCMake_TEST_OPTIONS -DCMAKE_TOOLCHAIN_FILE=${RunCMake_SOURCE_DIR}/BadToolset-toolchain.cmake)
+ run_cmake(BadToolsetToolchain)
+ unset(RunCMake_TEST_OPTIONS)
+endif()
diff --git a/Tests/RunCMake/GeneratorToolset/TestToolset-toolchain.cmake b/Tests/RunCMake/GeneratorToolset/TestToolset-toolchain.cmake
new file mode 100644
index 000000000..bee2ae4bb
--- /dev/null
+++ b/Tests/RunCMake/GeneratorToolset/TestToolset-toolchain.cmake
@@ -0,0 +1 @@
+set(CMAKE_GENERATOR_TOOLSET "Test Toolset")
diff --git a/Tests/RunCMake/GeneratorToolset/TestToolsetCudaBoth-stdout.txt b/Tests/RunCMake/GeneratorToolset/TestToolsetCudaBoth-stdout.txt
new file mode 100644
index 000000000..90503e2cc
--- /dev/null
+++ b/Tests/RunCMake/GeneratorToolset/TestToolsetCudaBoth-stdout.txt
@@ -0,0 +1,2 @@
+-- CMAKE_VS_PLATFORM_TOOLSET='Test Toolset'
+-- CMAKE_VS_PLATFORM_TOOLSET_CUDA='Test Cuda'
diff --git a/Tests/RunCMake/GeneratorToolset/TestToolsetCudaBoth.cmake b/Tests/RunCMake/GeneratorToolset/TestToolsetCudaBoth.cmake
new file mode 100644
index 000000000..befa0af9d
--- /dev/null
+++ b/Tests/RunCMake/GeneratorToolset/TestToolsetCudaBoth.cmake
@@ -0,0 +1,2 @@
+message(STATUS "CMAKE_VS_PLATFORM_TOOLSET='${CMAKE_VS_PLATFORM_TOOLSET}'")
+message(STATUS "CMAKE_VS_PLATFORM_TOOLSET_CUDA='${CMAKE_VS_PLATFORM_TOOLSET_CUDA}'")
diff --git a/Tests/RunCMake/GeneratorToolset/TestToolsetCudaOnly-stdout.txt b/Tests/RunCMake/GeneratorToolset/TestToolsetCudaOnly-stdout.txt
new file mode 100644
index 000000000..94e1e43e4
--- /dev/null
+++ b/Tests/RunCMake/GeneratorToolset/TestToolsetCudaOnly-stdout.txt
@@ -0,0 +1,2 @@
+-- CMAKE_VS_PLATFORM_TOOLSET='(v[0-9]+|Windows7.1SDK)'
+-- CMAKE_VS_PLATFORM_TOOLSET_CUDA='Test Cuda'
diff --git a/Tests/RunCMake/GeneratorToolset/TestToolsetCudaOnly.cmake b/Tests/RunCMake/GeneratorToolset/TestToolsetCudaOnly.cmake
new file mode 100644
index 000000000..befa0af9d
--- /dev/null
+++ b/Tests/RunCMake/GeneratorToolset/TestToolsetCudaOnly.cmake
@@ -0,0 +1,2 @@
+message(STATUS "CMAKE_VS_PLATFORM_TOOLSET='${CMAKE_VS_PLATFORM_TOOLSET}'")
+message(STATUS "CMAKE_VS_PLATFORM_TOOLSET_CUDA='${CMAKE_VS_PLATFORM_TOOLSET_CUDA}'")
diff --git a/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchBoth-stdout.txt b/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchBoth-stdout.txt
new file mode 100644
index 000000000..f0b6d4672
--- /dev/null
+++ b/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchBoth-stdout.txt
@@ -0,0 +1,2 @@
+-- CMAKE_VS_PLATFORM_TOOLSET='Test Toolset'
+-- CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE='x64'
diff --git a/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchBoth.cmake b/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchBoth.cmake
new file mode 100644
index 000000000..26926f9db
--- /dev/null
+++ b/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchBoth.cmake
@@ -0,0 +1,2 @@
+message(STATUS "CMAKE_VS_PLATFORM_TOOLSET='${CMAKE_VS_PLATFORM_TOOLSET}'")
+message(STATUS "CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE='${CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE}'")
diff --git a/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchNone-stdout.txt b/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchNone-stdout.txt
new file mode 100644
index 000000000..576b40cc0
--- /dev/null
+++ b/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchNone-stdout.txt
@@ -0,0 +1,2 @@
+-- CMAKE_VS_PLATFORM_TOOLSET='Test Toolset'
+-- CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE=''
diff --git a/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchNone.cmake b/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchNone.cmake
new file mode 100644
index 000000000..26926f9db
--- /dev/null
+++ b/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchNone.cmake
@@ -0,0 +1,2 @@
+message(STATUS "CMAKE_VS_PLATFORM_TOOLSET='${CMAKE_VS_PLATFORM_TOOLSET}'")
+message(STATUS "CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE='${CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE}'")
diff --git a/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchOnly-stdout.txt b/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchOnly-stdout.txt
new file mode 100644
index 000000000..8271bd487
--- /dev/null
+++ b/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchOnly-stdout.txt
@@ -0,0 +1,2 @@
+-- CMAKE_VS_PLATFORM_TOOLSET='v[0-9]+'
+-- CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE='x64'
diff --git a/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchOnly.cmake b/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchOnly.cmake
new file mode 100644
index 000000000..26926f9db
--- /dev/null
+++ b/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchOnly.cmake
@@ -0,0 +1,2 @@
+message(STATUS "CMAKE_VS_PLATFORM_TOOLSET='${CMAKE_VS_PLATFORM_TOOLSET}'")
+message(STATUS "CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE='${CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE}'")
diff --git a/Tests/RunCMake/GeneratorToolset/TestToolsetToolchain-result.txt b/Tests/RunCMake/GeneratorToolset/TestToolsetToolchain-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/GeneratorToolset/TestToolsetToolchain-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GeneratorToolset/TestToolsetToolchain-stderr.txt b/Tests/RunCMake/GeneratorToolset/TestToolsetToolchain-stderr.txt
new file mode 100644
index 000000000..0623e90c7
--- /dev/null
+++ b/Tests/RunCMake/GeneratorToolset/TestToolsetToolchain-stderr.txt
@@ -0,0 +1,9 @@
+CMake Error at TestToolsetToolchain.cmake:[0-9]+ \(message\):
+ CMAKE_GENERATOR_TOOLSET is "Test Toolset" as expected.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
++
+CMake Error at TestToolsetToolchain.cmake:[0-9]+ \(message\):
+ CMAKE_(VS|XCODE)_PLATFORM_TOOLSET is "Test Toolset" as expected.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/GeneratorToolset/TestToolsetToolchain.cmake b/Tests/RunCMake/GeneratorToolset/TestToolsetToolchain.cmake
new file mode 100644
index 000000000..7c1c41518
--- /dev/null
+++ b/Tests/RunCMake/GeneratorToolset/TestToolsetToolchain.cmake
@@ -0,0 +1,25 @@
+if("x${CMAKE_GENERATOR_TOOLSET}" STREQUAL "xTest Toolset")
+ message(SEND_ERROR "CMAKE_GENERATOR_TOOLSET is \"Test Toolset\" as expected.")
+else()
+ message(FATAL_ERROR
+ "CMAKE_GENERATOR_TOOLSET is \"${CMAKE_GENERATOR_TOOLSET}\" "
+ "but should be \"Test Toolset\"!")
+endif()
+if(CMAKE_GENERATOR MATCHES "Visual Studio")
+ if("x${CMAKE_VS_PLATFORM_TOOLSET}" STREQUAL "xTest Toolset")
+ message(SEND_ERROR "CMAKE_VS_PLATFORM_TOOLSET is \"Test Toolset\" as expected.")
+ else()
+ message(FATAL_ERROR
+ "CMAKE_VS_PLATFORM_TOOLSET is \"${CMAKE_VS_PLATFORM_TOOLSET}\" "
+ "but should be \"Test Toolset\"!")
+ endif()
+endif()
+if(CMAKE_GENERATOR MATCHES "Xcode")
+ if("x${CMAKE_XCODE_PLATFORM_TOOLSET}" STREQUAL "xTest Toolset")
+ message(SEND_ERROR "CMAKE_XCODE_PLATFORM_TOOLSET is \"Test Toolset\" as expected.")
+ else()
+ message(FATAL_ERROR
+ "CMAKE_XCODE_PLATFORM_TOOLSET is \"${CMAKE_XCODE_PLATFORM_TOOLSET}\" "
+ "but should be \"Test Toolset\"!")
+ endif()
+endif()