leveldb: Require C++11.

This CL switches the public headers to C++11 default and deleted constructors, and adds override to the relevant leveldb::EnvWrapper methods. This should be a good test for C++11 compiler support.

Once this CL settles, the rest of the codebase can be safely modernized to C++11.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=189873212
This commit is contained in:
costan
2018-03-21 00:47:18 -07:00
committed by Victor Costan
parent 8e75db8623
commit 74f032ff6f
10 changed files with 101 additions and 89 deletions

View File

@@ -3,11 +3,16 @@
# found in the LICENSE file. See the AUTHORS file for names of contributors.
cmake_minimum_required(VERSION 3.9)
project(Leveldb VERSION 0.1.0 LANGUAGES C CXX)
project(Leveldb VERSION 1.21.0 LANGUAGES C CXX)
# This project can take advantage of C++11.
# This project can use C11, but will gracefully decay down to C89.
set(CMAKE_C_STANDARD 11)
set(CMAKE_C_STANDARD_REQUIRED OFF)
set(CMAKE_C_EXTENSIONS OFF)
# This project requires C++11.
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED OFF)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
option(LEVELDB_BUILD_TESTS "Build LevelDB's unit tests" ON)