Skip to content

Commit 3f1a256

Browse files
committed
MDEV-31890: Remove COMPILE_FLAGS
The cmake configuration step is single-threaded and already consuming too much time. We should not make it worse by adding invocations like MY_CHECK_CXX_COMPILER_FLAG(). Let us prefer something that works on any supported version of GCC (4.8.5 or later) or clang, as well as recent versions of the Intel C compiler. This replaces commit 1fde785
1 parent 702dc2e commit 3f1a256

File tree

5 files changed

+20
-26
lines changed

5 files changed

+20
-26
lines changed

storage/innobase/CMakeLists.txt

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -359,12 +359,6 @@ IF(MSVC)
359359
TARGET_COMPILE_OPTIONS(innobase PRIVATE "/wd4065")
360360
ENDIF()
361361

362-
MY_CHECK_CXX_COMPILER_FLAG(-Wno-unused-but-set-variable)
363-
IF(have_CXX__Wno_unused_but_set_variable)
364-
ADD_COMPILE_FLAGS(pars/pars0grm.cc fts/fts0pars.cc
365-
COMPILE_FLAGS "-Wno-unused-but-set-variable")
366-
ENDIF()
367-
368362
IF(NOT (PLUGIN_INNOBASE STREQUAL DYNAMIC))
369363
ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/extra/mariabackup ${CMAKE_BINARY_DIR}/extra/mariabackup)
370364
ENDIF()

storage/innobase/fts/fts0pars.cc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,15 +83,15 @@
8383
#include "fts0tlex.h"
8484
#include "fts0pars.h"
8585
#include <my_sys.h>
86-
8786
extern int fts_lexer(YYSTYPE*, fts_lexer_t*);
8887
extern int fts_blexer(YYSTYPE*, yyscan_t);
8988
extern int fts_tlexer(YYSTYPE*, yyscan_t);
90-
91-
92-
89+
#ifdef __GNUC__
90+
# pragma GCC diagnostic ignored "-Wpragmas"
91+
# pragma GCC diagnostic ignored "-Wunknown-warning-option"
92+
# pragma GCC diagnostic ignored "-Wunused-but-set-variable"
93+
#endif
9394
extern int ftserror(const char* p);
94-
9595
/* Required for reentrant parser */
9696
#define ftslex fts_lexer
9797

storage/innobase/fts/fts0pars.y

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,15 @@ this program; if not, write to the Free Software Foundation, Inc.,
3131
#include "fts0tlex.h"
3232
#include "fts0pars.h"
3333
#include <my_sys.h>
34-
3534
extern int fts_lexer(YYSTYPE*, fts_lexer_t*);
3635
extern int fts_blexer(YYSTYPE*, yyscan_t);
3736
extern int fts_tlexer(YYSTYPE*, yyscan_t);
38-
39-
40-
37+
#ifdef __GNUC__
38+
# pragma GCC diagnostic ignored "-Wpragmas"
39+
# pragma GCC diagnostic ignored "-Wunknown-warning-option"
40+
# pragma GCC diagnostic ignored "-Wunused-but-set-variable"
41+
#endif
4142
extern int ftserror(const char* p);
42-
4343
/* Required for reentrant parser */
4444
#define ftslex fts_lexer
4545

storage/innobase/pars/pars0grm.cc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,13 +78,13 @@ que_node_t */
7878
#include "que0types.h"
7979
#include "que0que.h"
8080
#include "row0sel.h"
81-
82-
#if defined __GNUC__ && (!defined __clang_major__ || __clang_major__ > 11)
83-
#pragma GCC diagnostic ignored "-Wfree-nonheap-object"
81+
#ifdef __GNUC__
82+
# pragma GCC diagnostic ignored "-Wpragmas"
83+
# pragma GCC diagnostic ignored "-Wunknown-warning-option"
84+
# pragma GCC diagnostic ignored "-Wfree-nonheap-object"
85+
# pragma GCC diagnostic ignored "-Wunused-but-set-variable"
8486
#endif
85-
8687
#define YYSTYPE que_node_t*
87-
8888
/* #define __STDC__ */
8989
int
9090
yylex(void);

storage/innobase/pars/pars0grm.y

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,13 @@ que_node_t */
3737
#include "que0types.h"
3838
#include "que0que.h"
3939
#include "row0sel.h"
40-
41-
#if defined __GNUC__ && (!defined __clang_major__ || __clang_major__ > 11)
42-
#pragma GCC diagnostic ignored "-Wfree-nonheap-object"
40+
#ifdef __GNUC__
41+
# pragma GCC diagnostic ignored "-Wpragmas"
42+
# pragma GCC diagnostic ignored "-Wunknown-warning-option"
43+
# pragma GCC diagnostic ignored "-Wfree-nonheap-object"
44+
# pragma GCC diagnostic ignored "-Wunused-but-set-variable"
4345
#endif
44-
4546
#define YYSTYPE que_node_t*
46-
4747
/* #define __STDC__ */
4848
int
4949
yylex(void);

0 commit comments

Comments
 (0)