[cmake-commits] alex committed cmCPackGenericGenerator.cxx 1.43.2.2
1.43.2.3
cmake-commits at cmake.org
cmake-commits at cmake.org
Thu May 17 10:24:39 EDT 2007
Update of /cvsroot/CMake/CMake/Source/CPack
In directory public:/mounts/ram/cvs-serv18561/Source/CPack
Modified Files:
Tag: CMake-CrossCompileBasic
cmCPackGenericGenerator.cxx
Log Message:
ENH: merge changes from HEAD into the branch
-change INCLUDE(file [OPTIONAL] [VAR]) to INCLUDE(file [OPTIONAL] [RESULT_VARIABLE VAR])
-add tests for INCLUDE(), CMAKE_TOOLCHAIN_FILE and FIND_XXX()
-keep the stripping in CPack for now
-support a MS toolchain suffix
Alex
Index: cmCPackGenericGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/CPack/cmCPackGenericGenerator.cxx,v
retrieving revision 1.43.2.2
retrieving revision 1.43.2.3
diff -u -d -r1.43.2.2 -r1.43.2.3
--- cmCPackGenericGenerator.cxx 14 May 2007 20:28:07 -0000 1.43.2.2
+++ cmCPackGenericGenerator.cxx 17 May 2007 14:24:36 -0000 1.43.2.3
@@ -217,6 +217,47 @@
{
cmSystemTools::PutEnv("DESTDIR=");
}
+
+ const char* stripExecutable = this->GetOption("CPACK_STRIP_COMMAND");
+ const char* stripFiles
+ = this->GetOption("CPACK_STRIP_FILES");
+ if ( stripFiles && *stripFiles && stripExecutable && *stripExecutable )
+ {
+ cmCPackLogger(cmCPackLog::LOG_OUTPUT, "- Strip files" << std::endl);
+ std::vector<std::string> stripFilesVector;
+ cmSystemTools::ExpandListArgument(stripFiles,
+ stripFilesVector);
+ std::vector<std::string>::iterator it;
+ for ( it = stripFilesVector.begin();
+ it != stripFilesVector.end();
+ ++it )
+ {
+ std::string fileName = tempInstallDirectory;
+ fileName += "/" + *it;
+ fileName += cmSystemTools::GetExecutableExtension();
+ cmCPackLogger(cmCPackLog::LOG_VERBOSE,
+ " Strip file: " << fileName.c_str()
+ << std::endl);
+ std::string stripCommand = stripExecutable;
+ stripCommand += " \"";
+ stripCommand += fileName + "\"";
+ int retVal = 1;
+ std::string output;
+ bool resB =
+ cmSystemTools::RunSingleCommand(stripCommand.c_str(), &output,
+ &retVal, 0,
+ this->GeneratorVerbose, 0);
+ if ( !resB || retVal )
+ {
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "Problem running install command: " << stripCommand.c_str()
+ << std::endl
+ << "Error was: \"" << output.c_str() << "\""
+ << std::endl);
+ return 0;
+ }
+ }
+ }
return res;
}
@@ -530,10 +571,6 @@
{
mf->AddDefinition("BUILD_TYPE", buildConfig);
}
- if (this->GetOption("CPACK_DO_STRIP"))
- {
- mf->AddDefinition("CMAKE_INSTALL_DO_STRIP", this->GetOption("CPACK_DO_STRIP"));
- }
std::string installComponentLowerCase
= cmSystemTools::LowerCase(installComponent);
if ( installComponentLowerCase != "all" )
More information about the Cmake-commits
mailing list