Граф коммитов

31 Коммитов

Автор SHA1 Сообщение Дата
Billy Robert O'Neal III fd884a0d39 Revert one of the warning skip removals from https://github.com/microsoft/vcpkg-tool/pull/1457 2024-07-31 22:43:43 -07:00
Kefu Chai d67080fb00
Update fmt to v11.0.2 (#1457)
Signed-off-by: Kefu Chai <tchaikov@gmail.com>
Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
2024-07-23 20:47:25 +00:00
Guillaume Racicot 6bc426e87b
Update fmt to 10.1.0 (#1168)
Co-authored-by: Guillaume Racicot <grc@pixmob.com>
Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
2023-08-28 18:42:03 -07:00
Pierre Wendling 92a5968c9e
Update fmt to 10.0.0 (#1063) 2023-05-17 13:17:49 -07:00
Billy O'Neal a615159475
Revert "Update SHAs because GitHub changed them. (#874)" (#875)
This reverts commit f39cfece24.
2023-01-31 12:08:50 -08:00
Billy O'Neal f39cfece24
Update SHAs because GitHub changed them. (#874) 2023-01-30 12:53:08 -08:00
Billy O'Neal 5fdee72bc1
Turn on CodeQL and fix BinSkim regressions (#805)
* Turn on CodeQL as requested by DevDiv.

* Remove CMake output spew from CMP0135.

* Fix BinSkim failures.

* clang-format
2022-11-10 13:24:51 -08:00
Kai Pastor 5aaea46e43
Unbreak fmt upgrades (#783) 2022-11-02 14:49:55 -07:00
Javier Matos Denizac 875c5a33cb
Embed locale files (#751)
* Fix FindCMakeRC name

* add link to LCID documentation

* Format

* VS uses spanish (SPAIN) so the LCID is 3082 (not 1034)

* Verified LCID values, fixed test case, included link to latest documentation for LCID, added some comments

* format

* languages array is now static constexpr
2022-10-27 11:34:07 -07:00
Billy O'Neal c8b75a590c
Revert the addition of extra FMT variables from https://github.com/microsoft/vcpkg-tool/pull/679/ (#719)
Competing resolution of https://github.com/microsoft/vcpkg-tool/pull/686/
2022-09-30 16:11:08 -07:00
Vitaly Zaitsev fb516c9fc9
Updated fmt to version 9.1.0 (#679)
* Fixed build against fmt 9.0.0.

Signed-off-by: Vitaly Zaitsev <vitaly@easycoding.org>

* Updated bundled fmt to version 9.1.0.

Signed-off-by: Vitaly Zaitsev <vitaly@easycoding.org>

Signed-off-by: Vitaly Zaitsev <vitaly@easycoding.org>
2022-08-29 08:49:30 -07:00
Billy O'Neal 85dc3d9d4e
Fix fetching fmt from Terapin, including containers (#421)
* Use the tarball to get fmt and wire up consistently to Terrapin.

* Fix alpine?

* Fix Windows.
2022-03-07 17:18:12 -08:00
Billy O'Neal e8be5aa966
Update vcpkg-tool build for VS2022. (#398)
* Update vcpkg-tool build for VS2022.

* Disable 6553.
2022-02-28 13:40:15 -08:00
autoantwort f21b8662d1
update fmt to 8.1.1 and fix build (#356) 2022-02-15 12:22:01 -08:00
Billy O'Neal 1817176f96
Enable /W3 in fmt to pass SDL checks. (#318)
Resolves https://devdiv.visualstudio.com/DefaultCollection/DevDiv/_workitems/edit/1445633/
2022-01-05 16:35:58 -08:00
nicole mazzuca 5b939c9c74
[localization 1/n] First minor changes, mostly additive (#218)
* [localization 1/n] First minor changes, mostly additive

Additionally, convert vcpkg.cpp over to using messages.h

* oops, forgot to initialize the context

also, build on msvc & gcc 6

* add cgmanifest and NOTICE

* Add support for signing with fmt

* switch to MAXDWORD

* add localization file

* turn `find_package(fmt)` into a Findfmt script

* check sha

* Raise default locale initialization above filesystem access

* Avoid O(N^2) on happy path

* Address CR comment on formatter<vcpkg::StringLiteral>

Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
2021-10-26 09:58:33 -07:00
Billy O'Neal 433d72aa5e
Remove VCPKG_ALLOW_APPLE_CLANG. (#216)
This option is no longer necessary now that we no longer use std::filesystem on POSIX systems.
2021-10-15 14:44:11 -07:00
Billy O'Neal 0113d64d3f
Finish POSIX-native filesystem backend. (#213)
* Fix format-cxxcode on the Codespaces Ubuntu images.

* Implement the subset of copy we actually use, and delete checking of VCPKG_USE_STD_FILESYSTEM from the sources.

* Remove detection for C++ standard library and std::filesystem library.

* Add symlinks comment requested by Nicole.
2021-10-11 14:06:46 -07:00
Billy O'Neal dbe5d27b65
Use /MT and CMake 3.15. (#182)
* Use /MT and CMake 3.15.

CMakeLists.txt:
1 Bump to 3.15
4 Turn on policy CMP0092 to disable default cmake warnings.
30 Remove previous now-redundant use of MSVC_RUNTIME_LIBRARY
99 Remove regex obsoleted by CMP0092

utilities.cmake
194 Remove clang 9.x development warnings workaround.
203 Remove /W3 when development warnings are off.

* Make CMAKE_MSVC_RUNTIME_LIBRARY toolchain and command line overridable.

Co-authored-by: Robert Schumacher <roschuma@microsoft.com>

Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
2021-09-03 14:31:45 -07:00
Billy O'Neal cec5e1c2b0
Make symlink tests work on all Windows versions (#125)
* Make symlink tests work on all Windows versions

test/files.cpp
Rather than try to read windows client specific registry keys as a means of predicting whether symlinks work, now that we distribute vcpkg in binary forms on Windows, we can assume it is built with a modern compiler, and thus with std::filesystem. This means we can detect the problematic condition by just attempting to create the symlink, and testing if we get ERROR_PRIVILEGE_NOT_HELD back.

utilities.cmake:
Delete handling for old compilers on Windows.

files.h and base/files.cpp:
Add create_directory_symlink called by tests, and the missing overloads of create_symlink.
Delete code blocks looking for defined(_WIN32) && !VCPKG_USE_STD_FILESYSTEM.
Fix bad format string in create_directory error message without enough %s.
Remove unnecessary regex_search for invalid chars.

util.h and util.cpp:
Delete extra copy of create_symlink infrastructure and mechanism to guess if create_symlink works.

strings.cpp:
Inline b32_encode

hash.h and hash.cpp and hash.cpp:
Drive by delete SHA1.

* Delete unused rol32 and format.

* Delete unused variable.

Co-authored-by: nicole mazzuca <83086508+strega-nil-ms@users.noreply.github.com>
2021-07-22 13:32:39 -07:00
Billy O'Neal 8ad95bc162
Eliminate iostreams (#109)
* Eliminate use of iostreams

* Avoid standard-prohibited arithmetic on fpos_t.

* Avoid temporary copies of data into std::string when parsing PE/COFF things.

* Format

* Fix *nix build.

* Add \r\n support to `System::cmd_execute_and_stream_lines`

* Adopt some CR comments, simplify loop structure

* Merge LinesStream and LinesCollector

* Silence unused warning for Linux

* Rename read_file -> open_for_read

* Fix limits checks for fseek

* Code review feedback

Fixed first line always being buffered, added comment, renames

* Bill actually saves in the editor this time

* Fix handling of \rabc\n

* Update src/vcpkg/metrics.cpp

Co-authored-by: Robert Schumacher <roschuma@microsoft.com>

Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
2021-07-12 10:37:15 -07:00
Billy O'Neal 74c95caade
Fix broken signed builds by fixing case of argument in vcpkg_target_add_sourcelink (#92) 2021-06-14 13:40:38 -07:00
Francois Rivard 11e335c429
Add SourceLink (#63)
* Add SourceLink

* Apply suggestions from code review

Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
2021-05-24 11:22:45 -07:00
Billy O'Neal 72886647e6 [vcpkg] Apply fixes needed to extract vcpkg-tool (#16012)
utilities.cmake: Disable warnings that are firing on Azure Pipelines CI machines due to different Clang version.

expected.h: Fix a bug I introduced in https://github.com/microsoft/vcpkg/pull/15638/ because I was under the impression expected worked like optional (in that value_or_exit for it should be treated as a program bug)

build.cpp: Add (void)s to silence warnings.

binarycaching.cpp: Repair assumption that the current directory is C: which isn't true on the Hosted Azure Pipelines agents.

others: Make unit tests respect %VCPKG_ROOT%, as necessary in the vcpkg_tool repo. Note that this required splitting vcpkgcmdarguments::ImbueFromEnvironment into the once-only process modifying part and the just imbue from environment part.
2021-02-03 11:11:27 -08:00
Joakim L. Gilje 093c8b3333 [vcpkg] initial openbsd (community) support (#14549)
* initial openbsd support in vcpkg

* after clang-format

* hardcoded in the preferred compiler for openbsd in bootstrap scipt (thanks @tormfinn)

* Fetch a patched pkg-config because openbsd pkg-config lacks {fcfiledir}

* fixes from review feedback

* corrected hash for pkg-config.openbsd

* re-added missing endif()

* regenerate docs

* Update scripts/cmake/vcpkg_configure_meson.cmake

Co-authored-by: Nicole Mazzuca <mazzucan@outlook.com>
2020-11-23 09:43:23 -08:00
nicole mazzuca 12321dfab4 fix compile on g++ 6 (#13290) 2020-09-04 11:49:56 -07:00
nicole mazzuca 031e3b8325 [vcpkg] Rewrite CMake build system to be more target-based (#12698)
* Change to using more target-focused cmake

* Add vcpkg_target_add_warning_options

* targetify the rest

* move the globs together

* Force-include pch.h on non-windows

* Rename VCPKGLIB_NON_PCH_* to VCPKGLIB_* in globs

* Remove `include "pch.h"`s

* missed a few lines

* fix build

* fix CMAKE_CURRENT_SOURCE_DIR

* try to fix VCPKG_REQUIRE_LINK_CXXFS

* change msvc-stl logic

* fix build

* CR

* clang-format

* Apply suggestions from code review

Thanks @ras0219!

Co-authored-by: JackBoosY <yuzaiyang@beyondsoft.com>
Co-authored-by: ras0219 <533828+ras0219@users.noreply.github.com>
2020-08-10 12:32:34 -07:00
nicole mazzuca 582b25c2b3 [vcpkg manifest] Manifest Implementation (#11757)
==== Changes Related to manifests ====

* Add the `manifests` feature flag
  * This only says whether we look for a `vcpkg.json` in the cwd, not
    whether we support parsing manifests (for ports, for example)
* Changes to the manifests RFC
  * `"authors"` -> `"maintainers"`
  * `--x-classic-mode` -> `-manifests` \in `vcpkg_feature_flags`
  * reserve `"core"` in addition to `"default"`, since that's already
    reserved for features
  * Add a small helper note about what identifiers must look like
  * `<license-string>`: SPDX v3.8 -> v3.9
  * `"feature"."description"` is allowed to be an array of strings as well
  * `"version"` -> `"version-string"` for forward-compat with versions
    RFC
* Add the `--feature-flags` option
* Add the ability to turn off feature flags via passing
  `-<feature-flag>` to `VCPKG_FEATURE_FLAGS` or `--feature-flags`
* Add CMake toolchain support for manifests
  * Requires either:
    * a feature flag of `manifests` in either `Env{VCPKG_FEATURE_FLAGS}`
      or `VCPKG_FEATURE_FLAGS`
    * Passing the `VCPKG_ENABLE_MANIFESTS` option
  * The toolchain will install your packages to
    `${VCPKG_MANIFEST_DIR}/vcpkg_installed`.
* Add MSBuild `vcpkg integrate install` support for manifests
  * Requires `VcpkgEnableManifest` to be true
* `vcpkg create` creates a port that has a `vcpkg.json` instead of a
  `CONTROL`
* argparse, abseil, 3fd, and avisynthplus ports switched to manifest
  from CONTROL
* Add support for `--x-manifest-root`, as well as code for finding it if
  not passed
* Add support for parsing manifests!
* Add a filesystem lock!

==== Important Changes which are somewhat unrelated to manifests ====

* Rename `logicexpression.{h,cpp}` to `platform-expression.{h,cpp}`
* Add `PlatformExpression` type which takes the place of the old logic
  expression
  * Split the parsing of platform expressions from checking whether
    they're true or not
  * Eagerly parse PlatformExpressions as opposed to leaving them as
    strings
* Add checking for feature flag consistency
  * i.e., if `-binarycaching` is passed, you shouldn't be passing
    `--binarysource`
* Add the `Json::Reader` type which, with the help of user-defined
  visitors, converts JSON to your internal type
* VcpkgArgParser: place the switch names into a constant as opposed to
  using magic constants
  * In general update the parsing code so that this ^ works
* Add `Port-Version` fields to CONTROL files
  * This replaces the existing practice of
    `Version: <my-version>-<port-version>`

==== Smaller changes ====
* small drive-by cleanups to some CMake
  * `${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}` ->
    `${CURRENT_INSTALLED_DIR}`
  * Remove `-analyze` when compiling with clang-cl, since that's not a
    supported flag (vcpkg's build system)
  * Add a message about which compiler is detected by vcpkg's build
    system machinery
* Fix `Expected::then`
* Convert `""` to `{}` for `std::string` and `fs::path`, to avoid a
  `strlen` (additionally, `.empty()` instead of `== ""`, and `.clear()`)
* Add `Strings::strto` which converts strings to numeric types
* Support built-in arrays and `StringView` for `Strings::join`
* Add `operator<` and friends to `StringView`
* Add `substr` to `StringView`
* SourceParagraphParser gets some new errors
2020-06-30 10:40:18 -07:00
nicole mazzuca 097fd0df04 [vcpkg] Hopefully fix build on macOS 10.13/10.14 (#11205) 2020-05-11 16:31:04 -07:00
nicole mazzuca eb77928b97 [vcpkg] Fix build scripts on openSUSE and g++9 (#10867)
The existing code did not correctly pass `CXX` to cmake.
2020-04-17 10:56:27 -07:00
nicole mazzuca d8e18dbb69 [vcpkg] Clean up CMake build system (#10834)
There are quite a few changes to the CMake build system packaged up into
one set here:
* Added `toolsrc/cmake/utilities.cmake`, which contains the following:
  * `vcpkg_detect_compiler` -- get the name of the C++ compiler, as one
    of {gcc, clang, msvc}
  * `vcpkg_detect_standard_library` -- get the name of the standard
    library we're linking to, as one of {libstdc++, libc++, msvc-stl}
  * `vcpkg_detect_std_filesystem` -- figure out how to link and call
    into C++17's filesystem; whether one needs to link to `stdc++fs` or
    `c++fs`, and whether to use `<filesystem>` or
    `<experimental/filesystem>`.
* Added a `VCPKG_WARNINGS_AS_ERRORS`, split off from
  `VCPKG_DEVELOPMENT_WARNINGS`, which allows one to use the development
  warnings without passing -Werror
* Rename `DEFINE_DISABLE_METRICS` to `VCPKG_DISABLE_METRICS` -- the
  former will now print a deprecation message and set the latter.
* Now, print a deprecation message on `WERROR`; it doesn't do anything
  since the behavior it requested is now the default.
* Pass `-std=c++17` if the compiler allows it, instead of `-std=c++1z`
* Do some code movement
* Pass `USE_STD_FILESYSTEM` if possible, instead of only on minGW
  * Renamed to `VCPKG_USE_STD_FILESYSTEM`

Additionally, we now pass `/W4` in Debug mode on x86 in the Visual
Studio build system; this brings it in line with the CMake build system,
and the x64 Visual Studio build system.

And finally, we make some minor code changes to support compiling in
VCPKG_DEVELOPMENT_WARNINGS mode.
2020-04-14 22:08:50 -07:00