At a VS 2017 command prompt the `PATH` contains a directory that happens
to have a `Git/cmd/git.exe` inside it. However, this executable is not
meant for general use. Revise our use of `Git/` path suffixes to be
more specific to its original purpose of searching in the typical
`c:/Program Files*/Git/` installation directories. Avoid using the
suffixes on `PATH` entries.
Fixes: #16706
Before Vulkan 1.0.42, the SDK would add the Bin directory to `PATH`,
which was confusing the 32-bit search on Windows. Avoid such confusion
by ignoring the `PATH` when looking for the 32-bit version.
Vulkan 1.0.42 fixed the whole problem by moving the libraries into Lib,
Lib32, so this is strictly a compatibility fix for old SDKs.
This reverts commit v3.8.0-rc1~305^2 (Remove CTestTestfile.cmake when
BUILD_TESTING is OFF, 2016-11-14). It breaks projects that never enable
testing but create their own `CTestTestfile.cmake` manually instead.
When checking whether a directory is "implicit" (e.g. implicit link
directory or implicit rpath directory), resolve the real path of both
sides of the comparison. Otherwise we will not recognize paths like
`/usr/lib32` as implicit when `/usr/lib` is implicit and `lib32` is
actually a symlink to `lib`. This can lead to addition of unnecessary
entries to the RPATH of a binary, for example.
Fixes: #16682
The `FIND_LIBRARY_USE_LIB<arch>_PATHS` global properties ask
`find_library` to look in `lib<arch>` directories automatically before
corresponding `lib` directories. However, if `lib<arch>` is just a
symlink to `lib` (or vice-versa) then we should skip adding the
`lib<arch>` path. Such symlinks typically only exist to satisfy
software that expects the `lib<arch>` path to be available.
Fixes: #16687
When compiling KWIML tests with `-Werror=format-security` we get
error: -Wformat-security ignored without -Wformat
Therefore we should disable both `format` and `format-security`
together.
When `COMPILE_PDB_NAME` is used without `COMPILE_PDB_OUTPUT_DIRECTORY`
we cannot fall back on the link `PDB_OUTPUT_DIRECTORY` for an object
library because it has no link step.
Fixes: #16674
This reverts commit v3.7.0-rc1~275^2 (Ninja: Use full path for all
source files, 2016-08-05). Unfortunately using absolute paths can
cause incorrect rebuilds due to ninja limitations. The ninja
manual [1] explains:
> ... using absolute paths, your depfile may result in a mixture of
> relative and absolute paths. Paths used by other build rules need
> to match exactly.
Passing an absolute path to a source file to the compiler while using a
relative path in the ninja build manifest can cause such mixture and
lead to incorrect rebuilds. Simply revert the change for now.
Note that there was a follow-up to the original change in commit
v3.7.0-rc2~10^2 (Ninja: Fix RC language depfile generation with
cmcldeps, 2016-10-13). We don't need to revert that because that
change made the relevant code cleverly adapt to whatever variable
we use to reference the source file.
[1] https://ninja-build.org/manual.html#_depsFixes: #16675
Issue: #13894
In commit v3.8.0-rc1~87^2~1 (VS: added support for C#, 2017-01-09) we
removed what looked like a no-op streaming operation but in fact it
is responsible for applying indentation. Restore the line.