approvals / ApprovalTests.cpp

Native ApprovalTests for C++ on Linux, Mac and Windows
https://approvaltestscpp.readthedocs.io/en/latest/
Apache License 2.0
318 stars 51 forks source link

Set the requirement for C++11 features in the CMakeLists.txt file #80

Closed dheater closed 4 years ago

dheater commented 4 years ago

set(CMAKE_CXX_STANDARD 11) will inform the compiler to include the appropriate flags to use the C++ standard for older compilers where C++11 support is available, but is not the default (ex, gcc5)

Issue discovered during CI testing on Conan package. Conan CI runs on numerous compiler versions. PR is here: https://github.com/conan-io/conan-center-index/pull/544

Referencing this article for instructions on how to set the C++ standard version in CMake: https://crascit.com/2015/03/28/enabling-cxx11-in-cmake/

dheater commented 4 years ago

Sorry. My mistake. The cause of the Conan CI fail was in the test code. Not in ApprovalTests. I did verify that ApprovalTests.cpp builds with the version of the compiler where the test failed (gcc 5.2.1)