mirror of
https://github.com/reactos/CMake.git
synced 2024-11-25 12:40:06 +00:00
ENH: Added copy_if_different option to -E flag.
This commit is contained in:
parent
6e10f6cc75
commit
21c0dda8d0
@ -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" )
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user