[CMake] Header and CXX.includecache - how first comes in second
Michael Wild
themiwi at gmail.com
Wed Aug 3 08:08:09 EDT 2011
On 08/03/2011 01:07 PM, Mikhail Pridushchenko wrote:
> Hello!
>
> I have a problem with include files dependencies in my C++ project:
> iostream system header (for example) is being cached by CMake in
> CXX.includecache file for some targets. Also there are no
> #include <iostream>
> lines in my sources.
>
> I wonder if there is any way to figure out where it could come from?
>
> Thank you.
>
> --
> Mikhail Pridushchenko
Create the preprocessed file like this:
cd path/to/build/tree/where/target/is/defined
make help
# look for an appropriate sourcename.i in the output
make sourcename.i
# open the file name in the output in a text editor
It is important that if your target (e.g. library or executable) is
defined in a sub-directory, you have to call the "make help" and "make
sourcename.i" commands in the corresponding directory of the build tree.
This file is the file as the compiler sees it after preprocessing. You
can follow the trace of which file includes what other files.
HTH
Michael
More information about the CMake
mailing list