summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-01-16 14:43:56 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2015-01-16 14:43:56 (GMT)
commitc15a2fdd2ee3552024c3892bb798bb956b4677d9 (patch)
tree0432ce97fecaba2f505afa7c4adc1331813d6b7d
parent3cca39b46db715bcfdc7fc4a02210c8ab4cf572f (diff)
parent6c121924ada1f26c485c628279d6501406d9e3ac (diff)
downloadCMake-c15a2fdd2ee3552024c3892bb798bb956b4677d9.zip
CMake-c15a2fdd2ee3552024c3892bb798bb956b4677d9.tar.gz
CMake-c15a2fdd2ee3552024c3892bb798bb956b4677d9.tar.bz2
Merge topic 'tests-RunCMake-report-command'
6c121924 Tests: Teach RunCMake to report command-line on failure
-rw-r--r--Tests/RunCMake/RunCMake.cmake4
1 files changed, 4 insertions, 0 deletions
diff --git a/Tests/RunCMake/RunCMake.cmake b/Tests/RunCMake/RunCMake.cmake
index 7b3eda7..1625741 100644
--- a/Tests/RunCMake/RunCMake.cmake
+++ b/Tests/RunCMake/RunCMake.cmake
@@ -93,6 +93,10 @@ function(run_cmake test)
if(RunCMake_TEST_FAILED)
set(msg "${RunCMake_TEST_FAILED}\n${msg}")
endif()
+ if(msg AND RunCMake_TEST_COMMAND)
+ string(REPLACE ";" "\" \"" command "\"${RunCMake_TEST_COMMAND}\"")
+ set(msg "${msg}Command was:\n command> ${command}\n")
+ endif()
if(msg)
string(REGEX REPLACE "\n" "\n actual-out> " actual_out " actual-out> ${actual_stdout}")
string(REGEX REPLACE "\n" "\n actual-err> " actual_err " actual-err> ${actual_stderr}")