From: Przemyslaw Ciezkowski
Date: Thu, 25 Oct 2012 14:26:41 +0000 (+0200)
Subject: Change profiling build
X-Git-Tag: submit/trunk/20121102.073532~8
X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=993863358407c6cba01e32ea057da6e1105b6d61;p=platform%2Fframework%2Fweb%2Fwrt-commons.git
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 and fixed profiling.
[Verification] Build repository with build_type=profiling. Run any widget,
check if wrt-commons logs are disabled.
Change-Id: I1ccd931589844bebe99205643c624a3a83848f4e
---
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 35ebc04..c50c3e3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -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")