Change profiling build
authorPrzemyslaw Ciezkowski <p.ciezkowski@samsung.com>
Fri, 26 Oct 2012 06:31:05 +0000 (08:31 +0200)
committerTaejeong Lee <taejeong.lee@samsung.com>
Fri, 2 Nov 2012 07:11:46 +0000 (16:11 +0900)
[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

index 2126276..f85fa56 100644 (file)
@@ -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