[CMake] directory traverse guidance
Andreas Pakulat
apaku at gmx.de
Tue Jan 25 02:53:24 EST 2011
On 25.01.11 02:57:27, luxInteg wrote:
> Greetings
>
> I am learning cmake
>
> consider my project with two directories dir1 and dir2
>
> if I want to:-
> move to dir1 and add a library libA in dir1
> move to dir2 and add a library libB in dir2
> move back to dir1 and add a test testA in dir1
> move back to dir2 and add a test testB to dir2
>
>
> (the moving back is because of the interdependencies of the tests with the
> libraries i.e. testA reaquires libB etc))
>
> how do I do this?
You don't. All you need is 2 CMakeLists.txt, one in dir1 with libA and
testA targets and the other in dir2 with libB and testB targets. CMake
as a declarative language (to a certain extent) does not depend on the
order in which you declare targets and use them.
Andreas
--
Just to have it is enough.
More information about the CMake
mailing list