* 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
* [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>
* 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.
* 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>
* 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>
* 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>
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.
==== 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
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.