Skip to content

Commit

Permalink
Merge pull request #1280 from dutkalex/patch-2
Browse files Browse the repository at this point in the history
Update CMakeLists.txt
  • Loading branch information
jmark authored Oct 28, 2024
2 parents facc24c + d04f958 commit 95b968b
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,19 @@ if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
"Debug" "Release" "RelWithDebInfo")
endif()

set( CMAKE_C_STANDARD 11 )
if( NOT DEFINED CMAKE_C_STANDARD )
set( CMAKE_C_STANDARD 11 )
elseif( CMAKE_C_STANDARD LESS 11 )
message( FATAL_ERROR "The CMAKE_C_STANDARD variable has been set to ${CMAKE_C_STANDARD}, but t8code requires C11" )
endif()
set( CMAKE_C_STANDARD_REQUIRED ON )
set( CMAKE_C_EXTENSIONS OFF )

set( CMAKE_CXX_STANDARD 17 )
if( NOT DEFINED CMAKE_CXX_STANDARD )
set( CMAKE_CXX_STANDARD 17 )
elseif( CMAKE_CXX_STANDARD LESS 17 )
message( FATAL_ERROR "The CMAKE_CXX_STANDARD variable has been set to ${CMAKE_CXX_STANDARD}, but t8code requires C++17" )
endif()
set( CMAKE_CXX_STANDARD_REQUIRED ON )
set( CMAKE_CXX_EXTENSIONS OFF )

Expand Down

0 comments on commit 95b968b

Please sign in to comment.