Pass to `-Yc` path as was typed by user (not exactly so, B2 automatically turns / to \ on Windows, so force the / in variable expansion).
(cherry picked from commit 65fa7a57c683594ba8c0a77e5691f0514defeb8e)
Co-authored-by: Nikita Kniazev <nok.raven@gmail.com>
[skip ci]
* Test: Invoke b2 with .exe suffix on Windows
* GCC: Pass -ftemplate-depth-xxx when building PCH
* MSVC: Fix PCH include directory and pass only PCH-header name to -Yu
Apparently `[ $(pch-header).path ]` gives the wrong path to the header.
Previously it was needed to include pch header in every source file, but Clang does it automatically making the usage non-uniform. It is also a very noisy process to add pch header to an existing project. Automatic on-demand header inclusion solves both issues.
* pch: msvc source automatic header folder inclusion
* pch test refactoring
* pch test msvc automatic pch source generation
* Include pch header automatically and on-demand
* no more need in gcc pch naming hack
* Follow-up to removed restriction of pch naming on GCC
* Fix pch path conflict on GCC
gcc-pch-generator rewrites target name to a value derived from a header name
and this cases path conflict if multiple pch are created from the same header.
hello.cpp is duplicated in the test for the same reason but for `exe` target --
`exe hello-afx : hello.cpp ;` uses `hello.o` for object file name.
Do not require pch target to have the same name as the header base name.
The restriction was added in 76d041d7c1 without
a rationale and only for GCC while reworking PCH support for GCC and MSVC.
Now that the tests work in py2 or p3 we don't set py version in AP. This
allows for dealing with the AP images that don't have a way to set the
py version.
Various restructure of test framework handling of paths to avoid duplicate path editing which caused failed tests. Adjust many tests to deal with added subdirectories in build outputs now that toolset requirements are active.