I'm using MacOS X Lion with XCode 4.2.1. and I need gcc 2.4.6. to compile a CMake project. Therefor I build gcc 2.4.6. on my own in a local directory $HOME/mygcc/bin. Is there a way to influece the path to the compiler CMake uses?
You can either use the GUI to set these variables:
CMAKE_C_COMPILER=$HOME/mygcc/bingcc
CMAKE_CXX_COMPILER=$HOME/mygcc/bing++
Or you can run cmake from the commandline:
cmake ../path/to/source -DCMAKE_C_COMPILER=$HOME/mygcc/bin/gcc -DCMAKE_CXX_COMPILER=$HOME/mygcc/bin/g++
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With