Skip to content

Commit f9ef9c4

Browse files
committed
[cmake] Add support for checking if we have a host toolchain Swift compiler.
This just causes us to perform the cmake check. It isn't used anywhere.
1 parent 0d4d98e commit f9ef9c4

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

CMakeLists.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,17 @@ set(CMAKE_CXX_EXTENSIONS NO)
5151
include(SwiftUtils)
5252
include(CheckSymbolExists)
5353
include(CMakeDependentOption)
54+
include(CheckLanguage)
55+
56+
# Enable Swift for the host compiler build if we have the language. It is
57+
# optional until we have a bootstrap story.
58+
check_language(Swift)
59+
if(CMAKE_Swift_COMPILER)
60+
enable_language(Swift)
61+
else()
62+
message(STATUS "WARNING! Did not find a host compiler swift?! Can not build
63+
any compiler host sources written in Swift")
64+
endif()
5465

5566
#
5667
# User-configurable options that control the inclusion and default build

0 commit comments

Comments
 (0)