From: Michael Wallner Date: Thu, 27 Feb 2020 09:52:12 +0000 (+0100) Subject: bison: fix warnings X-Git-Tag: 1.1.0-beta1~250^2~11 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=47a71801cb4e7b926321771765f35707783d2e30;p=awesomized%2Flibmemcached bison: fix warnings --- diff --git a/src/libmemcached/CMakeLists.txt b/src/libmemcached/CMakeLists.txt index e3bcfbe7..4e8e0401 100644 --- a/src/libmemcached/CMakeLists.txt +++ b/src/libmemcached/CMakeLists.txt @@ -1,10 +1,15 @@ find_package(FLEX) -find_package(BISON) +find_package(BISON 2.3) + +if(${BISON_VERSION} VERSION_GREATER_EQUAL 3.0) + set(BISON_WARNINGS -Wno-deprecated) +endif() file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/csl) bison_target(CSL_PARSER csl/parser.yy ${CMAKE_CURRENT_BINARY_DIR}/csl/parser.cc DEFINES_FILE ${CMAKE_CURRENT_BINARY_DIR}/csl/parser.h + COMPILE_FLAGS ${BISON_WARNINGS} ) flex_target(CSL_SCANNER csl/scanner.l ${CMAKE_CURRENT_BINARY_DIR}/csl/scanner.cc DEFINES_FILE ${CMAKE_CURRENT_BINARY_DIR}/csl/scanner.h diff --git a/src/libmemcached/csl/common.h b/src/libmemcached/csl/common.h index 46a950a3..85881c18 100644 --- a/src/libmemcached/csl/common.h +++ b/src/libmemcached/csl/common.h @@ -48,7 +48,7 @@ typedef void* yyscan_t; #endif #ifndef YYSTYPE -# define YYSTYPE union CONFIG_STYPE +# define YYSTYPE CONFIG_STYPE #endif #define config_tokentype int