summaryrefslogtreecommitdiffstats
path: root/Source/CPack
diff options
context:
space:
mode:
authorEric NOULARD <eric.noulard@gmail.com>2012-05-09 16:02:13 (GMT)
committerEric NOULARD <eric.noulard@gmail.com>2012-05-09 16:02:13 (GMT)
commit3d10f65e39790863d8a939b9ea42c9680549a8ae (patch)
tree4995107c73429040d17fe6cdad8999f56c79cab5 /Source/CPack
parentad5c9d06c48b566fa6b1bb885142003c8ac9de60 (diff)
downloadCMake-3d10f65e39790863d8a939b9ea42c9680549a8ae.zip
CMake-3d10f65e39790863d8a939b9ea42c9680549a8ae.tar.gz
CMake-3d10f65e39790863d8a939b9ea42c9680549a8ae.tar.bz2
CPack - preserve timestamp for CPACK_INSTALLED_DIRECTORIES. fixes: #0013193
Diffstat (limited to 'Source/CPack')
-rw-r--r--Source/CPack/cmCPackGenerator.cxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/Source/CPack/cmCPackGenerator.cxx b/Source/CPack/cmCPackGenerator.cxx
index 0f832b3..de8f1e0 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);