Skip to content

Commit

Permalink
Set C++ version to 17 when using [[no_discard]] (#2291)
Browse files Browse the repository at this point in the history
  • Loading branch information
vrabaud authored Jul 18, 2024
1 parent a64d557 commit 920f70f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -645,7 +645,11 @@ endif()

if(AVIF_USE_CXX)
enable_language(CXX)
set(CMAKE_CXX_STANDARD 14)
if(AVIF_ENABLE_NODISCARD)
set(CMAKE_CXX_STANDARD 17)
else()
set(CMAKE_CXX_STANDARD 14)
endif()
endif()

option(AVIF_BUILD_APPS "Build avif apps." OFF)
Expand Down

0 comments on commit 920f70f

Please sign in to comment.