diff options
| author | Robert Schumacher <roschuma@microsoft.com> | 2016-09-23 12:20:09 -0700 |
|---|---|---|
| committer | Robert Schumacher <roschuma@microsoft.com> | 2016-09-23 12:20:09 -0700 |
| commit | 8a8180503d8217959d96a9f2b9fc6366d67c1354 (patch) | |
| tree | 71f299f461d4c726a5cf49a535b42898149caccc /toolsrc/src/triplet.cpp | |
| parent | b2f6a769ea015f49c7061e36c8c7125dd53ca01e (diff) | |
| parent | ddd0f88579eb1adff0dd8b14458c4bf70eaa902d (diff) | |
| download | vcpkg-8a8180503d8217959d96a9f2b9fc6366d67c1354.tar.gz vcpkg-8a8180503d8217959d96a9f2b9fc6366d67c1354.zip | |
Merge branch 'alzie-default_triplet'
Diffstat (limited to 'toolsrc/src/triplet.cpp')
| -rw-r--r-- | toolsrc/src/triplet.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/toolsrc/src/triplet.cpp b/toolsrc/src/triplet.cpp index 9ad3d8847..14f19d5cd 100644 --- a/toolsrc/src/triplet.cpp +++ b/toolsrc/src/triplet.cpp @@ -1,4 +1,5 @@ #include "triplet.h" +#include "vcpkg.h" #include "vcpkg_System.h" #include "vcpkg_Checks.h" @@ -56,4 +57,19 @@ namespace vcpkg Checks::exit_with_message("Unknown system: %s", value); } + + bool triplet::validate(const vcpkg_paths & paths) + { + auto it = fs::directory_iterator(paths.triplets); + for(; it != fs::directory_iterator(); ++it) + { + std::string triplet_file_name = it->path().stem().generic_u8string(); + if(value == triplet_file_name) // TODO: fuzzy compare + { + //value = triplet_file_name; // NOTE: uncomment when implementing fuzzy compare + return true; + } + } + return false; + } } |
