summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/Ninja/SelectCompiler/1/gcc
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-04-17 13:44:30 (GMT)
committerBrad King <brad.king@kitware.com>2020-04-22 12:03:16 (GMT)
commite01990999a83fb08b0e46b3131501c01e3256944 (patch)
treecb89821b1aea1bbab3566897e12cb569aa0912dd /Tests/RunCMake/Ninja/SelectCompiler/1/gcc
parent8bc757c8f68d653526dce3f723950ccf221a4c6c (diff)
downloadCMake-e01990999a83fb08b0e46b3131501c01e3256944.zip
CMake-e01990999a83fb08b0e46b3131501c01e3256944.tar.gz
CMake-e01990999a83fb08b0e46b3131501c01e3256944.tar.bz2
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
Diffstat (limited to 'Tests/RunCMake/Ninja/SelectCompiler/1/gcc')
-rwxr-xr-xTests/RunCMake/Ninja/SelectCompiler/1/gcc2
1 files changed, 2 insertions, 0 deletions
diff --git a/Tests/RunCMake/Ninja/SelectCompiler/1/gcc b/Tests/RunCMake/Ninja/SelectCompiler/1/gcc
new file mode 100755
index 0000000..151dfa6
--- /dev/null
+++ b/Tests/RunCMake/Ninja/SelectCompiler/1/gcc
@@ -0,0 +1,2 @@
+#!/bin/sh
+false