diff options
author | Brad King <brad.king@kitware.com> | 2020-04-14 12:15:30 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2020-04-15 12:34:18 (GMT) |
commit | af7de05853f9ced4703b7dc470f7eb475f1ede9c (patch) | |
tree | 528954403a46eec04a24492f66c5c46bdf1d2b0a /Tests/TryCompile | |
parent | 1639ee70ef7986c4c6ad72db1b2552bcaa5b88fa (diff) | |
download | CMake-af7de05853f9ced4703b7dc470f7eb475f1ede9c.zip CMake-af7de05853f9ced4703b7dc470f7eb475f1ede9c.tar.gz CMake-af7de05853f9ced4703b7dc470f7eb475f1ede9c.tar.bz2 |
Makefiles: Do not use '\#' escape sequence with Windows-style make tools
Since commit fbf7a92975 (Makefile: Handle '#' in COMPILE_OPTIONS,
2014-08-12, v3.1.0-rc1~174^2) we escape `#` as `\#` in `flags.make`
variable assignments so that they are not treated as a comment.
Windows-style make tools like NMake do not interpret backslashes
in that way. Other means will be needed to handle `#` in contexts
where it is even possible. The test suite is not covering this
for NMake anyway, and actually has a workaround in `Tests/TryCompile`
for the old behavior, which we can now update.
Diffstat (limited to 'Tests/TryCompile')
-rw-r--r-- | Tests/TryCompile/CMakeLists.txt | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Tests/TryCompile/CMakeLists.txt b/Tests/TryCompile/CMakeLists.txt index 9ec9b70..df921d8 100644 --- a/Tests/TryCompile/CMakeLists.txt +++ b/Tests/TryCompile/CMakeLists.txt @@ -187,7 +187,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\\)]]) +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() |