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

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

biologi spm
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
--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

Alexander Neundorf-3
On 2017 M05 27, Sat 15:49:35 CEST biologi spm wrote:
> 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.

you can set the CC and CXX env. variables to point at the compiler you want to
use. CMake should pick this one up then.

Alex

--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake
Loading...