class Rmk::Ccache

Meta-tool to change cc.cc and cxx.cxx to use ccache

Attributes

ccache[RW]

ccache binary

Public Class Methods

new() click to toggle source
Calls superclass method Rmk::NinjaGenerator.new
# File tools/ccache.rb, line 12
def initialize
  super
  @requires = [CC, CXX]
  data = tool_params(:Ccache, generator.configuration)
  @ccache = data[:ccache] || 'ccache'
end

Public Instance Methods

ninja_begin(_writer = generator.ninja) click to toggle source
# File tools/ccache.rb, line 19
def ninja_begin(_writer = generator.ninja)
  cc.cc = "$ccache #{cc.cc}"
  cxx.cxx = "$ccache #{cxx.cxx}"
end
ninja_variables(writer = generator.ninja) click to toggle source
# File tools/ccache.rb, line 24
def ninja_variables(writer = generator.ninja)
  writer.comment 'ccache'
  writer.variable('ccache', @ccache)
  writer.newline
end