diff options
author | Evan Wilde <etceterawilde@gmail.com> | 2022-09-27 15:30:46 -0700 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2022-10-24 12:39:21 -0400 |
commit | 2345139ab5b93cea4cf331af8d840ed5f943dbeb (patch) | |
tree | 3df2a92c0848262fc75cabacd466e67ff8520730 /Modules/Internal | |
parent | 4451a1f54fd2c1ba6aed4c38c23cb45e09f6be1d (diff) | |
download | cmake-2345139ab5b93cea4cf331af8d840ed5f943dbeb.tar.gz |
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/Internal')
-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 eadf3da504..2d43a76335 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() |