[Fwd: [CMake] Getting variables from a subdir]

James Bigler bigler at cs.utah.edu
Tue Feb 14 12:48:58 EST 2006


John Biddiscombe wrote:
> 
> 
> ------------------------------------------------------------------------
> 
> Subject:
> [CMake] Getting variables from a subdir
> From:
> "Ken Martin" <ken.martin at kitware.com>
> Date:
> Tue, 13 Sep 2005 11:02:28 -0400
> To:
> <cmake at cmake.org>
> 
> To:
> <cmake at cmake.org>
> 
> 
> I have added a new feature to help folks get variables from a subdir. I have
> modified the GET_DIRECTORY_PROPERTY command to have an optional argument
> that is the directory to get the property from. I also added the ability to
> query variables from the GET_DIRECTORY_PROPERTY command. So you can now do:
> 
> 
> add_subdirectory( foo )
> 
> get_directory_property( bar DIRECTORY foo DEFINITION var_name)
> 
> 
> You can also get all the other directory properties that
> get_directory_property supports from foo as well if you want. Note that if
> you swap the order of the two lines above it will not work. You cannot get a
> property from a subdir before the subdir is processed. (sort of obvious but
> worth being clear on)
> 
> Thanks
> Ken

What is the minimum version that supports this feature?  I need to check 
for it during the build process.

Thanks,
James


More information about the CMake mailing list