mirror of
https://github.com/Kitware/CMake.git
synced 2026-08-04 06:40:24 +00:00
file(CREATE_LINK): Revise CMP0205 warning
Ensure we only warn when COPY_ON_ERROR is specified. While we're at it, tweak the spelling and apply consistent policy & logic ordering in compound conditions.
This commit is contained in:
@@ -3295,12 +3295,12 @@ bool HandleCreateLinkCommand(std::vector<std::string> const& args,
|
||||
if (sourceIsDirectory) {
|
||||
if (cmp0205 == cmPolicies::NEW) {
|
||||
needToTry = false;
|
||||
} else if (cmp0205 == cmPolicies::WARN) {
|
||||
} else if (cmp0205 == cmPolicies::WARN && arguments.CopyOnError) {
|
||||
status.GetMakefile().IssueMessage(
|
||||
MessageType::AUTHOR_WARNING,
|
||||
cmStrCat("Path\n ", fileName,
|
||||
"\nis directory. Hardlinks creation is not supported for "
|
||||
"directories.\n",
|
||||
"\nis a directory. Hard link creation is not supported "
|
||||
"for directories.\n",
|
||||
cmPolicies::GetPolicyWarning(cmPolicies::CMP0205)));
|
||||
}
|
||||
}
|
||||
@@ -3320,13 +3320,13 @@ bool HandleCreateLinkCommand(std::vector<std::string> const& args,
|
||||
}
|
||||
}
|
||||
|
||||
if (arguments.CopyOnError && cmp0205 == cmPolicies::WARN &&
|
||||
if (cmp0205 == cmPolicies::WARN && arguments.CopyOnError &&
|
||||
sourceIsDirectory) {
|
||||
status.GetMakefile().IssueMessage(
|
||||
MessageType::AUTHOR_WARNING,
|
||||
cmStrCat("Path\n ", fileName,
|
||||
"\nis directory. It will be copied recursively when NEW policy "
|
||||
"behavior applies for CMP0205.\n",
|
||||
"\nis a directory. It will be copied "
|
||||
"recursively when CMP0205 is set to NEW.\n",
|
||||
cmPolicies::GetPolicyWarning(cmPolicies::CMP0205)));
|
||||
}
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
[^
|
||||
]*[\\|/]file-CREATE_LINK[\\|/]CMP0205
|
||||
|
||||
is directory. Hardlinks creation is not supported for directories.
|
||||
is a directory. Hard link creation is not supported for directories.
|
||||
|
||||
Policy CMP0205 is not set: file\(CREATE_LINK\) with COPY_ON_ERROR copies
|
||||
directory content\. Run "cmake --help-policy CMP0205" for policy details\.
|
||||
@@ -24,8 +24,7 @@ CMake Warning \(dev\) at [^
|
||||
[^
|
||||
]*[\\|/]file-CREATE_LINK[\\|/]CMP0205
|
||||
|
||||
is directory. It will be copied recursively when NEW policy behavior
|
||||
applies for CMP0205\.
|
||||
is a directory. It will be copied recursively when CMP0205 is set to NEW\.
|
||||
|
||||
Policy CMP0205 is not set: file\(CREATE_LINK\) with COPY_ON_ERROR copies
|
||||
directory content\. Run "cmake --help-policy CMP0205" for policy details\.
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
[^
|
||||
]*[\\|/]file-CREATE_LINK[\\|/]CMP0205
|
||||
|
||||
is directory. It will be copied recursively when NEW policy behavior
|
||||
applies for CMP0205\.
|
||||
is a directory. It will be copied recursively when CMP0205 is set to NEW\.
|
||||
|
||||
Policy CMP0205 is not set: file\(CREATE_LINK\) with COPY_ON_ERROR copies
|
||||
directory content\. Run "cmake --help-policy CMP0205" for policy details\.
|
||||
|
||||
Reference in New Issue
Block a user