SuperBuild: git clone gets deleted when recreating build dir

Alexander Neundorf neundorf at kde.org
Mon Sep 12 21:08:30 UTC 2011


On Sunday, August 28, 2011 09:33:01 PM Valentin Rusu wrote:
> Hello,
> 
> In my setup, the sources are cloned outside the ../build/ directory, as
> that
> let me easily find and modify them. But I just found out that the source
> directory gets deleted when I recreate the corresponding build directory.
> 
> To make it clear, here are the steps:
> 1- go to one of the superbuild subdirs,
> 2- mkdir build
> 3- cd build
> 4- cmake ..
> 5- make
> This will clone the sources in the src directory then build them. On my
> setup, the src directory is outside this build directory.
> 
> 
> Now, if the build directory created at step 2 is deleted (rm -rf build),
> then steps 2 to 5 are re-executed, the src located directory will get
> recreated at step 5 and all local modifications will be lost.
> 
> I looked into the cmake externalproject_add macro documentation, but it
> says
> nothing about this. What would be the option that we must use to prevent
> git clone if existing sources are in place?

I think nothing.
The source dir is part of the build dir. Why do you want to delete it 
completely ? It should be enough to delete only the "Build" dir in the build 
dir (and not the "Source" dir which is with the default setup its sibling).

So, for a superbuild, the building is the whole process, i.e. getting the 
sources, configuring, and updating them.
By deleting the build dir of this super- or meta-build, all steps have to be 
redone, including getting the sources.
I'll have a closer look again in the next days.

Alex


More information about the Kde-buildsystem mailing list