aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNaios <naios-dev@live.de>2017-12-19 17:22:30 +0100
committerNaios <naios-dev@live.de>2017-12-20 04:04:28 +0100
commit95a837717be55a72a1ebc9c00ce3a41bf5df76c8 (patch)
tree5637577f329c60cba01902ae1d9db3a2880c6082 /src
parent12853475186569b2f47f1d69f817cbef8e590d83 (diff)
Build: Disable warnings in protobuf projects
Diffstat (limited to 'src')
-rw-r--r--src/server/proto/CMakeLists.txt17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/server/proto/CMakeLists.txt b/src/server/proto/CMakeLists.txt
index 59d51fbbbbd..12387816457 100644
--- a/src/server/proto/CMakeLists.txt
+++ b/src/server/proto/CMakeLists.txt
@@ -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