glaze icon indicating copy to clipboard operation
glaze copied to clipboard

Fix cmake plz

Open Arniiiii opened this issue 8 months ago • 2 comments

I'm a maintainer of gentoo's recipe to build glaze: https://github.com/Arniiiii/ex_repo/tree/master/dev-cpp/glaze

Could you fix some parts of cmake plz?

Here's patches: https://github.com/Arniiiii/ex_repo/tree/master/dev-cpp/glaze/files

0003_no_to_quiet_find_package.patch Just don't be quiet. Logs are great.

0004_fix_bundling_asio_and_add_tests_execution.patch I've changed from FetchContent to find_package , but that's not the main issue: the cmake for bundling asio was all over networking tests. Also some networking tests were not enabled because of absence of add_test(...)

0005_fix_erland_cmake_test_option_name.patch Just consistency with main option for erlang

0007_fix_using_installed_glaze_with_eetf-format_enabled.patch You see, if your target has dependency, it is preferable to have scripts for finding dependencies inside of i.e. glazeConfig.cmake . I've just fixed it in this way (copy pasting FindErlang.cmake inside it and enable or disable it if glaze_EETF_FORMAT was enabled during configuration), but this can be also fixed using PackageProject.cmake or some techniques from it if you don't like the solution from the patch.

Arniiiii avatar Jun 28 '25 13:06 Arniiiii

Thanks for these notes. I'm currently occupied for a few weeks, so I won't get to this immediately. But, I'll try to address this as soon as I'm able.

stephenberry avatar Jun 30 '25 14:06 stephenberry

Hi, would also appreciate if all tests deps would be declared in tests/CMakeLists.txt. As @Arniiiii said if you remove the network tests subdir it will fail to build as it can not link against glz_asio.

carlo711 avatar Oct 05 '25 20:10 carlo711