gtest: ensure C++17 support (#207338)

This commit is contained in:
Dmitry Kalinkin 2023-01-23 01:20:01 -05:00 committed by GitHub
parent 78daa27725
commit 2f8e6f3d33
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -19,7 +19,13 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ cmake ninja ]; nativeBuildInputs = [ cmake ninja ];
cmakeFlags = [ "-DBUILD_SHARED_LIBS=ON" ]; cmakeFlags = [
"-DBUILD_SHARED_LIBS=ON"
] ++ lib.optionals (stdenv.cc.isClang && (lib.versionOlder stdenv.cc.version "16.0")) [
# Enable C++17 support
# https://github.com/google/googletest/issues/3081
"-DCMAKE_CXX_STANDARD=17"
];
meta = with lib; { meta = with lib; {
description = "Google's framework for writing C++ tests"; description = "Google's framework for writing C++ tests";