OpenTimelineIO icon indicating copy to clipboard operation
OpenTimelineIO copied to clipboard

Offer alternative for cxxabi on Windows (Swift+Clang).

Open furby-tm opened this issue 6 months ago • 3 comments

Summarize your change.

This fixes the clang compilation of OpenTimelineIO on Microsoft Windows, when compiling with Swift. Previously, the cxxabi.h header was erroneously getting included in the Windows clang compilation of OpenTimelineIO's stringUtils.cpp file because it was being conditionally compiled for clang across all platforms, and this header does not exist on the Windows platform.

  • The include for cxxabi.h is now guarded via __has_include(<cxxabi.h>).
  • A new preprocessor definition for OTIO_HAVE_DEMANGLER is set to 1 if cxxabi.h exists, and 0 if this header does not exist.
  • Previous checks against defined(__GNUC__) || defined(__clang__) are replaced with conditional compilation checks against the new OTIO_HAVE_DEMANGLER preprocessor define.

furby-tm avatar Jul 29 '24 19:07 furby-tm