[cmake-commits] alex committed cmInstallTargetGenerator.h 1.11 1.12
cmInstallTargetGenerator.cxx 1.35 1.36
cmake-commits at cmake.org
cmake-commits at cmake.org
Fri Jun 15 13:00:56 EDT 2007
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv22824
Modified Files:
cmInstallTargetGenerator.h cmInstallTargetGenerator.cxx
Log Message:
BUG: don't strip static libraries, it removes their symbol table, dynamic
libs have an extra symbol table so they still work stripped
Alex
Index: cmInstallTargetGenerator.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmInstallTargetGenerator.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- cmInstallTargetGenerator.h 15 Jun 2007 15:12:06 -0000 1.11
+++ cmInstallTargetGenerator.h 15 Jun 2007 17:00:54 -0000 1.12
@@ -45,6 +45,7 @@
bool useSOName);
void AddInstallNamePatchRule(std::ostream& os, const char* destination);
void AddStripRule(std::ostream& os,
+ cmTarget::TargetType type,
const std::string& quotedFullDestinationFilename,
bool optional);
void AddRanlibRule(std::ostream& os,
Index: cmInstallTargetGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmInstallTargetGenerator.cxx,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -d -r1.35 -r1.36
--- cmInstallTargetGenerator.cxx 15 Jun 2007 15:12:07 -0000 1.35
+++ cmInstallTargetGenerator.cxx 15 Jun 2007 17:00:54 -0000 1.36
@@ -182,10 +182,10 @@
quotedFullDestinationFilename += "/";
quotedFullDestinationFilename += cmSystemTools::GetFilenameName(fromFile);
quotedFullDestinationFilename += "\"";
-
+
this->AddRanlibRule(os, type, quotedFullDestinationFilename);
- this->AddStripRule(os, quotedFullDestinationFilename, optional);
+ this->AddStripRule(os, type, quotedFullDestinationFilename, optional);
}
//----------------------------------------------------------------------------
@@ -453,10 +453,18 @@
}
void cmInstallTargetGenerator::AddStripRule(std::ostream& os,
+ cmTarget::TargetType type,
const std::string& quotedFullDestinationFilename,
bool optional)
{
+ // don't strip static libraries, because it removes the only symbol table
+ // they have so you can't link to them anymore
+ if(type == cmTarget::STATIC_LIBRARY)
+ {
+ return;
+ }
+
// Don't handle OSX Bundles.
if(this->Target->GetMakefile()->IsOn("APPLE") &&
this->Target->GetPropertyAsBool("MACOSX_BUNDLE"))
@@ -469,21 +477,18 @@
return;
}
- os << "IF(CMAKE_INSTALL_DO_STRIP";
+ std::string optionalString;
if (optional)
{
- os << " AND EXISTS " << quotedFullDestinationFilename;
+ optionalString = " AND EXISTS ";
+ optionalString += quotedFullDestinationFilename;
}
- os << ")\n";
+
+ os << "IF(CMAKE_INSTALL_DO_STRIP" << optionalString << ")\n";
os << " EXECUTE_PROCESS(COMMAND \""
<< this->Target->GetMakefile()->GetDefinition("CMAKE_STRIP")
<< "\" " << quotedFullDestinationFilename << " )\n";
- os << "ENDIF(CMAKE_INSTALL_DO_STRIP";
- if (optional)
- {
- os << " AND EXISTS " << quotedFullDestinationFilename;
- }
- os << ")\n";
+ os << "ENDIF(CMAKE_INSTALL_DO_STRIP" << optionalString << ")\n";
}
void cmInstallTargetGenerator::AddRanlibRule(std::ostream& os,
More information about the Cmake-commits
mailing list