Skip to content

Commit

Permalink
make : change GNU make default CXX from g++ to c++ (ggerganov#2100)
Browse files Browse the repository at this point in the history
  • Loading branch information
przemoc authored Apr 28, 2024
1 parent 22b6598 commit 8fac645
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 8fac645

Please sign in to comment.