grpc.io
grpc.io copied to clipboard
Quick start: Abseil-C++ build on Catalina requires CMAKE_CXX_STANDARD flag
On Mac OSX Catalina, I found the abseil build failed because it did not default to a C++11 or higher standard. I replaced the cmake command,
cmake -DCMAKE_INSTALL_PREFIX=$MY_INSTALL_DIR \
-DCMAKE_POSITION_INDEPENDENT_CODE=TRUE \
../..
with:
cmake -DCMAKE_INSTALL_PREFIX=$MY_INSTALL_DIR \
-DCMAKE_POSITION_INDEPENDENT_CODE=TRUE \
-DCMAKE_CXX_STANDARD=17 \
../..
and all was well. I didn't try this with 11 because my projects all use 17, but it should work equally well.
CC @veblush