aboutsummaryrefslogtreecommitdiff
path: root/toolsrc/src/commands_installation.cpp
diff options
context:
space:
mode:
authorAlexander Karatarakis <alkarata@microsoft.com>2016-11-02 19:30:53 -0700
committerAlexander Karatarakis <alkarata@microsoft.com>2016-11-02 19:30:53 -0700
commit1fa055569540d887ceca0daadca7d0160b886089 (patch)
tree5157dd35a2c2195f6545bf1eb455de4bf45ab716 /toolsrc/src/commands_installation.cpp
parentce890f979945183f5a52663d869a9c7ee1e1bb01 (diff)
downloadvcpkg-1fa055569540d887ceca0daadca7d0160b886089.tar.gz
vcpkg-1fa055569540d887ceca0daadca7d0160b886089.zip
[building] Parse SourceParagraph at the start of the build
Diffstat (limited to 'toolsrc/src/commands_installation.cpp')
-rw-r--r--toolsrc/src/commands_installation.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/toolsrc/src/commands_installation.cpp b/toolsrc/src/commands_installation.cpp
index 7e7da9e3f..c728c41dc 100644
--- a/toolsrc/src/commands_installation.cpp
+++ b/toolsrc/src/commands_installation.cpp
@@ -11,17 +11,19 @@
namespace vcpkg
{
- static void create_binary_control_file(const vcpkg_paths& paths, const fs::path& port_dir, const triplet& target_triplet)
+ static void create_binary_control_file(const vcpkg_paths& paths, const SourceParagraph& source_paragraph, const triplet& target_triplet)
{
- auto pghs = get_paragraphs(port_dir / "CONTROL");
- Checks::check_exit(pghs.size() == 1, "Error: invalid control file");
- auto bpgh = BinaryParagraph(SourceParagraph(pghs[0]), target_triplet);
+ auto bpgh = BinaryParagraph(source_paragraph, target_triplet);
const fs::path binary_control_file = paths.packages / bpgh.dir() / "CONTROL";
std::ofstream(binary_control_file) << bpgh;
}
static void build_internal(const package_spec& spec, const vcpkg_paths& paths, const fs::path& port_dir)
{
+ auto pghs = get_paragraphs(port_dir / "CONTROL");
+ Checks::check_exit(pghs.size() == 1, "Error: invalid control file");
+ SourceParagraph source_paragraph(pghs[0]);
+
const fs::path ports_cmake_script_path = paths.ports_cmake;
auto&& target_triplet = spec.target_triplet();
const std::wstring command = Strings::wformat(LR"("%%VS140COMNTOOLS%%..\..\VC\vcvarsall.bat" %s && cmake -DCMD=BUILD -DPORT=%s -DTARGET_TRIPLET=%s "-DCURRENT_PORT_DIR=%s/." -P "%s")",
@@ -54,7 +56,7 @@ namespace vcpkg
perform_all_checks(spec, paths);
- create_binary_control_file(paths, port_dir, target_triplet);
+ create_binary_control_file(paths, source_paragraph, target_triplet);
// const fs::path port_buildtrees_dir = paths.buildtrees / spec.name;
// delete_directory(port_buildtrees_dir);