summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorKyle Edwards <kyle.edwards@kitware.com>2020-01-22 18:05:46 (GMT)
committerKyle Edwards <kyle.edwards@kitware.com>2020-01-22 18:05:46 (GMT)
commit4c8a917a8771a64cfa0a8931824307e7f371b904 (patch)
tree17537c064396bc01a4d62e0dc3aa010fa4a71a82 /Source
parent39c357b9c46958cf883dd079caa0d09c19399fed (diff)
downloadCMake-4c8a917a8771a64cfa0a8931824307e7f371b904.zip
CMake-4c8a917a8771a64cfa0a8931824307e7f371b904.tar.gz
CMake-4c8a917a8771a64cfa0a8931824307e7f371b904.tar.bz2
file(GET_RUNTIME_DEPENDENCIES): Tolerate empty list arguments
Also list all keywords that were missing values instead of only the first one.
Diffstat (limited to 'Source')
-rw-r--r--Source/cmFileCommand.cxx17
1 files changed, 14 insertions, 3 deletions
diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx
index d55b959..d45414f 100644
--- a/Source/cmFileCommand.cxx
+++ b/Source/cmFileCommand.cxx
@@ -2673,9 +2673,20 @@ bool HandleGetRuntimeDependenciesCommand(std::vector<std::string> const& args,
cmSystemTools::SetFatalErrorOccured();
return false;
}
- argIt = keywordsMissingValues.begin();
- if (argIt != keywordsMissingValues.end()) {
- status.SetError(cmStrCat("Keyword missing value: ", *argIt));
+
+ const std::vector<std::string> LIST_ARGS = { "DIRECTORIES",
+ "EXECUTABLES",
+ "LIBRARIES",
+ "MODULES",
+ "POST_EXCLUDE_REGEXES",
+ "POST_INCLUDE_REGEXES",
+ "PRE_EXCLUDE_REGEXES",
+ "PRE_INCLUDE_REGEXES" };
+ auto kwbegin = keywordsMissingValues.cbegin();
+ auto kwend = cmRemoveMatching(keywordsMissingValues, LIST_ARGS);
+ if (kwend != kwbegin) {
+ status.SetError(cmStrCat("Keywords missing values:\n ",
+ cmJoin(cmMakeRange(kwbegin, kwend), "\n ")));
cmSystemTools::SetFatalErrorOccured();
return false;
}