diff options
Diffstat (limited to 'ACE/include/makeinclude/platform_linux_clang.GNU')
-rw-r--r-- | ACE/include/makeinclude/platform_linux_clang.GNU | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/ACE/include/makeinclude/platform_linux_clang.GNU b/ACE/include/makeinclude/platform_linux_clang.GNU index facabe30b10..f5d4da11398 100644 --- a/ACE/include/makeinclude/platform_linux_clang.GNU +++ b/ACE/include/makeinclude/platform_linux_clang.GNU @@ -10,7 +10,18 @@ ifeq ($(insure),0) endif ifndef CXX_VERSION - CXX_VERSION := $(shell $(CXX) --version) + CXX_VERSION := $(shell $(CXX) -dumpversion) +endif +ifeq (cmd,$(findstring cmd,$(SHELL))) +CXX_MAJOR_VERSION := $(firstword $(subst ., ,$(CXX_VERSION))) +else +CXX_MAJOR_VERSION := $(shell $(CXX) -dumpversion | sed -e 's/[^0-9\.]//g' | sed -e 's/\..*$$//') +endif + +# clang5 has C++03 as default C++ version, enable this to be C++11 +# the older clang versions all return 4.2.1 as part of dumpversion +ifeq ($(findstring $(CXX_MAJOR_VERSION),4),$(CXX_MAJOR_VERSION)) + c++11 ?= 1 endif CCFLAGS += $(CFLAGS) @@ -30,14 +41,8 @@ ifeq ($(optimize),0) CPPFLAGS += -O0 endif -ifeq ($(c++0x),1) - CCFLAGS += -std=c++0x - no_deprecated ?= 1 -else - ifeq ($(c++11),1) - CCFLAGS += -std=c++11 - no_deprecated ?= 1 - endif +ifeq ($(c++11),1) + CCFLAGS += -std=c++11 endif ifeq ($(no_deprecated),1) |