[CMake] Variables propagating upwards
Lachlan Gunn
lachlan76 at gmail.com
Sat Sep 23 05:21:36 EDT 2006
Hi,
I have been working on a project that makes use of CMake, and a
problem has come up during the course of development.
When I set a variable in a lower-level CMakeLists.txt file, it does
not propagate upwards into the parent CMakeLists.txt file. Example:
src/CMakeLists.txt
-------------------------
SET(VAR foo)
ADD_SUBDIRECTORY(foo)
MESSAGE("=${VAR}=")
src/foo/CMakeLists.txt
-------------------------------
SET(VAR bar)
-------------------------------
The above will give an output of "=foo=", with an expected output of
"=bar=". Could anyone point me to the relevant documentation please?
--
Thanks,
Lachlan
More information about the CMake
mailing list