Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C++17 is the minimum required C++ level to compile ACE/TAO after this PR #2224

Merged
merged 19 commits into from
Apr 25, 2024
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,9 @@ jobs:
- name: checkout MPC
uses: actions/checkout@v4
with:
repository: DOCGroup/MPC
repository: jwillemsen/MPC
path: ${{ env.MPC_ROOT }}
ref: jwi-cmakelanguagestandard
- name: Add Repo
run: |
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add -
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,12 @@ jobs:
Repo: llvm-toolchain-$(lsb_release -cs)-15
platform_file: include $(ACE_ROOT)/include/makeinclude/platform_linux_clang.GNU
os: ubuntu-22.04
- CC: clang-16
CXX: clang++-16
PackageDeps: clang-16
Repo: llvm-toolchain-$(lsb_release -cs)-16
platform_file: include $(ACE_ROOT)/include/makeinclude/platform_linux_clang.GNU
os: ubuntu-22.04
- feature: CORBA/e micro
CC: gcc-10
CXX: g++-10
Expand Down Expand Up @@ -224,6 +230,9 @@ jobs:
with:
languages: cpp
if: matrix.feature == 'CodeQL'
- name: Print compiler version
run: |
${{ matrix.CXX }} -dumpversion
- name: Run mwc.pl on $(TAO_ROOT)/TAO_ACE.mwc
run: |
perl ${env:ACE_ROOT}/bin/mwc.pl -type gnuace ${env:TAO_ROOT}/TAO_ACE.mwc -workers 4
Expand Down
4 changes: 4 additions & 0 deletions ACE/NEWS
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
USER VISIBLE CHANGES BETWEEN ACE-7.1.4 and ACE-7.1.5
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please make this a major release if you're requiring a newer C++ standard.

Copy link
Member Author

@jwillemsen jwillemsen Apr 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will make it a new minor, we are not deprecating specific compilers, just lifting the required C++ standard

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stop resolving this. I still don't agree.

====================================================

. ACE/TAO now require C++17 or newer

. Add support for Embarcadero C++ Builder bcc64x compiler

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

Expand Down
4 changes: 2 additions & 2 deletions ACE/ace/Global_Macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@
# define ACE_SET_BITS(WORD, BITS) (WORD |= (BITS))
# define ACE_CLR_BITS(WORD, BITS) (WORD &= ~(BITS))

#if !defined (ACE_HAS_CPP14)
# error ACE/TAO require C++14 compliance, please upgrade your compiler and/or fix the platform configuration for your environment
#if !defined (ACE_HAS_CPP17)
# error ACE/TAO require C++17 compliance, please upgrade your compiler and/or fix the platform configuration for your environment
#endif

#define ACE_UNIMPLEMENTED_FUNC(f) f = delete;
Expand Down
2 changes: 1 addition & 1 deletion ACE/ace/checked_iterator.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* Some compilers (e.g. MSVC++ >= 8) issue security related
* diagnostics if algorithms such as std::copy() are used in an unsafe
* way. Normally this isn't an issue if STL container iterators are
* used in conjuction with the standard algorithms. However, in cases
* used in conjunction with the standard algorithms. However, in cases
* where application-specific iterators are use with standard
* algorithms that could potentially overrun a buffer, extra care must
* be taken to prevent such an overrun. If supported, checked
Expand Down
9 changes: 9 additions & 0 deletions ACE/bin/MakeProjectCreator/config/acedefaults.mpb
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,12 @@ feature(!threads) {
platform_libs -= rt
}
}

feature(ace_languagestandard2017) {
specific(vs2017,vs2019,vs2022) {
LanguageStandard = stdcpp17
}
specific(cmake) {
languagestandard = 17
}
}
6 changes: 6 additions & 0 deletions ACE/bin/MakeProjectCreator/config/vs2017nmake.mpb
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,9 @@ feature(vc_avoid_hides_class_member) {
DisableSpecificWarnings += 4458
}
}

feature(ace_languagestandard2017) {
specific(nmake) {
compile_flags += /std:c++17
}
}
6 changes: 6 additions & 0 deletions ACE/bin/MakeProjectCreator/config/vs2019nmake.mpb
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,9 @@ feature(vc_avoid_hides_class_member) {
DisableSpecificWarnings += 4458
}
}

feature(ace_languagestandard2017) {
specific(nmake) {
compile_flags += /std:c++17
}
}
6 changes: 6 additions & 0 deletions ACE/bin/MakeProjectCreator/config/vs2022nmake.mpb
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,9 @@ feature(vc_avoid_hides_class_member) {
DisableSpecificWarnings += 4458
}
}

feature(ace_languagestandard2017) {
specific(nmake) {
compile_flags += /std:c++17
}
}
20 changes: 19 additions & 1 deletion ACE/include/makeinclude/platform_linux_clang.GNU
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,13 @@ 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/\..*$$//')
CXX_MAJOR_DOT = $(word $2,$(subst ., ,$1))
CXX_MAJOR_VERSION := $(call CXX_MAJOR_DOT,$(CXX_VERSION),1)
endif

# clang 16 and newer default to C++17
ifeq ($(CXX_MAJOR_VERSION),$(filter $(CXX_MAJOR_VERSION),4 5 6 7 8 9 10 11 12 13 14 15))
c++std ?= c++17
endif

CCFLAGS += $(CFLAGS)
Expand All @@ -35,6 +41,18 @@ ifeq ($(optimize),0)
CPPFLAGS += -O0
endif

ifneq ($(c++std),)
CCFLAGS += -std=$(c++std)
endif

ifeq ($(c++20),1)
CCFLAGS += -std=c++20
endif

ifeq ($(c++17),1)
CCFLAGS += -std=c++17
endif

ifeq ($(c++14),1)
CCFLAGS += -std=c++14
endif
jwillemsen marked this conversation as resolved.
Show resolved Hide resolved
Expand Down
2 changes: 1 addition & 1 deletion ACE/include/makeinclude/platform_macosx_common.GNU
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ SOBUILD = -o $(VSHDIR)$*.dylib $<
ifeq ($(findstring g++,$(CXX)),)#
include $(ACE_ROOT)/include/makeinclude/platform_g++_common.GNU
else
c++14 ?= 1
c++std ?= c++17
include $(ACE_ROOT)/include/makeinclude/platform_clang_common.GNU
endif

Expand Down
5 changes: 0 additions & 5 deletions TAO/tests/Oneway_Send_Timeouts/Server_Task.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,7 @@ class Server_Task : public ACE_Task_Base
ACE_ARGV my_args (args_.c_str ());

// Initialize Server ORB in new thread

#ifdef ACE_HAS_CPP14
server_ = std::make_unique<Server> (my_args.argc (), my_args.argv ());
#else
server_.reset (new Server(my_args.argc (), my_args.argv ()));
#endif

ACE_ASSERT (server_);
initializer = true;
Expand Down
8 changes: 0 additions & 8 deletions TAO/tests/Oneway_Send_Timeouts/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,7 @@ bool MyMain::init_server (const ACE_TCHAR* args)
// main thread and extra thread for backdoor operations
int thread_pool = 2;

#ifdef ACE_HAS_CPP14
server_task_ = std::make_unique<Server_Task> (my_args);
#else
server_task_.reset (new Server_Task (my_args));
#endif

ACE_ASSERT (server_task_);

Expand Down Expand Up @@ -79,11 +75,7 @@ bool MyMain::init_client (const ACE_TCHAR* args)
std::string my_args (ACE_TEXT_ALWAYS_CHAR (args));
int thread_pool = 1;

#ifdef ACE_HAS_CPP14
client_task_ = std::make_unique<Client_Task> (my_args);
#else
client_task_.reset (new Client_Task (my_args));
#endif

ACE_ASSERT (client_task_);

Expand Down