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
--

Powered by www.kitware.com

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

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

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to