Change profiling build
authorPrzemyslaw Ciezkowski <p.ciezkowski@samsung.com>
Thu, 25 Oct 2012 14:26:41 +0000 (16:26 +0200)
committerJihoon Chung <jihoon.chung@samsung.com>
Fri, 2 Nov 2012 04:52:54 +0000 (13:52 +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 and fixed profiling.
[Verification] Build repository with build_type=profiling. Run any widget,
check if wrt-commons logs are disabled.

Change-Id: I1ccd931589844bebe99205643c624a3a83848f4e

CMakeLists.txt

index 35ebc04..c50c3e3 100644 (file)
@@ -25,15 +25,6 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
 # Project name
 PROJECT(dpl)
 
-# Options
-OPTION(DPL_LOG "DPL logs status" OFF)
-IF(DPL_LOG)
-    MESSAGE(STATUS "Logging enabled for DPL")
-    ADD_DEFINITIONS("-DDPL_LOGS_ENABLED")
-ELSE(DPL_LOG)
-    MESSAGE(STATUS "Logging disabled for DPL")
-ENDIF(DPL_LOG)
-
 STRING(REGEX MATCH "([^.]*)" API_VERSION "${VERSION}")
 ADD_DEFINITIONS("-DAPI_VERSION=\"$(API_VERSION)\"")
 
@@ -45,9 +36,18 @@ IF(NOT CMAKE_BUILD_TYPE)
     SET(CMAKE_BUILD_TYPE "Release")
 ENDIF(NOT CMAKE_BUILD_TYPE)
 
+# Options
+OPTION(DPL_LOG "DPL logs status" OFF)
+IF(DPL_LOG AND NOT CMAKE_BUILD_TYPE MATCHES "profiling")
+    MESSAGE(STATUS "Logging enabled for DPL")
+    ADD_DEFINITIONS("-DDPL_LOGS_ENABLED")
+ELSE(DPL_LOG AND NOT CMAKE_BUILD_TYPE MATCHES "profiling")
+    MESSAGE(STATUS "Logging disabled for DPL")
+ENDIF(DPL_LOG AND NOT CMAKE_BUILD_TYPE MATCHES "profiling")
+
 # 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")