diff options
author | Brad King <brad.king@kitware.com> | 2023-09-18 18:11:41 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2023-09-21 19:34:37 (GMT) |
commit | 127b6fa06bf53ad9f31d041a7d11434ca2856c8e (patch) | |
tree | 26f2bdb717a1592b9a31fb6bc1cdff37f42a1373 /Tests/HIP/CompileFlags | |
parent | 90e23f40ee27c0990b30b3640731e89539cb3990 (diff) | |
download | CMake-127b6fa06bf53ad9f31d041a7d11434ca2856c8e.zip CMake-127b6fa06bf53ad9f31d041a7d11434ca2856c8e.tar.gz CMake-127b6fa06bf53ad9f31d041a7d11434ca2856c8e.tar.bz2 |
HIP: Add CMAKE_HIP_PLATFORM variable to specify GPU platform
For now, require the value to be `amd`, since that is the only
platform we currently support.
Diffstat (limited to 'Tests/HIP/CompileFlags')
-rw-r--r-- | Tests/HIP/CompileFlags/CMakeLists.txt | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Tests/HIP/CompileFlags/CMakeLists.txt b/Tests/HIP/CompileFlags/CMakeLists.txt index c808313..46a94a3 100644 --- a/Tests/HIP/CompileFlags/CMakeLists.txt +++ b/Tests/HIP/CompileFlags/CMakeLists.txt @@ -3,6 +3,9 @@ project(CompileFlags HIP) add_executable(HIPOnlyCompileFlags main.hip) -set_property(TARGET HIPOnlyCompileFlags PROPERTY HIP_ARCHITECTURES gfx803) +if(CMAKE_HIP_PLATFORM STREQUAL "amd") + set(hip_archs gfx803) +endif() +set_property(TARGET HIPOnlyCompileFlags PROPERTY HIP_ARCHITECTURES ${hip_archs}) target_compile_options(HIPOnlyCompileFlags PRIVATE -DALWAYS_DEFINE) |