Merge branch 'release-3.29'
[kiteware-cmake.git] / Source / cmBuildOptions.h
blobaa3184e8794ced2ec5af7180c1b6a83595cf80e3
1 /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
2 file Copyright.txt or https://cmake.org/licensing for details. */
3 #pragma once
5 #include "cmConfigure.h" // IWYU pragma: keep
7 /** \brief Defines how to resolve packages **/
8 enum class PackageResolveMode
10 /** \brief Behavior is defined by preset or cache variable (e.g.
11 CMAKE_VS_NUGET_PACKAGE_RESTORE). This is the default. **/
12 Default,
14 /** \brief Ignore behavior defined by preset or cache variable and forces
15 packages to be resolved prior to build. **/
16 Force,
18 /** \brief Ignore behavior defined by preset or cache variable and forces
19 packages to be resolved, but skip the actual build. **/
20 OnlyResolve,
22 /** \brief Ignore behavior defined by preset or cache variable and don't
23 resolve any packages **/
24 Disable
27 struct cmBuildOptions
29 public:
30 cmBuildOptions() noexcept = default;
31 explicit cmBuildOptions(bool clean, bool fast,
32 PackageResolveMode resolveMode) noexcept
33 : Clean(clean)
34 , Fast(fast)
35 , ResolveMode(resolveMode)
38 explicit cmBuildOptions(const cmBuildOptions&) noexcept = default;
39 cmBuildOptions& operator=(const cmBuildOptions&) noexcept = default;
41 bool Clean = false;
42 bool Fast = false;
43 PackageResolveMode ResolveMode = PackageResolveMode::Default;