def SetVariableList(output, variable_name, values):
 if (not values):
  return SetVariable(output, variable_name, '')
 if (len(values) == 1):
  return SetVariable(output, variable_name, values[0])
 output.write('list(APPEND ')
 output.write(variable_name)
 output.write('\n  "')
 output.write('"\n  "'.join([CMakeStringEscape(value) for value in values]))
 output.write('")\n')

def SetVariableList ( output , variable_name , values ) : if ( not values ) : return SetVariable ( output , variable_name , '' ) if ( len ( values ) == 1 ) : return SetVariable ( output , variable_name , values [ 0 ] ) output . write ( 'list(APPEND ' ) output . write ( variable_name ) output . write ( '\n  "' ) output . write ( '"\n  "' . join ( [ CMakeStringEscape ( value ) for value in values ] ) ) output . write ( '")\n' )
sets a cmake variable to a list .