title: Header errors in CLion
body: <p>I met an annoying problem in Clion which is that there are always header errors in my project.<br>
  Here is my <code>CmakeLists.txt</code>:</p>
  
  <pre><code>cmake_minimum_required(VERSION 3.6)
  project(geometry)
  
  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
  
  set(PROJECT_SOURCE_DIR geo)
  set(CMAKE_INCLUDE_CURRENT_DIR geo)
  include_directories("${PROJECT_BINARY_DIR}")
  include_directories(${CMAKE_BINARY_DIR}/geo/)
  
  set(SOURCE_FILES
  
      geo/Circle.cpp
      geo/Circle.h
      geo/geo.h
      geo/ICircle.cpp
      geo/ICircle.h
      geo/IPoint.cpp
      geo/IPoint.h
      geo/IRectangle.cpp
      geo/IRectangle.h
      geo/IShape.cpp
      geo/IShape.h
      geo/IText.cpp
      geo/IText.h
      geo/Point.cpp
      geo/Point.h
      geo/Rectangle.cpp
      geo/Rectangle.h
      geo/Shape.cpp
      geo/Shape.h
      geo/Text.cpp
      geo/Text.h
      owl/IThing.cpp
      owl/IThing.h
      owl/owl.h
      owl/Thing.cpp
      owl/Thing.h
      rdfs/IResource.cpp
      rdfs/IResource.h
      rdfs/rdfs.h
      rdfs/Resource.cpp
      rdfs/Resource.h
      AllInOne.cpp
      example.cpp
      geometry.owl)
  
  add_executable(geometry ${SOURCE_FILES})
  </code></pre>
  
  <p>Here is the <code>example.cpp</code> which is also the main cpp:</p>
  
  <pre><code>#include &lt;autordf/Factory.h&gt;
  
  #include &lt;geo/geo.h&gt;
  
  using namespace geo;
  
  
  int main(int argc, char ** argv) {
      autordf::Factory f;
      f.addNamespacePrefix("geo", "http://example.org/geometry#");
      autordf::Object::setFactory(&amp;f);
  
      geo::Rectangle r("http://example.org/myfancyrectangle");
  
      // Set one of my rectangle coordinates - the long way
      geo::Point tl;
      tl.setX(1.0);
      tl.setY(2.0);
      r.setTopLeft(tl);
  
      // Set one of my rectangle coordinates - the short way
      r.setBottomRight(geo::Point().setX(11).setY(12));
  
      // Set result of my work
      f.saveToFile(stdout, "turtle");
  }
  </code></pre>
  
  <p>It works perfectly in the terminal but in Clion the result is:</p>
  
  <pre><code>Scanning dependencies of target geometry
  [  5%] Building CXX object CMakeFiles/geometry.dir/geo/Circle.cpp.o
  [ 11%] Building CXX object CMakeFiles/geometry.dir/geo/ICircle.cpp.o
  [ 17%] Building CXX object CMakeFiles/geometry.dir/geo/IPoint.cpp.o
  /home/burning/projects/autordf_projects/geometry/geo/Circle.cpp:2:24: fatal error: geo/Circle.h: No such file or directory
   #include &lt;geo/Circle.h&gt;
                          ^
  compilation terminated.
  /home/burning/projects/autordf_projects/geometry/geo/ICircle.cpp:2:25: fatal error: geo/ICircle.h: No such file or directory
   #include &lt;geo/ICircle.h&gt;
                           ^
  compilation terminated.
  /home/burning/projects/autordf_projects/geometry/geo/IPoint.cpp:2:24: fatal error: geo/IPoint.h: No such file or directory
   #include &lt;geo/IPoint.h&gt;
                          ^
  compilation terminated.
  [ 23%] Building CXX object CMakeFiles/geometry.dir/geo/IRectangle.cpp.o
  /home/burning/projects/autordf_projects/geometry/geo/IRectangle.cpp:2:28: fatal error: geo/IRectangle.h: No such file or directory
   #include &lt;geo/IRectangle.h&gt;
                              ^
  compilation terminated.
  make[3]: *** [CMakeFiles/geometry.dir/geo/ICircle.cpp.o] Error 1
  make[3]: *** Waiting for unfinished jobs....
  make[3]: *** [CMakeFiles/geometry.dir/geo/Circle.cpp.o] Error 1
  make[3]: *** [CMakeFiles/geometry.dir/geo/IPoint.cpp.o] Error 1
  make[3]: *** [CMakeFiles/geometry.dir/geo/IRectangle.cpp.o] Error 1
  make[2]: *** [CMakeFiles/geometry.dir/all] Error 2
  make[1]: *** [CMakeFiles/geometry.dir/rule] Error 2
  make: *** [geometry] Error 2
  </code></pre>
  
  <p>One of the header files in <code>geo/</code> (e.g. <code>Circle.cpp</code>) looks like:</p>
  
  <pre><code>/** @cond internal */
  #include &lt;geo/Circle.h&gt;
  
  // This is auto generated code by AutoRDF, do not edit !
  
  namespace geo {
  
  Circle::Circle(const std::string&amp; iri) : autordf::Object(iri, ICircle::TYPEIRI) {
  }
  
  Circle::Circle(const Object&amp; other) : autordf::Object(other) {
  }
  
  std::vector&lt;Circle&gt; Circle::find() {
      return findHelper&lt;Circle&gt;(ICircle::TYPEIRI);
  }
  
  }
  
  /** @endcond internal */
  </code></pre>
  
  <p>So, the problem is that I cannot include the other headers in the header file. As you can see above the error would be:</p>
  
  <pre><code>/home/burning/projects/autordf_projects/geometry/geo/Circle.cpp:2:24: fatal error: geo/Circle.h: No such file or directory
   #include &lt;geo/Circle.h&gt;
                          ^
  compilation terminated.
  </code></pre>
  
  <p>Could someone help me with that?</p>