[cmake-developers] Tracking Dependencies
J Decker
d3ck0r at gmail.com
Wed Nov 28 21:36:26 EST 2012
I really thought that CMake had a good handle on generation of
dependencies; I've been proven wrong.
I would have thought especially with those things using GCC (or openwatcom)
that cmake would have dependencies written as sources are compiled. In the
make system I was building, the makefiles had optional includes on the
dependencies (for when in a clean state they don't exist), and then a
makefile include for the dependencies of the sources (either all in a
project or on a one-by-one basis) would be written.
GCC has option (-M?) which will write a dependency makefile-format file as
it compiles. And what better place to have it written than from the
compiler that's actually doing the including?
Some argued that this approach is inheriantly flawed, but failed to
actually create an instance (that didn't involve manual manipulation of
states to get an out-of-order operation) that it failed.
I Added patches to openwatcom to also generate auto dependency files (for
its own wmake and gnu make output). (-ad... family of options )
Visual studio I guess has its own precompiled header thing that probably
does dependencies... but even visual studio built using command line
msbuild command ended up with scrambled sources.
----------------
the back-story
I have a core library that builds as an SDK sort of install, that you get
libraries and headers, and cmake rule files to easily add. Then many other
projects are built against the installed sdk. (it's installed in the build
directory with command line cmake -D overrides or environmental
variables)... Many changes were pulled from various repositories and built;
but there was a small flaw in the core library build, so it was incomplete,
but having been built previously, it had a 'built' SDK that it was able to
build against. Then when I actually got the core fixed, the other things
failed to link, the headers had been updated, but no change on the sources
this time, and so they ended up linking with missing references. (I
deprecated a function, removed the entry point, and provided a #define to
map it to the new function ).
And this happened with mingw and visual studio builds; watcom actually
didn't have an issue...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20121128/3250dcfd/attachment.html>
More information about the cmake-developers
mailing list