Skip to content

Remove redundant GTest::gtest from test link libraries#341

Merged
ednolan merged 1 commit intobemanproject:mainfrom
camio:fix-duplicate-gtest-link
Apr 2, 2026
Merged

Remove redundant GTest::gtest from test link libraries#341
ednolan merged 1 commit intobemanproject:mainfrom
camio:fix-duplicate-gtest-link

Conversation

@camio
Copy link
Copy Markdown
Member

@camio camio commented Apr 2, 2026

Summary

  • Remove GTest::gtest from target_link_libraries, keeping only GTest::gtest_main
  • Applied to both tests/ and cookiecutter/ CMakeLists.txt files

GTest::gtest_main is an alternative to GTest::gtest, not an addition. Linking both causes duplicate library warnings and linker errors on some platforms.

Fixes #292. Carries forward the agreed-upon portion of #294 (the BUILD_GMOCK changes from that PR were intentionally excluded per review feedback).

Test plan

  • cmake --workflow --preset appleclang-debug passes (configure, build, all 4 tests)
  • CI passes

🤖 Generated with Claude Code

GTest::gtest_main is an alternative to GTest::gtest, not an addition.
Linking both causes duplicate library warnings and linker errors on
some platforms.

Fixes bemanproject#292

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@ednolan ednolan merged commit d61b0cc into bemanproject:main Apr 2, 2026
99 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.

ld: warning: ignoring duplicate libraries: 'lib/libgtest.a'

2 participants