summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-10-07 11:13:14 (GMT)
committerKitware Robot <kwrobot@kitware.com>2020-10-07 11:13:21 (GMT)
commitc61f820a7fb1b191fe5591805f7e53fc52424f93 (patch)
tree22d9ffd25ab39d2fd836656fcc69c0a29554abbc /Modules
parent026beeb620f8f8c3939e128eb07c879133bf7d1c (diff)
parente17e2c6a517cf40b41014cdf3e239c0b21da868e (diff)
downloadCMake-c61f820a7fb1b191fe5591805f7e53fc52424f93.zip
CMake-c61f820a7fb1b191fe5591805f7e53fc52424f93.tar.gz
CMake-c61f820a7fb1b191fe5591805f7e53fc52424f93.tar.bz2
Merge topic 'add_ispc_to_check_helpers'
e17e2c6a51 ISPC: CheckCompilerFlags and CheckSourceCompiles support ISPC Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5337
Diffstat (limited to 'Modules')
-rw-r--r--Modules/CheckCompilerFlag.cmake2
-rw-r--r--Modules/CheckSourceCompiles.cmake3
2 files changed, 5 insertions, 0 deletions
diff --git a/Modules/CheckCompilerFlag.cmake b/Modules/CheckCompilerFlag.cmake
index 0339225..f2385d5 100644
--- a/Modules/CheckCompilerFlag.cmake
+++ b/Modules/CheckCompilerFlag.cmake
@@ -68,6 +68,8 @@ int main(void) { return 0; }]=])
int main(void) { return 0; }]=])
set(_lang_fail_regex FAIL_REGEX "command[ -]line option .* is valid for .* but not for Objective-C\\+\\+" # GNU
FAIL_REGEX "argument unused during compilation: .*") # Clang
+ elseif(_lang STREQUAL ISPC)
+ set(_lang_src "float func(uniform int32, float a) { return a / 2.25; }")
else()
message (SEND_ERROR "check_compiler_flag: ${_lang}: unknown language.")
return()
diff --git a/Modules/CheckSourceCompiles.cmake b/Modules/CheckSourceCompiles.cmake
index 13ec9db..70a733d 100644
--- a/Modules/CheckSourceCompiles.cmake
+++ b/Modules/CheckSourceCompiles.cmake
@@ -92,6 +92,9 @@ function(CHECK_SOURCE_COMPILES _lang _source _var)
elseif(_lang STREQUAL Fortran)
set(_lang_textual "Fortran")
set(_lang_ext "F")
+ elseif(_lang STREQUAL ISPC)
+ set(_lang_textual "ISPC")
+ set(_lang_ext "ispc")
elseif(_lang STREQUAL OBJC)
set(_lang_textual "Objective-C")
set(_lang_ext "m")