From: Przemysław Pawełczyk Date: Sun, 28 Apr 2024 21:54:21 +0000 (+0200) Subject: make : change GNU make default CXX from g++ to c++ (#2100) X-Git-Tag: upstream/1.7.4~827 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=8fac6455ffeb0a0950a84e790ddb74f7290d33c4;p=pkg%2Fggml%2Fsources%2Fwhisper.cpp make : change GNU make default CXX from g++ to c++ (#2100) --- diff --git a/Makefile b/Makefile index 3dd4a630..b7e5a0e9 100644 --- a/Makefile +++ b/Makefile @@ -18,6 +18,17 @@ ifndef NVCC_VERSION endif 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 + CCV := $(shell $(CC) --version | head -n 1) CXXV := $(shell $(CXX) --version | head -n 1)