diff options
author | Brad King <brad.king@kitware.com> | 2017-04-10 20:41:03 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-04-13 20:10:31 (GMT) |
commit | 40aa6c059c3beebabf8fa433b768192300331e50 (patch) | |
tree | dc11ffd7d34ec380c1f3d7cd19349fa1b4300bd6 /Source/cmGeneratorTarget.h | |
parent | e155fba644d4686ac8b4f43dfe31c749bba30c67 (diff) | |
download | CMake-40aa6c059c3beebabf8fa433b768192300331e50.zip CMake-40aa6c059c3beebabf8fa433b768192300331e50.tar.gz CMake-40aa6c059c3beebabf8fa433b768192300331e50.tar.bz2 |
cmGeneratorTarget: Add method to collect all sources for all configs
Multi-config generators like VS and Xcode need to loop over all the
source files first and then handle per-config information within
each one. Teach cmGeneratorTarget to provide such a view.
Diffstat (limited to 'Source/cmGeneratorTarget.h')
-rw-r--r-- | Source/cmGeneratorTarget.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h index 7c86d30..dd25cad 100644 --- a/Source/cmGeneratorTarget.h +++ b/Source/cmGeneratorTarget.h @@ -12,6 +12,7 @@ #include <map> #include <set> +#include <stddef.h> #include <string> #include <utility> #include <vector> @@ -107,6 +108,17 @@ public: /** Get all sources needed for a configuration with kinds assigned. */ KindedSources const& GetKindedSources(std::string const& config) const; + struct AllConfigSource + { + cmSourceFile const* Source; + cmGeneratorTarget::SourceKind Kind; + std::vector<size_t> Configs; + }; + + /** Get all sources needed for all configurations with kinds and + per-source configurations assigned. */ + std::vector<AllConfigSource> const& GetAllConfigSources() const; + void GetObjectSources(std::vector<cmSourceFile const*>&, const std::string& config) const; const std::string& GetObjectName(cmSourceFile const* file); @@ -731,6 +743,9 @@ private: void ComputeKindedSources(KindedSources& files, std::string const& config) const; + mutable std::vector<AllConfigSource> AllConfigSources; + void ComputeAllConfigSources() const; + std::vector<TargetPropertyEntry*> IncludeDirectoriesEntries; std::vector<TargetPropertyEntry*> CompileOptionsEntries; std::vector<TargetPropertyEntry*> CompileFeaturesEntries; |