Quoting kitts <[EMAIL PROTECTED]>:
On Monday 29 Jan 2007 IST, Alan W. Irwin wrote:
BTW, my understanding of why variables set in subdirectories do not
propagate to parent directories is the CMake developers are using this
rule to (rightly) limit variable scope to make it more difficult to have
cross-directory bugs.
What is a cross-directory bug ?
I agree it's the right way. Its pass-by-value but i also wanted the option
of a pass-by-reference when one knows exactly what he/she is doing. ;-)
We are using ENV{MY_SOURCES_LIST} to do the trick. This bypasses the
use of CMake variables:
in subdir:
SET( ENV{MY_SOURCES_LIST} "$ENV{MY_SOURCES_LIST} Src1.cpp Src2.cpp")
in main dir:
SET(ENV{MY_SOURCES_LIST} "")
ADD_SUBDIRECTORY( subdir )
SET(FINAL_SOURCES $ENV{MY_SOURCES_LIST})
Now my $100.000.000 question is: And how does this trigger the
cross-directory bug ?
Peter
--
www.fmtc.be
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
_______________________________________________
CMake mailing list
[email protected]
http://www.cmake.org/mailman/listinfo/cmake