diff options
author | Brad King <brad.king@kitware.com> | 2006-05-05 14:38:41 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2006-05-05 14:38:41 (GMT) |
commit | a317715407907eb42dc6499ac34d06599777efeb (patch) | |
tree | 94426d18e6e97eae114702678f826c3520de528f /Source | |
parent | 25a85c05851a4f97fcc7aedcbd10eda98404e3f3 (diff) | |
download | CMake-a317715407907eb42dc6499ac34d06599777efeb.zip CMake-a317715407907eb42dc6499ac34d06599777efeb.tar.gz CMake-a317715407907eb42dc6499ac34d06599777efeb.tar.bz2 |
ENH: Added option to not use copy-if-different when installing.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmFileCommand.cxx | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx index 9ca4f19..08d0d78 100644 --- a/Source/cmFileCommand.cxx +++ b/Source/cmFileCommand.cxx @@ -696,6 +696,11 @@ bool cmFileCommand::HandleInstallCommand( smanifest_files = manifest_files; } + // Check whether files should be copied always or only if they have + // changed. + bool copy_always = + cmSystemTools::IsOn(cmSystemTools::GetEnv("CMAKE_INSTALL_ALWAYS")); + // Handle each file listed. for ( i = 0; i < files.size(); i ++ ) { @@ -825,7 +830,8 @@ bool cmFileCommand::HandleInstallCommand( message = "Installing "; message += toFile.c_str(); this->Makefile->DisplayStatus(message.c_str(), -1); - if(!cmSystemTools::CopyADirectory(fromFile.c_str(), toFile.c_str())) + if(!cmSystemTools::CopyADirectory(fromFile.c_str(), toFile.c_str(), + copy_always)) { cmOStringStream e; e << "INSTALL cannot copy directory \"" << fromFile @@ -841,9 +847,9 @@ bool cmFileCommand::HandleInstallCommand( message += toFile.c_str(); this->Makefile->DisplayStatus(message.c_str(), -1); - // Copy the file, but only if it has changed. - if(!cmSystemTools::CopyFileIfDifferent(fromFile.c_str(), - toFile.c_str())) + // Copy the file. + if(!cmSystemTools::CopyAFile(fromFile.c_str(), toFile.c_str(), + copy_always)) { cmOStringStream e; e << "INSTALL cannot copy file \"" << fromFile |