From a6439d797ebb257334ae60f5f986d1533cba599d Mon Sep 17 00:00:00 2001 From: Tamir Duberstein Date: Mon, 17 Apr 2017 23:52:27 -0700 Subject: [PATCH] CMake: compile with -O2 Summary: Seems pretty important. Closes https://github.com/facebook/rocksdb/pull/2161 Differential Revision: D4891097 Pulled By: yiwu-arbug fbshipit-source-id: 16dc0149dc89d426407fabab4a5ba1d6d1562269 --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index cdf9feef8..1290d4a6d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -138,7 +138,7 @@ else() endif() set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") if(NOT CMAKE_BUILD_TYPE STREQUAL "Debug") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-omit-frame-pointer") + 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) if(HAVE_OMIT_LEAF_FRAME_POINTER)