From a0931f4a3cfe1ea8683ea6532679362d21616faf Mon Sep 17 00:00:00 2001 From: Jeremy Newton Date: Thu, 7 Apr 2022 16:27:34 -0400 Subject: [PATCH] Only default IMAGE_SUPPORT=ON for x86 Image support does not compile on other archectures, since it relies on the x86 only header "x86intrin.h". Signed-off-by: Jeremy Newton Change-Id: I120d15870e74e20bd618e6f5da8c05e28fb1203b --- runtime/hsa-runtime/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/runtime/hsa-runtime/CMakeLists.txt b/runtime/hsa-runtime/CMakeLists.txt index 8fb02b14e0..38a26fbb4c 100644 --- a/runtime/hsa-runtime/CMakeLists.txt +++ b/runtime/hsa-runtime/CMakeLists.txt @@ -191,10 +191,10 @@ set ( SRCS core/util/lnx/os_linux.cpp target_sources( ${CORE_RUNTIME_TARGET} PRIVATE ${SRCS} ) -if ( NOT DEFINED IMAGE_SUPPORT ) +if ( NOT DEFINED IMAGE_SUPPORT AND CMAKE_SYSTEM_PROCESSOR MATCHES "i?86|x86_64|amd64|AMD64" ) set ( IMAGE_SUPPORT ON ) endif() -set ( IMAGE_SUPPORT ${IMAGE_SUPPORT} CACHE BOOL "Build with image support (default: ON)." ) +set ( IMAGE_SUPPORT ${IMAGE_SUPPORT} CACHE BOOL "Build with image support (default: ON for x86, OFF elsewise)." ) ## Optional image module defintions. if(${IMAGE_SUPPORT})