Skip to content

[logme] New port#49397

Merged
BillyONeal merged 21 commits into
microsoft:masterfrom
efmsoft:add-logme
Feb 10, 2026
Merged

[logme] New port#49397
BillyONeal merged 21 commits into
microsoft:masterfrom
efmsoft:add-logme

Conversation

@efmsoft
Copy link
Copy Markdown
Contributor

@efmsoft efmsoft commented Jan 13, 2026

This PR adds a new port for logme, a cross-platform C/C++ logging framework.

Port details

Notes

  • Windows shared builds correctly handle runtime DLL dependencies.
  • GoogleTest-based test discovery works reliably when tests are enabled.
  • No API changes; this is a packaging-only addition.

New port checklist

  • Changes comply with the maintainer guide.
  • The name of the port matches the upstream project name.
  • Optional dependencies are resolved in exactly one way.
  • The versioning scheme in vcpkg.json matches upstream.
  • The license declaration in vcpkg.json matches upstream.
  • The installed copyright file matches upstream.
  • The source code comes from an authoritative upstream source.
  • The generated usage text is accurate.
  • The version database was updated using vcpkg x-add-version.
  • Only one version is present in the new port's versions file.
  • Only one version was added to each modified versions file.

@efmsoft
Copy link
Copy Markdown
Contributor Author

efmsoft commented Jan 13, 2026

@microsoft-github-policy-service agree

Copy link
Copy Markdown
Member

@vicroms vicroms left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like CI is failing due to tests executables being invoked in non-native triplets, if there's no option to avoid running them then we should patch out the library's buildsystem.

CMake Error at /vcpkg/downloads/tools/cmake-3.31.10-linux/cmake-3.31.10-linux-x86_64/share/cmake-3.31/Modules/GoogleTestAddTests.cmake:132 (message):
  Error running test executable.

    Path: '/mnt/vcpkg-ci/b/logme/arm-neon-android-dbg/LevelFilter'
    Working directory: '/mnt/vcpkg-ci/b/logme/out/Tests/LevelFilter'
    Result: 2
    Output:

Comment thread ports/logme/portfile.cmake Outdated
@vicroms vicroms marked this pull request as draft January 14, 2026 09:06
@efmsoft efmsoft marked this pull request as ready for review January 14, 2026 10:34
Comment thread ports/logme/disable-gtest-discovery-cross.patch Outdated
@vicroms vicroms marked this pull request as draft January 14, 2026 22:53
@efmsoft efmsoft marked this pull request as ready for review January 16, 2026 14:54
@vicroms vicroms closed this Jan 16, 2026
@vicroms vicroms reopened this Jan 16, 2026
@vicroms vicroms marked this pull request as draft January 16, 2026 20:21
@efmsoft efmsoft requested a review from vicroms February 3, 2026 09:11
@efmsoft efmsoft marked this pull request as ready for review February 3, 2026 09:11
Copy link
Copy Markdown
Member

@BillyONeal BillyONeal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is mostly right but I have a few nitpicks.

  1. In general when the automatically generated usage is correct we don't supply extra usage to make different ports more uniform, and the automatic one works OK here.
  2. The version database is damaged; there should only be one version here.

I have submitted fixes for these as efmsoft#1

  1. The CMakeLists.txt here improperly reaches into "parent" directories which is likely to have debug and release builds "race" with each other. The "../" probably needs to be patched out of the add_subdirectory calls (for example https://github.com/efmsoft/logme/blob/82665205859db9b6a8246abb65cfa07e2adb805a/CMakeLists.txt#L100 ).

(vcpkg runs debug and release concurrently and expects that to be safe because we build them into different directories, but this ../ is 'escaping' that)

@BillyONeal BillyONeal marked this pull request as draft February 3, 2026 23:11
@efmsoft
Copy link
Copy Markdown
Contributor Author

efmsoft commented Feb 4, 2026

Removed manual usage, fixed versions db, and updated logme to v2.4.4 with the CMake add_subdirectory() binary-dir escaping fix.

@efmsoft efmsoft marked this pull request as ready for review February 4, 2026 06:30
@BillyONeal BillyONeal changed the title Add logme port [logme] New port Feb 5, 2026
BillyONeal
BillyONeal previously approved these changes Feb 5, 2026
Copy link
Copy Markdown
Member

@BillyONeal BillyONeal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@BillyONeal BillyONeal enabled auto-merge (squash) February 5, 2026 01:10
Copy link
Copy Markdown
Contributor

@dg0yt dg0yt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would probably completely omit the examples feature, for a simpler portfile.

Comment thread ports/logme/portfile.cmake Outdated
Comment on lines +50 to +52
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
endif()
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess what is really needed is vcpkg_copy_tools.

Comment thread ports/logme/portfile.cmake Outdated
Comment on lines +43 to +46
vcpkg_cmake_config_fixup(
PACKAGE_NAME logme
CONFIG_PATH lib/cmake/logme
)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
vcpkg_cmake_config_fixup(
PACKAGE_NAME logme
CONFIG_PATH lib/cmake/logme
)
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/logme)

Comment thread ports/logme/portfile.cmake Outdated
Comment on lines +15 to +21

if(VCPKG_TARGET_IS_UWP)
list(APPEND FEATURE_OPTIONS
-DLOGME_BUILD_EXAMPLES=OFF
-DLOGME_BUILD_TOOLS=OFF
)
endif()
Copy link
Copy Markdown
Contributor

@dg0yt dg0yt Feb 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if(VCPKG_TARGET_IS_UWP)
list(APPEND FEATURE_OPTIONS
-DLOGME_BUILD_EXAMPLES=OFF
-DLOGME_BUILD_TOOLS=OFF
)
endif()

Handled by supports in the manifest.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All suggested changes are now applied (examples removed, tools handled via vcpkg_copy_tools, config fixup simplified). Could you please re-review? Thanks!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We removed the tools feature entirely. The CLI utility is not required for the library package, and attempting to package it caused repeated issues with vcpkg_copy_tools and feature testing (especially on single-config triplets). To avoid fragile install logic and CI failures, we decided to ship only the library.

auto-merge was automatically disabled February 5, 2026 11:12

Head branch was pushed to by a user without write access

@efmsoft efmsoft closed this Feb 5, 2026
@efmsoft efmsoft reopened this Feb 5, 2026
@efmsoft
Copy link
Copy Markdown
Contributor Author

efmsoft commented Feb 5, 2026

Applied the suggestions: removed the examples feature, switched tool handling to vcpkg_copy_tools (logmectl), and simplified vcpkg_cmake_config_fixup to CONFIG_PATH only.
Note: upstream doesn’t install logmectl, so the port installs the built exe from buildtrees before calling vcpkg_copy_tools.

@efmsoft efmsoft closed this Feb 5, 2026
@efmsoft efmsoft reopened this Feb 5, 2026
Comment thread ports/logme/portfile.cmake Outdated
Comment thread ports/logme/vcpkg.json Outdated
Comment thread versions/baseline.json Outdated
Comment thread versions/l-/logme.json
@vicroms vicroms marked this pull request as draft February 5, 2026 19:28
efmsoft and others added 4 commits February 6, 2026 10:57
Co-authored-by: Victor Romero <romerosanchezv@gmail.com>
Co-authored-by: Victor Romero <romerosanchezv@gmail.com>
Co-authored-by: Victor Romero <romerosanchezv@gmail.com>
@efmsoft
Copy link
Copy Markdown
Contributor Author

efmsoft commented Feb 6, 2026

Regenerated versions DB with x-add-version; pushed.

@efmsoft efmsoft marked this pull request as ready for review February 6, 2026 08:14
@efmsoft efmsoft requested a review from vicroms February 6, 2026 08:48
@BillyONeal
Copy link
Copy Markdown
Member

@microsoft-github-policy-service rerun

@BillyONeal
Copy link
Copy Markdown
Member

Thank you!

@BillyONeal BillyONeal merged commit 1d73873 into microsoft:master Feb 10, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants