Configure wrapper now deletes previous CMake cache

This commit is contained in:
Jon Siwek 2011-01-24 11:26:29 -06:00
parent 4da36217b7
commit 4817f7de4e
5 changed files with 7 additions and 19 deletions

18
configure vendored
View file

@ -189,21 +189,9 @@ done
if [ -d $builddir ]; then
# If build directory exists, check if it has a CMake cache
if [ -f $builddir/CMakeCache.txt ]; then
# If the Cmake cache exists, then check that it thinks
# the source tree exists where it's currently located
cmakehomedir=`grep CMAKE_HOME_DIRECTORY $builddir/CMakeCache.txt | \
sed 's/CMAKE_HOME_DIRECTORY:INTERNAL=//g'`
if [ "$cmakehomedir" != "$sourcedir" ]; then
# The source tree moved since the build was last configured
echo "\
The source tree has been moved from:
$cmakehomedir
to:
$sourcedir
To reconfigure in the new source directory, please delete:
$builddir/CMakeCache.txt" >&2
exit 1
fi
# If the CMake cache exists, delete it so that this configuration
# is not tainted by a previous one
rm -f $builddir/CMakeCache.txt
fi
else
# Create build directory