Skip to content

Commit

Permalink
Extend Common Compile Settings to Protobuf (#123)
Browse files Browse the repository at this point in the history
Extend Common Compile Settings to Protobuf
  • Loading branch information
fpetrini15 authored Jul 11, 2024
1 parent 4be655b commit e827f28
Showing 1 changed file with 12 additions and 15 deletions.
27 changes: 12 additions & 15 deletions protobuf/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,10 @@ if(${TRITON_COMMON_ENABLE_PROTOBUF})
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>
)

target_compile_options(
proto-library PRIVATE
$<$<OR:$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:AppleClang>,$<CXX_COMPILER_ID:GNU>>:
-Wall -Wextra -Wno-unused-parameter -Werror>
$<$<CXX_COMPILER_ID:MSVC>:/W0 /D_WIN32_WINNT=0x0A00 /EHsc /Zc:preprocessor>
target_link_libraries(
proto-library
PRIVATE
common-compile-settings
)

set_target_properties(
Expand Down Expand Up @@ -136,11 +135,10 @@ if(${TRITON_COMMON_ENABLE_GRPC})
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>
)

target_compile_options(
grpc-service-library PRIVATE
$<$<OR:$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:AppleClang>,$<CXX_COMPILER_ID:GNU>>:
-Wall -Wextra -Wno-unused-parameter -Werror>
$<$<CXX_COMPILER_ID:MSVC>:/W0 /D_WIN32_WINNT=0x0A00 /EHsc /Zc:preprocessor>
target_link_libraries(
grpc-service-library
PRIVATE
common-compile-settings
)

set_target_properties(
Expand Down Expand Up @@ -193,11 +191,10 @@ if(${TRITON_COMMON_ENABLE_GRPC})
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>
)

target_compile_options(
grpc-health-library PRIVATE
$<$<OR:$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:AppleClang>,$<CXX_COMPILER_ID:GNU>>:
-Wall -Wextra -Wno-unused-parameter -Werror>
$<$<CXX_COMPILER_ID:MSVC>:/W0 /D_WIN32_WINNT=0x0A00 /EHsc /Zc:preprocessor>
target_link_libraries(
grpc-health-library
PRIVATE
common-compile-settings
)

set_target_properties(
Expand Down

0 comments on commit e827f28

Please sign in to comment.