summaryrefslogtreecommitdiffstats
path: root/Source/cmBuildOptions.h
diff options
context:
space:
mode:
authorCarsten Rudolph <18394207+crud89@users.noreply.github.com>2022-01-22 09:29:46 (GMT)
committerBrad King <brad.king@kitware.com>2022-01-22 11:35:41 (GMT)
commitb2f8f0bb87b3b49a39d1db4333bffc5405166245 (patch)
treebbead21bb96a02373d752526f275eb503bd1a803 /Source/cmBuildOptions.h
parent193b8fca52b5665387dbc7f3199981d9e6cd4b79 (diff)
downloadCMake-b2f8f0bb87b3b49a39d1db4333bffc5405166245.zip
CMake-b2f8f0bb87b3b49a39d1db4333bffc5405166245.tar.gz
CMake-b2f8f0bb87b3b49a39d1db4333bffc5405166245.tar.bz2
cmGlobalVisualStudio10Generator: Auto restore NuGet packages.
Diffstat (limited to 'Source/cmBuildOptions.h')
-rw-r--r--Source/cmBuildOptions.h25
1 files changed, 24 insertions, 1 deletions
diff --git a/Source/cmBuildOptions.h b/Source/cmBuildOptions.h
index ed26703..58baeef 100644
--- a/Source/cmBuildOptions.h
+++ b/Source/cmBuildOptions.h
@@ -4,13 +4,35 @@
#include "cmConfigure.h" // IWYU pragma: keep
+/** \brief Defines how to resolve packages **/
+enum class PackageResolveMode
+{
+ /** \brief Defines behavior based on cache variable (e.g.
+ CMAKE_VS_NUGET_PACKAGE_RESTORE). This is the default. **/
+ FromCacheVariable,
+
+ /** \brief Ignore behavior defined by cache variable and forces packages to
+ be resolved prior to build. **/
+ Force,
+
+ /** \brief Ignore behavior defined by cache variable and forces packages to
+ be resolved, but skip the actual build. **/
+ OnlyResolve,
+
+ /** \brief Ignore behavior defined by cache variable and dont resolve any
+ packages **/
+ Disable
+};
+
struct cmBuildOptions
{
public:
cmBuildOptions() noexcept = default;
- explicit cmBuildOptions(bool clean, bool fast) noexcept
+ explicit cmBuildOptions(bool clean, bool fast,
+ PackageResolveMode resolveMode) noexcept
: Clean(clean)
, Fast(fast)
+ , ResolveMode(resolveMode)
{
}
explicit cmBuildOptions(const cmBuildOptions&) noexcept = default;
@@ -18,4 +40,5 @@ public:
bool Clean = false;
bool Fast = false;
+ PackageResolveMode ResolveMode = PackageResolveMode::FromCacheVariable;
};