Skip to content

Commit 8dde854

Browse files
author
Fytch
committed
increase minmum cmake version to 3.1 and use CXX_STANDARD
1 parent f59c107 commit 8dde854

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

CMakeLists.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1-
cmake_minimum_required( VERSION 2.8.8 )
1+
cmake_minimum_required( VERSION 3.1 )
22
project( ProgramOptions )
3+
set( CMAKE_CXX_STANDARD 11 )
4+
set( CMAKE_CXX_STANDARD_REQUIRED ON )
5+
set( CMAKE_CXX_EXTENSIONS OFF )
36

47
option( PROGRAMOPTIONS_NO_EXCEPTIONS "disable exceptions" OFF )
58
option( PROGRAMOPTIONS_NO_COLORS "disable colored output" OFF )
@@ -18,7 +21,7 @@ include_directories( "./" )
1821
include_directories( "./ext/" )
1922

2023
if( PROGRAMOPTIONS_GNU_OPTIONS )
21-
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wpedantic -Wno-deprecated -std=c++14 -fno-rtti" )
24+
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wpedantic -Wno-deprecated -fno-rtti" )
2225
set( CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g -ggdb -fno-omit-frame-pointer" )
2326
set( CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3 -march=native -DNDEBUG -s -flto" )
2427
endif()

0 commit comments

Comments
 (0)