Skip to content
Permalink
Browse files
Silence clang 13 -Wunused-but-set-variable
WITH_EMBEDDED_SERVER compiles the SQL parsers separately.
Thanks to Vladislav Vaintroub for helping with this.

Fixes up commit e05ab0c
  • Loading branch information
dr-m committed Oct 13, 2022
1 parent 128356b commit 1f56153
Showing 1 changed file with 10 additions and 2 deletions.
@@ -29,15 +29,23 @@ ${SSL_INTERNAL_INCLUDE_DIRS}
)

SET(GEN_SOURCES
${CMAKE_BINARY_DIR}/sql/sql_yacc.hh
${CMAKE_BINARY_DIR}/sql/sql_yacc.hh
${CMAKE_BINARY_DIR}/sql/sql_yacc.cc
${CMAKE_BINARY_DIR}/sql/sql_yacc_ora.hh
${CMAKE_BINARY_DIR}/sql/sql_yacc_ora.cc
${CMAKE_BINARY_DIR}/sql/lex_hash.h
${CMAKE_BINARY_DIR}/sql/lex_hash.h
)

SET_SOURCE_FILES_PROPERTIES(${GEN_SOURCES} PROPERTIES GENERATED TRUE)

IF(CMAKE_C_COMPILER_ID MATCHES "Clang" AND
NOT CMAKE_C_COMPILER_VERSION VERSION_LESS "13.0.0")
ADD_COMPILE_FLAGS(
${CMAKE_BINARY_DIR}/sql/sql_yacc.cc
${CMAKE_BINARY_DIR}/sql/sql_yacc_ora.cc
COMPILE_FLAGS "-Wno-unused-but-set-variable")
ENDIF()

SET(SQL_EMBEDDED_SOURCES emb_qcache.cc libmysqld.c lib_sql.cc
libmysql.c ../sql-common/errmsg.c
../sql-common/client.c

0 comments on commit 1f56153

Please sign in to comment.