summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2023-08-08 14:06:21 (GMT)
committerKitware Robot <kwrobot@kitware.com>2023-08-08 14:06:38 (GMT)
commit4a8f9260c5159015060515d3409329f719eac8c3 (patch)
tree51fe267989d5924b2c2fa6520e356f37c3326209 /Source
parenta707bc1349034978b9275f18e37951a38c105e9b (diff)
parent88f90a72f11bfdd16da63681ba3a5c482cf07304 (diff)
downloadCMake-4a8f9260c5159015060515d3409329f719eac8c3.zip
CMake-4a8f9260c5159015060515d3409329f719eac8c3.tar.gz
CMake-4a8f9260c5159015060515d3409329f719eac8c3.tar.bz2
Merge topic 'file-GENERATE-arg-parsing' into release-3.27
88f90a72f1 file(GENERATE): Restore INPUT|CONTENT parse checking Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !8694
Diffstat (limited to 'Source')
-rw-r--r--Source/cmFileCommand.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx
index 45fba8b..8f2ebf5 100644
--- a/Source/cmFileCommand.cxx
+++ b/Source/cmFileCommand.cxx
@@ -2555,8 +2555,9 @@ bool HandleGenerateCommand(std::vector<std::string> const& args,
return false;
}
const bool inputIsContent = arguments.ParsedKeywords[1] == "CONTENT"_s;
- if (!inputIsContent && arguments.ParsedKeywords[1] == "INPUT") {
+ if (!inputIsContent && arguments.ParsedKeywords[1] != "INPUT") {
status.SetError("Unknown argument to GENERATE subcommand.");
+ return false;
}
std::string const& input =
inputIsContent ? *arguments.Content : *arguments.Input;