Skip to content

Commit de988db

Browse files
committed
WL#11226: Clear all compile warnings -- post push fixes
1 parent dc79b16 commit de988db

File tree

3 files changed

+23
-10
lines changed

3 files changed

+23
-10
lines changed

cdk/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@
2828

2929

3030

31-
CMAKE_MINIMUM_REQUIRED(VERSION 3.8)
31+
CMAKE_MINIMUM_REQUIRED(VERSION 3.15)
3232

33-
cmake_policy(VERSION 3.0)
33+
cmake_policy(VERSION 3.15)
3434

3535
if(POLICY CMP0022)
3636
cmake_policy(SET CMP0022 NEW) # consistently use INTERFACE_LINK_LIBRARIES property

common/CMakeLists.txt

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,20 +29,33 @@
2929

3030
file(GLOB HEADERS *.h)
3131

32+
#TODO: Remove -Wno-delete-non-abstract-non-virtual-dtor when bumping ABI and
33+
# adding virtual destructor for DbDoc, Value and Column_detail
34+
35+
if(CLANG)
36+
37+
set_compiler_flag(-Wno-delete-non-abstract-non-virtual-dtor)
38+
39+
# Note: GCC/clang and MSVC compilers have different rules for resolving
40+
# relative paths in #include "..." directives [1]. The clang-cl compiler
41+
# understands both conventions but gives warning when using MSVC rules. Since
42+
# headers included by this code trigger the warning we disable it here (this
43+
# is about version_info.h included from nysqlx/common_constants.h)
44+
#
45+
# [1] https://stackoverflow.com/questions/48538707/include-search-paths-from-included-header-varies-for-different-compilers
46+
47+
set_compiler_flag(-Wno-microsoft-include)
48+
49+
endif()
50+
51+
3252
add_library(common STATIC
3353
session.cc result.cc collection.cc value.cc
3454
${HEADERS}
3555
)
3656

3757
target_link_libraries(common cdk)
3858

39-
#TODO: Remove -Wno-delete-non-abstract-non-virtual-dtor when bumping ABI and
40-
# adding virtual destructor for DbDoc, Value and Column_detail
41-
if(CLANG)
42-
target_compile_options(common PRIVATE
43-
-Wno-delete-non-abstract-non-virtual-dtor
44-
)
45-
endif()
4659

4760
#
4861
# Note: generated version_info.h is placed in the build location

include/mysqlx/common_constants.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
#ifndef MYSQL_COMMON_CONSTANTS_H
3232
#define MYSQL_COMMON_CONSTANTS_H
3333

34-
#include <version_info.h>
34+
#include "version_info.h"
3535

3636
#define DEFAULT_MYSQL_PORT 3306
3737
#define DEFAULT_MYSQLX_PORT 33060

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy