diff options
author | Brad King <brad.king@kitware.com> | 2017-09-12 13:38:03 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2017-09-12 13:38:24 (GMT) |
commit | cb171502287db0e4911faa10d748c72f08e5a9dd (patch) | |
tree | d51e973edeac480e1ab4383970bfcad35078883e /Source/cmMakefile.h | |
parent | 3f8c6cab4bb4a9f68708c11a38e4487dad363e38 (diff) | |
parent | 95b17c89be15a768178d66f42573d90852a1b986 (diff) | |
download | CMake-cb171502287db0e4911faa10d748c72f08e5a9dd.zip CMake-cb171502287db0e4911faa10d748c72f08e5a9dd.tar.gz CMake-cb171502287db0e4911faa10d748c72f08e5a9dd.tar.bz2 |
Merge topic 'get-or-create-source-group'
95b17c89 Use cmMakefile::GetOrCreateSourceGroup in cmQtAutogeneratorsInitializer
a451995f Use cmMakefile::GetOrCreateSourceGroup in cmSourceGroupCommand
1e6569c9 cmMakefile: Add GetOrCreateSourceGroup methods
3e8b3e94 cmMakefile: Collect source group methods in one place
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1243
Diffstat (limited to 'Source/cmMakefile.h')
-rw-r--r-- | Source/cmMakefile.h | 53 |
1 files changed, 30 insertions, 23 deletions
diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h index 938b61b..398604d 100644 --- a/Source/cmMakefile.h +++ b/Source/cmMakefile.h @@ -270,21 +270,6 @@ public: bool excludeFromAll = false); void AddAlias(const std::string& libname, const std::string& tgt); -#if defined(CMAKE_BUILD_WITH_CMAKE) - /** - * Add a root source group for consideration when adding a new source. - */ - void AddSourceGroup(const std::string& name, const char* regex = nullptr); - - /** - * Add a source group for consideration when adding a new source. - * name is tokenized. - */ - void AddSourceGroup(const std::vector<std::string>& name, - const char* regex = nullptr); - -#endif - //@{ /** * Set, Push, Pop policy values for CMake. @@ -476,6 +461,36 @@ public: * Get the source group */ cmSourceGroup* GetSourceGroup(const std::vector<std::string>& name) const; + + /** + * Add a root source group for consideration when adding a new source. + */ + void AddSourceGroup(const std::string& name, const char* regex = nullptr); + + /** + * Add a source group for consideration when adding a new source. + * name is tokenized. + */ + void AddSourceGroup(const std::vector<std::string>& name, + const char* regex = nullptr); + + /** + * Get and existing or create a new source group. + */ + cmSourceGroup* GetOrCreateSourceGroup( + const std::vector<std::string>& folders); + + /** + * Get and existing or create a new source group. + * The name will be tokenized. + */ + cmSourceGroup* GetOrCreateSourceGroup(const std::string& name); + + /** + * find what source group this source is in + */ + cmSourceGroup* FindSourceGroup(const char* source, + std::vector<cmSourceGroup>& groups) const; #endif /** @@ -552,14 +567,6 @@ public: bool atOnly, bool escapeQuotes, cmNewLineStyle = cmNewLineStyle()); -#if defined(CMAKE_BUILD_WITH_CMAKE) - /** - * find what source group this source is in - */ - cmSourceGroup* FindSourceGroup(const char* source, - std::vector<cmSourceGroup>& groups) const; -#endif - /** * Print a command's invocation */ |