!UNVBThoJtlIiVwiDjU:nixos.org

Staging

286 Members
Staging merges | Running staging cycles: https://github.com/NixOS/nixpkgs/pulls?q=is%3Apr+is%3Aopen+head%3Astaging-next+head%3Astaging-next-25.05 | Review Reports: https://malob.github.io/nix-review-tools-reports/99 Servers

Load older messages


SenderMessageTime
15 Sep 2025
@emilazy:matrix.orgemilyno sense going back in time01:43:54
@lt1379:matrix.orgLunthere was a fallthrough for bare msgpack before which didn't add includes properly but would work on FHS01:44:06
@emilazy:matrix.orgemilyanyway, you can use CMake aliases I think01:44:06
@lt1379:matrix.orgLun* there was a fallthrough for bare msgpack before which didn't add includes properly but would work on FHS (or our magic -isystem stuff)01:44:25
@emilazy:matrix.orgemilyhttps://github.com/prusa3d/PrusaSlicer/commit/cc788ebb643b6d4048f3550235ac3e9d3697ada001:44:35
@emilazy:matrix.orgemilylike this kind of thing01:44:37
@emilazy:matrix.orgemilyor actually01:44:45
@emilazy:matrix.orgemilyhttps://cmake.org/cmake/help/latest/command/add_library.html#alias-libraries01:44:55
@emilazy:matrix.orgemilyliterally just this01:44:58
@emilazy:matrix.orgemilyso look for new thing, otherwise look for old thing and alias it to new thing. or define local alias name for it or something.01:45:23
@emilazy:matrix.orgemilybut also meh01:45:28
@emilazy:matrix.orgemily like I think it's nicer than migraphx_msgpack_target 01:45:51
@emilazy:matrix.orgemilyto at least make that a real alias target01:45:56
@lt1379:matrix.orgLunCan I name the alias msgpack or do I need to pick something unique from the three names being find_package()ed?01:50:37
@emilazy:matrix.orgemily I would either pick msgpack-cxx (and only define the alias in the fallback cases) or I would name it something that won't collide 01:57:47
@emilazy:matrix.orgemilythe latter is probably more "hygienic"01:57:50
@lt1379:matrix.orgLun

ok I think what we want is

find_package(msgpack-cxx CONFIG)
if(msgpack-cxx_FOUND)
    message(STATUS "Found msgpack-cxx (>=6.x)")
else()
    find_package(msgpackc-cxx REQUIRED NAMES msgpackc-cxx msgpack)
    message(STATUS "Found msgpackc-cxx (<=5.x)")
    add_library(msgpack-cxx ALIAS msgpackc-cxx)
endif()
target_link_libraries(migraphx PRIVATE msgpack-cxx) …
02:09:57
@emilazy:matrix.orgemily I don't think you need/want to force CONFIG 02:10:35
@emilazy:matrix.orgemily and I am not sure about NAMES there 02:11:30
@emilazy:matrix.orgemilyI think that depends on the structure of how the old versions' CMake modules work02:12:08
@emilazy:matrix.orgemilydid they maintain compatibility for the < 5.0 versions in the libraries they did fix?02:12:26
@lt1379:matrix.orgLunold structure: https://github.com/msgpack/msgpack-c/blob/6e7deb809120881634b3ca895e66b2a946084f34/msgpack-config.cmake.in 02:12:39
@lt1379:matrix.orgLunso if the comment isn't lying msgpack-config exposes a msgpackc-cxx target in 3.x02:13:11
@emilazy:matrix.orgemily I am not convinced NAMES does quite what you want there, but I don't know CMake well enough to be completely certain. 02:13:55
@emilazy:matrix.orgemilyhttps://github.com/ROCm/rocm-libraries/commit/f86b000fb88bb144fc568d91aeb9b70ea3059125 I guess it is what they are doing already though? so meh02:14:36
@emilazy:matrix.orgemilyI would just copy what they are doing. at least they can't complain about it.02:14:46
@lt1379:matrix.orgLunlol02:15:08
@emilazy:matrix.orgemilyI got everything except ROCm working at least.02:18:02
@emilazy:matrix.orgemilyCMake 4 is really just turning up all the worst crap.02:18:26
@lt1379:matrix.orgLun PRed what I have, if they want it to match rocm-libraries exactly instead of the alias they can ask/ignore me and recreate the PR 9 months later using their own approach and close mine.
the alias version you suggested seems nicer so I don't want to go back to copying exactly what the other one does.
02:22:12

Show newer messages


Back to Room ListRoom Version: 6