Explorar o código

make : change GNU make default CXX from g++ to c++ (#6966)

Przemysław Pawełczyk hai 1 ano
pai
achega
577277ffd2
Modificáronse 1 ficheiros con 11 adicións e 0 borrados
  1. 11 0
      Makefile

+ 11 - 0
Makefile

@@ -27,6 +27,17 @@ ifndef UNAME_M
 UNAME_M := $(shell uname -m)
 endif
 
+# In GNU make default CXX is g++ instead of c++.  Let's fix that so that users
+# of non-gcc compilers don't have to provide g++ alias or wrapper.
+DEFCC  := cc
+DEFCXX := c++
+ifeq ($(origin CC),default)
+CC  := $(DEFCC)
+endif
+ifeq ($(origin CXX),default)
+CXX := $(DEFCXX)
+endif
+
 # Mac OS + Arm can report x86_64
 # ref: https://github.com/ggerganov/whisper.cpp/issues/66#issuecomment-1282546789
 ifeq ($(UNAME_S),Darwin)