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
This commit is contained in:
parent
1ca723dbd1
commit
a48a62d5ba
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user