Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change post-build checks to be warnings rather than errors. (#245)
* 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
- Loading branch information