|
@@ -23,14 +23,14 @@ macro(CtkMacroListFilter)
|
|
|
list(LENGTH LIST_FILTER_DEFAULT_ARGS LIST_FILTER_default_length)
|
|
|
if(${LIST_FILTER_default_length} EQUAL 0)
|
|
|
message(FATAL_ERROR "LIST_FILTER: missing list variable.")
|
|
|
- endif(${LIST_FILTER_default_length} EQUAL 0)
|
|
|
+ endif()
|
|
|
if(${LIST_FILTER_default_length} EQUAL 1)
|
|
|
message(FATAL_ERROR "LIST_FILTER: missing regular expression variable.")
|
|
|
- endif(${LIST_FILTER_default_length} EQUAL 1)
|
|
|
+ endif()
|
|
|
# Reset output variable
|
|
|
if(NOT LIST_FILTER_OUTPUT_VARIABLE)
|
|
|
set(LIST_FILTER_OUTPUT_VARIABLE "LIST_FILTER_internal_output")
|
|
|
- endif(NOT LIST_FILTER_OUTPUT_VARIABLE)
|
|
|
+ endif()
|
|
|
set(${LIST_FILTER_OUTPUT_VARIABLE})
|
|
|
# Extract input list from arguments
|
|
|
list(GET LIST_FILTER_DEFAULT_ARGS 0 LIST_FILTER_input_list)
|
|
@@ -40,12 +40,12 @@ macro(CtkMacroListFilter)
|
|
|
foreach(LIST_FILTER_regexp ${${LIST_FILTER_regexp_var}})
|
|
|
if(${LIST_FILTER_item} MATCHES ${LIST_FILTER_regexp})
|
|
|
list(APPEND ${LIST_FILTER_OUTPUT_VARIABLE} ${LIST_FILTER_item})
|
|
|
- endif(${LIST_FILTER_item} MATCHES ${LIST_FILTER_regexp})
|
|
|
- endforeach(LIST_FILTER_regexp ${${LIST_FILTER_regexp_var}})
|
|
|
- endforeach(LIST_FILTER_regexp_var)
|
|
|
- endforeach(LIST_FILTER_item)
|
|
|
+ endif()
|
|
|
+ endforeach()
|
|
|
+ endforeach()
|
|
|
+ endforeach()
|
|
|
# If OUTPUT_VARIABLE is not specified, overwrite the input list.
|
|
|
if(${LIST_FILTER_OUTPUT_VARIABLE} STREQUAL "LIST_FILTER_internal_output")
|
|
|
set(${LIST_FILTER_input_list} ${${LIST_FILTER_OUTPUT_VARIABLE}})
|
|
|
- endif(${LIST_FILTER_OUTPUT_VARIABLE} STREQUAL "LIST_FILTER_internal_output")
|
|
|
+ endif()
|
|
|
endmacro(CtkMacroListFilter)
|