4

Is it possible to use Homebrew to install boost libraries compiled with GCC (instead of Clang)?

I have tried pointing HOMEBREW_CXX to my Homebrew version of GCC, but it doesn't seem to do the trick.

If not, I can always modify the configure file following the suggestion in this answer:

How to install Boost with specified compiler (say GCC)

Community
  • 1
  • 1
Neal Kruis
  • 2,055
  • 3
  • 26
  • 49
  • 1
    And is it possible to install both simultaneously? Sadly, it seems the installed libraries don't have the suffix to help CMake to distinguish which one use for each compiler. – Alvaro Palma Aste Mar 23 '21 at 13:55

1 Answers1

6

brew install boost --cc=gcc-4.9 will do it. install --cc is described in man brew.

Tim Smith
  • 6,127
  • 1
  • 26
  • 32