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

Test: Support system GTest, and give warning if no submodule #13662

Merged
merged 1 commit into from
Jun 3, 2024

Conversation

chennes
Copy link
Member

@chennes chennes commented Apr 26, 2024

This adds code similar to that for GSL, that checks for the existence of the GTest submodule, and if it doesn't find it tries to find a system-installed version before printing an error about needing a submodule update. Still needs testing on Linux with GTest installed on the system.

@chennes
Copy link
Member Author

chennes commented Apr 28, 2024

I could use a Linux user with GTest installed on their system to test deleting the tests/lib subdirectory (which is the GTest submodule installation) and let me know if the test compilation proceeds correctly.

@yorikvanhavre yorikvanhavre self-requested a review May 6, 2024 15:46
@yorikvanhavre yorikvanhavre self-assigned this May 6, 2024
@yorikvanhavre
Copy link
Member

Tested and got this at cmake .:

-- Found GTest: /lib/x86_64-linux-gnu/cmake/GTest/GTestConfig.cmake (found version "1.14.0")
-- Found Google Test: version 1.14.0
CMake Error at tests/CMakeLists.txt:121 (add_subdirectory):
  add_subdirectory given source "lib" which is not an existing directory.

@yorikvanhavre yorikvanhavre removed their request for review May 7, 2024 10:05
@chennes chennes marked this pull request as draft May 7, 2024 12:50
@chennes chennes force-pushed the gitSubmoduleMissingWarning branch from c454dc8 to 87049b6 Compare May 8, 2024 17:17
@chennes chennes marked this pull request as ready for review May 12, 2024 19:49
@sliptonic
Copy link
Member

I'll try to review as well

@sliptonic
Copy link
Member

I deleted the tests/lib directory.
Ran cmake and got the typical error about the submodule not found.
Ran git submodule update --init
Ran cmake and make.
Everything worked as expected.

@sliptonic sliptonic merged commit 11fa271 into FreeCAD:main Jun 3, 2024
9 checks passed
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.

None yet

3 participants