docstr: Infer default generator.
  
  Gives precedence to ninja if there exists an executable named `ninja`
  in the search path.
docstr_tok: ["Infer","default","generator",".","Gives","precedence","to","ninja","if","there","exists","an","executable","named","`","ninja","`","in","the","search","path","."]
code: def default_generator():
      """Infer default generator.
  
      Gives precedence to ninja if there exists an executable named `ninja`
      in the search path.
      """
      found_ninja = which("ninja")
      return "Ninja" if found_ninja else "Unix Makefiles"
  
imports: import os
  import re
  from shutil import rmtree, which
  from .command import Command, default_bin
label_desc: Use image node_id 2 for calling the CMake obj's underlying member method code with example usage: obj.default_generator() and returns: unknown