Add Google Test dependency using FetchContent #8
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add Google Test dependency using FetchContent
This PR fixes the build failure caused by missing Google Test dependency by integrating Google Test using CMake's FetchContent module.
Changes Made
Main CMakeLists.txt
tests/CMakeLists.txt
midi-ci-gtest: For Google Test-based tests (test_property_json_serialization.cpp, test_message_serialization.cpp, test_messenger.cpp, test_profile_manager.cpp, test_json_serialization.cpp)midi-ci-tests: For custom assert-based tests (test_main.cpp, test_midi_ci_device.cpp)Test File Updates
serialize()instead ofto_string())Verification
✅ Build Success: Project builds without "gtest/gtest.h file not found" error
✅ Google Test Integration: Tests run with Google Test framework
✅ Custom Tests: Original custom tests still work
The 6 failing Google Test cases are due to application logic issues, not Google Test integration problems. The Google Test framework is working correctly as evidenced by the proper test execution and reporting.
Technical Details
Fixes the build error:
'gtest/gtest.h' file not foundLink to Devin run: https://app.devin.ai/sessions/c501399d39364fcda3f717fee8422056
Requested by: Atsushi Eno (atsushieno@gmail.com)