Skip to content
Merged
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 CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ endif()
option(OLP_SDK_ENABLE_TESTING "Flag to enable/disable building unit and integration tests" ON)
option(OLP_SDK_BUILD_DOC "Build SDK documentation" OFF)
option(OLP_SDK_NO_EXCEPTION "Disable exception handling" OFF)
option(OLP_SDK_FORCE_BOOST_OPTIONAL "Use boost::optional instead of std::optional with C++17 and above" OFF)
option(OLP_SDK_USE_STD_OPTIONAL "Use std::optional instead of boost::optional with C++17 and above" OFF)
option(OLP_SDK_BOOST_THROW_EXCEPTION_EXTERNAL "The boost::throw_exception() is defined externally" OFF)
option(OLP_SDK_BUILD_EXTERNAL_DEPS "Download and build external dependencies" ON)
option(OLP_SDK_BUILD_EXAMPLES "Enable examples targets" OFF)
Expand Down
4 changes: 2 additions & 2 deletions docs/get-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ cmake --build . --target docs
| `OLP_SDK_ENABLE_TESTING` | Defaults to `ON`. If enabled, unit tests are built for each library. |
| `OLP_SDK_BUILD_EXTERNAL_DEPS` | Defaults to `ON`. If enabled, CMake downloads and compiles dependencies. |
| `OLP_SDK_NO_EXCEPTION` | Defaults to `OFF`. If enabled, all libraries are built without exceptions. |
| `OLP_SDK_FORCE_BOOST_OPTIONAL` | Defaults to `OFF`. If enabled, all libraries are built with boost::optional type even when std::optional is available. |
| `OLP_SDK_USE_STD_OPTIONAL` | Defaults to `OFF`. If enabled, all libraries are built with std::optional type instead of boost::optional for C++17 and above. |
| `OLP_SDK_BOOST_THROW_EXCEPTION_EXTERNAL` | Defaults to `OFF`. When `OLP_SDK_NO_EXCEPTION` is `ON`, `boost` requires `boost::throw_exception()` to be defined. If enabled, the external definition of `boost::throw_exception()` is used. Otherwise, the library uses own definition. |
| `OLP_SDK_MSVC_PARALLEL_BUILD_ENABLE` (Windows Only) | Defaults to `ON`. If enabled, the `/MP` compilation flag is added to build the Data SDK using multiple cores. |
| `OLP_SDK_DISABLE_DEBUG_LOGGING`| Defaults to `OFF`. If enabled, the debug and trace level log messages are not printed. |
Expand Down Expand Up @@ -176,4 +176,4 @@ HERE Data SDK for C++ contains several example programs that demonstrate some of
- [Read example](dataservice-read-catalog-example.md) – demonstrates how to get catalog and partition metadata, as well as partition data.
- [Read example for a stream layer](dataservice-read-from-stream-layer-example.md) – demonstrates how to get data from a stream layer.
- [Cache example](dataservice-cache-example.md) – demonstrates how to get partition data and work with a mutable and protected cache.
- [Write example](dataservice-write-example.md) – demonstrates how to publish data to the HERE platform.
- [Write example](dataservice-write-example.md) – demonstrates how to publish data to the HERE platform.
4 changes: 2 additions & 2 deletions olp-cpp-sdk-core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -440,9 +440,9 @@ if (OLP_SDK_NO_EXCEPTION AND NOT OLP_SDK_BOOST_THROW_EXCEPTION_EXTERNAL)
PRIVATE OLP_SDK_BOOST_THROW_EXCEPTION=1)
endif()

if (OLP_SDK_FORCE_BOOST_OPTIONAL)
if (OLP_SDK_USE_STD_OPTIONAL)
target_compile_definitions(${PROJECT_NAME}
PUBLIC OLP_CPP_SDK_USE_BOOST_OPTIONAL)
PUBLIC OLP_CPP_SDK_USE_STD_OPTIONAL)
endif()

target_include_directories(${PROJECT_NAME} PUBLIC
Expand Down
2 changes: 1 addition & 1 deletion olp-cpp-sdk-core/include/olp/core/porting/optional.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

#pragma once

#if (__cplusplus >= 201703L) && !defined(OLP_CPP_SDK_USE_BOOST_OPTIONAL)
#if (__cplusplus >= 201703L) && defined(OLP_CPP_SDK_USE_STD_OPTIONAL)
#include <optional>

namespace olp {
Expand Down
Loading