jean-airoldie / zeromq-src-rs

Source code and logic to build ZeroMQ from source
MIT License
11 stars 15 forks source link

fix c++11 detection on older gcc #47

Closed skrap closed 1 month ago

skrap commented 1 month ago

On older GCC, the c++11 detection fails, as GCC refuses to compile for the C language with the -std=c++11 flag.

The error is below:

  cc1: error: command line option '-std=c++11' is valid for C++/ObjC++ but not for C [-Werror]
  cc1: all warnings being treated as errors

This failure is interpreted as a lack of -std=c++11 support, and eventually the build fails because of the absence of that flag.

I propose this fix: tell cc that we're compiling with c++ instead. This means, in practice, that we will use g++ rather than gcc.

jean-airoldie commented 1 month ago

Sounds good. I'll do a release after I merge.

skrap commented 1 month ago

Thank you!