[CMake] dependencies on auto-generated files and VC-8.0

William A. Hoffman billlist at nycap.rr.com
Sat Jul 1 07:28:30 EDT 2006


At 02:03 AM 7/1/2006, Alex Makarenko wrote:
>Hello,
>
>We are porting a fairly large C++ project from linux/gcc to win32/vc-80. We
>are using cmake 2.4.2. Everything is ok except for dependencies between
>targets and auto-generated files. 
>
>Before going into details I want to ask a general question about a paragraph
>on p.16 of Mastering CMake book which says "CMake has built-in dependency
>analysis capabilities for C and C++ source code files. Since IDE's support
>and maintain dependency information, CMake skips this step for those build
>systems." 
>
>Does it mean that CMake does not communicate any dependency information to
>Visual Studio? If so, then there is no point in trying to relate the
>dependency structure to CMake.

No, that means that CMake does not scan the c++/c files for #include lines
and create depend information.  The custom commands and inter-target
depends are given to the IDE.  For auto generated files, make sure
the files are in the source list for the target that uses them.  If the
two targets do not link to each other (which is rare), you can use
add_dependency to connect two targets.

So, maybe you could provide a small example of the problem you are
having and it should be simple to fix.


-Bill



More information about the CMake mailing list