[CMake] Variable visibility through CMake directory strucutre

Iacopo Palazzi iakko at siena.linux.it
Tue Jul 10 10:35:39 EDT 2007


Hi there,
the question I'm wondering about concerns the variable visibility during the 
CMake configuration process.

Assume you have a two-level structure project:

	./
	./core

Assume that the ./CMakeLists.txt is something like this:

	ADD_SUBDIRECTORY(core)

	FOREACH(F ${PRJ_SOURCES})
		MESSAGE(STATUS "File: ${F}")
	ENDFORACH(F ${PRJ_SOURCES})

Assume that the ./core/CMakeLists.txt is like this:

	SET(PRJ_SOURCES file.cpp)

The workflow wants that the ./core/CMakeLists.txt is being processed as first 
and then, the ./CMakeLists.txt.
In the ./CMakeLists.txt I expect the ${PRJ_SOURCES} with file.cpp inside 
because the ./core/CMakeLists.txt structure, but it's empty. Seems like that 
returning from ./core/CMakeLists.txt, the ${PRJ_SOURCES} is not returned with 
the filled data.

Is that a variable-visibility issue or something else unknown to me?

Tnx ppl.

-- 
--------------------------------------------------------------
Iacopo Palazzi <iakko at siena.linux.it>
GPG Public Key: http://iakko.net/iakko.gpgkey.asc
Fingerprint: B0A8 BC97 C53E 172D 0C77 80B3 C30E 835F 5C31 65AE
Jabber: iakko at jabber.linux.it - ICQ: 7622157
Siena Linux User Group - www.siena.linux.it

"Se solo Dio mi desse i sorgenti..."
--------------------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: This is a digitally signed message part.
Url : http://public.kitware.com/pipermail/cmake/attachments/20070710/30a85aa1/attachment.pgp


More information about the CMake mailing list