View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0013938 | CMake | CMake | public | 2013-02-20 11:03 | 2016-06-10 14:31 | ||||
Reporter | tasptz | ||||||||
Assigned To | Kitware Robot | ||||||||
Priority | normal | Severity | major | Reproducibility | always | ||||
Status | closed | Resolution | moved | ||||||
Platform | Linux | OS | Ubuntu | OS Version | 12.04 | ||||
Product Version | CMake 2.8.10.2 | ||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0013938: Incomplete header dependencies generated | ||||||||
Description | I constructed a minimal example which reproduces the issue. The include tree is: main.cpp -> a/a.h -> x.h (a.h includes x.h without path and x.h is in a/) \-> c/c.h -> x.h (c.h includes x.h without path and x.h is in c/) Now cmake detects the dependency only for one of the two x.h! Note: I even added all files to the executable add_executable(main main.cpp a/a.h a/x.h c/c.h c/x.h) | ||||||||
Steps To Reproduce | 1. Compile the project. * project build must be successful! 2. Change a/x.h and check if the change is picked up by the build system 3. Change c/x.h and check if the change is picked up by the build system Either step 2 or step 3 should fail! | ||||||||
Additional Information | I ran the following command in the build directory: $ rgrep "x.h" * CMakeFiles/main.dir/depend.make:CMakeFiles/main.dir/main.cpp.o: /home/poenitz/Desktop/bugreport/src/a/x.h CMakeFiles/main.dir/CXX.includecache:x.h CMakeFiles/main.dir/CXX.includecache:/removed/bugreport/src/a/x.h CMakeFiles/main.dir/CXX.includecache:/removed/bugreport/src/a/x.h CMakeFiles/main.dir/CXX.includecache:x.h CMakeFiles/main.dir/CXX.includecache:/removed/bugreport/src/c/x.h CMakeFiles/main.dir/depend.internal: /removed/bugreport/src/a/x.h | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | ![]() | ||||||||
Relationships | |
Relationships |
Notes | |
(0032358) Rolf Eike Beer (developer) 2013-02-20 12:04 |
Can you try to #include "./x.h" in both places and see if that helps? Sadly the C/C++ standards do not say that "" includes should look in the local directory first. This is insane, but sadly the truth. E.g. MSVC compilers handle <> and "" includes exactly the same AFAIK. |
(0032359) tasptz (reporter) 2013-02-20 12:21 |
No it does not help. Writing full project paths (a/x.h and c/x.h) resolves the issue. But isn't it irrelevant? I think that from a C++ point of view there is no collision here and building it works just fine. Isn't the only problem that cmake somehow overwrites one dependency because the file names are equal? |
(0042229) Kitware Robot (administrator) 2016-06-10 14:28 |
Resolving issue as `moved`. This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page. |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2013-02-20 11:03 | tasptz | New Issue | |
2013-02-20 11:03 | tasptz | File Added: bugreport.zip | |
2013-02-20 12:04 | Rolf Eike Beer | Note Added: 0032358 | |
2013-02-20 12:21 | tasptz | Note Added: 0032359 | |
2016-06-10 14:28 | Kitware Robot | Note Added: 0042229 | |
2016-06-10 14:28 | Kitware Robot | Status | new => resolved |
2016-06-10 14:28 | Kitware Robot | Resolution | open => moved |
2016-06-10 14:28 | Kitware Robot | Assigned To | => Kitware Robot |
2016-06-10 14:31 | Kitware Robot | Status | resolved => closed |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |