title: Setting CMake variables in QtCreator
body: <p>In the <a href="https://qt-project.org/doc/qtcreator-2.8/creator-project-cmake.html" rel="nofollow noreferrer">Qt Creator 2.8 documentation</a> <em>(now defunct, alternative link <a href="https://qt.developpez.com/doc/qtcreator-2.3/creator-project-cmake/" rel="nofollow noreferrer">here</a>)</em> there is a screenshot showing a wizard dialog where I can pass CMake command line arguments:</p>
  
  <blockquote>
    <p>The screenshot below shows how you can specify command line arguments to CMake for your project.</p>
    
    <p><img src="https://i.stack.imgur.com/BNWUs.png" alt="CMake Wizard screenshot"></p>
  </blockquote>
  
  <p>Is there a way to make these settings not there, but in a <code>CMakeLists.txt</code> file? </p>
  
  <p>For example, if I want a project to compile in release, every time I have to type <code>-DCMAKE_BUILD_TYPE=Release</code> into this dialog. How can I set that I want the project to build in release mode in a <code>CMakeLists.txt</code> file?</p>