[jhbuild] Remove CMakeCache.txt before triggering the cmake configure command



commit 95f78f3d1a3c8f59c3ae92e69fe40d115206115e
Author: Frédéric Péters <fpeters 0d be>
Date:   Sat Jul 3 09:46:03 2010 +0200

    Remove CMakeCache.txt before triggering the cmake configure command
    
    (GNOME bug 621194)

 jhbuild/modtypes/cmake.py |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/jhbuild/modtypes/cmake.py b/jhbuild/modtypes/cmake.py
index 5be03d8..4b628cb 100644
--- a/jhbuild/modtypes/cmake.py
+++ b/jhbuild/modtypes/cmake.py
@@ -58,7 +58,7 @@ class CMakeModule(Package, DownloadableModule):
 
     def skip_configure(self, buildscript, last_phase):
         return buildscript.config.nobuild
-    
+
     def do_configure(self, buildscript):
         buildscript.set_action(_('Configuring'), self)
         srcdir = self.get_srcdir(buildscript)
@@ -70,6 +70,11 @@ class CMakeModule(Package, DownloadableModule):
                '-DLIB_INSTALL_DIR=%s' % buildscript.config.libdir,
                '-Dlibdir=%s' % buildscript.config.libdir,
                srcdir]
+        if os.path.exists(os.path.join(builddir, 'CMakeCache.txt')):
+            # remove that file, as it holds the result of a previous cmake
+            # configure run, and would be reused unconditionnaly
+            # (cf https://bugzilla.gnome.org/show_bug.cgi?id=621194)
+            os.unlink(os.path.join(builddir, 'CMakeCache.txt'))
         buildscript.execute(cmd, cwd = builddir, extra_env = self.extra_env)
     do_configure.depends = [PHASE_CHECKOUT]
     do_configure.error_phases = [PHASE_FORCE_CHECKOUT]



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]