private Map<String, Macro> parseMacroDefinitions(List<String> defines) {
    final Map<String, Macro> result = new HashMap<>();

    for (String define : defines) {
      if (define.isEmpty()) {
        continue;
      }

      final String defineString = "#define " + define;

      LOG.debug("parsing external macro: '{}'", defineString);
      final Macro macro = parseMacroDefinition(defineString);

      if (macro != null) {
        if (LOG.isDebugEnabled()) {
          LOG.debug("storing external macro: '{}'", macro);
        }
        result.put(macro.name, macro);
      }
    }
    return result;
  }
private Map < String , Macro > parseMacroDefinitions ( List < String > defines ) { final Map < String , Macro > result = new HashMap < > ( ) ; for ( String define : defines ) { if ( define . isEmpty ( ) ) { continue ; } final String defineString = "#define " + define ; LOG . debug ( "parsing external macro: '{}'" , defineString ) ; final Macro macro = parseMacroDefinition ( defineString ) ; if ( macro != null ) { if ( LOG . isDebugEnabled ( ) ) { LOG . debug ( "storing external macro: '{}'" , macro ) ; } result . put ( macro . name , macro ) ; } } return result ; }
Parse defines, which are merged into one string (see sonar.cxx.defines)