grpc / grpc.io

Repository for the gRPC website and documentation
https://grpc.io
Other
420 stars 445 forks source link

Quick start: Abseil-C++ build on Catalina requires CMAKE_CXX_STANDARD flag #851

Open rfgunion opened 3 years ago

rfgunion commented 3 years ago

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.

sanjaypujare commented 3 years ago

CC @veblush