summaryrefslogtreecommitdiff
path: root/Modules
diff options
context:
space:
mode:
authorEvan Wilde <etceterawilde@gmail.com>2022-11-03 08:58:08 -0700
committerEvan Wilde <etceterawilde@gmail.com>2022-11-04 09:32:06 -0700
commit2d5403ecaa4faa5524902a6da86d62857e13c6bb (patch)
tree1c25d15c48459625ccb84965811c18462785daff /Modules
parent4fc3f7e88ff7d5f734ed5d6cf43b6420e869ef19 (diff)
downloadcmake-2d5403ecaa4faa5524902a6da86d62857e13c6bb.tar.gz
CheckCompilerFlag: Add Swift Support
Plumb through Swift `check_compiler_flag` support. Add tests to check that valid flags work and invalid flags don't.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/Internal/CheckFlagCommonConfig.cmake2
1 files changed, 2 insertions, 0 deletions
diff --git a/Modules/Internal/CheckFlagCommonConfig.cmake b/Modules/Internal/CheckFlagCommonConfig.cmake
index c011c24238..f8481cdd2b 100644
--- a/Modules/Internal/CheckFlagCommonConfig.cmake
+++ b/Modules/Internal/CheckFlagCommonConfig.cmake
@@ -48,6 +48,8 @@ macro(CMAKE_CHECK_FLAG_COMMON_INIT _FUNC _LANG _SRC _PATTERNS)
FAIL_REGEX "argument unused during compilation: .*") # Clang
elseif("${_LANG}" STREQUAL "ISPC")
set(${_SRC} "float func(uniform int32, float a) { return a / 2.25; }")
+ elseif("${_LANG}" STREQUAL "Swift")
+ set(${_SRC} "func blarpy() { }")
else()
message (SEND_ERROR "${_FUNC}: ${_LANG}: unknown language.")
return()