[CMake] Alternate compiler specific options - how to specify?

Rolf Eike Beer eike at sf-mail.de
Thu Sep 12 02:35:13 EDT 2013


Miller Henry wrote:
> We are using cmake 2.8.11 for out project.
> 
> Our local compiler is gcc-4.4.3.  There is desire to use a newer compiler,
> but we are not yet ready to commit to anything yet.  In the mean time we
> have installed binaries gcc-4.7 and gcc-4.8.  We can specify the alternate
> compiler with -DCMAKE_C_COMPILER=gcc-4.7, but we want to go a step farther:
>  one (believed important) advantage of gcc-4.7 is the option -mtune=atom
> since that is are target system. We want to force this option when using
> the newer compiler, but the older version of gcc doesn't accept it.

cmake --help-module CheckCCompilerFlag

Eike
-- 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://www.cmake.org/pipermail/cmake/attachments/20130912/a872ad86/attachment.pgp>


More information about the CMake mailing list