Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ The table below lists the dependencies of the Data SDK.
|:---------------------|:--------------------|
| Libcurl | 7.52.1 |
| OpenSSL | 1.1.1w |
| Boost (headers only) | 1.82.0 |
| Boost (headers only) | 1.84.0 |
| LevelDB | 1.21 |
| Snappy | 1.1.7 |
| RapidJSON | latest |
Expand Down
6 changes: 3 additions & 3 deletions external/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2019-2024 HERE Europe B.V.
# Copyright (C) 2019-2026 HERE Europe B.V.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -53,7 +53,7 @@ set(OLP_SDK_CPP_RAPIDJSON_URL "https://github.com/Tencent/rapidjson.git")
set(OLP_SDK_CPP_RAPIDJSON_TAG "d621dc9e9c77f81e5c8a35b8dcc16dcd63351321")

set(OLP_SDK_CPP_BOOST_URL "https://github.com/boostorg/boost.git")
set(OLP_SDK_CPP_BOOST_TAG "boost-1.82.0")
set(OLP_SDK_CPP_BOOST_TAG "boost-1.84.0")

set(OLP_SDK_CPP_LMDB_URL "https://github.com/LMDB/lmdb.git")
set(OLP_SDK_CPP_LMDB_TAG "LMDB_0.9.29")
Expand Down Expand Up @@ -97,7 +97,7 @@ if(OLP_SDK_ENABLE_DEFAULT_CACHE_LMDB)
endif()
endif()

find_package(Boost 1.82.0 QUIET)
find_package(Boost 1.84.0 QUIET)
if(NOT TARGET Boost AND NOT Boost_FOUND)
add_subdirectory(boost)
set(BOOST_ROOT ${EXTERNAL_BOOST_ROOT} PARENT_SCOPE)
Expand Down
10 changes: 8 additions & 2 deletions external/boost/CMakeLists.txt.boost.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2019-2020 HERE Europe B.V.
# Copyright (C) 2019-2026 HERE Europe B.V.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -24,9 +24,11 @@ include(ExternalProject)
ExternalProject_Add(boost-download
GIT_REPOSITORY @OLP_SDK_CPP_BOOST_URL@
GIT_TAG @OLP_SDK_CPP_BOOST_TAG@
GIT_SUBMODULES libs/any
GIT_SUBMODULES libs/align
libs/any
libs/assert
libs/config
libs/container
libs/container_hash
libs/core
libs/detail
Expand All @@ -35,8 +37,10 @@ ExternalProject_Add(boost-download
libs/function_types
libs/headers
libs/integer
libs/intrusive
libs/io
libs/iterator
libs/json
libs/move
libs/mpl
libs/mp11
Expand All @@ -47,13 +51,15 @@ ExternalProject_Add(boost-download
libs/random
libs/serialization
libs/smart_ptr
libs/system
libs/static_assert
libs/throw_exception
libs/tti
libs/type_index
libs/type_traits
libs/utility
libs/uuid
libs/variant2
libs/winapi
tools/build
tools/boost_install
Expand Down
4 changes: 4 additions & 0 deletions olp-cpp-sdk-core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,7 @@ endif()
set(OLP_SDK_UTILS_SOURCES
./src/utils/Base64.cpp
./src/utils/BoostExceptionHandle.cpp
./src/utils/BoostJsonSrc.cpp
./src/utils/Credentials.cpp
./src/utils/Dir.cpp
./src/utils/Thread.cpp
Expand Down Expand Up @@ -456,6 +457,9 @@ if (OLP_SDK_USE_STD_ANY)
PUBLIC OLP_SDK_USE_STD_ANY)
endif()

target_compile_definitions(${PROJECT_NAME} PRIVATE BOOST_ALL_NO_LIB)
target_compile_definitions(${PROJECT_NAME} PRIVATE BOOST_JSON_NO_LIB)

target_include_directories(${PROJECT_NAME} PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src>
Expand Down
20 changes: 20 additions & 0 deletions olp-cpp-sdk-core/src/utils/BoostJsonSrc.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/*
* Copyright (C) 2026 HERE Europe B.V.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* SPDX-License-Identifier: Apache-2.0
* License-Filename: LICENSE
*/

#include <boost/json/src.hpp>
3 changes: 2 additions & 1 deletion olp-cpp-sdk-core/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2019-2025 HERE Europe B.V.
# Copyright (C) 2019-2026 HERE Europe B.V.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -73,6 +73,7 @@ set(OLP_CPP_SDK_CORE_TESTS_SOURCES
./http/NetworkSettingsTest.cpp
./http/NetworkUtils.cpp

./utils/JsonTest.cpp
./utils/UtilsTest.cpp
./utils/UrlTest.cpp
)
Expand Down
67 changes: 67 additions & 0 deletions olp-cpp-sdk-core/tests/utils/JsonTest.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
/*
* Copyright (C) 2026 HERE Europe B.V.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* SPDX-License-Identifier: Apache-2.0
* License-Filename: LICENSE
*/

#include <gtest/gtest.h>

#include <boost/json/parse.hpp>

namespace {

using UtilsTest = testing::Test;

const std::string kJsonData = R"json(
{
"catalogs": [
{
"hrn": "hrn:here:data::olp:ocm",
"version": 17,
"dependencies": [],
"metadata_type": "partitions"
}
],
"regions": [
{
"id": 423423,
"parent_id": 14123411,
"catalogs": [
{
"hrn": "hrn:here:data::olp:ocm",
"status": "pending",
"size_raw_bytes": 4623545,
"layer_groups": [
"rendering"
],
"tiles": [
2354325,
5243252
]
}
]
}
]
})json";

TEST(UtilsTest, BoostJsonAvailable) {
boost::system::error_code error_code;
auto parsed_json = boost::json::parse(kJsonData, error_code);

EXPECT_FALSE(error_code.failed());
}

} // namespace
5 changes: 4 additions & 1 deletion tests/common/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2019-2021 HERE Europe B.V.
# Copyright (C) 2019-2026 HERE Europe B.V.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -50,6 +50,9 @@ target_include_directories(olp-cpp-sdk-tests-common
${CMAKE_CURRENT_SOURCE_DIR}/../../olp-cpp-sdk-dataservice-read/src/
)

target_compile_definitions(olp-cpp-sdk-tests-common PUBLIC BOOST_CONTAINER_NO_LIB)
target_compile_definitions(olp-cpp-sdk-tests-common PUBLIC BOOST_JSON_NO_LIB)

target_link_libraries(olp-cpp-sdk-tests-common
PUBLIC
gmock
Expand Down
Loading