Skip to content

Commit

Permalink
Fix Mac amd/x86_64 detection
Browse files Browse the repository at this point in the history
  • Loading branch information
WrathfulSpatula committed Jul 10, 2024
1 parent 2121bdb commit 87d0eb3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ if (NOT MSVC)

option(ENABLE_OPENCL "Use OpenCL optimizations" ON)
find_package(OpenCL)
if ((NOT OpenCL_FOUND) OR (APPLE AND NOT (${CMAKE_SYSTEM_PROCESSOR} MATCHES "^amd")))
if ((NOT OpenCL_FOUND) OR (APPLE AND NOT ((${CMAKE_SYSTEM_PROCESSOR} MATCHES "^amd") OR (${CMAKE_SYSTEM_PROCESSOR} MATCHES "^x86_64"))))
set (ENABLE_OPENCL OFF)
endif ((NOT OpenCL_FOUND) OR (APPLE AND NOT (${CMAKE_SYSTEM_PROCESSOR} MATCHES "^amd")))
endif ((NOT OpenCL_FOUND) OR (APPLE AND NOT ((${CMAKE_SYSTEM_PROCESSOR} MATCHES "^amd") OR (${CMAKE_SYSTEM_PROCESSOR} MATCHES "^x86_64"))))
add_library(qrack_device SHARED pennylane_qrack/qrack_device.cpp)
target_link_directories(qrack_device PUBLIC ${CMAKE_SOURCE_DIR}/catalyst/runtime/include ${CMAKE_SOURCE_DIR}/qrack/build)
target_include_directories(qrack_device PUBLIC ${CMAKE_SOURCE_DIR}/catalyst/runtime/include ${CMAKE_SOURCE_DIR}/_qrack_include)
Expand Down

0 comments on commit 87d0eb3

Please sign in to comment.