mirror of
https://github.com/google/leveldb.git
synced 2026-08-18 10:33:27 +08:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user