[CMake] process file contents
James C. Sutherland
James.Sutherland at utah.edu
Wed May 12 13:43:04 EDT 2010
I would like to execute a command like:
getrates -n < myFileName
I am trying to add this so it is processed after the target "getrates" is built
set( infile ${CMAKE_CURRENT_BINARY_DIR}/myFileName )
add_custom_command( TARGET getrates
POST_BUILD
COMMAND "${CMAKE_CURRENT_BINARY_DIR}/getrates" " -n < ${infile}"
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
VERBATIM
)
This does not seem to work, however. CMake doesn't handle the "<" properly. Any ideas about how to stream the contents of a file?
Thanks,
James
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20100512/3260f1c5/attachment.htm>
More information about the CMake
mailing list