Uploaded image for project: 'Xerces-C++'
  1. Xerces-C++
  2. XERCESC-2141

Enable C++11/14/17 with autoconf build and CMake build

    XMLWordPrintableJSON

Details

    • Patch

    Description

      The CMake build will try to put the compiler in C+14 mode, falling back to C11 then C+98. The autoconf build doesn't do this, and the attached patch makes the behaviour match so both build systems will use the same fallbacks.

      Current compilers default to C+14. Very old compilers have no support for C11 or C+14. But compilers in between support it, but not by default. This adds the feature tests to check for such support and enable it when available.

      The CMake C++ standard support is user-configurable by setting the CMAKE_CXX_STANDARD setting. Autoconf doesn't provide any way to do this, so the feature enabling isn't explicitly overridable. I'm not sure if that's too problematic. The main compatibility concern might be if this causes an ABI break with use of C++11/14 library features like the new string type. However, we aren't making use of any of these features. The main change would be the XMLCh type switch from uint16_t to char16_t. I'm not sure what the Xerces policy for such changes has been in the past. Any thoughts?

      Attachments

        Issue Links

          Activity

            People

              rleigh Roger Leigh
              rleigh Roger Leigh
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: