[CMake] depend.make

Marco Clemencic marco.clemencic at cern.ch
Thu Dec 12 06:03:06 EST 2013


Hi,

I cannot find it anymore in the documentation , but I remember to have read 
that the dependency scanner of CMake does not take into account the 
preprocessor conditionals (#ifdef, etc), thus producing a superset of the 
actual dependencies.
It is quite probable that boost/tr1/iostream _may_ include the other headers 
under some particular combination of preprocessor macros, so they are not used 
at compile time, but they taken into account by CMake.

Cheers
Marco

On Thursday 12 December 2013 11:51:52 Lars wrote:
> Thank you for your feedback.
> 
> This however only explain part of the issue as far as I can tell. To debug
> the issue I added #pragma message("boost tr1 iostream")
> at the top of the boost/tr1/iostream file. When building the source that
> message is shown in the console windows which then indicate the compiler
> has accessed the file. So far so good. I then did the same "trick" with
> boost/aligned_storage.hpp, boost/array.hpp and boost/assert.hpp which are
> the three first boost reference in depend.make and none of them not show up
> during building.
> 
> So why are these files included in the depend.make?
> 
> Regards,
> Lars
> Date: Wed, 11 Dec 2013 16:08:28 +0100
> From: nilsgladitz at gmail.com
> To: laasunde at hotmail.com; cmake at cmake.org
> Subject: Re: [CMake] depend.make
> 
> 
> 
> 
> 
> 
>     On 11.12.2013 12:53, Lars wrote:
> 
> 
> 
> 
> 
> 
>         Here is the source code used (which does not use the Boost
>         library).
> 
>         #include <iostream>
> 
>         int main(int argc, char **argv)
> 
>         {
> 
>           std::cout << "Hello world" << std::endl;
> 
> 
> 
>           return 0;
> 
>         }
> 
> 
> 
>     ${Boost_INCLUDE_DIR}/boost/tr1/tr1 does seem to contain an
>     "iostream" header which your #include <iostream> probably
>     picks up.
> 
>     Maybe that further includes the other boost headers?
> 
> 
> 
>     Nils



More information about the CMake mailing list