diff options
author | Brad King <brad.king@kitware.com> | 2022-05-25 11:24:40 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2022-05-25 11:24:48 (GMT) |
commit | 5dcf505f63037e23094146730704b031c57c5d06 (patch) | |
tree | b9921b81b3741cad9d1ce13a5a5a0b69fed4d678 /Source/cmState.h | |
parent | 7120221e2464f3ee0f4d511783a78d0d83e9cb03 (diff) | |
parent | 2aa83fa15b01941f0267e20a1a4e29793651fefd (diff) | |
download | CMake-5dcf505f63037e23094146730704b031c57c5d06.zip CMake-5dcf505f63037e23094146730704b031c57c5d06.tar.gz CMake-5dcf505f63037e23094146730704b031c57c5d06.tar.bz2 |
Merge topic 'dependency-providers'
2aa83fa15b Dependency providers: Add find_package and FetchContent support
8a28368feb FetchContent: Don't discard non-empty SOURCE_DIR and BINARY_DIR
8ce9bb8a0c FetchContent: Don't leak internal variables
74a6ddc339 cmFindPackageCommand: Handle Makefile variable definitions more robustly
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Gerhard Olsson <gerhard.nospam@gmail.com>
Merge-request: !7276
Diffstat (limited to 'Source/cmState.h')
-rw-r--r-- | Source/cmState.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/Source/cmState.h b/Source/cmState.h index ee133fc..2d0c521 100644 --- a/Source/cmState.h +++ b/Source/cmState.h @@ -8,11 +8,16 @@ #include <memory> #include <set> #include <string> +#include <type_traits> #include <unordered_map> #include <unordered_set> +#include <utility> #include <vector> +#include <cm/optional> + #include "cmDefinitions.h" +#include "cmDependencyProvider.h" #include "cmLinkedTree.h" #include "cmPolicies.h" #include "cmProperty.h" @@ -227,6 +232,24 @@ public: ProjectKind GetProjectKind() const; + void ClearDependencyProvider() { this->DependencyProvider.reset(); } + void SetDependencyProvider(cmDependencyProvider provider) + { + this->DependencyProvider = std::move(provider); + } + cm::optional<cmDependencyProvider> const& GetDependencyProvider() const + { + return this->DependencyProvider; + } + Command GetDependencyProviderCommand( + cmDependencyProvider::Method method) const; + + void SetInTopLevelIncludes(bool inTopLevelIncludes) + { + this->ProcessingTopLevelIncludes = inTopLevelIncludes; + } + bool InTopLevelIncludes() const { return this->ProcessingTopLevelIncludes; } + private: friend class cmake; void AddCacheEntry(const std::string& key, const char* value, @@ -288,4 +311,6 @@ private: bool NinjaMulti = false; Mode StateMode = Unknown; ProjectKind StateProjectKind = ProjectKind::Normal; + cm::optional<cmDependencyProvider> DependencyProvider; + bool ProcessingTopLevelIncludes = false; }; |