grpc: refactor cxxStandard selection

GRPC is less aggressive in overriding `CMAKE_CXX_STANDARD` nowadays.
This allows us to take a less invasive approach to ensure that the
provided abseil package is configured with the same implementation
for the provided c++17 compatibility shims.
Instead of always setting `CMAKE_CXX_STANDARD`, we only do it to
override hard-coded downgrade on darwin. With that, we can use the
default configuration for abseil-cpp, reducing the number of instances
of that library in the build closure to one.
This commit is contained in:
Tobias Mayer
2023-08-14 11:50:30 +02:00
parent 69ea1516ca
commit 54e9994a6b
4 changed files with 17 additions and 25 deletions
@@ -120,7 +120,6 @@ stdenv.mkDerivation rec {
# this adds a good chunk of time to the build
"-DBUILD_TESTING:BOOL=ON"
"-DGOOGLE_CLOUD_CPP_ENABLE_EXAMPLES:BOOL=OFF"
"-DCMAKE_CXX_STANDARD=${grpc.cxxStandard}"
] ++ lib.optionals (apis != [ "*" ]) [
"-DGOOGLE_CLOUD_CPP_ENABLE=${lib.concatStringsSep ";" apis}"
];