[CMake] Using different compilers

Alexander Neundorf a.neundorf-work at gmx.net
Wed Nov 9 02:22:45 EST 2005


> Von: Paulo Jabardo <pjabardo at yahoo.com.br> 
 
> How can I specify the compiler the compiler I want to 
> use in the CMakeLists.txt? The user could simply use 
> the advanced mode options to specify the options but I 
> think it would be interesting to use a set of "canned" 
> options, such as :  
> OPTION(USE_ICC "Use intel compilers") and it would 
> figure the rest out. 
>  
> Thanks 
> Paulo Jabardo 
 
You can set e.g. CMAKE_C_COMPILER and CMAKE_CXX_COMPILER, see this page 
for other useful cmake variables: 
http://www.cmake.org/Wiki/CMake_Useful_Variables 
 
Maybe this works even with the OPTION command. 
 
Alex 
 

-- 
Highspeed-Freiheit. Bei GMX supergünstig, z.B. GMX DSL_Cityflat,
DSL-Flatrate für nur 4,99 Euro/Monat*  http://www.gmx.net/de/go/dsl


More information about the CMake mailing list