We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e62d39d commit e3cb695Copy full SHA for e3cb695
1 file changed
cmakelib/QuickCppLibUtils.cmake
@@ -53,25 +53,8 @@ endfunction()
53
54
# Emulate list(FILTER list INCLUDE|EXCLUDE REGEX regex) on cmake < 3.6
55
function(list_filter listname op regexqualifer regex)
56
- if(CMAKE_VERSION VERSION_GREATER 3.59)
57
- list(FILTER ${ARGV})
58
- set(${listname} ${${listname}} PARENT_SCOPE)
59
- else()
60
- set(out)
61
- foreach(item ${${listname}})
62
- string(REGEX MATCH "${regex}" match ${item})
63
- if("${op}" STREQUAL "INCLUDE")
64
- if(match)
65
- list(APPEND out ${item})
66
- endif()
67
68
- if(NOT match)
69
70
71
72
- endforeach()
73
- set(${listname} ${out} PARENT_SCOPE)
74
+ list(FILTER ${ARGV})
+ set(${listname} ${${listname}} PARENT_SCOPE)
75
endfunction()
76
77
# Escape a string into a regex matching that string
0 commit comments