From 7cf055fcd003be0b5f51544e2c7a31e8edb46bef Mon Sep 17 00:00:00 2001 From: myk002 Date: Fri, 4 Feb 2022 13:35:06 -0800 Subject: [PATCH] avoid treating libexpat build warnings as errors this effectively overrides the CMAKE EXPAT_WARNINGS_AS_ERRORS to be treated as always OFF. since we currently add -Werror at the top-level CMakeLists.txt file, that variable was previously effectively always ON. Unless we want to be on the hook for solving libexpat build warnings, I believe this way will avoid unnecessary build breakages for users. --- depends/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/depends/CMakeLists.txt b/depends/CMakeLists.txt index f42955e7d..c72c41769 100644 --- a/depends/CMakeLists.txt +++ b/depends/CMakeLists.txt @@ -33,6 +33,9 @@ set(EXPAT_SHARED_LIBS OFF CACHE BOOL "") set(EXPAT_BUILD_DOCS OFF CACHE BOOL "") set(EXPAT_ENABLE_INSTALL OFF CACHE BOOL "") add_subdirectory(libexpat/expat) +if(UNIX) + set_target_properties(expat PROPERTIES COMPILE_FLAGS "-Wno-error") +endif() set(LIBZIP_BUILD_DOC OFF CACHE BOOL "") set(LIBZIP_BUILD_EXAMPLES OFF CACHE BOOL "")