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

Update cmakelists to use system googletest if available. #1035

Merged
merged 1 commit into from
Oct 22, 2023

Conversation

LocutusOfBorg
Copy link
Contributor

There is no need to use the embedded gtest code copy in Linux systems, if they already provide the googletest framework system-wide.
Search for it, and fallback to the embedded one if the system one is not detected.

This patch has been also contributed by Simon Quigley tsimonq2@debian.org

test/CMakeLists.txt Outdated Show resolved Hide resolved
@jbeder
Copy link
Owner

jbeder commented Sep 17, 2023

Can you add a variant of the Github action that installs GTest first so you can make sure that codepath works?

Repository owner deleted a comment Sep 17, 2023
Repository owner deleted a comment Sep 17, 2023
Repository owner deleted a comment Sep 17, 2023
Repository owner deleted a comment Sep 17, 2023
@LocutusOfBorg
Copy link
Contributor Author

@jbeder sorry but I fail to find how to install googletest-dev...
For me it would be something like

apt install googletest libgmock-dev libgtest-dev

@jbeder
Copy link
Owner

jbeder commented Sep 25, 2023

@jbeder sorry but I fail to find how to install googletest-dev... For me it would be something like

apt install googletest libgmock-dev libgtest-dev

What does this comment mean?

@LocutusOfBorg
Copy link
Contributor Author

@jbeder sorry but I fail to find how to install googletest-dev... For me it would be something like

apt install googletest libgmock-dev libgtest-dev

What does this comment mean?

This means, that I'm not able to parse the travis/github actions yml file...
With this PR, if the container installs the 3 above packages, automatically that system package will be built and used.
So, my idea is to have the installation of the 3 packages in a matrix row, right?

@LocutusOfBorg
Copy link
Contributor Author

is it ok now?

test/CMakeLists.txt Outdated Show resolved Hide resolved
.github/workflows/build.yml Show resolved Hide resolved
test/CMakeLists.txt Outdated Show resolved Hide resolved
There is no need to use the embedded gtest code copy in Linux systems, if they already provide the googletest framework system-wide.
Search for it, and fallback to the embedded one if the system one is not detected.

This patch has been also contributed by Simon Quigley <tsimonq2@debian.org>
@jbeder jbeder merged commit 145eec5 into jbeder:master Oct 22, 2023
33 checks passed
@LocutusOfBorg LocutusOfBorg deleted the patch-1 branch October 23, 2023 07:02
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