Skip to content

Commit 577277f

Browse files
authored
make : change GNU make default CXX from g++ to c++ (ggml-org#6966)
1 parent ca7f29f commit 577277f

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

Makefile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,17 @@ ifndef UNAME_M
2727
UNAME_M := $(shell uname -m)
2828
endif
2929

30+
# In GNU make default CXX is g++ instead of c++. Let's fix that so that users
31+
# of non-gcc compilers don't have to provide g++ alias or wrapper.
32+
DEFCC := cc
33+
DEFCXX := c++
34+
ifeq ($(origin CC),default)
35+
CC := $(DEFCC)
36+
endif
37+
ifeq ($(origin CXX),default)
38+
CXX := $(DEFCXX)
39+
endif
40+
3041
# Mac OS + Arm can report x86_64
3142
# ref: https://github.com/ggerganov/whisper.cpp/issues/66#issuecomment-1282546789
3243
ifeq ($(UNAME_S),Darwin)

0 commit comments

Comments
 (0)