title: How to build the latest clang-tidy?
body: <p>I've tried to build clang-tidy from <a href="https://github.com/llvm-mirror/clang-tools-extra" rel="noreferrer">sources</a> but it complains about an undefined CMake command:</p>
  
  <pre><code>CMake Error at clang-apply-replacements/CMakeLists.txt:5 (add_clang_library):
    Unknown CMake command "add_clang_library".
  
  
  CMake Warning (dev) in CMakeLists.txt:
    No cmake_minimum_required command is present.  A line of code such as
  
      cmake_minimum_required(VERSION 3.9)
  
    should be added at the top of the file.  The version specified may be lower
    if you wish to support older CMake versions for this project.  For more
    information run "cmake --help-policy CMP0000".
  This warning is for project developers.  Use -Wno-dev to suppress it.
  
  -- Configuring incomplete, errors occurred!
  </code></pre>
  
  <p>How can I build clang-tidy or, alternatively, how can I install the latest version on macOS?</p>