1# Parse arguments passed to a function into several lists separated by
2# upper-case identifiers and options that do not have an associated list e.g.:
10# PARSE_ARGUMENTS(ARG "LIST1;LIST2;LIST3" "OPTION1;OPTION2;OPTION3" ${arguments})
12# results in 7 distinct variables:
13# * ARG_DEFAULT_ARGS: hello;world
21# taken from http://www.cmake.org/Wiki/CMakeMacroParseArguments
23MACRO(PARSE_ARGUMENTS prefix arg_names option_names)
25 FOREACH(arg_name ${arg_names})
26 SET(${prefix}_${arg_name})
28 FOREACH(option ${option_names})
29 SET(${prefix}_${option} FALSE)
32 SET(current_arg_name DEFAULT_ARGS)
35 SET(larg_names ${arg_names})
36 LIST(FIND larg_names "${arg}" is_arg_name)
37 IF (is_arg_name GREATER -1)
38 SET(${prefix}_${current_arg_name} ${current_arg_list})
39 SET(current_arg_name ${arg})
41 ELSE (is_arg_name GREATER -1)
42 SET(loption_names ${option_names})
43 LIST(FIND loption_names "${arg}" is_option)
44 IF (is_option GREATER -1)
45 SET(${prefix}_${arg} TRUE)
46 ELSE (is_option GREATER -1)
47 SET(current_arg_list ${current_arg_list} ${arg})
48 ENDIF (is_option GREATER -1)
49 ENDIF (is_arg_name GREATER -1)
51 SET(${prefix}_${current_arg_name} ${current_arg_list})
52ENDMACRO(PARSE_ARGUMENTS)
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list