diff --git a/tools/build/CMake/BoostUtils.cmake b/tools/build/CMake/BoostUtils.cmake index 8cf2632..68baf5b 100644 --- a/tools/build/CMake/BoostUtils.cmake +++ b/tools/build/CMake/BoostUtils.cmake @@ -74,34 +74,34 @@ endmacro(cdr) # removed from these lists. PARSE_ARGUMENTS also creates a # prefix_DEFAULT_ARGS variable containing the list of all arguments up # to the first arg_name encountered. -MACRO(PARSE_ARGUMENTS prefix arg_names option_names) - SET(DEFAULT_ARGS) - FOREACH(arg_name ${arg_names}) - SET(${prefix}_${arg_name}) - ENDFOREACH(arg_name) - FOREACH(option ${option_names}) - SET(${prefix}_${option} FALSE) - ENDFOREACH(option) - - SET(current_arg_name DEFAULT_ARGS) - SET(current_arg_list) - FOREACH(arg ${ARGN}) - LIST_CONTAINS(is_arg_name ${arg} ${arg_names}) - IF (is_arg_name) - SET(${prefix}_${current_arg_name} ${current_arg_list}) - SET(current_arg_name ${arg}) - SET(current_arg_list) - ELSE (is_arg_name) - LIST_CONTAINS(is_option ${arg} ${option_names}) - IF (is_option) - SET(${prefix}_${arg} TRUE) - ELSE (is_option) - SET(current_arg_list ${current_arg_list} ${arg}) - ENDIF (is_option) - ENDIF (is_arg_name) - ENDFOREACH(arg) - SET(${prefix}_${current_arg_name} ${current_arg_list}) -ENDMACRO(PARSE_ARGUMENTS) +macro(PARSE_ARGUMENTS prefix arg_names option_names) + set(DEFAULT_ARGS) + foreach(arg_name ${arg_names}) + set(${prefix}_${arg_name}) + endforeach(arg_name) + foreach(option ${option_names}) + set(${prefix}_${option} FALSE) + endforeach(option) + + set(current_arg_name DEFAULT_ARGS) + set(current_arg_list) + foreach(arg ${ARGN}) + list_contains(is_arg_name ${arg} ${arg_names}) + if (is_arg_name) + set(${prefix}_${current_arg_name} ${current_arg_list}) + set(current_arg_name ${arg}) + set(current_arg_list) + else (is_arg_name) + list_contains(is_option ${arg} ${option_names}) + if (is_option) + set(${prefix}_${arg} TRUE) + else (is_option) + set(current_arg_list ${current_arg_list} ${arg}) + endif (is_option) + endif (is_arg_name) + endforeach(arg) + set(${prefix}_${current_arg_name} ${current_arg_list}) +endmacro(PARSE_ARGUMENTS) # Perform a reverse topological sort on the given LIST. # @@ -246,22 +246,21 @@ function (colormsg) set(LO${color} "2\;${${color}}") set(_${color}_ "4\;${${color}}") set(_HI${color}_ "1\;4\;${${color}}") - set(_LO${color}_ "2\;4\;${${color}}") - endforeach() + set(_LO${color}_ "2\;4\;${${color}}") endforeach() set(str "") set(coloron FALSE) foreach(arg ${ARGV}) if (NOT ${${arg}} STREQUAL "") if (CMAKE_COLOR_MAKEFILE) - set(str "${str}${_escape}[${${arg}}m") - set(coloron TRUE) + set(str "${str}${_escape}[${${arg}}m") + set(coloron TRUE) endif() else() set(str "${str}${arg}") if (coloron) - set(str "${str}${_escape}[0m") - set(coloron FALSE) + set(str "${str}${_escape}[0m") + set(coloron FALSE) endif() set(str "${str} ") endif()