Skip to content

Commit bcbd026

Browse files
authored
Merge pull request #37511 from gottesmm/pr-cb2ea137822cc9105d47dead13198b8899a5df4d
[cmake] Add support for checking if we have a host toolchain Swift compiler
2 parents 8978efb + f9ef9c4 commit bcbd026

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)