Merge branch 'fix-cmake_parse_arguments-expansion' into release
This commit is contained in:
commit
229a5bc903
|
@ -97,10 +97,18 @@ bool cmParseArgumentsCommand
|
||||||
} insideValues = NONE;
|
} insideValues = NONE;
|
||||||
std::string currentArgName;
|
std::string currentArgName;
|
||||||
|
|
||||||
// now iterate over the remaining arguments
|
// Flatten ;-lists in the arguments into a single list as was done
|
||||||
// and fill in the values where applicable
|
// by the original function(CMAKE_PARSE_ARGUMENTS).
|
||||||
|
list.clear();
|
||||||
for(; argIter != argEnd; ++argIter)
|
for(; argIter != argEnd; ++argIter)
|
||||||
{
|
{
|
||||||
|
cmSystemTools::ExpandListArgument(*argIter, list);
|
||||||
|
}
|
||||||
|
|
||||||
|
// iterate over the arguments list and fill in the values where applicable
|
||||||
|
for (argIter = list.begin(), argEnd = list.end();
|
||||||
|
argIter != argEnd; ++argIter)
|
||||||
|
{
|
||||||
const options_map::iterator optIter = options.find(*argIter);
|
const options_map::iterator optIter = options.find(*argIter);
|
||||||
if (optIter != options.end())
|
if (optIter != options.end())
|
||||||
{
|
{
|
||||||
|
|
|
@ -13,3 +13,22 @@ cmake_parse_arguments(MY_INSTALL "${options}" "${oneValueArgs}"
|
||||||
|
|
||||||
TEST(MY_INSTALL_DESTINATION UNDEFINED)
|
TEST(MY_INSTALL_DESTINATION UNDEFINED)
|
||||||
TEST(MY_INSTALL_OPTIONAL TRUE)
|
TEST(MY_INSTALL_OPTIONAL TRUE)
|
||||||
|
|
||||||
|
macro(foo)
|
||||||
|
set(_options )
|
||||||
|
set(_oneValueArgs FOO)
|
||||||
|
set(_multiValueArgs )
|
||||||
|
cmake_parse_arguments(_FOO2 "${_options}"
|
||||||
|
"${_oneValueArgs}"
|
||||||
|
"${_multiValueArgs}"
|
||||||
|
"${ARGN}")
|
||||||
|
cmake_parse_arguments(_FOO1 "${_options}"
|
||||||
|
"${_oneValueArgs}"
|
||||||
|
"${_multiValueArgs}"
|
||||||
|
${ARGN})
|
||||||
|
endmacro()
|
||||||
|
|
||||||
|
foo(FOO foo)
|
||||||
|
|
||||||
|
TEST(_FOO1_FOO foo)
|
||||||
|
TEST(_FOO2_FOO foo)
|
||||||
|
|
Loading…
Reference in New Issue