mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-07 22:30:13 -06:00
file(GET_RUNTIME_DEPENDENCIES): Tolerate empty list arguments
Also list all keywords that were missing values instead of only the first one.
This commit is contained in:
@@ -2673,9 +2673,20 @@ bool HandleGetRuntimeDependenciesCommand(std::vector<std::string> const& args,
|
|||||||
cmSystemTools::SetFatalErrorOccured();
|
cmSystemTools::SetFatalErrorOccured();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
argIt = keywordsMissingValues.begin();
|
|
||||||
if (argIt != keywordsMissingValues.end()) {
|
const std::vector<std::string> LIST_ARGS = { "DIRECTORIES",
|
||||||
status.SetError(cmStrCat("Keyword missing value: ", *argIt));
|
"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();
|
cmSystemTools::SetFatalErrorOccured();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,6 +13,11 @@ Call Stack \(most recent call first\):
|
|||||||
This warning is for project developers\. Use -Wno-dev to suppress it\.
|
This warning is for project developers\. Use -Wno-dev to suppress it\.
|
||||||
|
|
||||||
CMake Error at file-GET_RUNTIME_DEPENDENCIES-badargs2\.cmake:[0-9]+ \(file\):
|
CMake Error at file-GET_RUNTIME_DEPENDENCIES-badargs2\.cmake:[0-9]+ \(file\):
|
||||||
file Keyword missing value: BUNDLE_EXECUTABLE
|
file Keywords missing values:
|
||||||
|
|
||||||
|
RESOLVED_DEPENDENCIES_VAR
|
||||||
|
UNRESOLVED_DEPENDENCIES_VAR
|
||||||
|
CONFLICTING_DEPENDENCIES_PREFIX
|
||||||
|
BUNDLE_EXECUTABLE
|
||||||
Call Stack \(most recent call first\):
|
Call Stack \(most recent call first\):
|
||||||
CMakeLists\.txt:[0-9]+ \(include\)$
|
CMakeLists\.txt:[0-9]+ \(include\)$
|
||||||
|
|||||||
@@ -1,2 +1,15 @@
|
|||||||
file(GET_RUNTIME_DEPENDENCIES BUNDLE_EXECUTABLE)
|
file(GET_RUNTIME_DEPENDENCIES
|
||||||
|
RESOLVED_DEPENDENCIES_VAR
|
||||||
|
UNRESOLVED_DEPENDENCIES_VAR
|
||||||
|
CONFLICTING_DEPENDENCIES_PREFIX
|
||||||
|
BUNDLE_EXECUTABLE
|
||||||
|
EXECUTABLES
|
||||||
|
LIBRARIES
|
||||||
|
MODULES
|
||||||
|
DIRECTORIES
|
||||||
|
PRE_INCLUDE_REGEXES
|
||||||
|
PRE_EXCLUDE_REGEXES
|
||||||
|
POST_INCLUDE_REGEXES
|
||||||
|
POST_EXCLUDE_REGEXES
|
||||||
|
)
|
||||||
message(FATAL_ERROR "This message should not be displayed")
|
message(FATAL_ERROR "This message should not be displayed")
|
||||||
|
|||||||
Reference in New Issue
Block a user