Skip to content

Commit

Permalink
advance C++ compile standard to c++17
Browse files Browse the repository at this point in the history
  • Loading branch information
Petr Matousek committed Jul 11, 2024
1 parent aa57569 commit 193d4fb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion BUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ This project can be built either with CMake, or with CMake executed by Bazel.
-DProton_DIR=...
-DProtonCpp_DIR=...
-DENABLE_QPID_PROTON=ON
-DCMAKE_USER_C_FLAGS='-std=c++11'
-DCMAKE_USER_C_FLAGS='-std=c++17'

### Bazel command line

Expand Down
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.20.0)
project(cli-cpp)
enable_language(CXX)

set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)

Expand Down Expand Up @@ -97,7 +97,7 @@ if(NOT CMAKE_BUILD_TYPE)
endif(NOT CMAKE_BUILD_TYPE)

if (CMAKE_COMPILER_IS_GNUCXX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17")

set(CMAKE_C_FLAGS "-Wall -Wshadow -fdiagnostics-color=auto" CACHE STRING
"Flags used by the compiler during all build types." FORCE
Expand Down

0 comments on commit 193d4fb

Please sign in to comment.