[CMake] global variable vs propagation of include_directories
Brad King
brad.king at kitware.com
Tue Dec 2 11:07:45 EST 2008
Sowa, Bartlomiej (NSN - PL/Wroclaw) wrote:
> It would be ideal, to have a way to propagate and aggregate
> include_directories up the add_subdirectory hierarchy. Can you help me
> to find a way to do this?
You can use global properties as global variables. See the
set_property()/get_property() commands. You can also use the
PARENT_SCOPE option to the set() command. Another option is to use
get_directory_property() in the parent directory to get a definition
from the child directory. See the documentation of these commands.
-Brad
More information about the CMake
mailing list