diff options
author | Orkun Tokdemir <ilhanorkuntokdemir@gmail.com> | 2023-04-18 15:12:58 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2023-04-27 16:19:28 (GMT) |
commit | 8ba16db1637940540fbb254cad7f85c2323c6a3a (patch) | |
tree | bd17670a554790b2a1f55f4c6a990cf2047598f5 | |
parent | 0ca98beb5747de97040227695732f660b7b91fc0 (diff) | |
download | CMake-8ba16db1637940540fbb254cad7f85c2323c6a3a.zip CMake-8ba16db1637940540fbb254cad7f85c2323c6a3a.tar.gz CMake-8ba16db1637940540fbb254cad7f85c2323c6a3a.tar.bz2 |
Tests/RunCMake: Add option for dynamic expected output
Add `RunCMake_TEST_EXPECT_*` variables for this.
-rw-r--r-- | Tests/RunCMake/RunCMake.cmake | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Tests/RunCMake/RunCMake.cmake b/Tests/RunCMake/RunCMake.cmake index 8e85f6c..5e91e99 100644 --- a/Tests/RunCMake/RunCMake.cmake +++ b/Tests/RunCMake/RunCMake.cmake @@ -47,6 +47,8 @@ function(run_cmake test) elseif(EXISTS ${top_src}/${test}-${o}.txt) file(READ ${top_src}/${test}-${o}.txt expect_${o}) string(REGEX REPLACE "\n+$" "" expect_${o} "${expect_${o}}") + elseif(DEFINED RunCMake_TEST_EXPECT_${o}) + string(REGEX REPLACE "\n+$" "" expect_${o} "${RunCMake_TEST_EXPECT_${o}}") else() unset(expect_${o}) endif() |