Merge topic 'CPack-preserveTimestampInSourcePackage'

3d10f65 CPack - preserve timestamp for CPACK_INSTALLED_DIRECTORIES. fixes: #0013193
This commit is contained in:
David Cole 2012-05-17 14:58:20 -04:00 committed by CMake Topic Stage
commit 8519085803

View File

@ -388,8 +388,11 @@ int cmCPackGenerator::InstallProjectViaInstalledDirectories(
std::string>(targetFile,inFileRelative)); std::string>(targetFile,inFileRelative));
} }
/* If it is not a symlink then do a plain copy */ /* If it is not a symlink then do a plain copy */
else if ( !cmSystemTools::CopyFileIfDifferent(inFile.c_str(), else if (!(
filePath.c_str()) ) cmSystemTools::CopyFileIfDifferent(inFile.c_str(),filePath.c_str())
&&
cmSystemTools::CopyFileTime(inFile.c_str(),filePath.c_str())
) )
{ {
cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem copying file: " cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem copying file: "
<< inFile.c_str() << " -> " << filePath.c_str() << std::endl); << inFile.c_str() << " -> " << filePath.c_str() << std::endl);