* Change post-build checks to be warnings rather than errors. Note that they are still treated as errors for purposes of including a port in our curated catalog.
Improve the diagnostics for the pkgconfig check. Example:
```
billyoneal@Billys-MacBook-Pro vcpkg % ../vcpkg-tool/build/vcpkg install gtest --no-binarycaching
Computing installation plan...
The following packages will be built and installed:
gtest[core]:arm64-osx -> 1.11.0
Detecting compiler hash for triplet arm64-osx...
Starting package 1/1: gtest:arm64-osx
Building package gtest[core]:arm64-osx...
-- Using community triplet arm64-osx. This triplet configuration is not guaranteed to succeed.
-- [COMMUNITY] Loading triplet configuration from: /Users/billyoneal/vcpkg/triplets/community/arm64-osx.cmake
-- Downloading https://github.com/google/googletest/archive/release-1.11.0.tar.gz -> google-googletest-release-1.11.0.tar.gz...
-- Cleaning sources at /Users/billyoneal/vcpkg/buildtrees/gtest/src/ase-1.11.0-30e87b9484.clean. Use --editable to skip cleaning for the packages you specify.
-- Extracting source /Users/billyoneal/vcpkg/downloads/google-googletest-release-1.11.0.tar.gz
-- Applying patch fix-main-lib-path.patch
-- Using source at /Users/billyoneal/vcpkg/buildtrees/gtest/src/ase-1.11.0-30e87b9484.clean
-- Configuring arm64-osx-dbg
-- Configuring arm64-osx-rel
CMake Warning at scripts/cmake/vcpkg_configure_cmake.cmake:433 (message):
The following variables are not used in CMakeLists.txt:
BUILD_GTEST
CMAKE_DEBUG_POSTFIX
Please recheck them and remove the unnecessary options from the
`vcpkg_configure_cmake` call.
If these options should still be passed for whatever reason, please use the
`MAYBE_UNUSED_VARIABLES` argument.
Call Stack (most recent call first):
ports/gtest/portfile.cmake:17 (vcpkg_configure_cmake)
scripts/ports.cmake:141 (include)
-- Building arm64-osx-dbg
-- Building arm64-osx-rel
-- Installing: /Users/billyoneal/vcpkg/packages/gtest_arm64-osx/src/gtest.cc
-- Installing: /Users/billyoneal/vcpkg/packages/gtest_arm64-osx/src/gtest_main.cc
-- Installing: /Users/billyoneal/vcpkg/packages/gtest_arm64-osx/src/gtest-all.cc
-- Installing: /Users/billyoneal/vcpkg/packages/gtest_arm64-osx/src/gtest-death-test.cc
-- Installing: /Users/billyoneal/vcpkg/packages/gtest_arm64-osx/src/gtest-filepath.cc
-- Installing: /Users/billyoneal/vcpkg/packages/gtest_arm64-osx/src/gtest-internal-inl.h
-- Installing: /Users/billyoneal/vcpkg/packages/gtest_arm64-osx/src/gtest-matchers.cc
-- Installing: /Users/billyoneal/vcpkg/packages/gtest_arm64-osx/src/gtest-port.cc
-- Installing: /Users/billyoneal/vcpkg/packages/gtest_arm64-osx/src/gtest-printers.cc
-- Installing: /Users/billyoneal/vcpkg/packages/gtest_arm64-osx/src/gtest-test-part.cc
-- Installing: /Users/billyoneal/vcpkg/packages/gtest_arm64-osx/src/gtest-typed-test.cc
-- Installing: /Users/billyoneal/vcpkg/packages/gtest_arm64-osx/share/gtest/copyright
-- Performing post-build validation
pkgconfig directories should be lib/pkgconfig or lib/debug/pkgconfig.
The following misplaced pkgconfig files were found:
/Users/billyoneal/vcpkg/packages/gtest_arm64-osx/lib/manual-link/pkgconfig/gmock_main.pc
/Users/billyoneal/vcpkg/packages/gtest_arm64-osx/lib/manual-link/pkgconfig/gtest_main.pc
/Users/billyoneal/vcpkg/packages/gtest_arm64-osx/debug/lib/manual-link/pkgconfig/gmock_main.pc
/Users/billyoneal/vcpkg/packages/gtest_arm64-osx/debug/lib/manual-link/pkgconfig/gtest_main.pc
You can move the pkgconfig files with commands similar to:
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/lib/pkgconfig" "${CURRENT_PACKAGES_DIR}/lib/debug/pkgconfig")
file(RENAME "${CURRENT_PACKAGES_DIR}/lib/manual-link/pkgconfig/gmock_main.pc" "${CURRENT_PACKAGES_DIR}/lib/pkgconfig")
file(RENAME "${CURRENT_PACKAGES_DIR}/lib/manual-link/pkgconfig/gtest_main.pc" "${CURRENT_PACKAGES_DIR}/lib/pkgconfig")
file(RENAME "${CURRENT_PACKAGES_DIR}/debug/lib/manual-link/pkgconfig/gmock_main.pc" "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig")
file(RENAME "${CURRENT_PACKAGES_DIR}/debug/lib/manual-link/pkgconfig/gtest_main.pc" "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig")
vcpkg_fixup_pkgconfig()
Found 1 error(s). Please correct the portfile:
/Users/billyoneal/vcpkg/ports/gtest/portfile.cmake
-- Performing post-build validation done
Installing package gtest[core]:arm64-osx...
Elapsed time for package gtest:arm64-osx: 7.916 s
Total elapsed time: 10.12 s
The package gtest provides CMake targets:
find_package(GTest CONFIG REQUIRED)
target_link_libraries(main PRIVATE GTest::gmock GTest::gtest GTest::gmock_main GTest::gtest_main)
billyoneal@Billys-MacBook-Pro vcpkg %
```
* Add filenames and REMOVE_RECURSE note.
* Add non x- switch to enforce post build checks, and use "problem" rather than "error".
* Improve warning text again.
* Actually make the hidden switch work :)
* Attempt to fix broken git by updating Azure Pipelines macos agents
* [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.
* Add NO_COMPILER_TRACKING triplet option
* Use 'disable_compiler_tracking'
* Handle per-port compiler tracking
* Add test for compiler tracking
Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
* Add --clean-non-downloads-after-build switch to be used by CI to reduce our disk consumption there.
* Change --clean-non-downloads-after-build to separate switches for each of the 3.
* Delete Util::MoveOnlyBase and Util::ResourceBase.
* Remove stray debug output
* Allow versioning without builtin-baseline
...only if the default registry is replaced
* Enable registries, manifests, versions by default
* Block update and upgrade in manifest mode
* Require baseline for builtin registries
* Improve status reporting for user
Co-authored-by: Robert Schumacher <ras0219@outlook.com>
* Initial implementation of pseudo-lockfiles
* Migrate e2e test collateral
* Add git registry parsing unit tests
* Increase lockfile value validation (40 hex)
* Fix MSVC Analyze
* Introduce vcpkg-lock.json e2e testing
Add redirection for the registries cache directory via X_VCPKG_REGISTRIES_CACHE
* Fix unit tests
* Handle JSON escaping in lock file test
* Rename VTPResult to VersionsTreePathResult
* Format all version-files collateral
Co-authored-by: Robert Schumacher <ras0219@outlook.com>
* [vcpkg] x-add-version now also checks if the manifest file is properly formatted
* [vcpkg] x-add-version: add option to skip the formatting check
* [e2e tests] do not check formatting in x-add-version
* don't build tls12-download unless it's needed
Nobody needs to build it except us, so there's no need to.
Additionally, on mingw, tls12-download fails to build due,
so this also fixes our build on mingw.
* robert CRs, try fix tls12-downloader on mingw
Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
* fix build issues
Co-authored-by: Robert Schumacher <roschuma@microsoft.com>