diff --git a/CMakeLists.txt b/CMakeLists.txt index 1946c44..6af955c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -109,6 +109,8 @@ else() ) endif() set(AMDGPU_TARGETS "${DEFAULT_AMDGPU_TARGETS}" CACHE STRING "List of specific machine types for library to target") +# Don't force, as users should be able to override GPU_TARGETS at the command line if desired +set(GPU_TARGETS "${AMDGPU_TARGETS}" CACHE STRING "GPU architectures to build for") include(CheckLanguage) include(CMakeDependentOption) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index c67b713..1587d9e 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -183,7 +183,7 @@ if(SUPPORT_HIP) if((${CMAKE_BUILD_TYPE} MATCHES "Release") OR (${CMAKE_BUILD_TYPE} MATCHES "RelWithDebInfo")) list(APPEND HIP_HIPCC_FLAGS "-DNDEBUG") endif() - foreach(target ${AMDGPU_TARGETS}) + foreach(target ${GPU_TARGETS}) list(APPEND HIP_HIPCC_FLAGS "--offload-arch=${target}") endforeach()