diff options
author | Brad King <brad.king@kitware.com> | 2023-05-15 18:37:03 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2023-05-15 19:34:55 (GMT) |
commit | fb3c4715cd88bce564e3e64d844cdf4e9bebfb25 (patch) | |
tree | e9ad6e38011de33ad1426ff88c0396755668b4dc /Tests/RunCMake/showIncludes.c | |
parent | 822aa26915613d87de8ee19c8b45f7535ffca98f (diff) | |
download | CMake-fb3c4715cd88bce564e3e64d844cdf4e9bebfb25.zip CMake-fb3c4715cd88bce564e3e64d844cdf4e9bebfb25.tar.gz CMake-fb3c4715cd88bce564e3e64d844cdf4e9bebfb25.tar.bz2 |
Ninja: Restore detection of msvc-wine showIncludes prefix
Since commit 8f82e755f3 (Ninja: Fix detection of MSVC showIncludes
prefix in Italian, 2023-01-26, v3.26.0-rc1~20^2) our regex no longer
matches the output from `msvc-wine`, which uses forward slashes:
Note: including file: /path/to/foo.h
`cl /showIncludes` under Wine prints paths of the form `Z:\path\to\file`,
but the `msvc-wine` wrapper converts them to the form `/path/to/file` so
that native Ninja can be used. Update our regex to match the prefix
followed by a path with a leading forward slash.
Fixes: #24908
Diffstat (limited to 'Tests/RunCMake/showIncludes.c')
-rw-r--r-- | Tests/RunCMake/showIncludes.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Tests/RunCMake/showIncludes.c b/Tests/RunCMake/showIncludes.c index 5afe04a..7d467cf 100644 --- a/Tests/RunCMake/showIncludes.c +++ b/Tests/RunCMake/showIncludes.c @@ -36,6 +36,14 @@ int main() } } + // msvc-wine (special case for test, not a real VS value). + if (strcmp(vslang, "msvc-wine") == 0) { + if (cp == 437 || cp == 65001) { + printf("Note: including file: /c/foo.h\n"); + return 0; + } + } + // German. if (strcmp(vslang, "1031") == 0) { if (cp == 437 || cp == 65001) { |