[CMake] post and pre processing for the Cpack target (package/package_source)
Eric Noulard
eric.noulard at gmail.com
Thu Jul 9 15:56:34 EDT 2009
2009/7/9 t m <cmake at 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
More information about the CMake
mailing list