[CMake] Problem when globbing files and using that OUTPUT variable between ADD_CUSTOM_COMMAND commands
NoRulez
norulez at me.com
Fri Feb 17 05:23:29 EST 2012
Hi,
i have several ADD_CUSTOM_COMMAND commands with a specified target (let's say TARGET1).
Between those commands I need to collect files and want to use those collected files in the next ADD_CUSTOM_COMMAND.
How can i do that, because the following doesn't work as expected.
ADD_CUSTOM_COMMAND(TARGET TARGET1
COMMAND SAMPLE_COMMAND ARGS ARGUMENTS
WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
COMMENT "Doing some stuff"
VERBATIM)
# HERE I NEED A CUSTOM COMMAND where the CUSTOM_FILES variable can be used in the next ADD_CUSTOM_COMMAND
ADD_CUSTOM_COMMAND(OUTPUT CUSTOM_FILES
COMMAND /usr/bin/find ARGS ${CUSTOM_PATH} -type f
COMMENT "Find files"
VERBATIM)
ADD_CUSTOM_COMMAND(TARGET TARGET1
COMMAND SAMPLE_COMMAND ARGS ${CUSTOM_FILES}
WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
COMMENT "Doing some stuff"
VERBATIM)
ADD_CUSTOM_COMMAND(TARGET TARGET1
COMMAND SAMPLE_COMMAND ARGS ARGUMENTS
WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
COMMENT "Doing some stuff"
VERBATIM)
Thanks in advance
Best Regards
NoRuleu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20120217/ccd5e91c/attachment.htm>
More information about the CMake
mailing list