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

Unit testing best practices, fix gtest linkage #488

Merged
merged 2 commits into from
Feb 23, 2024

Conversation

hikinggrass
Copy link
Contributor

Describe your changes

Use conditional gtest source dependency and fix linkage of gtest

Issue ticket number and link

Checklist before requesting a review

  • I have performed a self-review of my code
  • I have made corresponding changes to the documentation
  • I read the contribution documentation and made sure that my changes meet its requirements

This follows the established best practices from everest.github.io

Signed-off-by: Kai-Uwe Hermann <[email protected]>
@@ -11,11 +11,16 @@ find_package(everest-cmake 0.1 REQUIRED
)

# options
option(BUILD_TESTING "Run unit tests" OFF)
option(${PROJECT_NAME}_BUILD_TESTING "Build unit tests, used if included as dependency" OFF)
Copy link
Contributor

Choose a reason for hiding this comment

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

I am not so sure what the idea is behind the 2 types of BUILD_TESTING flags but LIBOCPP_BUILD_TESTING seems to work for me 👍

@hikinggrass hikinggrass merged commit 2ae29ec into main Feb 23, 2024
4 checks passed
@hikinggrass hikinggrass deleted the feature/unit-testing-best-practices branch February 23, 2024 11:08
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.

3 participants