diff options
author | Brad King <brad.king@kitware.com> | 2021-11-10 16:57:01 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2021-11-11 11:43:07 (GMT) |
commit | 53990059daed056fc5a2c15df70444a2f8da704f (patch) | |
tree | 9e4515a9fc7ff38766269b5f3f989f2270583d9d /Source/cmLocalGenerator.h | |
parent | de6e362a88bc67d8376ad261f21b9b9ecefd1282 (diff) | |
download | CMake-53990059daed056fc5a2c15df70444a2f8da704f.zip CMake-53990059daed056fc5a2c15df70444a2f8da704f.tar.gz CMake-53990059daed056fc5a2c15df70444a2f8da704f.tar.bz2 |
cmLocalGenerator: Add dedicated types to hold unity source info
Diffstat (limited to 'Source/cmLocalGenerator.h')
-rw-r--r-- | Source/cmLocalGenerator.h | 36 |
1 files changed, 28 insertions, 8 deletions
diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h index 5e7de0e..4c9714b 100644 --- a/Source/cmLocalGenerator.h +++ b/Source/cmLocalGenerator.h @@ -11,6 +11,7 @@ #include <set> #include <string> #include <unordered_map> +#include <utility> #include <vector> #include <cm3p/kwiml/int.h> @@ -660,22 +661,41 @@ private: cmGeneratorTarget* reuseTarget, std::vector<std::string> const& extensions); - std::string WriteUnitySource( + struct UnityBatchedSource + { + cmSourceFile* Source = nullptr; + UnityBatchedSource(cmSourceFile* sf) + : Source(sf) + { + } + }; + struct UnitySource + { + std::string Path; + UnitySource(std::string path) + : Path(std::move(path)) + { + } + }; + + UnitySource WriteUnitySource( cmGeneratorTarget* target, - cmRange<std::vector<cmSourceFile*>::const_iterator> sources, + cmRange<std::vector<UnityBatchedSource>::const_iterator> sources, cmValue beforeInclude, cmValue afterInclude, std::string filename) const; void WriteUnitySourceInclude(std::ostream& unity_file, std::string const& sf_full_path, cmValue beforeInclude, cmValue afterInclude, cmValue uniqueIdName) const; - std::vector<std::string> AddUnityFilesModeAuto( + std::vector<UnitySource> AddUnityFilesModeAuto( cmGeneratorTarget* target, std::string const& lang, - std::vector<cmSourceFile*> const& filtered_sources, cmValue beforeInclude, - cmValue afterInclude, std::string const& filename_base, size_t batchSize); - std::vector<std::string> AddUnityFilesModeGroup( + std::vector<UnityBatchedSource> const& filtered_sources, + cmValue beforeInclude, cmValue afterInclude, + std::string const& filename_base, size_t batchSize); + std::vector<UnitySource> AddUnityFilesModeGroup( cmGeneratorTarget* target, std::string const& lang, - std::vector<cmSourceFile*> const& filtered_sources, cmValue beforeInclude, - cmValue afterInclude, std::string const& filename_base); + std::vector<UnityBatchedSource> const& filtered_sources, + cmValue beforeInclude, cmValue afterInclude, + std::string const& filename_base); }; #if !defined(CMAKE_BOOTSTRAP) |