libtins: force C++17 for gtest

This commit is contained in:
SandaruKasa 2025-07-15 18:11:45 +03:00
parent 604a720efb
commit 0489ebad35
2 changed files with 7 additions and 5 deletions

View File

@ -1,4 +1,4 @@
This change bypasses all the code that attempts to see which C++11 features are enabled in your specific C++11 compiler. C++14 is required for gtest 1.13+.
This change bypasses all the code that attempts to see which C++11 features are enabled in your specific C++11 compiler. C++17 is required for gtest 1.17+.
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 902233e676ee..49ac8a1010a4 100644
--- a/CMakeLists.txt
@ -20,7 +20,7 @@ index 902233e676ee..49ac8a1010a4 100644
- ENDIF()
+ SET(TINS_HAVE_CXX11 ON)
+ MESSAGE(STATUS "Using C++11 features")
+ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14")
+ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17")
ELSE(LIBTINS_ENABLE_CXX11)
MESSAGE(
WARNING

View File

@ -21,9 +21,11 @@ stdenv.mkDerivation rec {
};
patches = [
# Required for gtest 1.13+, see also upstream report at:
# https://github.com/mfontanini/libtins/issues/529
./0001-force-cpp-14.patch
# Required for gtest 1.17+:
# https://github.com/NixOS/nixpkgs/issues/425358
# See also an upstream report for gtest 1.13+ and C++14:
# https://github.com/mfontanini/libtins/issues/
./0001-force-cpp-17.patch
];
postPatch = ''