Skip to content

Commit

Permalink
[fix] compile errors under Fedora due to -Werror (#500)
Browse files Browse the repository at this point in the history
  • Loading branch information
silberzwiebel authored and Frenzie committed Aug 23, 2017
1 parent c89500f commit e1974cb
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
3 changes: 3 additions & 0 deletions thirdparty/djvulibre/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ assert_var_defined(CHOST)

ep_get_source_dir(SOURCE_DIR)

# fix build error due to -Werror under Fedora 26 (and potentially other systems)
set(CFLAGS "${CFLAGS} -Wno-error")

set(CFG_ENV_VAR "CC=\"${CC}\" CXX=\"${CXX}\" CFLAGS=\"${CFLAGS}\" CXXFLAGS=\"${CXXFLAGS}\" LDFLAGS=\"${LDFLAGS}\" LIBS=\"${LIBS}\"")
set(CFG_OPTS "-q --disable-desktopfiles --disable-static --enable-shared --disable-xmltools --disable-largefile --without-jpeg --without-tiff -host=\"${CHOST}\"")
set(CFG_CMD sh -c "${CFG_ENV_VAR} ${SOURCE_DIR}/configure ${CFG_OPTS}")
Expand Down
2 changes: 1 addition & 1 deletion thirdparty/turbo/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ ExternalProject_Add(
${PROJECT_NAME}
DOWNLOAD_COMMAND ${CMAKE_COMMAND} -P ${GIT_CLONE_SCRIPT_FILENAME}
BUILD_IN_SOURCE 1
# patch turbo to specify path of libssl and libcrypto
# patch turbo to specify path of libssl and libcrypto and to remove -Werror flag from turbo/deps/http_parser/Makefile
PATCH_COMMAND patch -N -p1 < ${CMAKE_CURRENT_SOURCE_DIR}/turbo.patch
# skip configure
CONFIGURE_COMMAND ""
Expand Down
14 changes: 14 additions & 0 deletions thirdparty/turbo/turbo.patch
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,17 @@ index 85cadc1..7f92575 100644
-- Still not OK...
error("Could not load " .. name .. " \
Please run makefile and ensure that installation is done correct.")
diff --git a/deps/http-parser/Makefile b/deps/http-parser/Makefile
index c8e7b8c..68f5eda 100644
--- a/deps/http-parser/Makefile
+++ b/deps/http-parser/Makefile
@@ -37,7 +37,7 @@ CPPFLAGS_DEBUG += $(CPPFLAGS_DEBUG_EXTRA)
CPPFLAGS_FAST = $(MYCPPFLAGS) -DHTTP_PARSER_STRICT=0
CPPFLAGS_FAST += $(CPPFLAGS_FAST_EXTRA)

-MYCFLAGS = -Wall -Wextra -Werror
+MYCFLAGS = -Wall -Wextra
CFLAGS_DEBUG = $(MYCFLAGS) -O0 -g $(CFLAGS_DEBUG_EXTRA)
CFLAGS_FAST = $(MYCFLAGS) -O3 $(CFLAGS_FAST_EXTRA)
CFLAGS = -O3 $(CFLAGS_FAST_EXTRA)

0 comments on commit e1974cb

Please sign in to comment.