From e6d4e975dcdd493393827e4028401374cffce189 Mon Sep 17 00:00:00 2001 From: antao Date: Mon, 3 Sep 2018 14:42:44 +0800 Subject: [PATCH] Add release option in CMakeLists.txt --- CMakeLists.txt | 8 +++++--- trantor | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8b964977..692b33b2 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -57,9 +57,11 @@ if(Boost_FOUND) include_directories(${Boost_INCLUDE_DIRS}) endif() - -set(CMAKE_CXX_FLAGS "-std=${CMAKE_CXX_STD_FLAGS} -g -Wall -fpermissive ${CMAKE_CXX_FLAGS}") - +if (RELEASE STREQUAL YES) + set(CMAKE_CXX_FLAGS "-std=${CMAKE_CXX_STD_FLAGS} -O2 -Wall -fpermissive ${CMAKE_CXX_FLAGS}") +else() + set(CMAKE_CXX_FLAGS "-std=${CMAKE_CXX_STD_FLAGS} -g -Wall -fpermissive ${CMAKE_CXX_FLAGS}") +endif() #string(REPLACE ";" " " CMAKE_CXX_FLAGS "${CXX_FLAGS}") MESSAGE(STATUS ${CMAKE_CXX_FLAGS}) diff --git a/trantor b/trantor index 18ebe227..1a64a89e 160000 --- a/trantor +++ b/trantor @@ -1 +1 @@ -Subproject commit 18ebe227f27d924e196cce96841c877128124e8f +Subproject commit 1a64a89e0741e467a16b5e459291caf225d36250