[CMake] External project and patch files

Jean-Christophe Fillion-Robin jchris.fillionr at kitware.com
Mon Jul 18 09:06:47 EDT 2011


Hi Hugh,

By design ExternalProject module will download  and patch a project only one
time.

Indeed, the ExternalProject wouldn't be able to apply a patch more than one
time. It also doesn't have a way to detect if a patch has been applied.

In other word, you will have to clear the project so that download / patch
steps could be run cleanly.

If you have specific workflow, you could run customized steps  that could be
able to detect if a patch has been applied, undo patch ... you would end up
with some complicated logic.

A different approach could be to create a git repository with the original
project and apply patch on the top of it. (If it applies for you, it could
be worth looking at git-svn ...)

Hth
Jc

On Sun, Jul 17, 2011 at 7:36 PM, Hugh Sorby <h.sorby at auckland.ac.nz> wrote:

>
> Hello All,
>
> I am using external project to well build some external projects.  I
> also patch these projects to play nice for me.  For this I use the
> ExternalProject_Add PATCH_COMMAND.  Right now I have two difficulties.
>
> 1. I have to combine all my fixes into one patch.  I would prefer to
> have a list of patches so that I can make it clearer to other developers
> what is going to be changed.  This would make it easier to review
> patches and view particular mods.
>
> 2. When I make changes to a patch and I recompile my external project,
> or the build tree holding the external project it doesn't rebuild the
> project.  I would be happy with being able to force a clean and rebuild
> here for the external project effected.
>
> Has anybody resolved these issues?
>
> Cheers,
> Hugh.
> _______________________________________________
> 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
>



-- 
+1 919 869 8849
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20110718/f0701cb9/attachment.htm>


More information about the CMake mailing list