OpenDDS / OpenDDS

OpenDDS is an open source C++ implementation of the Object Management Group (OMG) Data Distribution Service (DDS). OpenDDS also supports Java bindings through JNI.
http://www.opendds.org
Other
1.28k stars 463 forks source link

Test ACE's Minimum Required C++ Standard in CMake #4618

Closed iguessthislldo closed 1 week ago

iguessthislldo commented 2 weeks ago

Since https://github.com/OpenDDS/OpenDDS/pull/4487, CMake requires knowledge of the minimum C++ standard of ACE. It currently uses the ACE version to assume the minimum C++ standard, but the required standard changed in ACE to C++17. To support this correctly in CMake, we could do a version check, but master currently is 7.1.4, the last ACE7 release.

These changes try to compile against ace/Global_Macros.h to get the minimum C++ standard of ACE like how we currently check the compiler default. This will allow us to get any standard ACE requires as long it's a standard we're aware of. We will not need this after https://github.com/OpenDDS/OpenDDS/issues/4578, because CMake can directly tell us what ACE/TAO requires.

These changes still don't cover a case like ACE/TAO 7.1.4, where ACE/TAO was compiled with something other the compiler default or the minimum standard of ACE. CMake can't detect that, so that requires manually setting the standard in either CMake and/or the ACE/TAO build so they match.

Also: