Skip to content

Conversation

@varunu28
Copy link

@varunu28 varunu28 commented Oct 30, 2025

Heads Up

Please note that this PR was created by someone who has almost no knowledge of C++ build system. So if you think something doesn't makes sense then there is a pretty good chance that you are right. I have almost no clue of the CMake build system & I am happy to learn the ropes here. Also for full transparency, I have leveraged LLM tools to understand the underlying root cause & triage this issue.

Why this change?

This change tries to address #834 .

Actual code change

The issue was happening as system headers were given a priority over the bundled third party dependencies due to usage of SYSTEM keyword. The fix removes the SYSTEM keyword from CMakeLists.txt from both googletest dependencies & also adds bundled googletest include directories with BEFORE keyword in order for CMake to include these paths in the beginning of dependency scan.

Testing

make finishes successfully
image

Also invoked test & it failed(as expected) which verifies that the test library is working as intended
Screenshot 2025-10-30 at 9 55 07 AM

Screenshot 2025-10-31 at 5 37 53 AM

@varunu28
Copy link
Author

@apavlo I have updated the check to be applied only when googletest dependency is present in the system.

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.

1 participant