SuperBuild: git clone gets deleted when recreating build dir

Valentin Rusu kde at rusu.info
Sun Aug 28 19:33:01 UTC 2011


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?

-- 
Valentin Rusu (IRC valir, KDE vrusu)	
KSecretsService (former KSecretService, KWallet replacement)



More information about the Kde-buildsystem mailing list