Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: add build-test option #259

Closed
wants to merge 1 commit into from

Conversation

star-hengxing
Copy link

No description provided.

@lhmouse
Copy link
Owner

lhmouse commented Sep 9, 2024

There are two issues with this commit:

  1. The preferred name for this option would be enable-tests or with-tests (use plural!). The former is usually preferred.
  2. Tests should not be disabled by default. Ideally we should have build_by_default: false on tests, but it does not do what it seems to be:
    (test executable always built even when build_by_default is false mesonbuild/meson#2518)

@@ -15,3 +15,7 @@
option('enable-debug-checks',
type: 'boolean', value: false,
description: 'enable run-time assertions')

option('build-test',
type: 'boolean', value: false,
Copy link
Owner

Choose a reason for hiding this comment

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

The option should be named enable-tests, and should have a default value of true.

lhmouse added a commit that referenced this pull request Feb 10, 2025
Meson 1.7 now honors this argument, so tests should not be built unless
they are to be run.

This Closes #259.

Reference: https://mesonbuild.com/Release-notes-for-1-7-0.html#test-targets-no-longer-built-by-default
Signed-off-by: LIU Hao <[email protected]>
@lhmouse lhmouse closed this in 2fe116a Feb 10, 2025
@star-hengxing star-hengxing deleted the meson branch February 10, 2025 09:03
lhmouse added a commit that referenced this pull request Feb 12, 2025
Meson 1.7 now honors this argument, so tests should not be built unless
they are to be run.

This Closes #259.

Reference: https://mesonbuild.com/Release-notes-for-1-7-0.html#test-targets-no-longer-built-by-default
Signed-off-by: LIU Hao <[email protected]>
(cherry picked from commit 2fe116a)
Signed-off-by: LIU Hao <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants