[CMake] Feature request: change how CMake chooses compiler when Ninja is used (Windows)

biologi spm biologismksa2 at gmail.com
Sat May 27 03:49:35 EDT 2017


Hi CMake developers,

When both Mingw64 GCC and MSVC is available in PATH and run cmake
-GNinja, cmake always choose GCC. I have to manually remove GCC from
PATH or type -DCMAKE_IGNORE_PATH= which is very long.

I suggest when both compilers are found in PATH when running cmake
-GNinja, cmake should choose the first compiler found in PATH.

Case 1:

PATH=/path/to/cl.exe;/path/to/gcc.exe;, choose MSVC.

Case 2:

PATH=/path/to/gcc.exe;/path/to/cl.exe;, choose GCC.

Thanks in advance.

- John London


More information about the CMake mailing list