summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/RunCMake.cmake
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-02-09 07:41:06 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-02-09 18:15:04 (GMT)
commitc0d8e715915f65196353c09d86d4d34fe100437f (patch)
treef5fef6f19110ff0b065b6c21c07c22e6b922756f /Tests/RunCMake/RunCMake.cmake
parent68d29f519047aeef92a0ab8fef531010c311efaa (diff)
downloadCMake-c0d8e715915f65196353c09d86d4d34fe100437f.zip
CMake-c0d8e715915f65196353c09d86d4d34fe100437f.tar.gz
CMake-c0d8e715915f65196353c09d86d4d34fe100437f.tar.bz2
RunCMake: Allow specifying the stderr file for a test.
Diffstat (limited to 'Tests/RunCMake/RunCMake.cmake')
-rw-r--r--Tests/RunCMake/RunCMake.cmake5
1 files changed, 4 insertions, 1 deletions
diff --git a/Tests/RunCMake/RunCMake.cmake b/Tests/RunCMake/RunCMake.cmake
index 33b745d..6389ef4 100644
--- a/Tests/RunCMake/RunCMake.cmake
+++ b/Tests/RunCMake/RunCMake.cmake
@@ -18,7 +18,10 @@ function(run_cmake test)
set(expect_result 0)
endif()
foreach(o out err)
- if(EXISTS ${top_src}/${test}-std${o}.txt)
+ if(RunCMake-std${o}-file AND EXISTS ${top_src}/${RunCMake-std${o}-file})
+ file(READ ${top_src}/${RunCMake-std${o}-file} expect_std${o})
+ string(REGEX REPLACE "\n+$" "" expect_std${o} "${expect_std${o}}")
+ elseif(EXISTS ${top_src}/${test}-std${o}.txt)
file(READ ${top_src}/${test}-std${o}.txt expect_std${o})
string(REGEX REPLACE "\n+$" "" expect_std${o} "${expect_std${o}}")
else()