From 3d10f65e39790863d8a939b9ea42c9680549a8ae Mon Sep 17 00:00:00 2001 From: Eric NOULARD Date: Wed, 9 May 2012 18:02:13 +0200 Subject: [PATCH] CPack - preserve timestamp for CPACK_INSTALLED_DIRECTORIES. fixes: #0013193 --- Source/CPack/cmCPackGenerator.cxx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Source/CPack/cmCPackGenerator.cxx b/Source/CPack/cmCPackGenerator.cxx index 0f832b395e..de8f1e0aec 100644 --- a/Source/CPack/cmCPackGenerator.cxx +++ b/Source/CPack/cmCPackGenerator.cxx @@ -388,8 +388,11 @@ int cmCPackGenerator::InstallProjectViaInstalledDirectories( std::string>(targetFile,inFileRelative)); } /* If it is not a symlink then do a plain copy */ - else if ( !cmSystemTools::CopyFileIfDifferent(inFile.c_str(), - filePath.c_str()) ) + else if (!( + cmSystemTools::CopyFileIfDifferent(inFile.c_str(),filePath.c_str()) + && + cmSystemTools::CopyFileTime(inFile.c_str(),filePath.c_str()) + ) ) { cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem copying file: " << inFile.c_str() << " -> " << filePath.c_str() << std::endl);