1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-10-21 14:40:48 +08:00

Tests/RunCMake: Add option for dynamic expected output

Add `RunCMake_TEST_EXPECT_*` variables for this.
This commit is contained in:
Orkun Tokdemir
2023-04-18 17:12:58 +02:00
committed by Brad King
parent 0ca98beb57
commit 8ba16db163

View File

@@ -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()