On 05/22/2013 06:49 PM, Robert Dailey wrote: > Basically I'm creating a custom target that > depends on these output files. I have 1 custom command per > configuration to copy these files to the configuration output > directory, but since I cannot specify DEPENDS_<CONFIG> in > add_custom_target(), I'm not able to specify varying numbers of > dependencies. Could we perhaps add a DEPENDS_<CONFIG> to > add_custom_target, so that each configuration will end up depending on > different custom commands?
The DEPENDS option of add_custom_target is actually for specifying which sources will be brought into the target and driven by the build. Since add_custom_target has no real output its dependencies are only logical. I think we established over here: http://thread.gmane.org/gmane.comp.programming.tools.cmake.devel/6800/focus=6811 that per-config DEPENDS (and OUTPUTS) are needed even in add_custom_command in order to hook dependencies up cleanly. In general we've been moving away from X_<CONFIG> interfaces and toward using just X with generator expressions, so I'd prefer a solution like that. However, you may be able to solve your problem by using a simple custom target that has no dependencies and runs every time. In the COMMAND part, use $<CONFIGURATION> to tell a script what configuration is building. Then teach the script (or custom tool, in any language) how to check the libraries for the desired configuration and copy them if out of date. -Brad -- 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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
