[CMake] Automatic rebuild of external projects

David Cole david.cole at kitware.com
Mon Jul 2 08:13:44 EDT 2012


It's possible without modifying ExternalProject as well. One technique
we've adopted on several projects looks something like this:

  # After the ExternalProject_Add call for "myProject"
  ExternalProject_Add_Step(myProject forceconfigure
    COMMAND ${CMAKE_COMMAND} -E echo "Force configure of myProject"
    DEPENDEES update
    DEPENDERS configure
    ALWAYS 1)

Or, you can use "DEPENDEES configure DEPENDERS build" as a "forcebuild" step.

This is such a common request, that we will probably add
ALWAYS_CONFIGURE and ALWAYS_BUILD options to ExternalProject_Add in a
future version.


HTH,
David


On Mon, Jul 2, 2012 at 7:55 AM, Yuri Timenkov <yuri at timenkov.ru> wrote:
> Hi,
>
> It's possible with some modifications to ExternalProject.cmake:
> http://public.kitware.com/Bug/view.php?id=12322
>
> However it is not encouraged by CMake developers.
>
> On Mon, Jul 2, 2012 at 2:25 PM, Evgeny Startsev
> <exbluesbreaker at gmail.com> wrote:
>> I am using external project module for cmake. Is there any way to rebuild
>> local external project (from local directory), then its sources was changed?
>> I have tried special DOWNLOAD_COMMAND or UPDATE_COMMAND, but this commands
>> called only first time.
>>
>> --
>>
>> 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
> --
>
> 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


More information about the CMake mailing list