From 904ff83abb71b4ae133996b5a225b1c10832d7aa Mon Sep 17 00:00:00 2001 From: Stefan Bellus Date: Tue, 9 Jun 2015 12:29:38 +0200 Subject: [PATCH] Brackets [,] are not used because cmake is not able to parse variable name with brackets. Underscores are used instead. --- JSONParser.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/JSONParser.cmake b/JSONParser.cmake index d2344f4..cc79bda 100644 --- a/JSONParser.cmake +++ b/JSONParser.cmake @@ -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)