title: CLion can't find CMake generated headers?
body: <p>Going through the <a href="http://www.cmake.org/cmake-tutorial" rel="nofollow">CMake tutorial</a>:</p>
  
  <pre><code>├── CMakeLists.txt
  ├── src
  │   └── main.cpp
  └── templates
      └── fooConf.h.in
  </code></pre>
  
  <h3>CMakeLists.txt</h3>
  
  <pre><code>cmake_minimum_required(VERSION 3.2)
  project(foo)
  
  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
  
  set(PROJECT_SOURCE_DIR src)
  set(PROJECT_TEMPLATE_DIR templates)
  
  set(SOURCE_FILES ${PROJECT_SOURCE_DIR}/main.cpp)
  set(${PROJECT_NAME}_MAJOR 0)
  set(${PROJECT_NAME}_MINOR 1)
  set(${PROJECT_NAME}_MICRO 1)
  configure_file (
    "${PROJECT_TEMPLATE_DIR}/fooConf.h.in"
    "${PROJECT_SOURCE_DIR}/fooConf.h"
  )
  
  add_executable(foo ${SOURCE_FILES})
  </code></pre>
  
  <h3>templates/fooConf.h.in</h3>
  
  <pre><code>#define @PROJECT_NAME@_VERSION_MAJOR @PROJECT_NAME@@_VERSION_MAJOR@
  #define @PROJECT_NAME@_VERSION_MINOR @PROJECT_NAME@@_VERSION_MINOR@
  #define @PROJECT_NAME@_VERSION_MICRO @PROJECT_NAME@@_VERSION_MICRO@
  </code></pre>
  
  <h3>src/main.cpp</h3>
  
  <pre><code>#include &lt;iostream&gt;
  
  #include "src/fooConf.h"
  // Also tried: "fooConf.h"
  
  int main() {
      std::cout &lt;&lt; foo_VERSION_MAJOR;
      return 0;
  }
  </code></pre>
  
  <h3>[Error]</h3>
  
  <pre><code>fatal error: src/fooConf.h: No such file or directory
  </code></pre>