Skip to content

Commit

Permalink
use the C++17 standard for public builds
Browse files Browse the repository at this point in the history
Summary:
Per D27390136 (fdbc543) / fdbc543, WDT requires
C++17 to build (for the refactor replacing `folly::SpinLockGuard` with
`std::unique_lock`).

Bump the language standard declared in `CMakeLists.txt` so public builds
can succeed.

Reviewed By: davide125

Differential Revision: D27867115

fbshipit-source-id: 38e9237d31b3750647279e9a5e227249923406f5
  • Loading branch information
michel-slm authored and facebook-github-bot committed Apr 20, 2021
1 parent fdbc543 commit 0f100c6
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,8 @@ cmake_minimum_required(VERSION 3.2)
# Minor currently is also the protocol version - has to match with Protocol.cpp
project("WDT" LANGUAGES C CXX VERSION 1.32.1910230)

# On MacOS this requires the latest (master) CMake (and/or CMake 3.1.1/3.2)
# WDT itself works fine with C++11 (gcc 4.8 for instance) but more recent folly
# started to require C++14, so you can either get an older snapshot of folly
# and set "11" below or use this:
set(CMAKE_CXX_STANDARD 14)
# WDT uses C++17 features per fdbc5432230290f86ff8ad89ab52d5b7fef232b4
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED on)

# somehow 'option' for this doesn't seeem to work/I don't know how to make it
Expand Down

1 comment on commit 0f100c6

@michel-slm
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This replaces #216 and #217

Please sign in to comment.