File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -8,8 +8,13 @@ cmake_minimum_required(VERSION 3.1) # for "CMAKE_CXX_STANDARD" version
8
8
list (APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR} /cmake" ) # custom CMake modules like FindSQLiteCpp
9
9
project (SQLiteCpp VERSION 2.99 )
10
10
11
- # SQLiteC++ 3.x now requires C++11 compiler
12
- set (CMAKE_CXX_STANDARD 11 )
11
+ # SQLiteC++ 3.x requires C++11 features
12
+ if (NOT CMAKE_CXX_STANDARD )
13
+ set (CMAKE_CXX_STANDARD 11 )
14
+ elseif (CMAKE_CXX_STANDARD LESS 11 )
15
+ message (WARNING "CMAKE_CXX_STANDARD has been set to '${CMAKE_CXX_STANDARD} ' which is lower than the minimum required standard (c++11)." )
16
+ endif ()
17
+ message (STATUS "Using c++ standard c++${CMAKE_CXX_STANDARD} " )
13
18
set (CMAKE_CXX_STANDARD_REQUIRED ON )
14
19
15
20
message (STATUS "CMake version: ${CMAKE_VERSION} " )
You can’t perform that action at this time.
0 commit comments