summaryrefslogtreecommitdiffstats
path: root/Modules/Internal
diff options
context:
space:
mode:
authorRobert Maynard <robert.maynard@kitware.com>2020-08-28 19:03:39 (GMT)
committerZack Galbreath <zack.galbreath@kitware.com>2021-06-07 19:25:33 (GMT)
commitb50bfc89131e55685aa41146254b37d26049b4d5 (patch)
treee6ed45ba63b75decf4c9436fac6139174850370b /Modules/Internal
parentff0d2858e1e47af8e849318b411b1fbd8579a053 (diff)
downloadCMake-b50bfc89131e55685aa41146254b37d26049b4d5.zip
CMake-b50bfc89131e55685aa41146254b37d26049b4d5.tar.gz
CMake-b50bfc89131e55685aa41146254b37d26049b4d5.tar.bz2
HIP: Add language to CMake
Diffstat (limited to 'Modules/Internal')
-rw-r--r--Modules/Internal/FeatureTesting.cmake14
1 files changed, 14 insertions, 0 deletions
diff --git a/Modules/Internal/FeatureTesting.cmake b/Modules/Internal/FeatureTesting.cmake
index 72d96b3..b6f3c09 100644
--- a/Modules/Internal/FeatureTesting.cmake
+++ b/Modules/Internal/FeatureTesting.cmake
@@ -99,6 +99,16 @@ macro(_record_compiler_features_cuda std)
unset(lang_level_has_features)
endmacro()
+macro(_record_compiler_features_hip std)
+ list(APPEND CMAKE_HIP${std}_COMPILE_FEATURES hip_std_${std})
+
+ get_property(lang_level_has_features GLOBAL PROPERTY CMAKE_HIP${std}_KNOWN_FEATURES)
+ if(lang_level_has_features)
+ _record_compiler_features(HIP "${CMAKE_HIP${std}_STANDARD_COMPILE_OPTION}" CMAKE_HIP${std}_COMPILE_FEATURES)
+ endif()
+ unset(lang_level_has_features)
+endmacro()
+
macro(_has_compiler_features lang level compile_flags feature_list)
# presume all known features are supported
get_property(known_features GLOBAL PROPERTY CMAKE_${lang}${level}_KNOWN_FEATURES)
@@ -117,3 +127,7 @@ macro(_has_compiler_features_cuda std)
list(APPEND CMAKE_CUDA${std}_COMPILE_FEATURES cuda_std_${std})
_has_compiler_features(CUDA ${std} "${CMAKE_CUDA${std}_STANDARD_COMPILE_OPTION}" CMAKE_CUDA${std}_COMPILE_FEATURES)
endmacro()
+macro(_has_compiler_features_hip std)
+ list(APPEND CMAKE_HIP${std}_COMPILE_FEATURES hip_std_${std})
+ _has_compiler_features(HIP ${std} "${CMAKE_HIP${std}_STANDARD_COMPILE_OPTION}" CMAKE_HIP${std}_COMPILE_FEATURES)
+endmacro()