diff options
author | Robert Maynard <robert.maynard@kitware.com> | 2020-08-28 19:03:39 (GMT) |
---|---|---|
committer | Zack Galbreath <zack.galbreath@kitware.com> | 2021-06-07 19:25:33 (GMT) |
commit | b50bfc89131e55685aa41146254b37d26049b4d5 (patch) | |
tree | e6ed45ba63b75decf4c9436fac6139174850370b /Tests/HIP/CompileFlags | |
parent | ff0d2858e1e47af8e849318b411b1fbd8579a053 (diff) | |
download | CMake-b50bfc89131e55685aa41146254b37d26049b4d5.zip CMake-b50bfc89131e55685aa41146254b37d26049b4d5.tar.gz CMake-b50bfc89131e55685aa41146254b37d26049b4d5.tar.bz2 |
HIP: Add language to CMake
Diffstat (limited to 'Tests/HIP/CompileFlags')
-rw-r--r-- | Tests/HIP/CompileFlags/CMakeLists.txt | 8 | ||||
-rw-r--r-- | Tests/HIP/CompileFlags/main.hip | 13 |
2 files changed, 21 insertions, 0 deletions
diff --git a/Tests/HIP/CompileFlags/CMakeLists.txt b/Tests/HIP/CompileFlags/CMakeLists.txt new file mode 100644 index 0000000..c808313 --- /dev/null +++ b/Tests/HIP/CompileFlags/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.18) +project(CompileFlags HIP) + +add_executable(HIPOnlyCompileFlags main.hip) + +set_property(TARGET HIPOnlyCompileFlags PROPERTY HIP_ARCHITECTURES gfx803) + +target_compile_options(HIPOnlyCompileFlags PRIVATE -DALWAYS_DEFINE) diff --git a/Tests/HIP/CompileFlags/main.hip b/Tests/HIP/CompileFlags/main.hip new file mode 100644 index 0000000..3259f1d --- /dev/null +++ b/Tests/HIP/CompileFlags/main.hip @@ -0,0 +1,13 @@ +#ifdef __HIP_DEVICE_COMPILE__ +# ifndef __gfx803__ +# error "Passed architecture gfx803, but got something else." +# endif +#endif + +#ifndef ALWAYS_DEFINE +# error "ALWAYS_DEFINE not defined!" +#endif + +int main() +{ +} |