<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>I would like to execute a command like:</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>getrates -n < myFileName</div><div><br></div><div>I am trying to add this so it is processed after the target "getrates" is built</div><div><br></div><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">set( infile ${CMAKE_CURRENT_BINARY_DIR}/myFileName )<br>add_custom_command( TARGET getrates<br> POST_BUILD<br> COMMAND "${CMAKE_CURRENT_BINARY_DIR}/getrates" " -n < ${infile}"<br> WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}<br> VERBATIM<br> )</blockquote><div><br></div>
This does not seem to work, however. CMake doesn't handle the "<" properly. Any ideas about how to stream the contents of a file?<div><br></div><div>Thanks,</div><div><br></div><div>James</div></body></html>