Solved problem from another post with similar space escaping. set(PARAMS "$(if $(verbose), --verbose)" "$(if $(xml-output), --xml-output)" "$(if $(run), --run=$(run))" "$(if $(suite), --suite=$(suite))" ) string(REPLACE " " ";" PARAMS ${PARAMS}) add_custom_target(${PROJECT_NAME}_run WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} $(xml-output), --xml-output)" "$(if $(run), --run=$(run))" "$(if $(suite), --suite=$(suite))" COMMAND ${CMAKE_CURRENT_BINARY_DIR}/${target} ${PARAMS} DEPENDS ${target} )
-- View this message in context: http://cmake.3232098.n2.nabble.com/add-custom-target-COMMAND-embedded-make-code-tp7595092p7595094.html Sent from the CMake mailing list archive at Nabble.com. -- 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