You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

14 lines
395 B

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)