From f99537b5cad3d148aaf36d5944fd5f641341649c Mon Sep 17 00:00:00 2001 From: Przemyslaw Ciezkowski Date: Fri, 26 Oct 2012 08:31:05 +0200 Subject: [PATCH] Change profiling build [Issue#] LINUXNGWAP-444 [Feature] Change build parameters for profiling: -O2 optimization, disable debug symbols generation, disable logs, disable gprof symbols generation. [Cause] N/A [Solution] Changed profiling. [Verification] Build repository with build_type=profiling. Install a widget, check if logs are disabled. Change-Id: I3aff8ab1a4987880f1b1927846cad609194935e1 --- CMakeLists.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2126276..f85fa56 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -38,8 +38,8 @@ ENDIF(NOT CMAKE_BUILD_TYPE) ############################# compiler flags ################################## -SET(CMAKE_C_FLAGS_PROFILING "-O0 -g -pg") -SET(CMAKE_CXX_FLAGS_PROFILING "-O0 -std=c++0x -g -pg") +SET(CMAKE_C_FLAGS_PROFILING "-O2") +SET(CMAKE_CXX_FLAGS_PROFILING "-O2 -std=c++0x") SET(CMAKE_C_FLAGS_DEBUG "-O0 -g") SET(CMAKE_CXX_FLAGS_DEBUG "-O0 -std=c++0x -g") SET(CMAKE_C_FLAGS_RELEASE "-O2 -g") @@ -47,12 +47,12 @@ SET(CMAKE_CXX_FLAGS_RELEASE "-O2 -std=c++0x -g") SET(CMAKE_CXX_FLAGS_CCOV "-O0 -std=c++0x -g --coverage") OPTION(DPL_LOG "DPL logs status" ON) -IF(DPL_LOG) +IF(DPL_LOG AND NOT CMAKE_BUILD_TYPE MATCHES "profiling") MESSAGE(STATUS "Logging enabled for DPL") ADD_DEFINITIONS("-DDPL_LOGS_ENABLED") -ELSE(DPL_LOG) +ELSE(DPL_LOG AND NOT CMAKE_BUILD_TYPE MATCHES "profiling") MESSAGE(STATUS "Logging disabled for DPL") -ENDIF(DPL_LOG) +ENDIF(DPL_LOG AND NOT CMAKE_BUILD_TYPE MATCHES "profiling") # If supported for the target machine, emit position-independent code,suitable # for dynamic linking and avoiding any limit on the size of the global offset -- 2.7.4