mirror of
https://github.com/Kitware/CMake.git
synced 2026-08-08 16:50:48 +00:00
KWSys 2026-08-08 (19691df6)
Code extracted from:
https://gitlab.kitware.com/utils/kwsys.git
at commit 19691df656b78097f5ad9d810b068fa3df73e023 (master).
Upstream Shortlog
-----------------
Ben Boeckel (1):
6a287bb5 SystemTools: rename `CopyWhen::{Always => Unconditional}`
This commit is contained in:
committed by
Brad King
parent
8931545843
commit
0add8c6329
@@ -2599,7 +2599,7 @@ SystemTools::CopyStatus SystemTools::CopyAFile(std::string const& source,
|
||||
SystemTools::CopyWhen when)
|
||||
{
|
||||
switch (when) {
|
||||
case SystemTools::CopyWhen::Always:
|
||||
case SystemTools::CopyWhen::Unconditional:
|
||||
return SystemTools::CopyFileAlways(source, destination);
|
||||
case SystemTools::CopyWhen::OnlyIfDifferent:
|
||||
return SystemTools::CopyFileIfDifferent(source, destination);
|
||||
@@ -2617,7 +2617,7 @@ SystemTools::CopyStatus SystemTools::CopyAFile(std::string const& source,
|
||||
bool always)
|
||||
{
|
||||
return SystemTools::CopyAFile(source, destination,
|
||||
always ? CopyWhen::Always
|
||||
always ? CopyWhen::Unconditional
|
||||
: CopyWhen::OnlyIfDifferent);
|
||||
}
|
||||
|
||||
@@ -2670,7 +2670,7 @@ Status SystemTools::CopyADirectory(std::string const& source,
|
||||
std::string const& destination, bool always)
|
||||
{
|
||||
return SystemTools::CopyADirectory(source, destination,
|
||||
always ? CopyWhen::Always
|
||||
always ? CopyWhen::Unconditional
|
||||
: CopyWhen::OnlyIfDifferent);
|
||||
}
|
||||
|
||||
|
||||
@@ -665,7 +665,7 @@ public:
|
||||
|
||||
enum class CopyWhen
|
||||
{
|
||||
Always,
|
||||
Unconditional,
|
||||
OnlyIfDifferent,
|
||||
OnlyIfNewer,
|
||||
};
|
||||
@@ -675,20 +675,20 @@ public:
|
||||
*/
|
||||
static CopyStatus CopyAFile(std::string const& source,
|
||||
std::string const& destination,
|
||||
CopyWhen when = CopyWhen::Always);
|
||||
CopyWhen when = CopyWhen::Unconditional);
|
||||
static CopyStatus CopyAFile(std::string const& source,
|
||||
std::string const& destination, bool always);
|
||||
|
||||
/**
|
||||
* Copy content directory to another directory with all files and
|
||||
* subdirectories. The "when" argument controls when files are copied:
|
||||
* Always: all files are always copied.
|
||||
* Unconditional: all files are always copied.
|
||||
* OnlyIfDifferent: only files that have changed are copied.
|
||||
* OnlyIfNewer: only files that are newer than the destination are copied.
|
||||
*/
|
||||
static Status CopyADirectory(std::string const& source,
|
||||
std::string const& destination,
|
||||
CopyWhen when = CopyWhen::Always);
|
||||
CopyWhen when = CopyWhen::Unconditional);
|
||||
static Status CopyADirectory(std::string const& source,
|
||||
std::string const& destination, bool always);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user