build: Disable compilation warnings when building capnproto
Since capnproto is an externally developed, we are not concerned with
any compilation warnings it produces (i.e. we assume it works
correctly).
diff --git a/libs/EXTERNAL/CMakeLists.txt b/libs/EXTERNAL/CMakeLists.txt
index cb96998..15c5988 100644
--- a/libs/EXTERNAL/CMakeLists.txt
+++ b/libs/EXTERNAL/CMakeLists.txt
@@ -28,5 +28,11 @@
# Disable capnproto tests
set(BUILD_TESTING OFF)
+ #Since capnproto is an externally developed library/tool, we suppress all compiler warnings
+ CHECK_CXX_COMPILER_FLAG("-w" CXX_COMPILER_SUPPORTS_-w)
+ if(CXX_COMPILER_SUPPORTS_-w)
+ add_compile_options("-w")
+ endif()
+
add_subdirectory(capnproto EXCLUDE_FROM_ALL)
endif()