diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2022-10-13 14:43:35 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2022-10-13 14:43:35 +0300 |
commit | 1f5615360cce22875ae2ab92386704b2ba363d8b (patch) | |
tree | 031f630e397566913335af3fae1ab0bf097b0e85 /libmysqld | |
parent | 128356b4b1cf3c8289ac1ba7e69a44d42e06e40c (diff) | |
download | mariadb-git-1f5615360cce22875ae2ab92386704b2ba363d8b.tar.gz |
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 e05ab0cfc5f52c8c240bfc02239f199081d82f61
Diffstat (limited to 'libmysqld')
-rw-r--r-- | libmysqld/CMakeLists.txt | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/libmysqld/CMakeLists.txt b/libmysqld/CMakeLists.txt index 8886d69851b..070ef3af70d 100644 --- a/libmysqld/CMakeLists.txt +++ b/libmysqld/CMakeLists.txt @@ -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 |