libtins: Forcibly compile with C++14.

+28
+26
pkgs/development/libraries/libtins/0001-force-cpp-14.patch
···
··· 1 + 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+. 2 + diff --git a/CMakeLists.txt b/CMakeLists.txt 3 + index 902233e676ee..49ac8a1010a4 100644 4 + --- a/CMakeLists.txt 5 + +++ b/CMakeLists.txt 6 + @@ -103,17 +103,9 @@ ENDIF() 7 + # C++11 support 8 + OPTION(LIBTINS_ENABLE_CXX11 "Compile libtins with c++11 features" ON) 9 + IF(LIBTINS_ENABLE_CXX11) 10 + - # We only use declval and decltype on gcc/clang as VC fails to build that code, 11 + - # at least on VC2013 12 + - IF(HAS_CXX11_RVALUE_REFERENCES AND HAS_CXX11_FUNCTIONAL AND HAS_CXX11_CHRONO AND 13 + - HAS_CXX11_NOEXCEPT AND ((HAS_CXX11_DECLVAL AND HAS_CXX11_DECLTYPE) OR MSVC)) 14 + - SET(TINS_HAVE_CXX11 ON) 15 + - MESSAGE(STATUS "Enabling C++11 features") 16 + - SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX11_COMPILER_FLAGS}") 17 + - ELSE() 18 + - MESSAGE(WARNING "The compiler doesn't support the necessary C++11 features. " 19 + - "Disabling C++11 on this build") 20 + - ENDIF() 21 + + SET(TINS_HAVE_CXX11 ON) 22 + + MESSAGE(STATUS "Using C++11 features") 23 + + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14") 24 + ELSE(LIBTINS_ENABLE_CXX11) 25 + MESSAGE( 26 + WARNING
+2
pkgs/development/libraries/libtins/default.nix
··· 20 url = "https://github.com/mfontanini/libtins/commit/812be7966d445ec56e88eab512f8fd2d57152427.patch"; 21 hash = "sha256-5RCFPe95r1CBrAocjTPR2SvUlgaGa1aBc8RazyxUj3M="; 22 }) 23 ]; 24 25 postPatch = ''
··· 20 url = "https://github.com/mfontanini/libtins/commit/812be7966d445ec56e88eab512f8fd2d57152427.patch"; 21 hash = "sha256-5RCFPe95r1CBrAocjTPR2SvUlgaGa1aBc8RazyxUj3M="; 22 }) 23 + # Required for gtest 1.13+. 24 + ./0001-force-cpp-14.patch 25 ]; 26 27 postPatch = ''