summaryrefslogtreecommitdiff
path: root/Modules/Internal/CheckCompilerFlag.cmake
diff options
context:
space:
mode:
authorRobert Maynard <robert.maynard@kitware.com>2020-10-25 14:34:18 -0400
committerZack Galbreath <zack.galbreath@kitware.com>2021-06-07 19:25:33 +0000
commit2e86e50c2fb2897dc1a0612676c5bd26eb7924a9 (patch)
tree1a788cb67645e12353c4c0d875601edbeeb21159 /Modules/Internal/CheckCompilerFlag.cmake
parent947dbed0aa502c70a9e165757450bd8409036980 (diff)
downloadcmake-2e86e50c2fb2897dc1a0612676c5bd26eb7924a9.tar.gz
HIP: Add HIP to all the Check* modules
Diffstat (limited to 'Modules/Internal/CheckCompilerFlag.cmake')
-rw-r--r--Modules/Internal/CheckCompilerFlag.cmake3
1 files changed, 3 insertions, 0 deletions
diff --git a/Modules/Internal/CheckCompilerFlag.cmake b/Modules/Internal/CheckCompilerFlag.cmake
index 6b2a11e566..9eb1bf0f81 100644
--- a/Modules/Internal/CheckCompilerFlag.cmake
+++ b/Modules/Internal/CheckCompilerFlag.cmake
@@ -24,6 +24,9 @@ function(CMAKE_CHECK_COMPILER_FLAG _lang _flag _var)
elseif(_lang STREQUAL "Fortran")
set(_lang_src " program test\n stop\n end program")
set(_lang_fail_regex FAIL_REGEX "command[ -]line option .* is valid for .* but not for Fortran")
+ elseif(_lang STREQUAL "HIP")
+ set(_lang_src "__host__ int main() { return 0; }")
+ set(_lang_fail_regex FAIL_REGEX "argument unused during compilation: .*") # Clang
elseif(_lang STREQUAL "OBJC")
set(_lang_src [=[
#ifndef __OBJC__