From dab6b2e1c2ca0afb95c8c404e8244c399a606746 Mon Sep 17 00:00:00 2001 From: Lizonghang <870644199@qq.com> Date: Wed, 15 Jan 2025 20:50:36 +0400 Subject: [PATCH] fix option USE_HIGHS --- Makefile | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index 8c34694b..f2f9ed95 100644 --- a/Makefile +++ b/Makefile @@ -271,19 +271,20 @@ else ifeq ($(UNAME_S),Linux) MK_LDFLAGS += -L/usr/local/lib -lzmq endif -ifdef USE_HIGHS +ifeq ($(USE_HIGHS),1) ifeq ($(UNAME_S),Darwin) - MK_CPPFLAGS += -isystem /opt/homebrew/include/highs - MK_LDFLAGS += -L/opt/homebrew/lib -lhighs - else ifeq ($(UNAME_S),Linux) - MK_CPPFLAGS += -isystem /usr/local/include/highs - MK_LDFLAGS += -L/usr/local/lib -lhighs - + HIGHS_CPPFLAGS = -isystem /opt/homebrew/include/highs + HIGHS_LDFLAGS = -L/opt/homebrew/lib -lhighs + else ifeq ($(UNAME_S),Linux) + HIGHS_CPPFLAGS = -isystem /usr/local/include/highs + HIGHS_LDFLAGS = -L/usr/local/lib -lhighs ifneq ($(CONDA_PREFIX),) - MK_CPPFLAGS += -isystem $(CONDA_PREFIX)/include -isystem $(CONDA_PREFIX)/include/highs - MK_LDFLAGS += -L$(CONDA_PREFIX)/lib -Wl,-rpath,$(CONDA_PREFIX)/lib + HIGHS_CPPFLAGS += -isystem $(CONDA_PREFIX)/include -isystem $(CONDA_PREFIX)/include/highs + HIGHS_LDFLAGS += -L$(CONDA_PREFIX)/lib -Wl,-rpath,$(CONDA_PREFIX)/lib endif endif + MK_CPPFLAGS += $(HIGHS_CPPFLAGS) -DUSE_HIGHS + MK_LDFLAGS += $(HIGHS_LDFLAGS) endif ifdef LLAMA_NO_CCACHE