Skip to content

Commit

Permalink
Switch from C++17 to C++20.
Browse files Browse the repository at this point in the history
  • Loading branch information
fruffy committed Jan 22, 2024
1 parent 0736b4d commit f2e7d7b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .bazelrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
build --action_env=BAZEL_CXXOPTS="-std=c++17"
build --action_env=BAZEL_CXXOPTS="-std=c++20"
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -242,8 +242,8 @@ enable_testing ()
# set (CPACK_PACKAGE_VERSION_PATCH ${CPACK_PACKAGE_VERSION_PATCH}-${__P4C_VERSION_RC})
# endif ()

# set (CMAKE_CXX_EXTENSIONS OFF) # prefer using -std=c++17 rather than -std=gnu++17
set (CMAKE_CXX_STANDARD 17)
# set (CMAKE_CXX_EXTENSIONS OFF) # prefer using -std=c++20 rather than -std=gnu++20
set (CMAKE_CXX_STANDARD 20)
set (CMAKE_CXX_STANDARD_REQUIRED ON)

add_cxx_compiler_option ("-Wall")
Expand Down
2 changes: 1 addition & 1 deletion bazel/example/.bazelrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
build --action_env=BAZEL_CXXOPTS="-std=c++17"
build --action_env=BAZEL_CXXOPTS="-std=c++20"

0 comments on commit f2e7d7b

Please sign in to comment.