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

Change-Id: I1c504bf877754d693d22e71f0009df254983c173

CMakeLists.txt

index 5ea4ab5..f213c4b 100644 (file)
@@ -39,8 +39,8 @@ IF(NOT CMAKE_BUILD_TYPE)
 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")
@@ -49,12 +49,12 @@ 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")
 
 ADD_DEFINITIONS("-fPIC")
 ADD_DEFINITIONS("-fvisibility=default")         # mark all exported symbols as visible