[CMake] global variable passing up via INTERNAL cache variable
James Bigler
bigler at cs.utah.edu
Wed Nov 28 13:57:15 EST 2007
Erik Johansson wrote:
> 2007/11/27, James Bigler <bigler at cs.utah.edu>:
>> I got a hint that I could do this to set values that could be read by
>> the CMakeLists.txt file above:
>
> You can also use get_directory_property. See for example how we use it
> in Licq [1] to get a the list of files from a subdirectory (to
> implement convenience libs).
>
> // Erik
>
> [1] - http://trac.licq.org/browser/branches/newapi/licq/src/CMakeLists.txt
Thanks. I did know about this, but it didn't fit the requirements I needed.
This only helps if you have knowledge of all the directories where you happen to
change the global variable. I wanted something that would work without knowing
this bit of information. I'm dealing with dozens of directories, and I wanted
this to be more automatic.
James
More information about the CMake
mailing list