[Cmake-commits] [cmake-commits] king committed cmGlobalGenerator.cxx 1.261 1.262

cmake-commits at cmake.org cmake-commits at cmake.org
Thu Dec 10 09:09:52 EST 2009


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

Modified Files:
	cmGlobalGenerator.cxx 
Log Message:
Simplify CMake self-install special case

CMake has a special case for the "make install" target when building
CMake itself.  We use the just-built CMake to install itself since an
existing CMake installation cannot replace itself (at least on Windows).
We simplify the code that computes the location of the CMake binary by
taking advantage of existing generator support for target lookup.  This
will make it robust to any changes in CMake's own CMakeLists.txt files
in the future.


Index: cmGlobalGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalGenerator.cxx,v
retrieving revision 1.261
retrieving revision 1.262
diff -C 2 -d -r1.261 -r1.262
*** cmGlobalGenerator.cxx	6 Oct 2009 17:29:56 -0000	1.261
--- cmGlobalGenerator.cxx	10 Dec 2009 14:09:50 -0000	1.262
***************
*** 1762,1766 ****
            &cpackCommandLines, depends, 0);
        }
!     std::string cmd;
      cpackCommandLines.erase(cpackCommandLines.begin(),
        cpackCommandLines.end());
--- 1762,1766 ----
            &cpackCommandLines, depends, 0);
        }
!     std::string cmd = cmakeCommand;
      cpackCommandLines.erase(cpackCommandLines.begin(),
        cpackCommandLines.end());
***************
*** 1783,1798 ****
        {
        // We are building CMake itself.  We cannot use the original
!       // executable to install over itself.
!       cmd = mf->GetDefinition("EXECUTABLE_OUTPUT_PATH");
!       if(cmakeCfgIntDir && *cmakeCfgIntDir && cmakeCfgIntDir[0] != '.')
!         {
!         cmd += "/";
!         cmd += cmakeCfgIntDir;
!         }
!       cmd += "/cmake";
!       }
!     else
!       {
!       cmd = cmakeCommand;
        }
      singleLine.push_back(cmd.c_str());
--- 1783,1789 ----
        {
        // We are building CMake itself.  We cannot use the original
!       // executable to install over itself.  The generator will
!       // automatically convert this name to the build-time location.
!       cmd = "cmake";
        }
      singleLine.push_back(cmd.c_str());



More information about the Cmake-commits mailing list