[CMake] Choosing the right compiler

Brett Delle Grazie brett.dellegrazie at gmail.com
Mon Jul 16 04:59:53 EDT 2012


On 15 July 2012 10:40, J Decker <d3ck0r at gmail.com> wrote:
> One way would be to setup a build environment batch, which would set
> the path to only have one or the other. but that's certainly not a
> shorter method :)

This is exactly what I do. Its also slightly safer in case the
compilers or supporting build tools happen to have the same name.

>
> On Sat, Jul 14, 2012 at 5:17 PM, Óscar Fuentes <ofv at wanadoo.es> wrote:
>> 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?
>>
>> --
>>
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>>
>> Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.cmake.org/mailman/listinfo/cmake
> --
>
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake


More information about the CMake mailing list