Skip to content

Commit

Permalink
fix macos nightly build
Browse files Browse the repository at this point in the history
  • Loading branch information
fangq committed Aug 28, 2023
1 parent 2a5f27c commit 1a2f291
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ CUOMPLINK=
ARCH = $(shell uname -m)
PLATFORM = $(shell uname -s)
CUDA_HOME ?= /usr/local/cuda
ISCLANG = $(shell $(CC) --version | grep clang)

INCLUDEDIRS+=${INCLUDES} -Izmat -Izmat/easylzma -I$(CUDA_HOME)/include -Iubj

Expand All @@ -52,7 +53,11 @@ ifeq ($(BACKEND),ocelot)
CUCCOPT+=-D__STRICT_ANSI__ -g #--maxrregcount 32
else ifeq ($(BACKEND),cudastatic)
ifeq ($(findstring Darwin,$(PLATFORM)), Darwin)
CUDART=-lcudadevrt -lcudart_static -ldl -static-libgcc -static-libstdc++
ifeq ($(ISCLANG),)
CUDART=-lcudadevrt -lcudart_static -ldl -static-libgcc -static-libstdc++
else
CUDART=-lcudadevrt -lcudart_static -ldl /usr/local/lib/libomp.a
endif
else
CUDART=-lcudadevrt -lcudart_static -ldl -lrt -static-libgcc -static-libstdc++
endif
Expand Down Expand Up @@ -105,7 +110,7 @@ ifeq ($(findstring _NT-,$(PLATFORM)), _NT-)
MEXLINKLIBS="\$$LINKLIBS"
export CC CXX
else ifeq ($(findstring Darwin,$(PLATFORM)), Darwin)
CUDA_STATIC=--cudart static
CUDA_STATIC=--cudart static /usr/local/lib/libomp.a
OMP=-Xclang -fopenmp
CPPOPT+=$(OMP)
LINKOPT+=-L/usr/local/lib
Expand Down Expand Up @@ -192,7 +197,7 @@ log debuglog: CUCCOPT+=-DUSE_LL5_RAND
fermi fermimex fermioct: xor
fermimex fermioct: OUTPUTFLAG:=-output

log posix xoro fermi: LINKOPT+=$(CUOMPLINK) $(OMP)
log posix xoro fermi: LINKOPT+=$(CUOMPLINK) "$(OMP)"

debugxor debuglog: CUCCOPT+=-DMCX_DEBUG
fermi fermimex fermioct: CUCCOPT+=-DSAVE_DETECTORS -use_fast_math $(CUGENCODE)
Expand Down

0 comments on commit 1a2f291

Please sign in to comment.