mirror of
https://github.com/cp2k/cp2k.git
synced 2026-07-29 06:35:28 -04:00
Skip libtorch if glibc is too old
This commit is contained in:
parent
a85683755d
commit
43746ff0cb
1 changed files with 10 additions and 8 deletions
|
|
@ -367,18 +367,20 @@ ifneq ($(USE_OPENBLAS),)
|
|||
endif
|
||||
endif
|
||||
|
||||
ifneq ($(USE_LIBTORCH),)
|
||||
USE_LIBTORCH := $(strip $(USE_LIBTORCH))
|
||||
LIBTORCH_INC := $(INSTALL_PATH)/libtorch-$(USE_LIBTORCH)/include
|
||||
LIBTORCH_LIB := $(INSTALL_PATH)/libtorch-$(USE_LIBTORCH)/lib
|
||||
CFLAGS += -I$(LIBTORCH_INC)
|
||||
DFLAGS += -D__LIBTORCH
|
||||
LIBS += -Wl,-rpath=$(LIBTORCH_LIB) -L$(LIBTORCH_LIB) -lc10 -ltorch_cpu -ltorch
|
||||
ifeq ($(shell [ $(shell ldd --version | head -n 1 | cut -d. -f2) -ge 27 ] && echo yes), yes)
|
||||
ifneq ($(USE_LIBTORCH),)
|
||||
USE_LIBTORCH := $(strip $(USE_LIBTORCH))
|
||||
LIBTORCH_INC := $(INSTALL_PATH)/libtorch-$(USE_LIBTORCH)/include
|
||||
LIBTORCH_LIB := $(INSTALL_PATH)/libtorch-$(USE_LIBTORCH)/lib
|
||||
CFLAGS += -I$(LIBTORCH_INC)
|
||||
DFLAGS += -D__LIBTORCH
|
||||
LIBS += -Wl,-rpath=$(LIBTORCH_LIB) -L$(LIBTORCH_LIB) -lc10 -ltorch_cpu -ltorch
|
||||
endif
|
||||
endif
|
||||
|
||||
CFLAGS += $(DFLAGS) $(CFLAGS_DEBUG)
|
||||
|
||||
CXXFLAGS += $(CFLAGS) --std=c++14
|
||||
CXXFLAGS := $(CFLAGS) --std=c++14
|
||||
|
||||
FCFLAGS := $(CFLAGS) $(FCFLAGS_DEBUG) $(WFLAGS)
|
||||
ifeq ($(shell [ $(shell gcc -dumpversion | cut -d. -f1) -gt 9 ] && echo yes), yes)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue