Fix build break in Profiling build type.
authorZbigniew Kostrzewa <z.kostrzewa@samsung.com>
Tue, 1 Oct 2013 07:42:15 +0000 (09:42 +0200)
committerHoseon LEE <hoseon46.lee@samsung.com>
Mon, 14 Oct 2013 11:19:14 +0000 (20:19 +0900)
[Issue#]   N/A
[Problem]  Build break in Profiling build type.
[Cause]    Profiling API not adjusted to C language (e.g. bool type).
[Solution] Fix build break.

[Verification] Build repository with following command:
    $ gbs build -A armv7l --define 'build_type Profiling'

Change-Id: I5a0338353607250a757ff45bd42d44c5dd363b66

src/CMakeLists.txt
src/profiling/profiling_util.cpp
src/profiling/profiling_util.h
src/wrt-client/CMakeLists.txt

index fd127d1..98f03ff 100644 (file)
@@ -184,10 +184,6 @@ SET_TARGET_PROPERTIES(${TARGET_WRT_ENGINE_STATIC} PROPERTIES
 SET_TARGET_PROPERTIES(${TARGET_WRT_ENGINE_STATIC} PROPERTIES
     COMPILE_FLAGS "-include profiling_util.h")
 
-TARGET_LINK_LIBRARIES(${TARGET_WRT_ENGINE_STATIC}
-    ${PROF_LIB}
-    )
-
 INSTALL(FILES
     ${WRT_SRC_DIR}/domain/widget_model.h
     DESTINATION include/${PROJECT_NAME}
index cd94c0f..371ebce 100644 (file)
@@ -153,7 +153,9 @@ void AddStdoutProfilingMeasurment(const char* name, bool start)
     fprintf(stdout, "%s\n", output.str().c_str());
 }
 
+#ifdef __cplusplus
 extern "C"
+#endif
 void AddProfilingMeasurment(const char* name,
                             const char* prefix,
                             const char* description)
index 13ec532..3ce0de5 100644 (file)
 
 #ifdef PROFILING_ENABLED
 
+#ifndef __cplusplus
+#include <stdbool.h>
+#endif //__cplusplus
+
 #ifdef __cplusplus
 extern "C"
 void AddProfilingMeasurment(const char* name,
index 69ef4f0..43877a8 100644 (file)
@@ -57,6 +57,7 @@ TARGET_LINK_LIBRARIES(${TARGET_WRT_CLIENT}
     ${CLIENT_DEP_LIBRARIES}
     ${TARGET_CORE_MODULE_LIB}
     ${SMACK_LABELING_SUPPORT_STATIC}
+    ${PROF_LIB}
     "-pie"
 )