ebu / libadm

Audio Definition Model (ITU-R BS.2076) handling library
https://libadm.readthedocs.io
Apache License 2.0
39 stars 16 forks source link

Add option to disable warning on MSVC about symbol visibility for cus… #163

Open rsjbailey opened 2 years ago

rsjbailey commented 2 years ago

…tom exceptions

Currently, on MSVC builds, we have a lot of warnings about the custom adm extensions being derived from std::exception, despite this being listed as a 'best practice' in the msvc documentation.

As these exceptions are defined in a header, this will not be an issue for direct consumers of libadm. We think this would only be an issue for transitive dependants if the direct dependent allows the exception definition to propogate out, and the ABI for std::exception changes, and the consumer is using a different version of the compiler than that with which is was built (or debug/release mismatch) - a combination which is fairly unlikely.

To err on the side of caution, this PR leaves the warnings enabled by default, but provides a cmake option that disables these warnings for this specific case. It also enables this option for CI builds, to avoid noise that might obscure more pertinent issues.