[CMake] Automatic rebuild of external projects

David Cole david.cole at kitware.com
Mon Jul 2 10:54:41 EDT 2012


That should work already.

If you change the URL of an ExternalProject, it should re-execute the
download and all subsequent steps.

If you're having problems with that, please post a piece of sample
CMake code that we can use to try to reproduce your problem.


Thanks,
David


On Mon, Jul 2, 2012 at 10:30 AM, Evgeny Startsev
<exbluesbreaker at gmail.com> wrote:
> Thank you, for answers! Sorry, i not accurately describe the problem. I
> interested in support rebuild, then source in External_project URL changed.
> As i understand it correctly this solution for changes in downloaded local
> sources?
>
> I found only solution with rsync based download command and force rsync step
> before install for rebuild, if sources from URL changed.
>
> On Mon, Jul 2, 2012 at 6:13 PM, David Cole <david.cole at kitware.com> wrote:
>>
>> 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