title: How to manage multiple build configurations with cmake
body: <p>I am trying to think through how to design a new project build system.<br>
  I want to use CMake to compile for Windows and Linux. I want to have Release and Debug builds, which are pretty straight forward.  </p>
  
  <p>The problem is that I will want to deploy this software for multiple hardware projects over the course of the next few years. This means that I will have pre-processor definitions to turn on/off and or alter functionality in my C++ program. I will also want to link configuration specific libraries. A current legacy project uses a header with a list of defines and then links all possible project dependencies.</p>
  
  <p>An example header:</p>
  
  <pre><code>// projects.h
  
  //#define project1
  //#define project2
  #define project3
  </code></pre>
  
  <p>Which means that to change hardware/project configurations you have to edit this file to make sure the correct hardware configuration is selected.<br>
  What I want to do is to have a configuration for each project which can also be configured for Release or Debug build.</p>
  
  <p>Is there any advice on how to more optimally deal with this in CMake?</p>