File tree 1 file changed +13
-1
lines changed
1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change 8
8
#
9
9
###############################################################################
10
10
11
- cmake_minimum_required (VERSION 2.8.11 )
11
+ cmake_minimum_required (VERSION 3.3 FATAL_ERROR )
12
12
13
13
# In-source builds are disabled.
14
14
if ("${CMAKE_CURRENT_SOURCE_DIR} " STREQUAL "${CMAKE_CURRENT_BINARY_DIR} " )
@@ -83,6 +83,18 @@ endif()
83
83
#
84
84
###############################################################################
85
85
86
+ # Check for C++ standard to use
87
+ get_property (known_features GLOBAL PROPERTY CMAKE_CXX_KNOWN_FEATURES)
88
+ if (cxx_std_14 IN_LIST known_features)
89
+ set (CMAKE_CXX_STANDARD 14)
90
+ message ("C++14 support enabled..." )
91
+ else () # minimum requeired standard
92
+ set (CMAKE_CXX_STANDARD 11)
93
+ message ("C++11 support enabled..." )
94
+ endif ()
95
+ set (CMAKE_CXX_STANDARD_REQUIRED ON )
96
+ set (CMAKE_CXX_EXTENSIONS OFF )
97
+
86
98
set (LIBRARY_TYPE SHARED)
87
99
if (STATIC )
88
100
set (LIBRARY_TYPE)
You can’t perform that action at this time.
0 commit comments