[cmake-developers] target_include_directories branch in stage

Brad King brad.king at kitware.com
Mon Dec 5 09:17:56 EST 2011


On 12/4/2011 12:49 PM, Stephen Kelly wrote:
> I've pushed the branch to my gitorious clone again.
>
> https://gitorious.org/~steveire/cmake/steveires-cmake

Thanks.  Why do you maintain a special std::vector<std::string> member
to hold the INCLUDE_DIRECTORIES target property?  I think the property
can be stored just like any other property during configuration.  Then
the generators can use ExpandListArguments.  Initialization from the
directory property value can just be added to cmTarget::SetMakefile:

   this->SetPropertyDefault("INCLUDE_DIRECTORIES", 0);

The directory-level IncludeDirectories vector can probably also go
away in favor of a normal directory property if things are properly
refactored.

> The top two commits need to be reviewed and have real fixes decided and
> written for them. Should the memoization be removed?

Yes.  Once all generators are updated to look for include directories through
the targets then the per-directory LanguageToIncludeFlags map does not make
sense anyway.  However, I think that the memoization should simply be moved
over to cmTarget.

 > What does cmMakeDepends do?

It's the original implicit header dependency scanner.  Unfortunately someone
exposed it in the CMake language through the output_required_files() command
so we can never remove it.  It's not used for anything else.  I think we can
just stick with the directory-level includes in its implementation.

-Brad



More information about the cmake-developers mailing list