Skip to content

Commit

Permalink
Improved finding CL/cl.h.
Browse files Browse the repository at this point in the history
  • Loading branch information
hfp committed Nov 6, 2024
1 parent ca4491f commit 2554e17
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions config/cp2k/Linux-x86-64-intelx.arch
Original file line number Diff line number Diff line change
Expand Up @@ -1057,10 +1057,13 @@ dbm_multiply_opencl.o: dbm_multiply_opencl.c $(ALL_HEADERS) $(OPENCL_DBM_SRC).h
OPENCL_LIBS := $(if $(wildcard $(OPENCL_ROOT)/lib64),lib64,lib)
LIBS += -L$(OPENCL_ROOT)/$(OPENCL_LIBS)
IFLAGS += $(OPENCL_ROOT)/include
else ifneq (,$(wildcard $(OPENCL_ROOT)/include/sycl/CL/cl.h))
OPENCL_LIBS := $(if $(wildcard $(OPENCL_ROOT)/lib64),lib64,lib)
LIBS += -L$(OPENCL_ROOT)/$(OPENCL_LIBS) -L$(OPENCL_ROOT)/compiler/lib/intel64 -lintlc
IFLAGS += $(OPENCL_ROOT)/include/sycl
else ifneq (,$(ICX))
OPENCL_ROOT := $(dir $(dir $(dir $(ICX))))
ifneq (,$(wildcard $(OPENCL_ROOT)/include/sycl/CL/cl.h))
OPENCL_LIBS := $(if $(wildcard $(OPENCL_ROOT)/lib64),lib64,lib)
LIBS += -L$(OPENCL_ROOT)/$(OPENCL_LIBS) -L$(OPENCL_ROOT)/compiler/lib/intel64 -lintlc
IFLAGS += $(OPENCL_ROOT)/include/sycl
endif
endif
OCL_ICD_LOADER := $(firstword $(wildcard /usr/lib/*/libOpenCL.so.*))
LIBS += $(if $(OCL_ICD_LOADER),$(OCL_ICD_LOADER),-l:libOpenCL.so.1)
Expand Down

0 comments on commit 2554e17

Please sign in to comment.