summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorcostan <costan@google.com>2018-03-21 00:47:18 -0700
committerVictor Costan <pwnall@chromium.org>2018-03-21 01:17:59 -0700
commit74f032ff6f2465160366d865b1bb89a45dc2046b (patch)
treef8180f20b6d85fc70a8e3054c3ce46732dfa3c0e /CMakeLists.txt
parent8e75db8623703cdc25ec3cd06f82129296672489 (diff)
downloadleveldb-74f032ff6f2465160366d865b1bb89a45dc2046b.tar.gz
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
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt11
1 files changed, 8 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 73b69a4..6f7c36a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -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)