Spaces:
Sleeping
Sleeping
Przemysław Pawełczyk
commited on
make : change GNU make default CXX from g++ to c++ (#2100)
Browse files
Makefile
CHANGED
|
@@ -18,6 +18,17 @@ ifndef NVCC_VERSION
|
|
| 18 |
endif
|
| 19 |
endif
|
| 20 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
CCV := $(shell $(CC) --version | head -n 1)
|
| 22 |
CXXV := $(shell $(CXX) --version | head -n 1)
|
| 23 |
|
|
|
|
| 18 |
endif
|
| 19 |
endif
|
| 20 |
|
| 21 |
+
# In GNU make default CXX is g++ instead of c++. Let's fix that so that users
|
| 22 |
+
# of non-gcc compilers don't have to provide g++ alias or wrapper.
|
| 23 |
+
DEFCC := cc
|
| 24 |
+
DEFCXX := c++
|
| 25 |
+
ifeq ($(origin CC),default)
|
| 26 |
+
CC := $(DEFCC)
|
| 27 |
+
endif
|
| 28 |
+
ifeq ($(origin CXX),default)
|
| 29 |
+
CXX := $(DEFCXX)
|
| 30 |
+
endif
|
| 31 |
+
|
| 32 |
CCV := $(shell $(CC) --version | head -n 1)
|
| 33 |
CXXV := $(shell $(CXX) --version | head -n 1)
|
| 34 |
|