Skip to content

Commit 5b71421

Browse files
authored
Allow the user to override C++ standard (#1582)
Especially when this CMakeLists.txt is included from other top-level projects, we shouldn't override the C++ standard if it's already set. Relates-To: MINOR Signed-off-by: Harald Fernengel <[email protected]>
1 parent cd01858 commit 5b71421

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

CMakeLists.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (C) 2019-2024 HERE Europe B.V.
1+
# Copyright (C) 2019-2025 HERE Europe B.V.
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.
@@ -50,7 +50,9 @@ option(OLP_SDK_ENABLE_IOS_BACKGROUND_DOWNLOAD "Enable iOS network layer download
5050
option(OLP_SDK_ENABLE_OFFLINE_MODE "Enable offline mode. Network layer is excluded from the build and all network requests returned with error." OFF)
5151

5252
# C++ standard version. Minimum supported version is 11.
53-
set(CMAKE_CXX_STANDARD 11)
53+
if (NOT CMAKE_CXX_STANDARD)
54+
set(CMAKE_CXX_STANDARD 11)
55+
endif()
5456
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
5557
# Set no exception
5658
if (OLP_SDK_NO_EXCEPTION)

0 commit comments

Comments
 (0)