CPack - preserve timestamp for CPACK_INSTALLED_DIRECTORIES. fixes: #0013193

This commit is contained in:
Eric NOULARD 2012-05-09 18:02:13 +02:00
parent ad5c9d06c4
commit 3d10f65e39
1 changed files with 5 additions and 2 deletions

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);