Fix warnings in poco xml

This commit is contained in:
Robert Schulze 2023-02-07 17:58:15 +00:00
parent 1838c8912a
commit 64afe8be0b
No known key found for this signature in database
GPG Key ID: 26703B55FB13728A

View File

@ -1,6 +1,3 @@
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -w")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -w")
# Poco::XML (expat)
file (GLOB SRCS_EXPAT src/xml*.c)
@ -8,6 +5,17 @@ file (GLOB SRCS_EXPAT src/xml*.c)
add_library (_poco_xml_expat ${SRCS_EXPAT})
add_library (Poco::XML::Expat ALIAS _poco_xml_expat)
# TODO: remove these warning exclusions
target_compile_options (_poco_xml_expat
PRIVATE
-Wno-cast-qual
-Wno-empty-translation-unit
-Wno-extra-semi-stmt
-Wno-implicit-fallthrough
-Wno-reserved-identifier
-Wno-unused-macros
)
target_include_directories (_poco_xml_expat PUBLIC "include")
target_include_directories (_poco_xml_expat PRIVATE "../Foundation/include")
@ -17,6 +25,24 @@ file (GLOB SRCS src/*.cpp)
add_library (_poco_xml ${SRCS})
add_library (Poco::XML ALIAS _poco_xml)
target_compile_options (_poco_xml PRIVATE -Wno-old-style-cast)
# TODO: remove these warning exclusions
target_compile_options (_poco_xml
PRIVATE
-Wno-cast-qual
-Wno-deprecated-dynamic-exception-spec
-Wno-implicit-fallthrough
-Wno-missing-noreturn
-Wno-old-style-cast
-Wno-reserved-identifier
-Wno-shadow
-Wno-shorten-64-to-32
-Wno-suggest-destructor-override
-Wno-suggest-override
-Wno-tautological-type-limit-compare
-Wno-unreachable-code
-Wno-unused-macros
-Wno-unused-parameter
-Wno-zero-as-null-pointer-constant
)
target_include_directories (_poco_xml SYSTEM PUBLIC "include")
target_link_libraries (_poco_xml PUBLIC Poco::Foundation Poco::XML::Expat)