mirror of
https://github.com/Kitware/CMake.git
synced 2025-12-31 10:50:16 -06:00
Tests: Fix TryCompile bad source case for clang-cl 15 on Windows
When `pass.c bad#source.c` passes through `nmake`, the compiler gets `pass.c bad`. The clang-cl 15 compiler now fails on `bad` with an error that we did not previously match. Update our regex.
This commit is contained in:
@@ -117,7 +117,7 @@ try_compile(SHOULD_FAIL_DUE_TO_BAD_SOURCE
|
||||
if(SHOULD_FAIL_DUE_TO_BAD_SOURCE AND NOT CMAKE_GENERATOR MATCHES "Watcom WMake|NMake Makefiles")
|
||||
string(REPLACE "\n" "\n " output " ${output}")
|
||||
message(SEND_ERROR "try_compile with bad#source.c did not fail:\n${output}")
|
||||
elseif(NOT output MATCHES [[(bad#source\.c|bad\.c|bad')]])
|
||||
elseif(NOT output MATCHES [[(bad#source\.c|bad\.c|bad[':])]])
|
||||
string(REPLACE "\n" "\n " output " ${output}")
|
||||
message(SEND_ERROR "try_compile with bad#source.c failed without mentioning bad source:\n${output}")
|
||||
else()
|
||||
|
||||
Reference in New Issue
Block a user