summaryrefslogtreecommitdiffstats
path: root/Tests/CTestTestMemcheck
diff options
context:
space:
mode:
authorRolf Eike Beer <eike@sf-mail.de>2013-07-27 19:40:25 (GMT)
committerRolf Eike Beer <eike@sf-mail.de>2013-07-27 20:05:47 (GMT)
commitc0756b6dd67b7f2e113dafde398cec597537068c (patch)
tree45e4af7a5feb264ed5a2af6137f9560d70ad3972 /Tests/CTestTestMemcheck
parent46558d290be1760828714545f41afae17b0c71c9 (diff)
downloadCMake-c0756b6dd67b7f2e113dafde398cec597537068c.zip
CMake-c0756b6dd67b7f2e113dafde398cec597537068c.tar.gz
CMake-c0756b6dd67b7f2e113dafde398cec597537068c.tar.bz2
Revert "CTest: fix pre and post test commands with spaces" (#13887)
This reverts commit 6187876dea89618044e200808bcae75a18bd4043. It was actually possible before to have paths with spaces in them, the spaces just need to be quoted. This way spaces will work as argument separators.
Diffstat (limited to 'Tests/CTestTestMemcheck')
-rw-r--r--Tests/CTestTestMemcheck/CMakeLists.txt6
1 files changed, 5 insertions, 1 deletions
diff --git a/Tests/CTestTestMemcheck/CMakeLists.txt b/Tests/CTestTestMemcheck/CMakeLists.txt
index ff02883..2db9282 100644
--- a/Tests/CTestTestMemcheck/CMakeLists.txt
+++ b/Tests/CTestTestMemcheck/CMakeLists.txt
@@ -91,7 +91,11 @@ gen_mcnl_test(DummyPurifyNoLogfile "\${PSEUDO_PURIFY}")
gen_mcnl_test(DummyValgrindNoLogfile "\${PSEUDO_VALGRIND}")
gen_mcnl_test(DummyBCNoLogfile "\${PSEUDO_BC}")
-set(CTEST_EXTRA_CODE "set(CTEST_CUSTOM_PRE_MEMCHECK \"\${CTEST_MEMORYCHECK_COMMAND}\")\nset(CTEST_CUSTOM_POST_MEMCHECK \"\${CTEST_MEMORYCHECK_COMMAND}\")")
+set(CTEST_EXTRA_CODE "string(REPLACE \" \" \"\\\\ \" PRE_POST_COMMAND \"\${CTEST_MEMORYCHECK_COMMAND}\")
+
+set(CTEST_CUSTOM_PRE_MEMCHECK \"\${PRE_POST_COMMAND} pre command\")
+set(CTEST_CUSTOM_POST_MEMCHECK \"\${PRE_POST_COMMAND} post command \")
+")
gen_mc_test(DummyValgrindPrePost "\${PSEUDO_VALGRIND}")
set(CTEST_EXTRA_CODE "set(CTEST_CUSTOM_POST_MEMCHECK \"\${ERROR_COMMAND}\")")