]> git.djapps.eu Git - pkg/ggml/sources/whisper.cpp/commitdiff
make : change GNU make default CXX from g++ to c++ (#2100)
authorPrzemysław Pawełczyk <redacted>
Sun, 28 Apr 2024 21:54:21 +0000 (23:54 +0200)
committerGitHub <redacted>
Sun, 28 Apr 2024 21:54:21 +0000 (22:54 +0100)
Makefile

index 3dd4a63085724b457d9f5de326fbce39f6794c08..b7e5a0e96f099bd60f1b6aad186b16ed35ad6e29 100644 (file)
--- 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)