Skip to content

Commit c2aa886

Browse files
committed
Switch to building the swift package and cocoa binaries as c++20
1 parent 69f903e commit c2aa886

File tree

4 files changed

+6
-3
lines changed

4 files changed

+6
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
-----------
2121

2222
### Internals
23-
* None.
23+
* Switch to building the Swift package and Cocoa binaries as C++20 ([PR #7802](https://github.com/realm/realm-core/pull/7802)).
2424

2525
----------------------------------------------
2626

CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ endif()
3434
set(PROJECT_VERSION ${DEP_VERSION})
3535

3636
# Project-wide build flags
37-
set(CMAKE_CXX_STANDARD 17)
37+
if (NOT DEFINED CMAKE_CXX_STANDARD)
38+
set(CMAKE_CXX_STANDARD 17)
39+
endif()
3840
set(CMAKE_CXX_STANDARD_REQUIRED ON)
3941
set(CMAKE_CXX_EXTENSIONS OFF)
4042

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -565,5 +565,5 @@ let package = Package(
565565
.headerSearchPath("../"),
566566
] + cxxSettings) as [CXXSetting]),
567567
],
568-
cxxLanguageStandard: .cxx17
568+
cxxLanguageStandard: .cxx20
569569
)

tools/cmake/xcode.toolchain.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,4 @@ set(CMAKE_XCODE_ATTRIBUTE_TVOS_DEPLOYMENT_TARGET "12.0")
3131

3232
set(REALM_ENABLE_ASSERTIONS ON CACHE BOOL "Enable release assertions")
3333
set(REALM_XCODE_TOOLCHAIN TRUE)
34+
set(CMAKE_CXX_STANDARD 20)

0 commit comments

Comments
 (0)