[CMake] Dependency build order problem
Trevor Kellaway
tkellaway at asl-electronics.co.uk
Sat Jan 5 08:12:31 EST 2008
Alex,
Wow, that must probably be a record for fastest response to a post (3
minutes)!
> I think you have to use
> add_dependencies(d e)
>
> to tell cmake that d depends on e (which it does since it
> needs something from the build of e)
That has fixed it, by changing d's CMakeLists.txt to the following:
SET (THIS_LIB d)
SET (THIS_SRC d.c)
ADD_LIBRARY (${THIS_LIB} ${THIS_SRC})
ADD_DEPENDENCIES (d e)
Note: I tried placing the ADD_DEPENDENCIES in the top level CMakeLists
at various positions but this didn't work.
Thanks
- Trevor
More information about the CMake
mailing list