Hi All, after moving from Visual Studio to Eclipse I realised that PRE_BUILD command does not work as expected.
According to documentation: 'Note that the PRE_BUILD option is only supported on Visual Studio 7 or later. For all other generators PRE_BUILD will be treated as PRE_LINK.' I was suprised with that, because usually when one use makefile, he can create additional target to perform files copy operations and etc. I found old thread in this mail list on same question: http://www.cmake.org/pipermail/cmake/2007-December/018445.html I guess no one had time to take a closer look into this problem There is, actually, wery simple workaround using cmake: # Add pre_build target add_custom_target(SOMETARGET_prebuild DEPENDS SOMEDEPENDANCIES) add_dependencies(SOMETARGET SOMETARGET_prebuild) add_custom_command( TARGET SOMETARGET_prebuild POST_BUILD COMMAND do some stuff) I was just wondering if it could be possible to integrate into add_custom_comman() such sollution for makefiles? It could make cmake code look nicer and make life much easier. Here are some arguments for it: In example above things look quite simple, but if I want to add a few commands to one project from MACRO (what I actually do)? How should I check wheather SOMETARGET_prebuild (or whatever) already has been created? Defently there some simple precautions to avoid doube add, but I guess it should be nicer to automate it. In any case, thanks for a great tool! Best regards, Kirill Kranke
_______________________________________________ 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
