[Cmake] subdirs please change it.

Andy Cedilnik andy.cedilnik at kitware.com
Mon, 10 May 2004 12:09:52 -0400


Hi Klaas,

I agree with you all the way, but unfortunately the current design of
CMake does not allow that.

I can suggest you this option:

1. Use INCLUDE instead of SUBDIRS. INCLUDE happens when it is
encountered, so you have full control over it. Also, there will not be
recursive Makefile problem since all your code will be compiled by the
toplevel Makefile. The drawbacks are that you will have to specify full
path to sources and CMAKE_CURRENT_(BINARY/SOURCE)_DIR will not work.

			Andy

On Mon, 2004-05-10 at 11:59, klaas.holwerda wrote:
> Hi,
> 
> I like Cmake a lot, i use it in wxArt2D together with wxWidget.
> 
> But this strange behaviour when it comes to going into subdirs, after 
> only the top level is done,
> is becoming a nightmare!!
> This makes it almost impossible to write something more modular.
> 
> And therefore is ask to please consider changing this in such a way that 
> the CMakeLists.txt files
> are processed sequential, and it goes into subdirs when they are 
> encountered.
> 
> This subject is brought up before, so i think it is not needed to 
> explain what are the problem with the current
> approach. It comes down to setting variable at a  lower level in a 
> subdirectory, which you want to use at the highest
> level. But there it is not know yet, since the lower levels are not 
> processed yet.
> Very disturbing and unpredictable.
> 
> It is not exactly clear to me why it is like this ( soemthing witrh 
> threads??), but i think that feature i would
> prefer to give up, in order to make Cmake much easier to understand.
> 
> I hope you will consider this, since by feeling is that it makes CMake 
> much easier to handle.
> 
> Thanks for Cmake and regards,