Skip to content

Commit

Permalink
Switch to building the swift package and cocoa binaries as c++20
Browse files Browse the repository at this point in the history
  • Loading branch information
tgoyne committed Jun 12, 2024
1 parent 69f903e commit c2aa886
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
-----------

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

----------------------------------------------

Expand Down
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ endif()
set(PROJECT_VERSION ${DEP_VERSION})

# Project-wide build flags
set(CMAKE_CXX_STANDARD 17)
if (NOT DEFINED CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 17)
endif()
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)

Expand Down
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -565,5 +565,5 @@ let package = Package(
.headerSearchPath("../"),
] + cxxSettings) as [CXXSetting]),
],
cxxLanguageStandard: .cxx17
cxxLanguageStandard: .cxx20
)
1 change: 1 addition & 0 deletions tools/cmake/xcode.toolchain.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,4 @@ set(CMAKE_XCODE_ATTRIBUTE_TVOS_DEPLOYMENT_TARGET "12.0")

set(REALM_ENABLE_ASSERTIONS ON CACHE BOOL "Enable release assertions")
set(REALM_XCODE_TOOLCHAIN TRUE)
set(CMAKE_CXX_STANDARD 20)

0 comments on commit c2aa886

Please sign in to comment.