[CMake] Prefer clang over gcc

Rolf Eike Beer eike at sf-mail.de
Sun Jun 24 06:20:13 EDT 2018


Am Sonntag, 24. Juni 2018, 11:32:32 CEST schrieb Quaquaraquà:
> 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?

CMake will look at /usr/bin/cc if nothing else is set.

Eike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: This is a digitally signed message part.
URL: <https://cmake.org/pipermail/cmake/attachments/20180624/b401cd9f/attachment.sig>


More information about the CMake mailing list