summaryrefslogtreecommitdiffstats
path: root/Tests/HIP/CompileFlags/CMakeLists.txt
blob: a3adb7b8660e7a66fc8e24d5a6c524c1f44b7c74 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
cmake_minimum_required(VERSION 3.18)
project(CompileFlags HIP)

add_executable(HIPOnlyCompileFlags main.hip)

if(CMAKE_HIP_PLATFORM STREQUAL "amd")
  set(hip_archs gfx803)
elseif(CMAKE_HIP_PLATFORM STREQUAL "nvidia")
  set(hip_archs 52)
endif()
set_property(TARGET HIPOnlyCompileFlags PROPERTY HIP_ARCHITECTURES ${hip_archs})

target_compile_options(HIPOnlyCompileFlags PRIVATE -DALWAYS_DEFINE)