Skip to content

Commit 522e930

Browse files
Georgios PsaropoulosTor Didriksen
Georgios Psaropoulos
authored and
Tor Didriksen
committed
Bug#36730025 Update rapidjson library [noclose,RAPIDJSON_HAS_STDSTRING]
Define RAPIDJSON_HAS_STDSTRING=1 for the rapidjson interface target. Remove explicit definitions before including rapidjson headers. Change-Id: I60aa0ea60e246d4f3638e5c05dec92602f1f74c4 (cherry picked from commit 9ad50ced4d2fdb6a8f5ebb3e28bf8b3ef0994824)
1 parent f19d7e8 commit 522e930

File tree

15 files changed

+4
-28
lines changed

15 files changed

+4
-28
lines changed

cmake/rapidjson.cmake

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,8 @@ MACRO (MYSQL_CHECK_RAPIDJSON)
125125
TARGET_COMPILE_DEFINITIONS(rapidjson INTERFACE
126126
RAPIDJSON_NO_SIZETYPEDEFINE
127127
RAPIDJSON_SCHEMA_USE_INTERNALREGEX=0
128-
RAPIDJSON_SCHEMA_USE_STDREGEX=1)
128+
RAPIDJSON_SCHEMA_USE_STDREGEX=1
129+
RAPIDJSON_HAS_STDSTRING=1)
129130

130131
IF(WITH_RAPIDJSON STREQUAL "bundled")
131132
TARGET_INCLUDE_DIRECTORIES(rapidjson SYSTEM BEFORE INTERFACE

components/keyrings/common/config/config_reader.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@
2626

2727
#include <string>
2828

29-
#define RAPIDJSON_HAS_STDSTRING 1
30-
3129
#include "my_rapidjson_size_t.h"
3230

3331
#include <rapidjson/document.h>

components/keyrings/common/json_data/json_reader.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@
2828
#include <string>
2929
#include <vector>
3030

31-
#define RAPIDJSON_HAS_STDSTRING 1
32-
3331
#include "my_rapidjson_size_t.h"
3432

3533
#include <rapidjson/document.h>

components/keyrings/common/json_data/json_writer.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@
2626

2727
#include <string>
2828

29-
#define RAPIDJSON_HAS_STDSTRING 1
30-
3129
#include "my_rapidjson_size_t.h"
3230

3331
#include <rapidjson/document.h>

components/keyrings/keyring_file/config/config.cc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@
2323

2424
#include <memory>
2525

26-
#define RAPIDJSON_HAS_STDSTRING 1
27-
2826
#include "my_rapidjson_size_t.h"
2927

3028
#include <rapidjson/document.h>

router/src/metadata_cache/src/router_cs_options.cc

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,6 @@
2323
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
2424
*/
2525

26-
// enable using Rapidjson library with std::string
27-
#define RAPIDJSON_HAS_STDSTRING 1
28-
2926
#include "router_cs_options.h"
3027

3128
#include <rapidjson/writer.h>

router/src/mock_server/src/mock_server_rest_client.cc

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,6 @@
2323
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
2424
*/
2525

26-
// enable using Rapidjson library with std::string
27-
#define RAPIDJSON_HAS_STDSTRING 1
28-
2926
#include "my_rapidjson_size_t.h"
3027

3128
#include "mysqlrouter/mock_server_rest_client.h"

router/src/router/src/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,5 +156,5 @@ MYSQL_ADD_EXECUTABLE(mysqlrouter_keyring
156156
keyring_cli.cc
157157
keyring_frontend.cc
158158
COMPONENT Router
159-
LINK_LIBRARIES router_lib
159+
LINK_LIBRARIES router_lib extra::rapidjson
160160
)

router/src/routing/tests/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ FOREACH(test_file ${test_files})
5858
LIB_DEPENDS
5959
routing_export_all
6060
test-helpers
61+
extra::rapidjson
6162
INCLUDE_DIRS
6263
${CMAKE_CURRENT_SOURCE_DIR}/../src
6364
${CMAKE_CURRENT_SOURCE_DIR}/../../harness/tests # mock_io_service.h

router/tests/component/test_routing_sharing.cc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@
2929
#include <gmock/gmock.h>
3030
#include <gtest/gtest.h>
3131

32-
#define RAPIDJSON_HAS_STDSTRING 1
33-
3432
#include "mysql/harness/net_ts/impl/socket.h"
3533
#include "rest_api_testutils.h"
3634
#include "router/src/routing/tests/mysql_client.h"

router/tests/integration/test_routing_direct.cc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,6 @@
4242
#include <gtest/gtest-param-test.h>
4343
#include <gtest/gtest.h>
4444

45-
#define RAPIDJSON_HAS_STDSTRING 1
46-
4745
#include "my_rapidjson_size_t.h"
4846

4947
#include <rapidjson/pointer.h>

router/tests/integration/test_routing_sharing.cc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,6 @@
4242
#include <gtest/gtest-param-test.h>
4343
#include <gtest/gtest.h>
4444

45-
#define RAPIDJSON_HAS_STDSTRING 1
46-
4745
#include "my_rapidjson_size_t.h"
4846

4947
#include <rapidjson/pointer.h>

router/tests/integration/test_routing_sharing_constrained_pools.cc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,6 @@
4242
#include <gtest/gtest-param-test.h>
4343
#include <gtest/gtest.h>
4444

45-
#define RAPIDJSON_HAS_STDSTRING 1
46-
4745
#include "my_rapidjson_size_t.h"
4846

4947
#include <rapidjson/pointer.h>

router/tests/integration/test_routing_sharing_restart.cc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,6 @@
4242
#include <gtest/gtest-param-test.h>
4343
#include <gtest/gtest.h>
4444

45-
#define RAPIDJSON_HAS_STDSTRING 1
46-
4745
#include "my_rapidjson_size_t.h"
4846

4947
#include <rapidjson/pointer.h>

sql/sql_component.cc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@
2525
#include <stddef.h>
2626
#include <vector>
2727

28-
#define RAPIDJSON_HAS_STDSTRING 1
29-
3028
#include "manifest.h"
3129
#include "my_dbug.h"
3230
#include "my_inttypes.h"

0 commit comments

Comments
 (0)