title: cmake doesn't correctly parse whitespace in command line parameter
body: <p>When I call cmake like this, everything works:</p>
  
  <p><code>cmake -G'Android Gradle - Ninja' ..</code></p>
  
  <p>However, I'm setting up a bash script that lets me specify the target platform, changing the <code>-G</code> argument dynamically.</p>
  
  <pre><code>#!/usr/bin/env bash
  
  CMAKE_GENERATOR="Ninja"
  if [[ $TARGET_PLATFORM == "android" ]] ; then
      CMAKE_GENERATOR="'Android Gradle - Ninja'"
  fi
  
  cmake -G$CMAKE_GENERATOR ..
  </code></pre>
  
  <p>This gives me the following error:</p>
  
  <p><code>CMake Error: Could not create named generator 'Android</code></p>
  
  <p>Apparently cmake splits the generator name at the whitespace and interprets it as multiple arguments. I've tried multiple combinations of escaping the single/double quotes as well as the whitespaces but can't get it to work. I'm not even sure if this is a cmake or bash issue. Any ideas?</p>