Skip to content

Commit 5e5298a

Browse files
Try fixes
1 parent 69b6117 commit 5e5298a

2 files changed

Lines changed: 15 additions & 8 deletions

File tree

CMakeLists.txt

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ endif()
5454

5555
function(livekit_enable_strict_compile_warnings target_name)
5656
if(MSVC)
57-
target_compile_options(${target_name} PRIVATE /permissive- /Zc:__cplusplus /W4 /WX)
57+
target_compile_options(${target_name} PRIVATE /permissive- /Zc:__cplusplus /W4 /WX /wd4251)
5858
else()
5959
target_compile_options(${target_name} PRIVATE
6060
-Wall
@@ -134,12 +134,12 @@ else()
134134
message(FATAL_ERROR "No protobuf library target found (expected protobuf::libprotobuf)")
135135
endif()
136136

137-
set(LIVEKIT_EXTERNAL_SYSTEM_INCLUDE_DIRS
137+
set(LIVEKIT_PROTO_INCLUDE_DIRS
138138
"${PROTO_BINARY_DIR}"
139139
${Protobuf_INCLUDE_DIRS}
140140
)
141+
set(LIVEKIT_EXTERNAL_SYSTEM_INCLUDE_DIRS)
141142
foreach(_livekit_system_include_target
142-
protobuf::libprotobuf
143143
absl::base
144144
spdlog::spdlog
145145
spdlog)
@@ -154,10 +154,7 @@ foreach(_livekit_system_include_target
154154
endforeach()
155155
list(REMOVE_DUPLICATES LIVEKIT_EXTERNAL_SYSTEM_INCLUDE_DIRS)
156156

157-
target_include_directories(livekit_proto PRIVATE
158-
"${PROTO_BINARY_DIR}"
159-
${Protobuf_INCLUDE_DIRS}
160-
)
157+
target_include_directories(livekit_proto PRIVATE ${LIVEKIT_PROTO_INCLUDE_DIRS})
161158
target_link_libraries(livekit_proto PRIVATE ${LIVEKIT_PROTOBUF_TARGET})
162159
if(TARGET absl::base)
163160
get_target_property(_absl_inc absl::base INTERFACE_INCLUDE_DIRECTORIES)
@@ -444,6 +441,10 @@ add_library(livekit SHARED
444441
src/trace/trace_event.h
445442
src/trace/tracing.cpp
446443
)
444+
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
445+
set_source_files_properties(src/trace/event_tracer.cpp
446+
PROPERTIES COMPILE_OPTIONS "-Wno-error=type-limits")
447+
endif()
447448
# Symbol visibility: keep liblivekit's exported ABI restricted to the public
448449
# LiveKit API. By default everything is hidden unless marked by the LIVEKIT_API
449450
# macro in code
@@ -466,6 +467,10 @@ endif()
466467

467468
target_sources(livekit PRIVATE $<TARGET_OBJECTS:livekit_proto>)
468469

470+
target_include_directories(livekit
471+
BEFORE PRIVATE
472+
${LIVEKIT_PROTO_INCLUDE_DIRS}
473+
)
469474
target_include_directories(livekit
470475
PUBLIC
471476
$<BUILD_INTERFACE:${LIVEKIT_ROOT_DIR}/include>

scripts/clang-tidy.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,9 @@ fi
206206
# SDK and we forward it to every clang-tidy invocation via --extra-arg. Linux
207207
# CI doesn't need this -- the system clang-tidy already finds libstdc++/libc++
208208
# through its built-in resource dir.
209-
extra_args=()
209+
# Match the Clang build's variadic macro diagnostic suppression when clang-tidy
210+
# is driven from GCC compile commands in Linux CI.
211+
extra_args=(-extra-arg=-Wno-gnu-zero-variadic-macro-arguments)
210212
if [[ "$(uname)" == "Darwin" ]]; then
211213
sdk_path="$(xcrun --show-sdk-path 2>/dev/null || true)"
212214
if [[ -n "${sdk_path}" ]]; then

0 commit comments

Comments
 (0)