title: How can I set CMAKE_MAKE_PROGRAM to Ninja?
body: <p>I'm a newbie to CMake and am trying to understand how to configure CMake to use Ninja as the build tool. The specific problem I'm having is I'm trying to install YouCompleteMe plugin for vim using their install.py. I get the following error:</p>
  
  <pre><code>Searching Python 3.8 libraries...
  Found Python library: /usr/lib64/libpython3.8.so
  Found Python headers folder: /usr/include/python3.8
  CMake Error: CMake was unable to find a build program corresponding to "Unix Makefiles".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.
  CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
  CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
  -- Configuring incomplete, errors occurred!
  See also "/tmp/ycm_build__dy3xdvd/CMakeFiles/CMakeOutput.log".
  ERROR: the build failed.
  </code></pre>
  
  <p>After looking similar errors up on the internet I realise that I can fix this by installing Make. But, I'm wondering if I can actually use Ninja instead of Make which I have already installed and is in the path. Is there a way I can set <code>CMAKE_MAKE_PROGRAM</code> to my Ninja installation so that I can get past this error or do I have to use Make because <code>CMAKE_MAKE_PROGRAM</code> can only be set from within the project?</p>
  
  <p>EDIT:</p>
  
  <p>When I say set the <code>CMAKE_MAKE_PROGRAM</code>, I mean at the machine level like an environment variable. Not by modifying the build definition files in the actual project I'm trying to build.</p>