Skip to content

Include GoogleTest in the TrinityAL tests CMakeLists - #170

Merged
ccpisheden merged 2 commits into
mainfrom
trinityal-tests-include-googletest
Dec 1, 2026
Merged

ccpisheden merged 2 commits into
mainfrom
trinityal-tests-include-googletest

Conversation

@ccpisheden

Copy link
Copy Markdown
Contributor

trinityal/tests/CMakeLists.txt calls gtest_discover_tests without including the GoogleTest module. It only worked because the shader compiler's module-mode find_package(GTest) happened to include it first, so configuring with BUILD_SHADER_COMPILER=OFF failed:

CMake Error at trinityal/tests/CMakeLists.txt:198 (gtest_discover_tests):
  Unknown CMake command "gtest_discover_tests".

This includes it explicitly, as trinity/CMakeLists.txt already does.

Tested (Windows, x64-windows-trinitydev, DX11 + DX12, BUILD_SHADER_COMPILER=OFF, BUILD_TESTING=ON):

  • Without the fix: configure fails with the error above.
  • With the fix: configure and build succeed; test discovery registers all 252 TrinityALTest_dx11 tests, and they pass (250 run, 2 disabled).

🤖 Generated with Claude Code

TrinityAL's tests call gtest_discover_tests without including the
GoogleTest module. It only worked because the shader compiler's
module-mode find_package(GTest) included it first, so configuring with
BUILD_SHADER_COMPILER=OFF failed with: Unknown CMake command
"gtest_discover_tests". Include it explicitly, as the Trinity tests
already do.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ccpisheden
ccpisheden merged commit 7630205 into main Dec 1, 2026
1 of 13 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.

2 participants