summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/GeneratorToolset/NoToolset.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2012-12-10 15:42:33 (GMT)
committerBrad King <brad.king@kitware.com>2013-02-07 15:53:19 (GMT)
commit4fd534295642b1c08c72229d705db6c7265ecd28 (patch)
tree6cd0fd251856c6a0ee50bccdaff9c5ad771c43a3 /Tests/RunCMake/GeneratorToolset/NoToolset.cmake
parent118c32f8f211b0bb9a096fbb0711cacf2b68f057 (diff)
downloadCMake-4fd534295642b1c08c72229d705db6c7265ecd28.zip
CMake-4fd534295642b1c08c72229d705db6c7265ecd28.tar.gz
CMake-4fd534295642b1c08c72229d705db6c7265ecd28.tar.bz2
CMake: Add -T option to choose a generator toolset
Reject the option by default. It will be implemented on a per-generator basis. Pass the setting into try_compile project generation. Add cache entry CMAKE_GENERATOR_TOOLSET and associated variable documentation to hold the value persistently. Add a RunCMake.GeneratorToolset test to cover basic "-T" option cases. Verify that CMAKE_GENERATOR_TOOLSET is empty without -T, that -T is rejected when the generator doesn't support it, and that two -T options are always rejected.
Diffstat (limited to 'Tests/RunCMake/GeneratorToolset/NoToolset.cmake')
-rw-r--r--Tests/RunCMake/GeneratorToolset/NoToolset.cmake7
1 files changed, 7 insertions, 0 deletions
diff --git a/Tests/RunCMake/GeneratorToolset/NoToolset.cmake b/Tests/RunCMake/GeneratorToolset/NoToolset.cmake
new file mode 100644
index 0000000..f1f1ecd
--- /dev/null
+++ b/Tests/RunCMake/GeneratorToolset/NoToolset.cmake
@@ -0,0 +1,7 @@
+if("x${CMAKE_GENERATOR_TOOLSET}" STREQUAL "x")
+ message(FATAL_ERROR "CMAKE_GENERATOR_TOOLSET is empty as expected.")
+else()
+ message(FATAL_ERROR
+ "CMAKE_GENERATOR_TOOLSET is \"${CMAKE_GENERATOR_TOOLSET}\" "
+ "but should be empty!")
+endif()