mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-15 04:07:59 +08:00
[vcpkg] Use more forward declarations rather than definitions (#13623)
Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
This commit is contained in:
parent
d192905986
commit
0dcc11ac22
@ -480,7 +480,7 @@ namespace vcpkg::Json
|
||||
m_path.push_back(key);
|
||||
auto res = internal_visit(value, visitor);
|
||||
m_path.pop_back();
|
||||
return std::move(res);
|
||||
return res;
|
||||
}
|
||||
template<class Type>
|
||||
Optional<Type> visit_map_field(StringView key, const Value& value, IDeserializer<Type>&& visitor)
|
||||
|
@ -1,11 +1,14 @@
|
||||
#pragma once
|
||||
|
||||
#include <vcpkg/fwd/cmakevars.h>
|
||||
#include <vcpkg/fwd/dependencies.h>
|
||||
#include <vcpkg/fwd/portfileprovider.h>
|
||||
|
||||
#include <vcpkg/base/cstringview.h>
|
||||
#include <vcpkg/base/files.h>
|
||||
#include <vcpkg/base/optional.h>
|
||||
#include <vcpkg/base/system.process.h>
|
||||
|
||||
#include <vcpkg/cmakevars.h>
|
||||
#include <vcpkg/commands.integrate.h>
|
||||
#include <vcpkg/packagespec.h>
|
||||
#include <vcpkg/statusparagraphs.h>
|
||||
@ -23,12 +26,6 @@ namespace vcpkg
|
||||
struct IBinaryProvider;
|
||||
}
|
||||
|
||||
namespace vcpkg::Dependencies
|
||||
{
|
||||
struct InstallPlanAction;
|
||||
struct ActionPlan;
|
||||
}
|
||||
|
||||
namespace vcpkg::System
|
||||
{
|
||||
struct Environment;
|
||||
|
@ -1,16 +1,12 @@
|
||||
#pragma once
|
||||
|
||||
#include <vcpkg/fwd/dependencies.h>
|
||||
#include <vcpkg/fwd/vcpkgpaths.h>
|
||||
|
||||
#include <vcpkg/base/optional.h>
|
||||
|
||||
#include <vcpkg/portfileprovider.h>
|
||||
|
||||
namespace vcpkg::Dependencies
|
||||
{
|
||||
struct ActionPlan;
|
||||
}
|
||||
|
||||
namespace vcpkg::CMakeVars
|
||||
{
|
||||
struct CMakeVarProvider
|
||||
|
@ -1,6 +1,5 @@
|
||||
#pragma once
|
||||
|
||||
#include <vcpkg/build.h>
|
||||
#include <vcpkg/commands.interface.h>
|
||||
|
||||
namespace vcpkg::Commands
|
||||
|
@ -1,5 +1,8 @@
|
||||
#pragma once
|
||||
|
||||
#include <vcpkg/fwd/cmakevars.h>
|
||||
#include <vcpkg/fwd/portfileprovider.h>
|
||||
|
||||
#include <vcpkg/base/optional.h>
|
||||
#include <vcpkg/base/util.h>
|
||||
|
||||
@ -15,16 +18,6 @@ namespace vcpkg::Graphs
|
||||
struct Randomizer;
|
||||
}
|
||||
|
||||
namespace vcpkg::CMakeVars
|
||||
{
|
||||
struct CMakeVarProvider;
|
||||
}
|
||||
|
||||
namespace vcpkg::PortFileProvider
|
||||
{
|
||||
struct PortFileProvider;
|
||||
}
|
||||
|
||||
namespace vcpkg
|
||||
{
|
||||
struct StatusParagraphs;
|
||||
|
@ -1,7 +1,8 @@
|
||||
#pragma once
|
||||
|
||||
#include <vcpkg/fwd/vcpkgpaths.h>
|
||||
|
||||
#include <vcpkg/dependencies.h>
|
||||
#include <vcpkg/vcpkgpaths.h>
|
||||
|
||||
#include <vector>
|
||||
|
||||
|
@ -1,9 +1,10 @@
|
||||
#pragma once
|
||||
|
||||
#include <vcpkg/fwd/vcpkgpaths.h>
|
||||
|
||||
#include <vcpkg/base/system.h>
|
||||
|
||||
#include <vcpkg/dependencies.h>
|
||||
#include <vcpkg/vcpkgpaths.h>
|
||||
|
||||
#include <vector>
|
||||
|
||||
|
7
toolsrc/include/vcpkg/fwd/build.h
Normal file
7
toolsrc/include/vcpkg/fwd/build.h
Normal file
@ -0,0 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
namespace vcpkg::Build
|
||||
{
|
||||
struct BuildInfo;
|
||||
struct PreBuildInfo;
|
||||
}
|
6
toolsrc/include/vcpkg/fwd/cmakevars.h
Normal file
6
toolsrc/include/vcpkg/fwd/cmakevars.h
Normal file
@ -0,0 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
namespace vcpkg::CMakeVars
|
||||
{
|
||||
struct CMakeVarProvider;
|
||||
}
|
7
toolsrc/include/vcpkg/fwd/dependencies.h
Normal file
7
toolsrc/include/vcpkg/fwd/dependencies.h
Normal file
@ -0,0 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
namespace vcpkg::Dependencies
|
||||
{
|
||||
struct InstallPlanAction;
|
||||
struct ActionPlan;
|
||||
}
|
7
toolsrc/include/vcpkg/fwd/portfileprovider.h
Normal file
7
toolsrc/include/vcpkg/fwd/portfileprovider.h
Normal file
@ -0,0 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
namespace vcpkg::PortFileProvider
|
||||
{
|
||||
struct PortFileProvider;
|
||||
struct PathsPortFileProvider;
|
||||
}
|
@ -1,10 +1,11 @@
|
||||
#pragma once
|
||||
|
||||
#include <vcpkg/fwd/vcpkgpaths.h>
|
||||
|
||||
#include <vcpkg/base/expected.h>
|
||||
#include <vcpkg/base/util.h>
|
||||
|
||||
#include <vcpkg/sourceparagraph.h>
|
||||
#include <vcpkg/vcpkgpaths.h>
|
||||
|
||||
namespace vcpkg::PortFileProvider
|
||||
{
|
||||
|
@ -1,8 +1,14 @@
|
||||
#pragma once
|
||||
|
||||
#include <vcpkg/build.h>
|
||||
#include <vcpkg/packagespec.h>
|
||||
#include <vcpkg/vcpkgpaths.h>
|
||||
#include <vcpkg/fwd/build.h>
|
||||
#include <vcpkg/fwd/vcpkgpaths.h>
|
||||
|
||||
#include <vcpkg/base/files.h>
|
||||
|
||||
namespace vcpkg
|
||||
{
|
||||
struct PackageSpec;
|
||||
}
|
||||
|
||||
namespace vcpkg::PostBuildLint
|
||||
{
|
||||
|
@ -2,11 +2,11 @@
|
||||
|
||||
#include <vcpkg/base/fwd/json.h>
|
||||
|
||||
#include <vcpkg/fwd/vcpkgpaths.h>
|
||||
|
||||
#include <vcpkg/base/files.h>
|
||||
#include <vcpkg/base/optional.h>
|
||||
|
||||
#include <vcpkg/vcpkgpaths.h>
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <system_error>
|
||||
|
@ -1,7 +1,10 @@
|
||||
#pragma once
|
||||
|
||||
#include <vcpkg/fwd/dependencies.h>
|
||||
#include <vcpkg/fwd/vcpkgcmdarguments.h>
|
||||
#include <vcpkg/fwd/vcpkgpaths.h>
|
||||
|
||||
#include <vcpkg/commands.interface.h>
|
||||
#include <vcpkg/dependencies.h>
|
||||
|
||||
namespace vcpkg::Remove
|
||||
{
|
||||
|
@ -1,5 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <vcpkg/fwd/vcpkgcmdarguments.h>
|
||||
|
||||
#include <vcpkg/base/optional.h>
|
||||
#include <vcpkg/base/system.h>
|
||||
|
||||
@ -8,7 +10,6 @@
|
||||
namespace vcpkg
|
||||
{
|
||||
struct TripletInstance;
|
||||
struct VcpkgCmdArguments;
|
||||
|
||||
struct Triplet
|
||||
{
|
||||
|
@ -1,11 +1,18 @@
|
||||
#pragma once
|
||||
|
||||
#include <vcpkg/fwd/portfileprovider.h>
|
||||
#include <vcpkg/fwd/vcpkgcmdarguments.h>
|
||||
#include <vcpkg/fwd/vcpkgpaths.h>
|
||||
|
||||
#include <vcpkg/commands.interface.h>
|
||||
#include <vcpkg/dependencies.h>
|
||||
#include <vcpkg/packagespec.h>
|
||||
#include <vcpkg/statusparagraphs.h>
|
||||
#include <vcpkg/versiont.h>
|
||||
|
||||
namespace vcpkg
|
||||
{
|
||||
struct StatusParagraphs;
|
||||
}
|
||||
|
||||
namespace vcpkg::Update
|
||||
{
|
||||
struct OutdatedPackage
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
#include <vcpkg/base/files.h>
|
||||
|
||||
#include <vcpkg/build.h>
|
||||
#include <vcpkg/commands.h>
|
||||
#include <vcpkg/vcpkgcmdarguments.h>
|
||||
#include <vcpkg/vcpkgpaths.h>
|
||||
|
@ -2,6 +2,8 @@
|
||||
|
||||
#include <vcpkg/base/sortedvector.h>
|
||||
|
||||
#include <vcpkg/portfileprovider.h>
|
||||
#include <vcpkg/statusparagraphs.h>
|
||||
#include <vcpkg/update.h>
|
||||
|
||||
#include <vcpkg-test/util.h>
|
||||
|
@ -17,6 +17,7 @@
|
||||
#include <vcpkg/metrics.h>
|
||||
#include <vcpkg/paragraphs.h>
|
||||
#include <vcpkg/userconfig.h>
|
||||
#include <vcpkg/vcpkgcmdarguments.h>
|
||||
#include <vcpkg/vcpkglib.h>
|
||||
|
||||
#include <cassert>
|
||||
|
@ -13,6 +13,7 @@
|
||||
#include <vcpkg/binarycaching.h>
|
||||
#include <vcpkg/build.h>
|
||||
#include <vcpkg/buildenvironment.h>
|
||||
#include <vcpkg/cmakevars.h>
|
||||
#include <vcpkg/commands.h>
|
||||
#include <vcpkg/commands.version.h>
|
||||
#include <vcpkg/dependencies.h>
|
||||
|
@ -7,6 +7,7 @@
|
||||
|
||||
#include <vcpkg/binarycaching.h>
|
||||
#include <vcpkg/build.h>
|
||||
#include <vcpkg/cmakevars.h>
|
||||
#include <vcpkg/commands.ci.h>
|
||||
#include <vcpkg/dependencies.h>
|
||||
#include <vcpkg/globalstate.h>
|
||||
|
@ -2,6 +2,7 @@
|
||||
#include <vcpkg/base/system.print.h>
|
||||
#include <vcpkg/base/util.h>
|
||||
|
||||
#include <vcpkg/cmakevars.h>
|
||||
#include <vcpkg/commands.dependinfo.h>
|
||||
#include <vcpkg/dependencies.h>
|
||||
#include <vcpkg/help.h>
|
||||
|
@ -5,6 +5,7 @@
|
||||
#include <vcpkg/globalstate.h>
|
||||
#include <vcpkg/help.h>
|
||||
#include <vcpkg/paragraphs.h>
|
||||
#include <vcpkg/portfileprovider.h>
|
||||
#include <vcpkg/sourceparagraph.h>
|
||||
#include <vcpkg/vcpkgcmdarguments.h>
|
||||
#include <vcpkg/vcpkglib.h>
|
||||
|
@ -2,12 +2,14 @@
|
||||
#include <vcpkg/base/util.h>
|
||||
|
||||
#include <vcpkg/binarycaching.h>
|
||||
#include <vcpkg/cmakevars.h>
|
||||
#include <vcpkg/commands.upgrade.h>
|
||||
#include <vcpkg/dependencies.h>
|
||||
#include <vcpkg/globalstate.h>
|
||||
#include <vcpkg/help.h>
|
||||
#include <vcpkg/input.h>
|
||||
#include <vcpkg/install.h>
|
||||
#include <vcpkg/portfileprovider.h>
|
||||
#include <vcpkg/statusparagraphs.h>
|
||||
#include <vcpkg/update.h>
|
||||
#include <vcpkg/vcpkgcmdarguments.h>
|
||||
|
@ -3,6 +3,7 @@
|
||||
#include <vcpkg/base/strings.h>
|
||||
#include <vcpkg/base/util.h>
|
||||
|
||||
#include <vcpkg/cmakevars.h>
|
||||
#include <vcpkg/dependencies.h>
|
||||
#include <vcpkg/packagespec.h>
|
||||
#include <vcpkg/paragraphs.h>
|
||||
|
@ -13,6 +13,7 @@
|
||||
#include <vcpkg/input.h>
|
||||
#include <vcpkg/install.h>
|
||||
#include <vcpkg/paragraphs.h>
|
||||
#include <vcpkg/portfileprovider.h>
|
||||
#include <vcpkg/tools.h>
|
||||
#include <vcpkg/vcpkglib.h>
|
||||
|
||||
|
@ -5,6 +5,7 @@
|
||||
#include <vcpkg/input.h>
|
||||
#include <vcpkg/metrics.h>
|
||||
#include <vcpkg/packagespec.h>
|
||||
#include <vcpkg/vcpkgpaths.h>
|
||||
|
||||
namespace vcpkg
|
||||
{
|
||||
|
@ -1,6 +1,7 @@
|
||||
#include <vcpkg/base/json.h>
|
||||
|
||||
#include <vcpkg/registries.h>
|
||||
#include <vcpkg/vcpkgpaths.h>
|
||||
|
||||
namespace
|
||||
{
|
||||
|
@ -6,6 +6,7 @@
|
||||
#include <vcpkg/help.h>
|
||||
#include <vcpkg/input.h>
|
||||
#include <vcpkg/paragraphs.h>
|
||||
#include <vcpkg/portfileprovider.h>
|
||||
#include <vcpkg/remove.h>
|
||||
#include <vcpkg/update.h>
|
||||
#include <vcpkg/vcpkglib.h>
|
||||
|
@ -3,7 +3,9 @@
|
||||
#include <vcpkg/commands.h>
|
||||
#include <vcpkg/help.h>
|
||||
#include <vcpkg/paragraphs.h>
|
||||
#include <vcpkg/portfileprovider.h>
|
||||
#include <vcpkg/update.h>
|
||||
#include <vcpkg/vcpkgcmdarguments.h>
|
||||
#include <vcpkg/vcpkglib.h>
|
||||
|
||||
namespace vcpkg::Update
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include <vcpkg/base/json.h>
|
||||
#include <vcpkg/base/system.debug.h>
|
||||
#include <vcpkg/base/system.print.h>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user