From a48a62d5baa5e60d7e9340ef513ce8640fb1c738 Mon Sep 17 00:00:00 2001 From: Nikhil Benesch Date: Tue, 16 May 2017 10:31:24 -0700 Subject: [PATCH] define NDEBUG in CMake non-debug builds Summary: This brings CMake builds further in line with builds that go through the normal Makefile. Closes https://github.com/facebook/rocksdb/pull/2300 Differential Revision: D5064631 Pulled By: yiwu-arbug fbshipit-source-id: 7b2b2d5299f575f87badcf590cc95e040f14d52d --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 43a170745..dec306881 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -174,6 +174,7 @@ else() endif() set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") if(NOT CMAKE_BUILD_TYPE STREQUAL "Debug") + add_definitions(-DNDEBUG) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2 -fno-omit-frame-pointer") include(CheckCXXCompilerFlag) CHECK_CXX_COMPILER_FLAG("-momit-leaf-frame-pointer" HAVE_OMIT_LEAF_FRAME_POINTER)