On 27.01.2016 23:05 Fabian Wein wrote:
For my a test suite I want to test a Python script,
I have the arguments in a variable like

SET(MATVIZ_ARGS „—res 2 —type bulk2d’")

and call it similar to

EXECUTE_PROCESS(
     COMMAND "${MATVIZ_PY}" "${MATVIZ_ARGS}"

Suggestion: do not quote the argument variable here:

       COMMAND "${MATVIZ_PY}" ${MATVIZ_ARGS}

     WORKING_DIRECTORY "${CCSD}"
     ERROR_VARIABLE MATVIZ_ERROR
     RESULT_VARIABLE MATVIZ_RETVAL
   )

or do something like this:

SET(MATVIZ_ARGS "—res 2" "—type bulk2d")

EXECUTE_PROCESS(
COMMAND "${MATVIZ_PY}" ${MATVIZ_ARGS}
...

If you need arguments with spaces, you might have to double quote the arguments in the SET command.

--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Reply via email to