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.
We try to choose the Windows SDK version based on the version of Windows
targeted by the build. However, if using VS 2017 without the Windows
8.1 SDK installed then we must fall back to the Windows 10 SDK even when
targeting an older version of Windows.
Inspired-by: gnaggnoyil <gnaggnoyil@gmail.com>
It does not actually configure the project to install to the given
location. That must be done by passing the `<INSTALL_DIR>` placeholder
to the external project configuration step.