From a5cc6a227ea18f071522cfd9e8774721900dfdef Mon Sep 17 00:00:00 2001 From: Zbigniew Kostrzewa Date: Tue, 1 Oct 2013 09:42:15 +0200 Subject: [PATCH] Fix build break in Profiling build type. [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 | 4 ---- src/profiling/profiling_util.cpp | 2 ++ src/profiling/profiling_util.h | 4 ++++ src/wrt-client/CMakeLists.txt | 1 + 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index fd127d1..98f03ff 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -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} diff --git a/src/profiling/profiling_util.cpp b/src/profiling/profiling_util.cpp index cd94c0f..371ebce 100644 --- a/src/profiling/profiling_util.cpp +++ b/src/profiling/profiling_util.cpp @@ -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) diff --git a/src/profiling/profiling_util.h b/src/profiling/profiling_util.h index 13ec532..3ce0de5 100644 --- a/src/profiling/profiling_util.h +++ b/src/profiling/profiling_util.h @@ -25,6 +25,10 @@ #ifdef PROFILING_ENABLED +#ifndef __cplusplus +#include +#endif //__cplusplus + #ifdef __cplusplus extern "C" void AddProfilingMeasurment(const char* name, diff --git a/src/wrt-client/CMakeLists.txt b/src/wrt-client/CMakeLists.txt index 69ef4f0..43877a8 100644 --- a/src/wrt-client/CMakeLists.txt +++ b/src/wrt-client/CMakeLists.txt @@ -57,6 +57,7 @@ TARGET_LINK_LIBRARIES(${TARGET_WRT_CLIENT} ${CLIENT_DEP_LIBRARIES} ${TARGET_CORE_MODULE_LIB} ${SMACK_LABELING_SUPPORT_STATIC} + ${PROF_LIB} "-pie" ) -- 2.7.4