How to Get CMake to Use Default Compiler on System PATH? -


currently, invoke cmake build directory follows:

cxx="/opt/gcc-4.8/bin/g++" cmake ..

to cmake use particular compiler. otherwise uses operating system default compiler.

my path has "/opt/gcc-4.8/bin" in front of else. so, instead of prepending environmental variable there way specify in "`cmakelists.txt" file use default g++ on path?

cmake honors setting of path environment variable, gives preference generic compiler names cc , c++. determine c compiler used default under unix cmake, run:

$ cc 

to determine default c++ compiler, run:

$ c++ 

if generate symbolic link c++ in /opt/gcc-4.8/bin points /opt/gcc-4.8/bin/g++, cmake should use gcc 4.8 default.


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -