mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-24 09:49:07 +08:00
Introduce precompiled headers
This commit is contained in:
parent
4ded91423a
commit
050e4a0f7a
38
toolsrc/include/pch.h
Normal file
38
toolsrc/include/pch.h
Normal file
@ -0,0 +1,38 @@
|
||||
#pragma once
|
||||
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#define NOMINMAX
|
||||
#include <Windows.h>
|
||||
#include <shellapi.h>
|
||||
#include <Shlobj.h>
|
||||
#include <winhttp.h>
|
||||
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include <memory>
|
||||
#include <cassert>
|
||||
#include <cstdarg>
|
||||
#include <codecvt>
|
||||
#include <cctype>
|
||||
|
||||
#include <set>
|
||||
#include <map>
|
||||
#include <unordered_set>
|
||||
#include <unordered_map>
|
||||
#include <fstream>
|
||||
#include <regex>
|
||||
#include <array>
|
||||
#include <iomanip>
|
||||
|
||||
#include <iterator>
|
||||
#include <utility>
|
||||
#include <sys/timeb.h>
|
||||
#include <time.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <functional>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include <stdexcept>
|
||||
#include <system_error>
|
@ -1,3 +1,4 @@
|
||||
#include "pch.h"
|
||||
#include "BinaryParagraph.h"
|
||||
#include "vcpkglib_helpers.h"
|
||||
#include "vcpkg_Checks.h"
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include "pch.h"
|
||||
#include "BuildInfo.h"
|
||||
#include "vcpkg_Checks.h"
|
||||
#include "vcpkglib_helpers.h"
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include "pch.h"
|
||||
#include "MachineType.h"
|
||||
#include "vcpkg_Checks.h"
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include "pch.h"
|
||||
#include "Paragraphs.h"
|
||||
#include "vcpkg_Files.h"
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include "pch.h"
|
||||
#include "SourceParagraph.h"
|
||||
#include "vcpkglib_helpers.h"
|
||||
#include "vcpkg_System.h"
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include "pch.h"
|
||||
#include "StatusParagraph.h"
|
||||
#include "vcpkglib_helpers.h"
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include "pch.h"
|
||||
#include "StatusParagraphs.h"
|
||||
#include <algorithm>
|
||||
#include "vcpkg_Checks.h"
|
||||
|
||||
namespace vcpkg
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include "pch.h"
|
||||
#include "Stopwatch.h"
|
||||
#include "vcpkg_Checks.h"
|
||||
|
||||
|
@ -1,8 +1,6 @@
|
||||
#include "pch.h"
|
||||
#include "coff_file_reader.h"
|
||||
#include <iostream>
|
||||
#include "vcpkg_Checks.h"
|
||||
#include <set>
|
||||
#include <fstream>
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include "pch.h"
|
||||
#include "vcpkg_Commands.h"
|
||||
|
||||
namespace vcpkg::Commands
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include "pch.h"
|
||||
#include "vcpkg_Commands.h"
|
||||
#include "StatusParagraphs.h"
|
||||
#include "vcpkglib.h"
|
||||
@ -8,7 +9,6 @@
|
||||
#include "vcpkg_Environment.h"
|
||||
#include "metrics.h"
|
||||
#include "vcpkg_info.h"
|
||||
#include <fstream>
|
||||
|
||||
namespace vcpkg::Commands::Build
|
||||
{
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include "pch.h"
|
||||
#include "vcpkg_Commands.h"
|
||||
#include "vcpkg_System.h"
|
||||
#include "vcpkg_Environment.h"
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include "pch.h"
|
||||
#include "vcpkg_Commands.h"
|
||||
#include "vcpkg_System.h"
|
||||
#include "vcpkg_Files.h"
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include "pch.h"
|
||||
#include "vcpkg_Commands.h"
|
||||
#include "vcpkg_System.h"
|
||||
#include "vcpkg_info.h"
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include "pch.h"
|
||||
#include "vcpkg_Commands.h"
|
||||
#include "vcpkg_System.h"
|
||||
#include "vcpkg_Environment.h"
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include "pch.h"
|
||||
#include "vcpkg_Commands.h"
|
||||
#include "vcpkg_System.h"
|
||||
#include "vcpkg_Input.h"
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include "pch.h"
|
||||
#include "vcpkg_Commands.h"
|
||||
#include "vcpkg_System.h"
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include "pch.h"
|
||||
#include "vcpkg_Commands.h"
|
||||
#include "vcpkg_System.h"
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
#include "pch.h"
|
||||
#include "vcpkg_Commands.h"
|
||||
#include "Paragraphs.h"
|
||||
#include "StatusParagraph.h"
|
||||
#include "vcpkg_Files.h"
|
||||
#include <fstream>
|
||||
|
||||
namespace vcpkg::Commands::Import
|
||||
{
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include "pch.h"
|
||||
#include "vcpkg_Commands.h"
|
||||
#include "vcpkglib.h"
|
||||
#include "vcpkg_Environment.h"
|
||||
|
@ -1,10 +1,5 @@
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <windows.h>
|
||||
#include <shellapi.h>
|
||||
#include "pch.h"
|
||||
#include "vcpkg_Commands.h"
|
||||
#include <fstream>
|
||||
#include <regex>
|
||||
#include <array>
|
||||
#include "vcpkg_Environment.h"
|
||||
#include "vcpkg_Checks.h"
|
||||
#include "vcpkg_System.h"
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include "pch.h"
|
||||
#include "vcpkg_Commands.h"
|
||||
#include "vcpkglib.h"
|
||||
#include "vcpkg_System.h"
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include "pch.h"
|
||||
#include "vcpkg_Commands.h"
|
||||
#include "vcpkg_System.h"
|
||||
#include "vcpkglib.h"
|
||||
|
@ -1,11 +1,7 @@
|
||||
#include "pch.h"
|
||||
#include "vcpkg_Commands.h"
|
||||
#include "vcpkg_System.h"
|
||||
#include <map>
|
||||
#include <iterator>
|
||||
#include "vcpkg_Maps.h"
|
||||
#include <iostream>
|
||||
#include <iomanip>
|
||||
#include <set>
|
||||
#include "Paragraphs.h"
|
||||
#include "SourceParagraph.h"
|
||||
#include "vcpkg_Environment.h"
|
||||
|
@ -1,9 +1,9 @@
|
||||
#include "pch.h"
|
||||
#include "vcpkg_Commands.h"
|
||||
#include "vcpkglib.h"
|
||||
#include "vcpkg_System.h"
|
||||
#include "vcpkg_Input.h"
|
||||
#include "vcpkg_Dependencies.h"
|
||||
#include <fstream>
|
||||
|
||||
namespace vcpkg::Commands::Remove
|
||||
{
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include "pch.h"
|
||||
#include "vcpkg_Commands.h"
|
||||
#include "vcpkg_System.h"
|
||||
#include "Paragraphs.h"
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include "pch.h"
|
||||
#include "vcpkg_Commands.h"
|
||||
#include "vcpkglib.h"
|
||||
#include "vcpkg_System.h"
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include "pch.h"
|
||||
#include "vcpkg_Commands.h"
|
||||
#include "vcpkg_System.h"
|
||||
#include "vcpkg_info.h"
|
||||
|
@ -1,15 +1,5 @@
|
||||
#include "pch.h"
|
||||
#include "metrics.h"
|
||||
#include <utility>
|
||||
#include <array>
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
#include <sys/timeb.h>
|
||||
#include <time.h>
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <Windows.h>
|
||||
#include <winhttp.h>
|
||||
#include <fstream>
|
||||
#include "filesystem_fs.h"
|
||||
#include "vcpkg_Strings.h"
|
||||
#include "vcpkg_System.h"
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include "pch.h"
|
||||
#include "package_spec.h"
|
||||
#include <algorithm>
|
||||
|
||||
namespace vcpkg
|
||||
{
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include <package_spec.h>
|
||||
#include <system_error>
|
||||
#include "pch.h"
|
||||
#include "package_spec.h"
|
||||
#include "package_spec_parse_result.h"
|
||||
|
||||
namespace vcpkg
|
||||
|
1
toolsrc/src/pch.cpp
Normal file
1
toolsrc/src/pch.cpp
Normal file
@ -0,0 +1 @@
|
||||
#include "pch.h"
|
@ -1,12 +1,11 @@
|
||||
#include "pch.h"
|
||||
#include "vcpkg_paths.h"
|
||||
#include "package_spec.h"
|
||||
#include "vcpkg_Files.h"
|
||||
#include <functional>
|
||||
#include "vcpkg_System.h"
|
||||
#include "vcpkg_Environment.h"
|
||||
#include "coff_file_reader.h"
|
||||
#include "BuildInfo.h"
|
||||
#include <regex>
|
||||
|
||||
namespace vcpkg::PostBuildLint
|
||||
{
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include "pch.h"
|
||||
#include "triplet.h"
|
||||
#include "vcpkg_Checks.h"
|
||||
#include <algorithm>
|
||||
|
||||
namespace vcpkg
|
||||
{
|
||||
|
@ -1,6 +1,5 @@
|
||||
#include "pch.h"
|
||||
#include "vcpkg_Checks.h"
|
||||
|
||||
#include <stdexcept>
|
||||
#include "vcpkg_System.h"
|
||||
|
||||
namespace vcpkg::Checks
|
||||
|
@ -1,12 +1,9 @@
|
||||
#include "pch.h"
|
||||
#include "vcpkg_Dependencies.h"
|
||||
#include <vector>
|
||||
#include "vcpkg_Graphs.h"
|
||||
#include "vcpkg_paths.h"
|
||||
#include "package_spec.h"
|
||||
#include "StatusParagraphs.h"
|
||||
#include <unordered_set>
|
||||
#include <unordered_map>
|
||||
#include "vcpkg_Maps.h"
|
||||
#include "vcpkg_Files.h"
|
||||
#include "vcpkglib.h"
|
||||
|
||||
|
@ -1,5 +1,4 @@
|
||||
#include <regex>
|
||||
#include <array>
|
||||
#include "pch.h"
|
||||
#include "vcpkg_Environment.h"
|
||||
#include "vcpkg_Commands.h"
|
||||
#include "metrics.h"
|
||||
|
@ -1,6 +1,5 @@
|
||||
#include "pch.h"
|
||||
#include "vcpkg_Files.h"
|
||||
#include <fstream>
|
||||
#include <regex>
|
||||
#include "vcpkg_System.h"
|
||||
|
||||
namespace vcpkg::Files
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include "pch.h"
|
||||
#include "vcpkg_Input.h"
|
||||
#include "vcpkg_System.h"
|
||||
#include "metrics.h"
|
||||
|
@ -1,12 +1,6 @@
|
||||
#include "pch.h"
|
||||
#include "vcpkg_Strings.h"
|
||||
|
||||
#include <cstdarg>
|
||||
#include <algorithm>
|
||||
#include <codecvt>
|
||||
#include <iterator>
|
||||
#include <functional>
|
||||
#include <cctype>
|
||||
|
||||
namespace vcpkg::Strings::details
|
||||
{
|
||||
// To disambiguate between two overloads
|
||||
|
@ -1,7 +1,5 @@
|
||||
#include "pch.h"
|
||||
#include "vcpkg_System.h"
|
||||
#include <iostream>
|
||||
#include <Windows.h>
|
||||
#include <regex>
|
||||
|
||||
namespace vcpkg::System
|
||||
{
|
||||
|
@ -1,8 +1,6 @@
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <Windows.h>
|
||||
#include "pch.h"
|
||||
#include "vcpkg_cmd_arguments.h"
|
||||
#include "vcpkg_Commands.h"
|
||||
#include <unordered_set>
|
||||
#include "metrics.h"
|
||||
#include "vcpkg_System.h"
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include "pch.h"
|
||||
#include "vcpkg_info.h"
|
||||
#include "metrics.h"
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include "pch.h"
|
||||
#include "expected.h"
|
||||
#include "vcpkg_paths.h"
|
||||
#include "metrics.h"
|
||||
|
@ -1,15 +1,7 @@
|
||||
#include "pch.h"
|
||||
#include "vcpkglib.h"
|
||||
#include <iostream>
|
||||
#include <iomanip>
|
||||
#include <fstream>
|
||||
#include <functional>
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
#include "vcpkg_Files.h"
|
||||
#include "Paragraphs.h"
|
||||
#include <regex>
|
||||
#include "metrics.h"
|
||||
|
||||
using namespace vcpkg;
|
||||
|
@ -1,7 +1,6 @@
|
||||
#include "pch.h"
|
||||
#include "vcpkg_Checks.h"
|
||||
#include "vcpkglib_helpers.h"
|
||||
#include <unordered_map>
|
||||
#include <regex>
|
||||
|
||||
namespace vcpkg::details
|
||||
{
|
||||
|
@ -78,6 +78,8 @@
|
||||
<PreprocessorDefinitions>DISABLE_METRICS=$(DISABLE_METRICS);VCPKG_VERSION=$(VCPKG_VERSION);_MBCS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalOptions>/std:c++latest %(AdditionalOptions)</AdditionalOptions>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
@ -89,6 +91,8 @@
|
||||
<PreprocessorDefinitions>DISABLE_METRICS=$(DISABLE_METRICS);VCPKG_VERSION=$(VCPKG_VERSION);_MBCS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalOptions>/std:c++latest %(AdditionalOptions)</AdditionalOptions>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
@ -102,6 +106,8 @@
|
||||
<PreprocessorDefinitions>DISABLE_METRICS=$(DISABLE_METRICS);VCPKG_VERSION=$(VCPKG_VERSION);_MBCS;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalOptions>/std:c++latest %(AdditionalOptions)</AdditionalOptions>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
@ -119,6 +125,8 @@
|
||||
<PreprocessorDefinitions>DISABLE_METRICS=$(DISABLE_METRICS);VCPKG_VERSION=$(VCPKG_VERSION);_MBCS;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalOptions>/std:c++latest %(AdditionalOptions)</AdditionalOptions>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
@ -138,6 +146,7 @@
|
||||
<ClInclude Include="..\include\package_spec.h" />
|
||||
<ClInclude Include="..\include\package_spec_parse_result.h" />
|
||||
<ClInclude Include="..\include\Paragraphs.h" />
|
||||
<ClInclude Include="..\include\pch.h" />
|
||||
<ClInclude Include="..\include\post_build_lint.h" />
|
||||
<ClInclude Include="..\include\SourceParagraph.h" />
|
||||
<ClInclude Include="..\include\StatusParagraph.h" />
|
||||
@ -186,6 +195,12 @@
|
||||
<ClCompile Include="..\src\commands_version.cpp" />
|
||||
<ClCompile Include="..\src\MachineType.cpp" />
|
||||
<ClCompile Include="..\src\metrics.cpp" />
|
||||
<ClCompile Include="..\src\pch.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\post_build_lint.cpp" />
|
||||
<ClCompile Include="..\src\Stopwatch.cpp" />
|
||||
<ClCompile Include="..\src\vcpkglib.cpp" />
|
||||
|
@ -150,6 +150,9 @@
|
||||
<ClCompile Include="..\src\vcpkg_Strings.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\pch.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\include\package_spec.h">
|
||||
@ -254,5 +257,8 @@
|
||||
<ClInclude Include="..\include\vcpkg_System.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\include\pch.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
</Project>
|
Loading…
Reference in New Issue
Block a user