[CMake] Multiple custom commands depending on same file

giuliano giuliano.carlini at aleri.com
Tue Apr 21 20:49:09 EDT 2009


I have something like:

    ADD_CUSTOM_COMMAND(
        OUTPUT          ${BUILD_FOLDER}/file-A.txt
        COMMAND         ${XSLT}
        ARGS            --output ${BUILD_FOLDER}/file-A.txt A.xslt file.xml
        DEPENDS         file.xml A.xslt
    )

    ADD_CUSTOM_COMMAND(
        OUTPUT          ${BUILD_FOLDER}/file-B.txt
        COMMAND         ${XSLT}
        ARGS            --output ${BUILD_FOLDER}/file-B.txt B.xslt file.xml
        DEPENDS         file.xml B.xslt
    )

When I run cmake, only file-A.txt is built. If I reverse the stanzas for 
file-A.txt and file-B.txt, then only file-B.txt is built.

It seems as if only the first target that depends on a file gets built. 
How do I get cmake to build them all?

I'm running cmake 2.4.

Thanks!

giuliano

-- 

giuliano carlini | coder
Aleri - Continuous IntelligenceTM
82 Pioneer Way #106 | Mountain View, CA 94041 | USA
Cell: 650.483.7648 | Office: 650.210.3830 | Fax: 312.210.3811
giuliano.carlini at aleri.com | http://www.aleri.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20090421/10b497cb/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: giuliano_carlini.vcf
Type: text/x-vcard
Size: 291 bytes
Desc: not available
URL: <http://www.cmake.org/pipermail/cmake/attachments/20090421/10b497cb/attachment.vcf>


More information about the CMake mailing list