Skip to content

Commit

Permalink
Fix Mac build
Browse files Browse the repository at this point in the history
  • Loading branch information
WrathfulSpatula committed Jul 10, 2024
1 parent d01cd3a commit 2121bdb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 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 ${CMAKE_SYSTEM_PROCESSOR} MATCHES "arm64"))
if ((NOT OpenCL_FOUND) OR (APPLE AND NOT (${CMAKE_SYSTEM_PROCESSOR} MATCHES "^amd")))
set (ENABLE_OPENCL OFF)
endif ((NOT OpenCL_FOUND) OR (APPLE AND NOT ${CMAKE_SYSTEM_PROCESSOR} MATCHES "arm64"))
endif ((NOT OpenCL_FOUND) OR (APPLE AND NOT (${CMAKE_SYSTEM_PROCESSOR} MATCHES "^amd")))
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
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ ifeq ($(UNAME_P),x86_64)
mkdir ../../_qrack_include; mkdir ../../_qrack_include/qrack; cp -r ../include/* ../../_qrack_include/qrack; cp -r include/* ../../_qrack_include/qrack; \
cd ../../..
else
cd qrack/build; cmake -DQBCAPPOW=12 -DCPP_STD=14 -DENABLE_RDRAND=OFF -DENABLE_COMPLEX_X2=OFF -DENABLE_SSE3=OFF ..; make all; \
cd qrack/build; cmake -DQBCAPPOW=12 -DCPP_STD=14 -DENABLE_RDRAND=OFF -DENABLE_COMPLEX_X2=OFF -DENABLE_SSE3=OFF -DENABLE_OPENCL=OFF ..; make all; \
mkdir ../../_qrack_include; mkdir ../../_qrack_include/qrack; cp -r ../include/* ../../_qrack_include/qrack; cp -r include/* ../../_qrack_include/qrack; \
cd ../../..
endif
Expand Down

0 comments on commit 2121bdb

Please sign in to comment.