summaryrefslogtreecommitdiff
path: root/Modules/CMakeSwiftCompiler.cmake.in
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-07-06 16:15:49 -0400
committerBrad King <brad.king@kitware.com>2015-07-06 16:15:49 -0400
commitbf11253163b54f7c18b001cb00973a6341ee859b (patch)
treeadf50cd777722e5c08168025889c08a2e7ce68da /Modules/CMakeSwiftCompiler.cmake.in
parent8fbd9584af44100bbddd0f4031b57c5bc2530837 (diff)
downloadcmake-bf11253163b54f7c18b001cb00973a6341ee859b.tar.gz
Add rudimentary support for the Apple Swift language with Xcode
Allow the `Swift` language to be enabled with the Xcode generator for Xcode >= 6.1. Reject it on other generators and with older Xcode versions. Since Apple is the only vendor implementing the language right now, the compiler id can be just `Apple`.
Diffstat (limited to 'Modules/CMakeSwiftCompiler.cmake.in')
-rw-r--r--Modules/CMakeSwiftCompiler.cmake.in5
1 files changed, 5 insertions, 0 deletions
diff --git a/Modules/CMakeSwiftCompiler.cmake.in b/Modules/CMakeSwiftCompiler.cmake.in
new file mode 100644
index 0000000000..45f0a31051
--- /dev/null
+++ b/Modules/CMakeSwiftCompiler.cmake.in
@@ -0,0 +1,5 @@
+set(CMAKE_Swift_COMPILER "@CMAKE_Swift_COMPILER@")
+set(CMAKE_Swift_COMPILER_ID "@CMAKE_Swift_COMPILER_ID@")
+
+set(CMAKE_Swift_COMPILER_ID_RUN 1)
+set(CMAKE_Swift_SOURCE_FILE_EXTENSIONS swift)