[Cmake] Cmake flexibility
Neil Killeen
Neil . Killeen at atnf . csiro . au
Fri, 21 Mar 2003 11:30:37 +1100 (EST)
Bill
that is a cunning solution !
thanks
Neil
On Thu, 20 Mar 2003, Bill Hoffman wrote:
> One thing you could do is this:
>
>
> Source
> Code
> Modules
> Module1
> Test
> Module2
> Test
> Applications
> App1
> App2
> Documentation
>
> In the Source/CMakeLists.txt file:
> SUBDIRS(Code/Modules)
> SUBDIRS(Code/Modules/Module1/Test)
> SUBDIRS(Code/Modules/Module2/Test)
>
> In Modules/CMakeLists.txt file:
> SUBDIRS(Module1 Module2)
>
> Then have no SUBDIRS in Module1 or Module2.
>
> So, if you did a make from Source, it would build first the Modules, then Test1, then Test2.
>
> If you ran make from Modules, it would only build Module1 and Module2 but not the tests.
>
> If you ran make from Module1/Test or Module2/Test it would build those tests.
>
> -Bill
>
>
>
>