Skip to content

fix: Fix Meson build for separated nanoarrow_testing target#574

Merged
paleolimbot merged 2 commits intoapache:mainfrom
paleolimbot:testing-meson-fix
Aug 5, 2024
Merged

fix: Fix Meson build for separated nanoarrow_testing target#574
paleolimbot merged 2 commits intoapache:mainfrom
paleolimbot:testing-meson-fix

Conversation

@paleolimbot
Copy link
Copy Markdown
Member

After #561 , the nanoarrow_testing library is no longer header-only and requires linking!

Copy link
Copy Markdown
Contributor

@WillAyd WillAyd left a comment

Choose a reason for hiding this comment

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

Looks great - just a few comments / questions

Comment thread meson.build Outdated
link_with: nanoarrow_lib,
include_directories: incdir,
dependencies: config['deps'],
dependencies: [nanoarrow_testing_dep, nanoarrow_dep, arrow_dep, gtest_dep, gmock_dep],
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.

Not sure if it matters too much, but nanoarrow_dep is duplicative here, since nanoarrow_testing_dep already includes that in its declare_dependency declaration

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Does it matter that nanoarrow_testing_dep doesn't list link_with: nanoarrow_lib? Or maybe that would only matter with hidden visiblity? There were some places that listed nanoarrow_ipc_dep and nanoarrow_dep, which I tried to replicate here, but I really have no idea 😬

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.

Don't think so - I believe the nanoarrow_dep it has as a dependency will take care of that. Using CMake as an analogy, I think:

nanoarrow_dep = declare_dependency(link_with: nanoarrow_lib, ...)

is akin to using the PUBLIC keyword when setting the link libraries of a target

target_link_libraries(nanoarrow PUBLIC nanoarrow_lib)

i.e. it becomes transitive for any target that references the dependency

Copy link
Copy Markdown
Contributor

@WillAyd WillAyd Aug 5, 2024

Choose a reason for hiding this comment

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

(in the CMake example, nanoarrow would probably be an INTERFACE library)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I'll update!

Comment thread meson.options
option('namespace', type: 'string',
description: 'A prefix for exported symbols')
option('device', type: 'boolean', description: 'Build device libraries', value: false)
option('testing', type: 'boolean', description: 'Build testing libraries', value: false)
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.

Is there any advantage to adding this as a new build option versus just having it tied to the existing tests option?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I think so...one could use the testing library from another project, too (in which case you probably wouldn't want to build nanoarrow's tests too).

@paleolimbot paleolimbot marked this pull request as ready for review August 5, 2024 17:56
Copy link
Copy Markdown
Contributor

@WillAyd WillAyd left a comment

Choose a reason for hiding this comment

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

nice work. you are becoming a meson expert

@paleolimbot paleolimbot merged commit 3e65f1a into apache:main Aug 5, 2024
@paleolimbot paleolimbot deleted the testing-meson-fix branch August 6, 2024 13:00
@paleolimbot paleolimbot added this to the nanoarrow 0.6.0 milestone Sep 17, 2024
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.

2 participants