[Cmake-commits] [cmake-commits] king committed cmFileCommand.cxx 1.115 1.116

cmake-commits at cmake.org cmake-commits at cmake.org
Mon Jan 5 11:05:59 EST 2009


Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv4448/Source

Modified Files:
	cmFileCommand.cxx 
Log Message:
COMP: Fix installation of cmake-gui by CMake 2.4

When CMake 2.4 generates the build tree for CMake itself it asks the
built CMake to install itself using the rules that 2.4 generated.  Since
the install rules use undocumented commands that are not compatible from
2.4 to 2.6 we need a special case to avoid failure.  This sets a special
indicator variable in the install rules that enables a compatibility
hack to support the old install rule format.


Index: cmFileCommand.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmFileCommand.cxx,v
retrieving revision 1.115
retrieving revision 1.116
diff -C 2 -d -r1.115 -r1.116
*** cmFileCommand.cxx	5 Jan 2009 16:03:41 -0000	1.115
--- cmFileCommand.cxx	5 Jan 2009 16:05:57 -0000	1.116
***************
*** 1691,1695 ****
      enum Doing { DoingNone, DoingFiles, DoingProperties,
                   DoingPermissionsFile, DoingPermissionsDir,
!                  DoingPermissionsMatch };
      Doing doing = DoingNone;
      bool use_given_permissions_file = false;
--- 1691,1695 ----
      enum Doing { DoingNone, DoingFiles, DoingProperties,
                   DoingPermissionsFile, DoingPermissionsDir,
!                  DoingPermissionsMatch, DoingSelf24 };
      Doing doing = DoingNone;
      bool use_given_permissions_file = false;
***************
*** 1845,1848 ****
--- 1845,1856 ----
        else if ( *cstr == "COMPONENTS"  )
          {
+         if(this->Makefile->IsOn("CMAKE_INSTALL_SELF_2_4"))
+           {
+           // When CMake 2.4 builds this CMake version we need to support
+           // the install scripts it generates since it asks this CMake
+           // to install itself using the rules it generated.
+           doing = DoingSelf24;
+           continue;
+           }
          cmOStringStream e;
          e << "INSTALL called with old-style COMPONENTS argument.  "
***************
*** 1904,1907 ****
--- 1912,1922 ----
            }
          }
+       else if(doing == DoingSelf24)
+         {
+         // Ignore these arguments for compatibility.  This should be
+         // reached only when CMake 2.4 is installing the current
+         // CMake.  It can be removed when CMake 2.6 or higher is
+         // required to build CMake.
+         }
        else
          {



More information about the Cmake-commits mailing list