diff --git a/hip-config.cmake.in b/hip-config.cmake.in index 2edce6cd..48d0bb68 100755 --- a/hip-config.cmake.in +++ b/hip-config.cmake.in @@ -159,8 +159,14 @@ if(HIP_COMPILER STREQUAL "clang") if(NOT WIN32) find_dependency(AMDDeviceLibs) endif() - set(AMDGPU_TARGETS "gfx900;gfx906;gfx908;gfx90a;gfx1030" CACHE STRING "AMD GPU targets to compile for") - set(GPU_TARGETS "${AMDGPU_TARGETS}" CACHE STRING "GPU targets to compile for") + set(GPU_DEFAULT_TARGETS "gfx900;gfx906;gfx908;gfx90a;gfx1030") + + if(NOT DEFINED AMDGPU_TARGETS) + set(GPU_TARGETS "${GPU_DEFAULT_TARGETS}" CACHE STRING "GPU targets to compile for. Adding features is supported e.g. gfx908:xnack+") + else() + message(WARNING "Variable AMDGPU_TARGETS is deprecated! Please use GPU_TARGETS to choose architectures.") + set(GPU_TARGETS "${AMDGPU_TARGETS}" CACHE STRING "GPU targets to compile for. Adding features is supported e.g. gfx908:xnack+") + endif() endif() if(NOT WIN32)