From 47a71801cb4e7b926321771765f35707783d2e30 Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Thu, 27 Feb 2020 10:52:12 +0100 Subject: [PATCH] bison: fix warnings --- src/libmemcached/CMakeLists.txt | 7 ++++++- src/libmemcached/csl/common.h | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) 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 -- 2.30.2