diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2020-11-09 13:49:05 +0100 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2020-11-09 13:49:05 +0100 |
commit | 8b823ad37ba31afaf32ba944b792191a78bf3259 (patch) | |
tree | ddefb8b051ed9bd1de1100456fade8b5a84c6119 /ACE/include | |
parent | 754e5a7a4d7c445d52b5376323bf19a6a206dc23 (diff) | |
download | ATCD-8b823ad37ba31afaf32ba944b792191a78bf3259.tar.gz |
Enable C++11 as default c++ version for gcc4, that version of gcc has C++03 as default
* ACE/include/makeinclude/platform_g++_common.GNU:
Diffstat (limited to 'ACE/include')
-rw-r--r-- | ACE/include/makeinclude/platform_g++_common.GNU | 53 |
1 files changed, 29 insertions, 24 deletions
diff --git a/ACE/include/makeinclude/platform_g++_common.GNU b/ACE/include/makeinclude/platform_g++_common.GNU index 413fb0c0b88..f635763de77 100644 --- a/ACE/include/makeinclude/platform_g++_common.GNU +++ b/ACE/include/makeinclude/platform_g++_common.GNU @@ -52,30 +52,6 @@ ifeq ($(gprof),1) LDFLAGS += -pg endif -ifeq ($(c++20),1) - CCFLAGS += -std=c++20 - # This is needed due to the use of the deprecated auto_ptr class - no_deprecated ?= 1 -else - ifeq ($(c++17),1) - CCFLAGS += -std=c++17 - # This is needed due to the use of the deprecated auto_ptr class - no_deprecated ?= 1 - else - ifeq ($(c++14),1) - CCFLAGS += -std=c++14 - # This is needed due to the use of the deprecated auto_ptr class - no_deprecated ?= 1 - else - ifeq ($(c++11),1) - CCFLAGS += -std=c++11 - # This is needed due to the use of the deprecated auto_ptr class - no_deprecated ?= 1 - endif # c++11 - endif # c++14 - endif #c++17 -endif #c++20 - ifeq ($(no_deprecated),1) CCFLAGS += -Wno-deprecated endif @@ -110,6 +86,35 @@ else GXX_4_OR_BETTER := 1 endif +# gcc 4 has C++03 as default C++ version, enable this to be C++11 +ifeq ($(findstring $(CXX_MAJOR_VERSION),4),$(CXX_MAJOR_VERSION)) + c++11 ?= 1 +endif + +ifeq ($(c++20),1) + CCFLAGS += -std=c++20 + # This is needed due to the use of the deprecated auto_ptr class + no_deprecated ?= 1 +else + ifeq ($(c++17),1) + CCFLAGS += -std=c++17 + # This is needed due to the use of the deprecated auto_ptr class + no_deprecated ?= 1 + else + ifeq ($(c++14),1) + CCFLAGS += -std=c++14 + # This is needed due to the use of the deprecated auto_ptr class + no_deprecated ?= 1 + else + ifeq ($(c++11),1) + CCFLAGS += -std=c++11 + # This is needed due to the use of the deprecated auto_ptr class + no_deprecated ?= 1 + endif # c++11 + endif # c++14 + endif #c++17 +endif #c++20 + # If no option has been specified, set templates to automatic # version of the compiler. # |