Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Strictly enforce CXX_STANDARD
Browse files Browse the repository at this point in the history
kitswas committed Aug 7, 2024
1 parent ae17270 commit 5adfa0d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
cmake_minimum_required(VERSION 3.16)
project(CPP_project)

set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD 17)
set(CXX_STANDARD_REQUIRED ON) # Without this CXX_STANDARD may fall back to a lower version

# Some compiler flags for GCC and Clang, disable if unwanted
if("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" OR "${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU")

0 comments on commit 5adfa0d

Please sign in to comment.