title: CMake dependency conflict with same header file names
body: <p>I am stuck in CMake dependency issue. CMake does not rebuild the program when I modified the CXX header files.</p>
  
  <p>My file structure is as such</p>
  
  <pre><code>$ tree
  .
  ├── a
  │   ├── a.h
  │   └── c.h
  ├── b
  │   ├── b.h
  │   └── c.h
  ├── CMakeLists.txt
  └── main.cxx
  </code></pre>
  
  <p>File contents:</p>
  
  <p>a.h</p>
  
  <pre><code>$ cat a/a.h
  #include "c.h"
  </code></pre>
  
  <p>b.h</p>
  
  <pre><code>$ cat b/b.h
  #include "c.h"
  </code></pre>
  
  <p>main.cxx</p>
  
  <pre><code>$ cat main.cxx
  #include "a/a.h"
  #include "b/b.h"
  int main()
  {
  }
  </code></pre>
  
  <p>CMake depend.internal</p>
  
  <pre><code>$ cat CMakeFiles/hello.dir/depend.internal
  # CMAKE generated file: DO NOT EDIT!
  # Generated by "Unix Makefiles" Generator, CMake Version 3.7
  
  CMakeFiles/hello.dir/main.cxx.o
   /proj/mtk09331/work/tmp/cmake/a/a.h
   /proj/mtk09331/work/tmp/cmake/a/c.h
   /proj/mtk09331/work/tmp/cmake/b/b.h
   /proj/mtk09331/work/tmp/cmake/main.cxx
  </code></pre>
  
  <p>CMakeLists.txt:</p>
  
  <pre><code>$ cat CMakeLists.txt
  add_executable(hello main.cxx)
  </code></pre>
  
  <p>As you can see, b/c.h does not exist in the dependency list.
  Therefore, CMake won't rebuild the program if I modified b/c.h.</p>
  
  <p>Does cmake not allow the same header file names?
  Altough it works with renaming the header files.
  But I would like to find a "correct" way to prevents this.</p>
  
  <p>Thanks in advance</p>