diff options
author | Evan Wilde <etceterawilde@gmail.com> | 2022-09-27 22:30:46 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2022-10-24 16:39:21 (GMT) |
commit | 2345139ab5b93cea4cf331af8d840ed5f943dbeb (patch) | |
tree | 3df2a92c0848262fc75cabacd466e67ff8520730 /Modules | |
parent | 4451a1f54fd2c1ba6aed4c38c23cb45e09f6be1d (diff) | |
download | CMake-2345139ab5b93cea4cf331af8d840ed5f943dbeb.zip CMake-2345139ab5b93cea4cf331af8d840ed5f943dbeb.tar.gz CMake-2345139ab5b93cea4cf331af8d840ed5f943dbeb.tar.bz2 |
CheckSourceCompiles: Add support for Swift
Plumb through swift `check_source_compiles` support. Add tests to check
that valid swift sources compile and invalid sources don't.
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/Internal/CheckSourceCompiles.cmake | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Modules/Internal/CheckSourceCompiles.cmake b/Modules/Internal/CheckSourceCompiles.cmake index eadf3da..2d43a76 100644 --- a/Modules/Internal/CheckSourceCompiles.cmake +++ b/Modules/Internal/CheckSourceCompiles.cmake @@ -34,6 +34,9 @@ function(CMAKE_CHECK_SOURCE_COMPILES _lang _source _var) elseif(_lang STREQUAL "OBJCXX") set(_lang_textual "Objective-C++") set(_lang_ext "mm") + elseif(_lang STREQUAL "Swift") + set(_lang_textual "Swift") + set(_lang_ext "swift") else() message (SEND_ERROR "check_source_compiles: ${_lang}: unknown language.") return() |