summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/RunCMake.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2023-09-13 12:42:49 (GMT)
committerKitware Robot <kwrobot@kitware.com>2023-09-13 12:42:55 (GMT)
commita8c50d6faf8cd91ad8a338b41b9140c687bc27ca (patch)
tree971741b7d4c2da00542310a613d533b35c6e3f5b /Tests/RunCMake/RunCMake.cmake
parent6686caf74c315cce85bfe7de48bfb3d21dead368 (diff)
parent09b650d00097863c03bff6c46122a7f366c4ddd2 (diff)
downloadCMake-a8c50d6faf8cd91ad8a338b41b9140c687bc27ca.zip
CMake-a8c50d6faf8cd91ad8a338b41b9140c687bc27ca.tar.gz
CMake-a8c50d6faf8cd91ad8a338b41b9140c687bc27ca.tar.bz2
Merge topic 'orkun_21677_16_06_2023'
09b650d000 Autogen: Move QtAutoMocDeps tests to RunCMake/Autogen ebc9e448b3 Autogen: Add depfile support for Makefiles e5358b9d8d RunCMake: Add RunCMake_TEST_NOT_EXPECT variables Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Merge-request: !8570
Diffstat (limited to 'Tests/RunCMake/RunCMake.cmake')
-rw-r--r--Tests/RunCMake/RunCMake.cmake10
1 files changed, 10 insertions, 0 deletions
diff --git a/Tests/RunCMake/RunCMake.cmake b/Tests/RunCMake/RunCMake.cmake
index 3e5ddc5..baeb9ca 100644
--- a/Tests/RunCMake/RunCMake.cmake
+++ b/Tests/RunCMake/RunCMake.cmake
@@ -53,6 +53,11 @@ function(run_cmake test)
unset(expect_${o})
endif()
endforeach()
+ foreach(o IN ITEMS stdout stderr config)
+ if(DEFINED RunCMake_TEST_NOT_EXPECT_${o})
+ string(REGEX REPLACE "\n+$" "" not_expect_${o} "${RunCMake_TEST_NOT_EXPECT_${o}}")
+ endif()
+ endforeach()
if (NOT expect_stderr)
if (NOT RunCMake_DEFAULT_stderr)
set(RunCMake_DEFAULT_stderr "^$")
@@ -228,6 +233,11 @@ function(run_cmake test)
string(APPEND msg "${o} does not match that expected.\n")
endif()
endif()
+ if(DEFINED not_expect_${o})
+ if("${actual_${o}}" MATCHES "${not_expect_${o}}")
+ string(APPEND msg "${o} matches that not expected.\n")
+ endif()
+ endif()
endforeach()
unset(RunCMake_TEST_FAILED)
if(RunCMake-check-file AND EXISTS ${top_src}/${RunCMake-check-file})