Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The cmake configuration adds a compiler flag to set the C++ version to C++11. This happens even if the default C++ version for the GCC compiler version used is higer than C++11. In this case the flag downgrades the version. Since system libraries and headers can use features compatible with the default C++ version of the default compiler, downgrading the C++ version might make some system libraries incompatible with this setting. The recent update of googletest in Fedora requires C++ 14. The gcc version in Fedora Rawhide is currently 13. C++ 17 is the default since GCC 11. C++ 14 is the default since GCC 6.1. This PR drops the addition of the -std=c++11 flag if the GCC version is 6.1 or greater. With this change the code can be compiled on Fedora Rawhide without triggering errors: /usr/include/gtest/internal/gtest-port.h:270:2: error: #error C++ versions less than C++14 are not supported. The implementation and the preceding commit message text are by Mattias Ellert, @ellert, copied from cern-fts/davix#103.
- Loading branch information