[CMake] post and pre processing for the Cpack target (package/package_source)
Hello CMake Experts, Is there any way to define post or pre-processing actions for built-in targets like package/package_source. Those two are not visible in CMakeLists.txt scope, so the add_dependencies(package_source pre_package_source) can not be used. What I found is the solution described here: http://dingyichen.livejournal.com/8104.html. It based on fact that you can wrapp a package target call by adding own target: ADD_CUSTOM_TARGET(pack_src COMMAND make package_source COMMENT Packaging Source files DEPENDS other_dependency VERBATIM ) I check it and is fine as far as you do not use -j option together with make. Is there any other alternative ?, Thanks in advance. regards, Tomek. ___ 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
Re: [CMake] post and pre processing for the Cpack target (package/package_source)
2009/7/9 t m cm...@majchrowski.co.uk: Hello CMake Experts, Is there any way to define post or pre-processing actions for built-in targets like package/package_source. Those two are not visible in CMakeLists.txt scope, so the add_dependencies(package_source pre_package_source) can not be used. What I found is the solution described here: http://dingyichen.livejournal.com/8104.html. It based on fact that you can wrapp a package target call by adding own target: ADD_CUSTOM_TARGET(pack_src COMMAND make package_source COMMENT Packaging Source files DEPENDS other_dependency VERBATIM ) I check it and is fine as far as you do not use -j option together with make. Is there any other alternative ?, Thanks in advance. Unfortunately I think that all built-in targets suffers from this issue: it may be worth adding a comment there: http://www.cmake.org/Bug/view.php?id=8438 It may be worth a special comment on this one because package/package are even trickier target than all/install etc... because package/package source are not always present :-) They are generated by the generic generator if CPack[Source]Config.cmake is found in the build tree, see: CMake/Source/cmGlobalGenerator.cxx. -- Erk Membre de l'April - « promouvoir et défendre le logiciel libre » - http://www.april.org ___ 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