diff options
Diffstat (limited to 'Source/cmake.h')
-rw-r--r-- | Source/cmake.h | 28 |
1 files changed, 21 insertions, 7 deletions
diff --git a/Source/cmake.h b/Source/cmake.h index 35425ec..cfcd264 100644 --- a/Source/cmake.h +++ b/Source/cmake.h @@ -16,6 +16,8 @@ #include <utility> #include <vector> +#include <cm/string_view> + #include "cmGeneratedFileStream.h" #include "cmInstalledFile.h" #include "cmListFileCache.h" @@ -34,6 +36,9 @@ class cmFileTimeCache; class cmGlobalGenerator; class cmGlobalGeneratorFactory; class cmMakefile; +#if !defined(CMAKE_BOOTSTRAP) +class cmMakefileProfilingData; +#endif class cmMessenger; class cmVariableWatch; struct cmDocumentationEntry; @@ -135,13 +140,13 @@ public: struct FileExtensions { - bool Test(std::string const& ext) const + bool Test(cm::string_view ext) const { return (this->unordered.find(ext) != this->unordered.end()); } std::vector<std::string> ordered; - std::unordered_set<std::string> unordered; + std::unordered_set<cm::string_view> unordered; }; using InstalledFilesMap = std::map<std::string, cmInstalledFile>; @@ -263,7 +268,7 @@ public: return this->SourceFileExtensions.ordered; } - bool IsSourceExtension(const std::string& ext) const + bool IsSourceExtension(cm::string_view ext) const { return this->SourceFileExtensions.Test(ext); } @@ -273,7 +278,7 @@ public: return this->HeaderFileExtensions.ordered; } - bool IsHeaderExtension(const std::string& ext) const + bool IsHeaderExtension(cm::string_view ext) const { return this->HeaderFileExtensions.Test(ext); } @@ -283,7 +288,7 @@ public: return this->CudaFileExtensions.ordered; } - bool IsCudaExtension(const std::string& ext) const + bool IsCudaExtension(cm::string_view ext) const { return this->CudaFileExtensions.Test(ext); } @@ -293,7 +298,7 @@ public: return this->FortranFileExtensions.ordered; } - bool IsFortranExtension(const std::string& ext) const + bool IsFortranExtension(cm::string_view ext) const { return this->FortranFileExtensions.Test(ext); } @@ -361,7 +366,7 @@ public: void SetProperty(const std::string& prop, const char* value); void AppendProperty(const std::string& prop, const std::string& value, bool asString = false); - const char* GetProperty(const std::string& prop); + cmProp GetProperty(const std::string& prop); bool GetPropertyAsBool(const std::string& prop); //! Get or create an cmInstalledFile instance and return a pointer to it @@ -549,6 +554,11 @@ public: bool GetRegenerateDuringBuild() const { return this->RegenerateDuringBuild; } +#if !defined(CMAKE_BOOTSTRAP) + cmMakefileProfilingData& GetProfilingOutput(); + bool IsProfilingEnabled() const; +#endif + protected: void RunCheckForUnusedVariables(); int HandleDeleteCacheVariables(const std::string& var); @@ -657,6 +667,10 @@ private: void AppendGlobalGeneratorsDocumentation(std::vector<cmDocumentationEntry>&); void AppendExtraGeneratorsDocumentation(std::vector<cmDocumentationEntry>&); + +#if !defined(CMAKE_BOOTSTRAP) + std::unique_ptr<cmMakefileProfilingData> ProfilingOutput; +#endif }; #define CMAKE_STANDARD_OPTIONS_TABLE \ |