parameters: (self, name, default=None, substitute=False)
docstring: Get value of CMake variable set in project.
  
      :param name: Name of the variable.
      :type name: :class:`str`
      :param default: Value to return if no such variable exists.
      :param substitute: If ``True``, expand variable references in value.
      :type substitute: :class:`bool`
  
      :returns: Value of the variable, or ``default`` if not set.
      :rtype: :class:`str` or ``type(default)``
  
      :raises:
        :exc:`~exceptions.KeyError` if no such ``name`` is set and ``default`` is
        ``None``.
  
      This returns the raw value of the variable ``name`` which is set in the
      build script. By default, no substitution is performed (the result is taken
      from the raw argument). If more than one ``set()`` command sets the same
      ``name``, the result is the raw argument to the last such command. If the
      value consists of more than one argument, only the first is returned.
  
      If ``substitute`` is ``True``, each occurrence of '``${var}``' will be
      replaced with the corresponding variable if it has been set. Variable
      references can nest and are evaluated from the inside out,
      e.g. '``${outer_${inner_variable}_variable}``'. If a variable
      reference is not found, it will be replaced with '``<var>-NOTFOUND``'.
  
      If no ``set()`` command sets ``name``, and ``default`` is not ``None``,
      ``default`` is returned. Otherwise a :exc:`~exceptions.KeyError` is raised.
  
      .. note::
  
        Variables set using a nested reference are not supported.
        For example, if the underlying CMake code is ``set(foo \"world\")``
        and ``set(hello_${foo} \"earth\")``. Occurrences of
        '``${hello_${foo}}``' will be replaced by '``hello_world-NOTFOUND``'
  
      .. seealso:: :func:`.substituteVariableReferences`
docstring_summary: Get value of CMake variable set in project.
docstring_tokens: Get value of CMake variable set in project .
function: def getValue(self, name, default=None, substitute=False):
      """Get value of CMake variable set in project.
  
      :param name: Name of the variable.
      :type name: :class:`str`
      :param default: Value to return if no such variable exists.
      :param substitute: If ``True``, expand variable references in value.
      :type substitute: :class:`bool`
  
      :returns: Value of the variable, or ``default`` if not set.
      :rtype: :class:`str` or ``type(default)``
  
      :raises:
        :exc:`~exceptions.KeyError` if no such ``name`` is set and ``default`` is
        ``None``.
  
      This returns the raw value of the variable ``name`` which is set in the
      build script. By default, no substitution is performed (the result is taken
      from the raw argument). If more than one ``set()`` command sets the same
      ``name``, the result is the raw argument to the last such command. If the
      value consists of more than one argument, only the first is returned.
  
      If ``substitute`` is ``True``, each occurrence of '``${var}``' will be
      replaced with the corresponding variable if it has been set. Variable
      references can nest and are evaluated from the inside out,
      e.g. '``${outer_${inner_variable}_variable}``'. If a variable
      reference is not found, it will be replaced with '``<var>-NOTFOUND``'.
  
      If no ``set()`` command sets ``name``, and ``default`` is not ``None``,
      ``default`` is returned. Otherwise a :exc:`~exceptions.KeyError` is raised.
  
      .. note::
  
        Variables set using a nested reference are not supported.
        For example, if the underlying CMake code is ``set(foo \"world\")``
        and ``set(hello_${foo} \"earth\")``. Occurrences of
        '``${hello_${foo}}``' will be replaced by '``hello_world-NOTFOUND``'
  
      .. seealso:: :func:`.substituteVariableReferences`
      """
  
      for t in reversed(self._scriptContents.tokens):
        if _isCommand(t, "set") and len(t.arguments) and \
           t.arguments[0].text == name:
          if len(t.arguments) < 2:
            return None
          value = t.arguments[1].text
          if substitute:
            value = self.substituteVariableReferences(value)
          return value
  
      if default is not None:
        return default
  
      raise KeyError("script does not set %r" % name)
function_tokens: def getValue ( self , name , default = None , substitute = False ) : for t in reversed ( self . _scriptContents . tokens ) : if _isCommand ( t , "set" ) and len ( t . arguments ) and t . arguments [ 0 ] . text == name : if len ( t . arguments ) < 2 : return None value = t . arguments [ 1 ] . text if substitute : value = self . substituteVariableReferences ( value ) return value if default is not None : return default raise KeyError ( "script does not set %r" % name )