diff --git a/cmake/rapidjson/CMakeLists.txt b/cmake/rapidjson/CMakeLists.txt index dddeaf8f76..228606da16 100644 --- a/cmake/rapidjson/CMakeLists.txt +++ b/cmake/rapidjson/CMakeLists.txt @@ -2,4 +2,4 @@ # SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-swift-pilot-client-1 add_library(externals_rapidjson INTERFACE) -target_include_directories(externals_rapidjson INTERFACE ${PROJECT_SOURCE_DIR}/externals/common/include) +target_include_directories(externals_rapidjson SYSTEM INTERFACE ${PROJECT_SOURCE_DIR}/externals/common/include) diff --git a/src/xswiftbus/CMakeLists.txt b/src/xswiftbus/CMakeLists.txt index ba4c5b9e83..f3f581eff5 100644 --- a/src/xswiftbus/CMakeLists.txt +++ b/src/xswiftbus/CMakeLists.txt @@ -135,6 +135,12 @@ if(MSVC) target_compile_definitions(xswiftbus PRIVATE _CRT_SECURE_NO_WARNINGS) endif() +if(${CMAKE_CXX_COMPILER_ID} STREQUAL GNU) + add_compile_options(-Wno-missing-field-initializers -Wno-stringop-truncation) +elseif(${CMAKE_CXX_COMPILER_ID} MATCHES ".*Clang") + add_compile_options(-Wno-missing-field-initializers) +endif() + if(UNIX AND NOT APPLE) target_compile_definitions(xswiftbus PUBLIC LIN=1) elseif(WIN32)