diff options
author | Brad King <brad.king@kitware.com> | 2002-12-16 16:10:37 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2002-12-16 16:10:37 (GMT) |
commit | 21c0dda8d0599c53db4344cd4316654be2bc91e9 (patch) | |
tree | 00255c0c090675a94fd47591c27a8b8d5e0228c3 /Source/cmake.cxx | |
parent | 6e10f6cc7561a5a7e0f5f4f556aed0e7aa3be6d4 (diff) | |
download | CMake-21c0dda8d0599c53db4344cd4316654be2bc91e9.zip CMake-21c0dda8d0599c53db4344cd4316654be2bc91e9.tar.gz CMake-21c0dda8d0599c53db4344cd4316654be2bc91e9.tar.bz2 |
ENH: Added copy_if_different option to -E flag.
Diffstat (limited to 'Source/cmake.cxx')
-rw-r--r-- | Source/cmake.cxx | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx index b6b2855..afb9378 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -472,6 +472,7 @@ void CMakeCommandUsage(const char* program) << "Available commands: \n" << " chdir dir cmd [args]... - run command in a given directory\n" << " copy file destination - copy file to destination (either file or directory)\n" + << " copy_if_different in-file out-file - copy file if input has changed\n" << " echo [string]... - displays arguments as text\n" << " remove file1 file2 ... - remove the file(s)\n" << " time command [args] ... - run command and return elapsed time\n"; @@ -496,6 +497,13 @@ int cmake::CMakeCommand(std::vector<std::string>& args) return cmSystemTools::GetErrorOccuredFlag(); } + // Copy file if different. + if (args[1] == "copy_if_different" && args.size() == 4) + { + cmSystemTools::CopyFileIfDifferent(args[2].c_str(), args[3].c_str()); + return cmSystemTools::GetErrorOccuredFlag(); + } + // Echo string else if (args[1] == "echo" ) { |