Skip to content

Commit 8930598

Browse files
authored
Merge pull request #122 from Altinity/customizations/21.8
Pre-release 21.8.15
2 parents 198b119 + 4c35386 commit 8930598

File tree

29 files changed

+558
-240
lines changed

29 files changed

+558
-240
lines changed

CMakeLists.txt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ if (CMAKE_GENERATOR STREQUAL "Ninja" AND NOT DISABLE_COLORED_BUILD)
150150
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fdiagnostics-color=always")
151151
endif ()
152152

153+
include (cmake/check_flags.cmake)
153154
include (cmake/add_warning.cmake)
154155

155156
if (NOT MSVC)
@@ -165,6 +166,10 @@ if (COMPILER_CLANG)
165166
endif ()
166167
endif ()
167168

169+
if (HAS_RESERVED_IDENTIFIER)
170+
add_compile_definitions (HAS_RESERVED_IDENTIFIER)
171+
endif ()
172+
168173
# If turned `ON`, assumes the user has either the system GTest library or the bundled one.
169174
option(ENABLE_TESTS "Provide unit_test_dbms target with Google.Test unit tests" ON)
170175
option(ENABLE_EXAMPLES "Build all example programs in 'examples' subdirectories" OFF)
@@ -605,9 +610,6 @@ include_directories(${ConfigIncludePath})
605610
# Add as many warnings as possible for our own code.
606611
include (cmake/warnings.cmake)
607612

608-
# Check if needed compiler flags are supported
609-
include (cmake/check_flags.cmake)
610-
611613
add_subdirectory (base)
612614
add_subdirectory (src)
613615
add_subdirectory (programs)

base/common/unit.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
#pragma once
22
#include <cstddef>
33

4+
#ifdef HAS_RESERVED_IDENTIFIER
5+
#pragma clang diagnostic ignored "-Wreserved-identifier"
6+
#endif
7+
48
constexpr size_t KiB = 1024;
59
constexpr size_t MiB = 1024 * KiB;
610
constexpr size_t GiB = 1024 * MiB;

base/common/wide_integer_impl.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111
#include <cassert>
1212
#include <limits>
1313

14+
#ifdef HAS_RESERVED_IDENTIFIER
15+
#pragma clang diagnostic ignored "-Wreserved-identifier"
16+
#endif
1417

1518
namespace wide
1619
{

cmake/check_flags.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
include (CheckCXXCompilerFlag)
22
include (CheckCCompilerFlag)
33

4+
check_cxx_compiler_flag("-Wreserved-identifier" HAS_RESERVED_IDENTIFIER)
45
check_cxx_compiler_flag("-Wsuggest-destructor-override" HAS_SUGGEST_DESTRUCTOR_OVERRIDE)
56
check_cxx_compiler_flag("-Wshadow" HAS_SHADOW)
67
check_cxx_compiler_flag("-Wsuggest-override" HAS_SUGGEST_OVERRIDE)

0 commit comments

Comments
 (0)