|
|
@ -8,15 +8,17 @@ INCFLAGS = |
|
|
|
## -std=c++11. If you want to remove this variable please do so in a way that allows setting
|
|
|
|
## -std=c++11. If you want to remove this variable please do so in a way that allows setting
|
|
|
|
## custom FLAGS to work at build-time.
|
|
|
|
## custom FLAGS to work at build-time.
|
|
|
|
|
|
|
|
|
|
|
|
# detect proper flag for c++11 support by gcc
|
|
|
|
# detect proper flag for c++11 support by compilers
|
|
|
|
CXXVER := $(shell $(CXX) -dumpversion) |
|
|
|
CXXVER := $(shell $(CXX) -dumpversion) |
|
|
|
ifeq ($(shell expr match ${CXXVER} "4\.[0-9][0-9]"),4) # >= 4.10
|
|
|
|
ifeq ($(shell expr match $(CXX) 'clang'),5) |
|
|
|
|
|
|
|
NEEDED_CXXFLAGS += -std=c++11 |
|
|
|
|
|
|
|
else ifeq ($(shell expr match ${CXXVER} "4\.[0-9][0-9]"),4) # gcc >= 4.10
|
|
|
|
NEEDED_CXXFLAGS += -std=c++11 |
|
|
|
NEEDED_CXXFLAGS += -std=c++11 |
|
|
|
else ifeq ($(shell expr match ${CXXVER} "4\.[7-9]"),3) # >= 4.7
|
|
|
|
else ifeq ($(shell expr match ${CXXVER} "4\.[7-9]"),3) # >= 4.7
|
|
|
|
NEEDED_CXXFLAGS += -std=c++11 |
|
|
|
NEEDED_CXXFLAGS += -std=c++11 |
|
|
|
else ifeq ($(shell expr match ${CXXVER} "4\.6"),3) # = 4.6
|
|
|
|
else ifeq ($(shell expr match ${CXXVER} "4\.6"),3) # = 4.6
|
|
|
|
NEEDED_CXXFLAGS += -std=c++0x |
|
|
|
NEEDED_CXXFLAGS += -std=c++0x |
|
|
|
else ifeq ($(shell expr match $(CXX) 'clang'),5) |
|
|
|
else ifeq ($(shell expr match ${CXXVER} "5\.[0-9]"),3) # gcc >= 5.0
|
|
|
|
NEEDED_CXXFLAGS += -std=c++11 |
|
|
|
NEEDED_CXXFLAGS += -std=c++11 |
|
|
|
else # not supported
|
|
|
|
else # not supported
|
|
|
|
$(error Compiler too old) |
|
|
|
$(error Compiler too old) |
|
|
|