title: CMake multiple-option setting
body: <p>I'm working on a project which is built with CMake, so I'm writing up a <code>CMakeLists.txt</code> for it. In this file I want to have a (cached) CMake variable that can only take one of several options (which I would specify somehow), rather than any arbitrary string. For simplicity, let's take it to be a string which can take "red", "green" or "blue" - but nothing else.</p>
  
  <p>Can I achieve this with a recent CMake version, other than setting an arbitrary string then checking it for validity?</p>