[Cmake] Automatic dependency building under Unix

Bill Hoffman bill.hoffman at kitware.com
Wed May 9 14:43:21 EDT 2001


Right now, it has to drop down into the directory.
However, I am about to re-write the entire unix make generation
system.   I will only be generating one Makefile with no includes.
So, if you could hold off changes until that is done....

Also, I am not convinced that this would not cause some strange problems.
I don't think makefiles should jump up the tree, but only down.
If you don't do a make from the top, it is your problem.   
Some strange things could happen, possible infinite make loops, as make jumps
up a directory, then back into the same directory, then back up.  If the
target failed to build, it would never stop.  



-Bill


At 02:28 PM 5/9/2001 -0400, Amitha Perera wrote:
>1) Under Unix, the CMakeTargets.make contain is list of required
>libraries in the variable CMAKE_DEPEND_LIBS. There are not, however,
>corresponding rules to make those dependencies. That is, if I start
>afresh, go into some directory and type make, it'll stop short with
>"not rule to make some-lib.a".
>
>It should be easy to output a rule to run a submake in the directory
>for each dependent library: for each library path/libx.a
>path/libx.a:
>        cd path
>        $(MAKE)
>
>These rules could be output in cmUnixMakefileGenerator::OutputDependencies.
>If this is okay, I can make such a change and submit a patch. (I can't
>commit.)
>
>
>
>2) Is there a way to specify a library as an external dependency? Say
>LINK_EXTERNAL_LIBRARIES( jpeg )? In vxl, there is a v3p/jpeg library
>in the project for those that don't have an external jpeg library. The
>idea is to use the external one if you have it. However, if I simply
>LINK_LIBRARIES( jpeg ), the CMake system will emit a dependency for
>v3p/jpeg, since it just goes by the name.
>
>
>Thanks,
>Amitha.
>
>_______________________________________________
>Cmake mailing list
>Cmake at public.kitware.com
>http://public.kitware.com/mailman/listinfo/cmake 





More information about the CMake mailing list