fix: Windows build and formatting issues
Fixes two CI failures: 1. Windows Abseil header lookup - removed manual include_directories in util.cmake that were only added when gRPC was enabled. CMake target properties now handle Abseil includes automatically. 2. Code formatting violations in test/yaze_test.cc - applied clang-format 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -35,18 +35,16 @@ target_include_directories(yaze_util PUBLIC
|
||||
${PROJECT_BINARY_DIR}
|
||||
)
|
||||
|
||||
if(YAZE_ENABLE_GRPC)
|
||||
target_include_directories(yaze_util PRIVATE
|
||||
${CMAKE_BINARY_DIR}/_deps/grpc-src/third_party/abseil-cpp
|
||||
)
|
||||
endif()
|
||||
# Note: Abseil include paths are provided automatically through target_link_libraries
|
||||
# No manual include_directories needed - linking to absl::* targets provides the paths
|
||||
|
||||
target_link_libraries(yaze_util PUBLIC
|
||||
yaze_common
|
||||
)
|
||||
|
||||
# Add Abseil dependencies if gRPC is enabled
|
||||
# We link to grpc++ which transitively provides Abseil and ensures correct build order
|
||||
# Add Abseil dependencies
|
||||
# When gRPC is enabled, we link to grpc++ which transitively provides Abseil
|
||||
# When gRPC is disabled, we use the standalone Abseil from absl.cmake
|
||||
if(YAZE_ENABLE_GRPC)
|
||||
target_link_libraries(yaze_util PUBLIC
|
||||
grpc++
|
||||
@@ -55,6 +53,14 @@ if(YAZE_ENABLE_GRPC)
|
||||
absl::strings
|
||||
absl::str_format
|
||||
)
|
||||
else()
|
||||
# Link standalone Abseil targets (configured in cmake/absl.cmake)
|
||||
target_link_libraries(yaze_util PUBLIC
|
||||
absl::status
|
||||
absl::statusor
|
||||
absl::strings
|
||||
absl::str_format
|
||||
)
|
||||
endif()
|
||||
|
||||
set_target_properties(yaze_util PROPERTIES
|
||||
|
||||
Reference in New Issue
Block a user