File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -51,9 +51,13 @@ if(PRE)
5151endif ()
5252
5353if (POST)
54- string (REPLACE "^" ";" _post ${POST} )
54+ set (POST_LIST ${POST} )
55+ separate_arguments (${POST_LIST} )
56+ string (REPLACE " " ";" _postargs ${POST_LIST} )
57+ list (GET _postargs 0 _postcmd)
58+ list (REMOVE_AT _postargs 0)
5559 if (DBG)
56- message (STATUS "testdriver:POST=${_post } " )
60+ message (STATUS "testdriver:POST=${_postcmd}${_postargs } " )
5761 endif ()
5862endif ()
5963
@@ -143,7 +147,7 @@ if(CMD)
143147 set (_chkerr ERROR_VARIABLE _errvar2) # Only check out eventually
144148 endif ()
145149 endif ()
146-
150+
147151 execute_process (COMMAND ${_cmd} ${_input} ${_chkout} ${_chkerr} WORKING_DIRECTORY ${CWD} RESULT_VARIABLE _rc)
148152
149153 string (REGEX REPLACE "([.]*)[;][-][e][;]([^;]+)([.]*)" "\\ 1;-e '\\ 2\\ 3'" res "${_cmd} " )
@@ -243,7 +247,7 @@ endif()
243247
244248#---Execute post-command-----------------------------------------------------------------------------
245249if (POST)
246- execute_process (COMMAND ${_post } ${_cwd} OUTPUT_VARIABLE _outvar ERROR_VARIABLE _outvar RESULT_VARIABLE _rc)
250+ execute_process (COMMAND ${_postcmd} ${_postargs } ${_cwd} OUTPUT_VARIABLE _outvar ERROR_VARIABLE _outvar RESULT_VARIABLE _rc)
247251 if (_outvar)
248252 message ("-- BEGIN POST OUTPUT --" )
249253 message ("${_outvar} " )
You can’t perform that action at this time.
0 commit comments