[cmake-commits] alex committed cmGlobalGenerator.cxx 1.175 1.176 cmGlobalGenerator.h 1.75 1.76 cmGlobalUnixMakefileGenerator3.h 1.40 1.41 cmLocalUnixMakefileGenerator3.cxx 1.208 1.209

cmake-commits at cmake.org cmake-commits at cmake.org
Fri May 18 13:43:41 EDT 2007


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

Modified Files:
	cmGlobalGenerator.cxx cmGlobalGenerator.h 
	cmGlobalUnixMakefileGenerator3.h 
	cmLocalUnixMakefileGenerator3.cxx 
Log Message:

ENH: add install/strip target for makefile generators if strip was found

Alex


Index: cmGlobalGenerator.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalGenerator.h,v
retrieving revision 1.75
retrieving revision 1.76
diff -u -d -r1.75 -r1.76
--- cmGlobalGenerator.h	9 May 2007 18:41:38 -0000	1.75
+++ cmGlobalGenerator.h	18 May 2007 17:43:39 -0000	1.76
@@ -186,6 +186,7 @@
   virtual const char* GetAllTargetName()          { return "ALL_BUILD"; }
   virtual const char* GetInstallTargetName()      { return "INSTALL"; }
   virtual const char* GetInstallLocalTargetName() { return 0; }
+  virtual const char* GetInstallStripTargetName() { return 0; }
   virtual const char* GetPreinstallTargetName()   { return 0; }
   virtual const char* GetTestTargetName()         { return "RUN_TESTS"; }
   virtual const char* GetPackageTargetName()      { return "PACKAGE"; }

Index: cmGlobalUnixMakefileGenerator3.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalUnixMakefileGenerator3.h,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -d -r1.40 -r1.41
--- cmGlobalUnixMakefileGenerator3.h	16 May 2007 17:24:17 -0000	1.40
+++ cmGlobalUnixMakefileGenerator3.h	18 May 2007 17:43:39 -0000	1.41
@@ -161,6 +161,7 @@
   virtual const char* GetAllTargetName()          { return "all"; }
   virtual const char* GetInstallTargetName()      { return "install"; }
   virtual const char* GetInstallLocalTargetName() { return "install/local"; }
+  virtual const char* GetInstallStripTargetName() { return "install/strip"; }
   virtual const char* GetPreinstallTargetName()   { return "preinstall"; }
   virtual const char* GetTestTargetName()         { return "test"; }
   virtual const char* GetPackageTargetName()      { return "package"; }

Index: cmGlobalGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalGenerator.cxx,v
retrieving revision 1.175
retrieving revision 1.176
diff -u -d -r1.175 -r1.176
--- cmGlobalGenerator.cxx	9 May 2007 18:41:38 -0000	1.175
+++ cmGlobalGenerator.cxx	18 May 2007 17:43:39 -0000	1.176
@@ -1440,16 +1440,35 @@
     // install_local
     if(const char* install_local = this->GetInstallLocalTargetName())
       {
-      singleLine.insert(singleLine.begin()+1, "-DCMAKE_INSTALL_LOCAL_ONLY=1");
+      cmCustomCommandLine localCmdLine = singleLine;
+
+      localCmdLine.insert(localCmdLine.begin()+1, "-DCMAKE_INSTALL_LOCAL_ONLY=1");
       cpackCommandLines.erase(cpackCommandLines.begin(),
         cpackCommandLines.end());
-      cpackCommandLines.push_back(singleLine);
+      cpackCommandLines.push_back(localCmdLine);
 
       (*targets)[install_local] =
         this->CreateGlobalTarget(
           install_local, "Installing only the local directory...",
           &cpackCommandLines, depends);
       }
+
+    // install_strip
+    const char* install_strip = this->GetInstallStripTargetName();
+    if((install_strip !=0) && (mf->IsSet("CMAKE_STRIP")))
+      {
+      cmCustomCommandLine stripCmdLine = singleLine;
+
+      stripCmdLine.insert(stripCmdLine.begin()+1,"-DCMAKE_INSTALL_DO_STRIP=1");
+      cpackCommandLines.erase(cpackCommandLines.begin(),
+        cpackCommandLines.end());
+      cpackCommandLines.push_back(stripCmdLine);
+
+      (*targets)[install_strip] =
+        this->CreateGlobalTarget(
+          install_strip, "Installing the project stripped...",
+          &cpackCommandLines, depends);
+      }
     }
 }
 

Index: cmLocalUnixMakefileGenerator3.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmLocalUnixMakefileGenerator3.cxx,v
retrieving revision 1.208
retrieving revision 1.209
diff -u -d -r1.208 -r1.209
--- cmLocalUnixMakefileGenerator3.cxx	17 May 2007 14:53:17 -0000	1.208
+++ cmLocalUnixMakefileGenerator3.cxx	18 May 2007 17:43:39 -0000	1.209
@@ -1456,7 +1456,9 @@
 
       // Provide a "/fast" version of the target.
       depends.clear();
-      if((targetName == "install") || (targetName == "install_local"))
+      if((targetName == "install") 
+          || (targetName == "install_local")
+          || (targetName == "install_strip"))
         {
         // Provide a fast install target that does not depend on all
         // but has the same command.



More information about the Cmake-commits mailing list