Skip to content

Commit 22baa54

Browse files
mszabo-wikiafacebook-github-bot
authored andcommitted
Explicitly require C++20 (facebook#9575)
Summary: HHVM (and some dependencies) now make heavy use of C++20 features such as coroutines, so make this requirement explicit in the root listfile. This also allows conveniently setting/forwarding the standard level in subprojects by referencing CMAKE_CXX_STANDARD. Pull Request resolved: facebook#9575 Reviewed By: Wilfred Differential Revision: D67959847 fbshipit-source-id: 539c201f9108bed07844ef9e9ca1f205261e4446
1 parent 9bc12f7 commit 22baa54

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ cmake_policy(SET CMP0045 NEW)
55
# ditto for add_dependencies(): https://cmake.org/cmake/help/v3.0/policy/CMP0046.html
66
cmake_policy(SET CMP0046 NEW)
77

8+
set(CMAKE_CXX_STANDARD 20)
9+
set(CMAKE_CXX_STANDARD_REQUIRED ON)
10+
811
# This needs to be done before any languages are enabled or
912
# projects are created.
1013
INCLUDE("${CMAKE_CURRENT_SOURCE_DIR}/CMake/VisualStudioToolset.cmake")

0 commit comments

Comments
 (0)