diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2020-11-10 08:45:50 +0100 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2020-11-10 08:45:50 +0100 |
commit | 77a1104c4693db655642a24a622757a91fd3def2 (patch) | |
tree | 7654345df8cf13653eaca852127f3a9313027c0c /ACE/include | |
parent | 04bb26f586826c645f61c3f0a55ba70f2b78f43f (diff) | |
download | ATCD-77a1104c4693db655642a24a622757a91fd3def2.tar.gz |
clang5 has c++03 as default C++ compliance level, set this to c++11 for clang5, newer versions of clang have newer C++ compliance levels. Also use c++11 instead of c++0x
* ACE/include/makeinclude/platform_linux_clang.GNU:
Diffstat (limited to 'ACE/include')
-rw-r--r-- | ACE/include/makeinclude/platform_linux_clang.GNU | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/ACE/include/makeinclude/platform_linux_clang.GNU b/ACE/include/makeinclude/platform_linux_clang.GNU index facabe30b10..6ce3673b19c 100644 --- a/ACE/include/makeinclude/platform_linux_clang.GNU +++ b/ACE/include/makeinclude/platform_linux_clang.GNU @@ -10,7 +10,17 @@ 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_FOR_VERSION_TEST) -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 +ifeq ($(findstring $(CXX_MAJOR_VERSION),5),$(CXX_MAJOR_VERSION)) + c++11 ?= 1 endif CCFLAGS += $(CFLAGS) @@ -30,14 +40,9 @@ ifeq ($(optimize),0) CPPFLAGS += -O0 endif -ifeq ($(c++0x),1) - CCFLAGS += -std=c++0x +ifeq ($(c++11),1) + CCFLAGS += -std=c++11 no_deprecated ?= 1 -else - ifeq ($(c++11),1) - CCFLAGS += -std=c++11 - no_deprecated ?= 1 - endif endif ifeq ($(no_deprecated),1) |