[CMake] cmake script profiler

Bill Hoffman bill.hoffman at kitware.com
Wed Apr 24 22:00:22 EDT 2013


On 4/24/2013 5:13 PM, Volo Zyko wrote:
> We have executables and libraries and a lot of custom targets (the
> project is organized so that we export headers during the build - not
> the best idea in the world)

Can you consolidate them into larger custom targets that use custom 
commands instead?

add_custom_target(create_a_header COMMAND ...)  # lots of these are bad

add_custom_target(create_all_headers)
add_custom_command(...)   # lots of these that are part of the one 
target is good
add_custom_command(...)

Should even make your makefiles faster.

-Bill



More information about the CMake mailing list