LuciferYang opened a new pull request, #836: URL: https://github.com/apache/iceberg-cpp/pull/836
## What Fixes #829. The GoogleTest and Google Benchmark FetchContent setup lived in `src/iceberg/test/CMakeLists.txt` and `src/iceberg/benchmark/CMakeLists.txt`, apart from the other third-party dependencies. This follows the review discussion on #825, which suggested keeping dependency resolution in one place. ## How - Add `resolve_gtest_dependency()` and `resolve_benchmark_dependency()` to `cmake_modules/IcebergThirdpartyToolchain.cmake`, next to the existing `resolve_*` functions. - Gate them on `ICEBERG_BUILD_TESTS` and `ICEBERG_BUILD_BENCHMARKS`, the same conditions that already guard the test and benchmark subdirectories. - Both functions call `prepare_fetchcontent()` like the other resolvers, so a command-line `-DCMAKE_COMPILE_WARNING_AS_ERROR=ON` does not build the vendored GTest/Benchmark sources with `-Werror`. - Version pins are unchanged. Only CMake is affected; Meson resolves these through `subprojects/*.wrap`, so it needs no change. ## Verified - `-DICEBERG_BUILD_BENCHMARKS=ON`: both dependencies fetch; `benchmark_smoke` and `schema_test` build; `ctest -R schema_test` passes. - Tests and benchmarks both off: neither dependency is fetched. - `-DCMAKE_COMPILE_WARNING_AS_ERROR=ON` with benchmarks on: configure and build succeed. - `pre-commit run -a` clean. --- This contribution was authored with assistance from Claude Opus 4.8, in line with the Iceberg guidelines for AI-assisted contributions (https://iceberg.apache.org/contribute/#guidelines-for-ai-assisted-contributions). All changes were reviewed and tested by the author. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
