On 12-10-2010 15:55, Bill Hoffman wrote:
On 10/12/2010 9:09 AM, Thomas Sondergaard wrote:
Hi,

I've noticed that Visual Studio doesn't run custom commands added with
add_custom_command in parallel. This means running moc and uic is slow
on Windows. Is there something that can be done about this?


No, I don't think so, VS does not work like that. It only does target
parallelism. Not per-command parallelism. It never has don that... You
can get the compiler to do it with the /MP flag, but not custom
commands, unless the command itself supported it.

-Bill

Couldn't cmake provide a generic wrapper around commands to allow multiple to be run, e.g

cmake --run --command "moc -o moc_foo.cc foo.h" --command "moc -o moc_bar.cc bar.h"

or the following where moc_script.txt contains one line per command

cmake --run --command-script moc_script.txt

With such cmake support you could use add_custom_command with multiple outputs to get things like moc and uic generation done in parallel, couldn't it?

Best regards,

Thomas

_______________________________________________
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