mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Build: Disable warnings in protobuf projects
This commit is contained in:
@@ -49,7 +49,6 @@ if (MSVC)
|
||||
${protobuf_STAT_SRCS}
|
||||
src/google/protobuf/stubs/atomicops_internals_x86_msvc.cc
|
||||
)
|
||||
add_compile_options(/wd4800)
|
||||
else()
|
||||
set(protobuf_STAT_SRCS
|
||||
${protobuf_STAT_SRCS}
|
||||
@@ -68,6 +67,7 @@ target_include_directories(protobuf
|
||||
target_link_libraries(protobuf
|
||||
PRIVATE
|
||||
trinity-default-interface
|
||||
trinity-no-warning-interface
|
||||
PUBLIC
|
||||
threads)
|
||||
|
||||
@@ -80,6 +80,16 @@ if (BUILD_SHARED_LIBS)
|
||||
-DPROTOBUF_USE_DLLS)
|
||||
endif()
|
||||
|
||||
if (MSVC)
|
||||
target_compile_options(protobuf
|
||||
PRIVATE
|
||||
/wd4996)
|
||||
|
||||
target_compile_definitions(protobuf
|
||||
PRIVATE
|
||||
-D_SCL_SECURE_NO_WARNINGS)
|
||||
endif()
|
||||
|
||||
set_target_properties(protobuf
|
||||
PROPERTIES
|
||||
FOLDER
|
||||
|
||||
@@ -8,14 +8,6 @@
|
||||
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
||||
string(REGEX REPLACE "/W[0-4]" "/W0" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
|
||||
string(REGEX REPLACE "/W[0-4]" "/W0" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
|
||||
else()
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -w")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -w")
|
||||
endif()
|
||||
|
||||
CollectSourceFiles(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
PRIVATE_SOURCES
|
||||
@@ -47,10 +39,19 @@ target_include_directories(proto
|
||||
${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
target_link_libraries(proto
|
||||
PRIVATE
|
||||
trinity-default-interface
|
||||
trinity-no-warning-interface
|
||||
PUBLIC
|
||||
common
|
||||
protobuf)
|
||||
|
||||
if (MSVC)
|
||||
target_compile_definitions(protobuf
|
||||
PRIVATE
|
||||
-D_SCL_SECURE_NO_WARNINGS)
|
||||
endif()
|
||||
|
||||
set_target_properties(proto
|
||||
PROPERTIES
|
||||
FOLDER
|
||||
|
||||
Reference in New Issue
Block a user