Put user-defined configuration triplets path on top of the search queue (#11931)

I believe that user-defined configuration triplets paths should be the first when searching for triplet configuration.
This commit puts user-defined configuration triplets (if defined) on top of the search queue before standard paths.
This could help to overwrite default tiplet configuration without setting custom triplet.

P.S. If current implementation is better than my suggestion, feel free to ignore this commit.

Signed-off-by: Vitalii Koshura <lestat.de.lionkur@gmail.com>
This commit is contained in:
Vitalii Koshura 2020-06-19 00:53:58 +02:00 committed by GitHub
parent 55e96af16b
commit de44a808e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -128,8 +128,6 @@ namespace vcpkg
ports_cmake = filesystem.canonical(VCPKG_LINE_INFO, scripts / fs::u8path("ports.cmake"));
triplets_dirs.emplace_back(triplets);
triplets_dirs.emplace_back(community_triplets);
if (args.overlay_triplets)
{
for (auto&& overlay_triplets_dir : *args.overlay_triplets)
@ -137,6 +135,8 @@ namespace vcpkg
triplets_dirs.emplace_back(filesystem.canonical(VCPKG_LINE_INFO, fs::u8path(overlay_triplets_dir)));
}
}
triplets_dirs.emplace_back(triplets);
triplets_dirs.emplace_back(community_triplets);
}
fs::path VcpkgPaths::package_dir(const PackageSpec& spec) const { return this->packages / spec.dir(); }