[CMake] Choosing the right compiler

Óscar Fuentes ofv at wanadoo.es
Sat Jul 14 20:17:01 EDT 2012


On a machine with both MinGW and VS installed, some generators (Ninja,
for instance) will use MinGW by default. The only way I know of
instructing cmake to use VS instead is

cmake -G Ninja -DCMAKE_CXX_COMPILER=cl -DCMAKE_C_COMPILER=cl ...

This is quite verbose and triggers some bugs.

Is there a cleaner way to tell cmake to use VS instead of MinGW with a
given generator?



More information about the CMake mailing list