From e01990999a83fb08b0e46b3131501c01e3256944 Mon Sep 17 00:00:00 2001 From: Brad King Date: Fri, 17 Apr 2020 09:44:30 -0400 Subject: Ninja: On Windows, select the compiler occurring first in PATH On Windows, toolchains like MSVC require a set of environment variables to be configured for the compiler to work correctly. The scripts that prepare these environments typically put the compiler's directory ahead of others in the `PATH`. Teach the Ninja generators to use this as a heuristic to select the compiler when none is explicitly specified. This is not necessary with Makefile generators because each toolchain's environment comes with its own make tool variant, and the corresponding Makefile generator (e.g. "NMake Makefiles") automatically implies the matching compiler. Fixes: #20585 --- Help/release/dev/ninja-compiler-PATH-windows.rst | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 Help/release/dev/ninja-compiler-PATH-windows.rst (limited to 'Help') diff --git a/Help/release/dev/ninja-compiler-PATH-windows.rst b/Help/release/dev/ninja-compiler-PATH-windows.rst new file mode 100644 index 0000000000..cb33493b05 --- /dev/null +++ b/Help/release/dev/ninja-compiler-PATH-windows.rst @@ -0,0 +1,7 @@ +ninja-compiler-PATH-windows +--------------------------- + +* On Windows, the :generator:`Ninja` and :generator:`Ninja Multi-Config` + generators, when a compiler is not explicitly specified, now select + the first compiler (of any name) found in directories listed by the + ``PATH`` environment variable. -- cgit v1.2.1