MantisBT - CMake | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0012650 | CMake | Modules | public | 2012-01-02 18:35 | 2016-06-10 14:31 |
Reporter | Julien Finet | ||||
Assigned To | Kitware Robot | ||||
Priority | normal | Severity | feature | Reproducibility | N/A |
Status | closed | Resolution | moved | ||
Platform | OS | OS Version | |||
Product Version | CMake 2.8.7 | ||||
Target Version | Fixed in Version | ||||
Summary | 0012650: Support duplicate keyword value pairs in CMAKE_PARSE_ARGUMENTS | ||||
Description | Being able to specify multiple times the same variable (here TARGETS) could be useful. I took the example from the doc: 34 # function(MY_INSTALL) 35 # set(options OPTIONAL FAST) 36 # set(oneValueArgs DESTINATION RENAME) 37 # set(multiValueArgs TARGETS CONFIGURATIONS) 38 # cmake_parse_arguments(MY_INSTALL "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} ) 39 # ... 41 # Assume my_install() has been called like this: 42 # my_install(TARGETS foo DESTINATION bin OPTIONAL TARGETS bar) 43 # 44 # After the cmake_parse_arguments() call the macro will have set the following 45 # variables: 46 # MY_INSTALL_OPTIONAL = TRUE 47 # MY_INSTALL_FAST = FALSE (this option was not used when calling my_install() 48 # MY_INSTALL_DESTINATION = "bin" 49 # MY_INSTALL_RENAME = "" (was not used) 50 # MY_INSTALL_TARGETS = "foo;bar" 51 # MY_INSTALL_CONFIGURATIONS = "" (was not used) 52 # MY_INSTALL_UNPARSED_ARGUMENTS = "" | ||||
Steps To Reproduce | |||||
Additional Information | Doing so would allow nesting calls without parsing. Keeping the same example: function(MY_INSTALL_WITH_FRUIT_DEPENDENCY) my_install(TARGET banana apple ${ARGN} ) end_function() function(MY_INSTALL_WITH_PERSON_DEPENDENCY) my_install(TARGET john alice ${ARGN}) end_functions() | ||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files | |||||
Issue History | |||||
Date Modified | Username | Field | Change | ||
2012-01-02 18:35 | Julien Finet | New Issue | |||
2012-08-11 21:09 | David Cole | Status | new => backlog | ||
2012-08-11 21:09 | David Cole | Note Added: 0030344 | |||
2016-06-10 14:28 | Kitware Robot | Note Added: 0041951 | |||
2016-06-10 14:28 | Kitware Robot | Status | backlog => resolved | ||
2016-06-10 14:28 | Kitware Robot | Resolution | open => moved | ||
2016-06-10 14:28 | Kitware Robot | Assigned To | => Kitware Robot | ||
2016-06-10 14:31 | Kitware Robot | Status | resolved => closed |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|