Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't downgrade the C++ version #103

Merged
merged 1 commit into from
Feb 1, 2023

Commits on Jan 24, 2023

  1. Don't downgrade the C++ version

    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.
    ellert committed Jan 24, 2023
    Configuration menu
    Copy the full SHA
    357918e View commit details
    Browse the repository at this point in the history