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

Update CMakeLists.txt for macOS #39

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Update CMakeLists.txt for macOS #39

wants to merge 1 commit into from

Conversation

schuhmaj
Copy link

@schuhmaj schuhmaj commented Jul 12, 2024

Changelog

  • Improve the finding of libxerces-c by employing find_package(..), which works cross-platform
    • add some hints on how to install libxerces-c (e.g., either via apt or brew)
  • Decrease C++ standard to C++14 due to out-of-date bundled libxsd
    • GNU GCC compiles fine with C++17 (also on macOS)
    • Apple Clang does not compile with C++17
    • This is actually the desired behavior in this case since the bundled library contains usages of std::auto_ptr. However, this feature was removed in C++17. So, GNU GCC compiles code that is actually not compliant with the standard.

What might be better? Compile libxsd with C++14 and the rest with C++17.
However, my quick-win strategy for setting this up failed --> So, how much do we want this?

@schuhmaj schuhmaj requested a review from thesamriel July 12, 2024 13:01
@schuhmaj schuhmaj self-assigned this Jul 12, 2024
This is achieved by updating the CMake set-up:
- add find_package(XercesC ...) (can be installed via brew)
- link the target, as specified by FindXercesC.cmake
- decrease the C++ standard to 14 (This is required, as libxsd uses std::auto_ptr which was removed in C++17. Hence, stricter compilers (e.g. Apple Clang) refuse to compile)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant