diff options
author | YR Chen <stevapple@icloud.com> | 2023-03-18 07:34:39 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2023-03-20 14:08:25 (GMT) |
commit | 843fc607de7654bd24eab1b6d97d69ee989a8f9c (patch) | |
tree | 04557e6c199510099f9c6243e47c728225e9571e /Tests/RunCMake/Ninja | |
parent | 3346570ae99b4f51a9b5b0a52f58765726d4ee2b (diff) | |
download | CMake-843fc607de7654bd24eab1b6d97d69ee989a8f9c.zip CMake-843fc607de7654bd24eab1b6d97d69ee989a8f9c.tar.gz CMake-843fc607de7654bd24eab1b6d97d69ee989a8f9c.tar.bz2 |
Ninja: Restore detection of clang-cl 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 `clang-cl`, which uses a relative path, forward
slashes, and is always in English [1]:
Note: including file: ./foo.h
Update the regex to match that too.
[1] https://github.com/llvm/llvm-project/blob/llvmorg-16.0.0/clang/lib/Frontend/HeaderIncludeGen.cpp#L102
Co-authored-by: Brad King <brad.king@kitware.com>
Diffstat (limited to 'Tests/RunCMake/Ninja')
4 files changed, 8 insertions, 0 deletions
diff --git a/Tests/RunCMake/Ninja/RunCMakeTest.cmake b/Tests/RunCMake/Ninja/RunCMakeTest.cmake index 9214e90..520d9c7 100644 --- a/Tests/RunCMake/Ninja/RunCMakeTest.cmake +++ b/Tests/RunCMake/Ninja/RunCMakeTest.cmake @@ -46,6 +46,7 @@ if(WIN32) if(RunCMake_MAKE_PROGRAM) set(maybe_MAKE_PROGRAM "-DRunCMake_MAKE_PROGRAM=${RunCMake_MAKE_PROGRAM}") endif() + run_cmake_script(ShowIncludes-437-ClangCl -DshowIncludes=${showIncludes} ${maybe_MAKE_PROGRAM}) run_cmake_script(ShowIncludes-437-English -DshowIncludes=${showIncludes} ${maybe_MAKE_PROGRAM}) run_cmake_script(ShowIncludes-437-French -DshowIncludes=${showIncludes} ${maybe_MAKE_PROGRAM}) run_cmake_script(ShowIncludes-437-German -DshowIncludes=${showIncludes} ${maybe_MAKE_PROGRAM}) diff --git a/Tests/RunCMake/Ninja/ShowIncludes-437-ClangCl-check.cmake b/Tests/RunCMake/Ninja/ShowIncludes-437-ClangCl-check.cmake new file mode 100644 index 0000000..6136463 --- /dev/null +++ b/Tests/RunCMake/Ninja/ShowIncludes-437-ClangCl-check.cmake @@ -0,0 +1,3 @@ +# 'clang-cl /showIncludes' prefix. +set(expect "Note: including file: ") +include(${CMAKE_CURRENT_LIST_DIR}/ShowIncludes-check.cmake) diff --git a/Tests/RunCMake/Ninja/ShowIncludes-437-ClangCl-stdout.txt b/Tests/RunCMake/Ninja/ShowIncludes-437-ClangCl-stdout.txt new file mode 100644 index 0000000..bda7eab --- /dev/null +++ b/Tests/RunCMake/Ninja/ShowIncludes-437-ClangCl-stdout.txt @@ -0,0 +1 @@ +-- showIncludes='Note: including file: ' diff --git a/Tests/RunCMake/Ninja/ShowIncludes-437-ClangCl.cmake b/Tests/RunCMake/Ninja/ShowIncludes-437-ClangCl.cmake new file mode 100644 index 0000000..7eca3d3 --- /dev/null +++ b/Tests/RunCMake/Ninja/ShowIncludes-437-ClangCl.cmake @@ -0,0 +1,3 @@ +set(CODEPAGE 437) +set(VSLANG "clang-cl") # Special case for test, not a real VS value. +include(${CMAKE_CURRENT_LIST_DIR}/ShowIncludes.cmake) |