rapidjson: build with C++17 language level

gtest was upgraded to 1.14.0; as of 1.13.x gtest requires at least c++14
to build.

rapidjson's CMake scripts have support for specifying C++11 or C++17;
rather than add our own support for C++14 we set the C++17 flag instead.

+8 -1
+8 -1
pkgs/development/libraries/rapidjson/default.nix
··· 43 43 # for tests, adding gtest to checkInputs does not work 44 44 # https://github.com/NixOS/nixpkgs/pull/212200 45 45 buildInputs = [ gtest ]; 46 - cmakeFlags = [ "-DGTEST_SOURCE_DIR=${gtest.dev}/include" ]; 46 + cmakeFlags = [ 47 + "-DGTEST_SOURCE_DIR=${gtest.dev}/include" 48 + 49 + # Build rapidjson with std=c++17 so gtest 1.13.0+ works 50 + # https://github.com/NixOS/nixpkgs/pull/282245#issuecomment-1951796902 51 + "-DRAPIDJSON_BUILD_CXX11=OFF" 52 + "-DRAPIDJSON_BUILD_CXX17=ON" 53 + ]; 47 54 48 55 nativeCheckInputs = [ valgrind ]; 49 56 doCheck = !stdenv.hostPlatform.isStatic && !stdenv.isDarwin;