Skip to content

Commit

Permalink
Changed the default to C++17 for QNX and g++ versions older as 11 (11…
Browse files Browse the repository at this point in the history
… has C++17 as default)

    * ACE/include/makeinclude/platform_g++_common.GNU:
    * ACE/include/makeinclude/platform_qnx_gcc.GNU:
  • Loading branch information
jwillemsen committed Apr 5, 2024
1 parent bd6cd5b commit 33d1703
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
14 changes: 14 additions & 0 deletions ACE/include/makeinclude/platform_g++_common.GNU
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,20 @@ endif

CXX_FULL_VERSION := $(shell $(CXX_FOR_VERSION_TEST) --version)

# Minimum C++ level is now C++17, gcc until version 11 have an older version as default
ifeq ($(findstring $(CXX_MAJOR_VERSION),7),$(CXX_MAJOR_VERSION))
c++std ?= c++17
endif
ifeq ($(findstring $(CXX_MAJOR_VERSION),8),$(CXX_MAJOR_VERSION))
c++std ?= c++17
endif
ifeq ($(findstring $(CXX_MAJOR_VERSION),9),$(CXX_MAJOR_VERSION))
c++std ?= c++17
endif
ifeq ($(findstring $(CXX_MAJOR_VERSION),10),$(CXX_MAJOR_VERSION))
c++std ?= c++17
endif

# Only modify LDFLAGS if DLD has been set.
ifneq ($(DLD),)
ifeq ($(DLD),$(CXX_FOR_VERSION_TEST)) # only try this is we are using ld through gcc
Expand Down
2 changes: 1 addition & 1 deletion ACE/include/makeinclude/platform_qnx_gcc.GNU
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ debug ?= 1
optimize ?= 0
threads ?= 1
pipes ?= 0
c++std ?= gnu++14
c++std ?= gnu++17

CCFLAGS += -fexceptions
LDFLAGS += -fexceptions
Expand Down

0 comments on commit 33d1703

Please sign in to comment.