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(CMake): support running tests with ctest #405

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

matoro
Copy link

@matoro matoro commented Jul 2, 2024

Adds the ability to run the test suite via ctest. Works with both in-source and out-of-source builds. Respects user flags, and builds SIMD into the tests corresponding to whatever was used to build the library. Does not interfere with the ability to run tests the old way.

Copy link
Collaborator

@BurningEnlightenment BurningEnlightenment left a comment

Choose a reason for hiding this comment

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

Building tests should always be optional. Please add an option BUILD_TESTING or BLAKE3_BUILD_TESTING, conditionally call enable_testing(), and conditionally build the test target.

I'll defer to @oconnor663 as to whether we want to integrate the test environment with CMake.

c/CMakeLists.txt Outdated Show resolved Hide resolved
@matoro
Copy link
Author

matoro commented Jul 4, 2024

Sure thing, both suggestions done.

@arthurzam
Copy link

ping?

It would really help as at Gentoo Linux.

Copy link
Collaborator

@BurningEnlightenment BurningEnlightenment left a comment

Choose a reason for hiding this comment

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

An option(BLAKE3_BUILD_TESTING … would be nice to have for the GUI people. However, I'm fine with this as is. Thanks for the contribution 🙏

@oconnor663 still needs to decide, whether we want this or not.

matoro added a commit to matoro/gentoo that referenced this pull request Aug 9, 2024
See: BLAKE3-team/BLAKE3#405
Bug: https://bugs.gentoo.org/935370
Signed-off-by: Matoro Mahri <matoro_gentoo@matoro.tk>
matoro added a commit to matoro/gentoo that referenced this pull request Aug 9, 2024
See: BLAKE3-team/BLAKE3#405
Bug: https://bugs.gentoo.org/935370
Signed-off-by: Matoro Mahri <matoro_gentoo@matoro.tk>
matoro added a commit to matoro/gentoo that referenced this pull request Aug 9, 2024
See: BLAKE3-team/BLAKE3#405
Bug: https://bugs.gentoo.org/935370
Signed-off-by: Matoro Mahri <matoro_gentoo@matoro.tk>
matoro added a commit to matoro/gentoo that referenced this pull request Aug 9, 2024
See: BLAKE3-team/BLAKE3#405
Bug: https://bugs.gentoo.org/935370
Signed-off-by: Matoro Mahri <matoro_gentoo@matoro.tk>
gentoo-bot pushed a commit to gentoo/gentoo that referenced this pull request Aug 9, 2024
See: BLAKE3-team/BLAKE3#405
Bug: https://bugs.gentoo.org/935370
Signed-off-by: Matoro Mahri <matoro_gentoo@matoro.tk>
Closes: #38021
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants