[CMake] Prefer clang over gcc

Quaquaraquà nuquaquaraqua at gmail.com
Sun Jun 24 05:32:32 EDT 2018


Dear users,

how do you specify the order of compilers to select from the system? 
That is, if the user didn't set neither CMAKE_C_COMPILER nor the env. 
var. CC, I wish the build system would pick one of the compilers from a 
given list. In AutoConf, this is achieved through AC_PROG_CC([clang gcc 
icc cc]) [1]. What would be the corresponding snippet in cmake?

Yours,

Quaquaraqua


[1] 
https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.69/html_node/C-Compiler.html



More information about the CMake mailing list