View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0009354 | CMake | CMake | public | 2009-08-04 01:57 | 2016-06-10 14:30 | ||||
Reporter | Christian Luidolt | ||||||||
Assigned To | Brad King | ||||||||
Priority | normal | Severity | minor | Reproducibility | always | ||||
Status | closed | Resolution | moved | ||||||
Platform | OS | OS Version | |||||||
Product Version | CMake-2-6 | ||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0009354: wrong C dependency if header file has same name as standard header file | ||||||||
Description | A project specific include path is set. In this include directory one header file (headers.h) includes another header file (assert.h) which has the same name as a system header file. To reproduce the error, the system header file must also included (directly or indirectly) by the C++ file. The generated CMakeFiles/IncludeTest.dir/depend.make file does not show the dependency to the "private" assert.h - so the C++ file is not rebuild if assert.h is modified. | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | includetest.tgz [^] (551 bytes) 2009-08-04 01:57 | ||||||||
Relationships | ||||||
|
Relationships |
Notes | |
(0017053) Brad King (manager) 2009-08-04 10:27 |
This is a known limitation, and is mentioned in a comment in the implementation. See the source file "Source/cmDependsC.cxx", in the method "cmDependsC::Scan": http://www.cmake.org/cgi-bin/viewcvs.cgi/Source/cmDependsC.cxx?revision=1.35&root=CMake&view=markup [^] The comment reads: "Note that this check does not account for the possibility of two headers with the same name in different directories when one is included by double-quotes and the other by angle brackets. This kind of problem will be fixed when a more preprocessor-like implementation of this scanner is created." The comment isn't quite right this case, but is very similar (using quotes in main.cxx won't help in your case). The same problem would occur if you created an "assert.h" next to main.cxx and included it via double-quotes. Basically the whole scanner implementation assumes unique header names within a translation unit. A better approach would assume uniqueness only inside a single source or header, but that will take significant changes. I don't know when I'll have time to do this, but if anyone reading this issue wants to volunteer I'm happy to advise. A work-around is to change #include "assert.h" in "headers.h" to read #include "./assert.h" or #include <inc/assert.h> or #include "assert.h" #if 0 # include "./assert.h" // work-around CMake scanning problem #endif or to rename the header. |
(0030535) Brad King (manager) 2012-08-13 10:37 |
Sending issues I'm not actively working on to the backlog to await someone with time for them. If an issue you care about is sent to the backlog when you feel it should have been addressed in a different manner, please bring it up on the CMake mailing list for discussion. Sign up for the mailing list here, if you're not already on it: http://www.cmake.org/mailman/listinfo/cmake [^] It's easy to re-activate a bug here if you can find a CMake developer or contributor who has the bandwidth to take it on. |
(0041584) Kitware Robot (administrator) 2016-06-10 14:27 |
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 |
2009-08-04 01:57 | Christian Luidolt | New Issue | |
2009-08-04 01:57 | Christian Luidolt | File Added: includetest.tgz | |
2009-08-04 08:49 | Bill Hoffman | Status | new => assigned |
2009-08-04 08:49 | Bill Hoffman | Assigned To | => Brad King |
2009-08-04 10:27 | Brad King | Note Added: 0017053 | |
2012-08-13 10:37 | Brad King | Status | assigned => backlog |
2012-08-13 10:37 | Brad King | Note Added: 0030535 | |
2014-07-03 09:22 | Brad King | Relationship added | related to 0015003 |
2016-06-10 14:27 | Kitware Robot | Note Added: 0041584 | |
2016-06-10 14:27 | Kitware Robot | Status | backlog => resolved |
2016-06-10 14:27 | Kitware Robot | Resolution | open => moved |
2016-06-10 14:30 | Kitware Robot | Status | resolved => closed |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |