I also have a very big project with sub-projects lying in different tree leafs.
And when I started to learn CMake I also had a question, how to define
variables that can be seen on other project in other tree leaf.
What I also learned from a newsgroup is that most of the time, when you need
variables to be seen in other project, you are doing something wrong.
If you need to define a global variable like HAVE_SOMETHING, use your top level
CMakeLists.txt file.
Denis
> > Currently I'm having a bit of trouble making
> variables defined in the
> > following directory:
> >
> > C:\a\b\c\d\e\CMakeLists.txt
> >
> > Available to another script in a distant directory,
> located here:
> >
> > C:\a\b\x\y\z\CMakeLists.txt
> >
> > I've tried using PARENT_SCOPE, but this
> doesn't declare it "high"
> > enough. The only possible way I've been able to
> make this work is by
> > making it an internal cache variable. However, I do
> not want to
> > persist the contents of the variable. Do I have any
> other options?
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake