Skip to content

Commit

Permalink
Brackets [,] are not used because cmake is not able to parse variable…
Browse files Browse the repository at this point in the history
… name with brackets. Underscores are used instead.
  • Loading branch information
sbellus committed Jun 9, 2015
1 parent 53b681c commit 904ff83
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions JSONParser.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -224,15 +224,15 @@ macro(_sbeParseArray prefix)
if("\"" STREQUAL "${json_char}")
# simple value
list(APPEND ${prefix} ${json_${json_ArrayNestingLevel}_arrayIndex})
_sbeParseValue(${prefix}[${json_${json_ArrayNestingLevel}_arrayIndex}])
_sbeParseValue(${prefix}_${json_${json_ArrayNestingLevel}_arrayIndex})
elseif("{" STREQUAL "${json_char}")
# object
_sbeMoveToNextNonEmptyCharacter()
list(APPEND ${prefix} ${json_${json_ArrayNestingLevel}_arrayIndex})
_sbeParseObject(${prefix}[${json_${json_ArrayNestingLevel}_arrayIndex}])
_sbeParseObject(${prefix}_${json_${json_ArrayNestingLevel}_arrayIndex})
else()
list(APPEND ${prefix} ${json_${json_ArrayNestingLevel}_arrayIndex})
_sbeParseReservedWord(${prefix}[${json_${json_ArrayNestingLevel}_arrayIndex}])
_sbeParseReservedWord(${prefix}_${json_${json_ArrayNestingLevel}_arrayIndex})
endif()

string(SUBSTRING ${json_string} ${json_index} 1 json_char)
Expand Down

0 comments on commit 904ff83

Please sign in to comment.