1 parent
3851aeb703
commit
053ee5b296
23 files changed
+845
-93
No files matched your search
@@ -51,7 +51,11 @@ foreach(line IN LISTS lines)
|
||||
if(_match)
|
||||
string(REGEX REPLACE "^[ \t]*class[ \t]+([A-Za-z_][A-Za-z0-9_]*)[ \t]*:.*" "\\1" fixture_class_name "${line}")
|
||||
set(in_fixture_class TRUE)
|
||||
string(REGEX MATCH "^[ \t]*" fixture_indent "${line}")
|
||||
# Derive indentation without an empty-match-capable regex. CMake 4
|
||||
# rejects such expressions even when the current input is non-empty.
|
||||
string(STRIP "${line}" _trimmed_fixture_line)
|
||||
string(FIND "${line}" "${_trimmed_fixture_line}" _indent_length)
|
||||
string(SUBSTRING "${line}" 0 ${_indent_length} fixture_indent)
|
||||
endif()
|
||||
|
||||
if(in_fixture_class)
|
||||
@@ -127,8 +131,17 @@ foreach(line IN LISTS lines)
|
||||
set(current_skip "")
|
||||
else()
|
||||
# If line is code (not comment/empty), break the comment association
|
||||
string(REGEX MATCH "^[ \t]*$" _is_empty "${line}")
|
||||
string(REGEX MATCH "^[ \t]*//" _is_comment "${line}")
|
||||
string(STRIP "${line}" _stripped_line)
|
||||
if(_stripped_line STREQUAL "")
|
||||
set(_is_empty TRUE)
|
||||
else()
|
||||
set(_is_empty FALSE)
|
||||
endif()
|
||||
if(line MATCHES "^[ \t]*//")
|
||||
set(_is_comment TRUE)
|
||||
else()
|
||||
set(_is_comment FALSE)
|
||||
endif()
|
||||
if(NOT _is_empty AND NOT _is_comment)
|
||||
set(current_tags "")
|
||||
set(current_skip "")
|
||||
|
||||
Reference in new issue
Block a user