bbc / bmx

Library and utilities to read and write broadcasting media files. Primarily supports the MXF file format
BSD 3-Clause "New" or "Revised" License
62 stars 17 forks source link

Use C++11 as minimal required only #71

Closed uilianries closed 4 months ago

uilianries commented 4 months ago

Hello, this PR adds the ability of choosing the C++ standard used when building the project. So far, it's configured to C++11 only, not giving the chance of using newer C++ standards like 14, 17 and 20.

We discovered this behavior when packaging the BMX project into Conan: https://github.com/conan-io/conan-center-index/pull/23955

As we run the CI with different C++ standards, we noted was not possible to use a different version of C++.

The target_compile_features passes the required standard cxx_std_11 but does not impose as unique supported version. In case passing -DCMAKE_CXX_STANDARD=14, CMake will use C++14 instead.