Skip to content

Commit

Permalink
Merge pull request #2212 from jwillemsen/jwi-defaultcpp17
Browse files Browse the repository at this point in the history
Changed the default to C++17 for QNX and g++ versions older as 11 (11…
  • Loading branch information
jwillemsen committed Apr 8, 2024
2 parents 7add19f + eb7dd3b commit 3c1ffaa
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
3 changes: 3 additions & 0 deletions ACE/NEWS
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
USER VISIBLE CHANGES BETWEEN ACE-7.1.3 and ACE-7.1.4
====================================================

. With g++ versions < 11 we default to C++17 as
minimum C++ standards level

USER VISIBLE CHANGES BETWEEN ACE-7.1.2 and ACE-7.1.3
====================================================

Expand Down
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 3c1ffaa

Please sign in to comment.