summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/GeneratorToolset/TestToolsetXcodeBuildSystemDefault1.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-09-14 15:52:31 (GMT)
committerBrad King <brad.king@kitware.com>2020-09-18 16:49:17 (GMT)
commit2db623f554d5522350214a7c5bacd5ec2dec1b34 (patch)
tree27da28d96274f726e195d216199fd949005a0930 /Tests/RunCMake/GeneratorToolset/TestToolsetXcodeBuildSystemDefault1.cmake
parent3ab18c870dc00499f33a40a193e95cc4e1df54ba (diff)
downloadCMake-2db623f554d5522350214a7c5bacd5ec2dec1b34.zip
CMake-2db623f554d5522350214a7c5bacd5ec2dec1b34.tar.gz
CMake-2db623f554d5522350214a7c5bacd5ec2dec1b34.tar.bz2
Xcode: Add option to specify build system variant
Extend the `-T <toolset>` option to support a `buildsystem=` field with the Xcode generator. Add a `CMAKE_XCODE_BUILD_SYSTEM` variable to inform project code about the selected build system variant.
Diffstat (limited to 'Tests/RunCMake/GeneratorToolset/TestToolsetXcodeBuildSystemDefault1.cmake')
-rw-r--r--Tests/RunCMake/GeneratorToolset/TestToolsetXcodeBuildSystemDefault1.cmake8
1 files changed, 8 insertions, 0 deletions
diff --git a/Tests/RunCMake/GeneratorToolset/TestToolsetXcodeBuildSystemDefault1.cmake b/Tests/RunCMake/GeneratorToolset/TestToolsetXcodeBuildSystemDefault1.cmake
new file mode 100644
index 0000000..645bb19
--- /dev/null
+++ b/Tests/RunCMake/GeneratorToolset/TestToolsetXcodeBuildSystemDefault1.cmake
@@ -0,0 +1,8 @@
+message(STATUS "CMAKE_XCODE_BUILD_SYSTEM='${CMAKE_XCODE_BUILD_SYSTEM}'")
+if(CMAKE_GENERATOR_TOOLSET STREQUAL "Test Toolset")
+ message(FATAL_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()