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

Switch GTest to use FetchContent rather than a submodule. #43

Merged
merged 2 commits into from
Oct 16, 2024
Merged

Conversation

zrax
Copy link
Owner

@zrax zrax commented Oct 15, 2024

This way, we avoid having to keep a copy of all the gtest code in the repo, but still avoid needing to deal with submodules.

Fixes #40
Supersedes #41

Copy link
Contributor

@dpogue dpogue left a comment

Choose a reason for hiding this comment

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

This approach seems like the best of all options :)

include(FetchContent)
FetchContent_Declare(gtest
GIT_REPOSITORY https://github.com/google/googletest.git
GIT_TAG v1.15.2
Copy link
Contributor

Choose a reason for hiding this comment

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

I seem to recall 1.14.x caused issues with one of the older compilers we were trying to support, which is why we were previously locked on 1.13.0.

Happy to use the latest, but just want to confirm that you're intentionally bumping the version up.

Copy link
Owner Author

Choose a reason for hiding this comment

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

The submodule was actually on 1.12.1, which is the last version to support C++11 (newer versions require C++14). I guess this technically means we'd be dropping support for C++11 for testing, but I think I'm fine with that.

@zrax zrax merged commit 1aa4576 into master Oct 16, 2024
18 checks passed
@zrax zrax deleted the fetch_gtest branch October 16, 2024 15:25
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.

Release tarballs fail to build due to missing gtest submodule
2 participants