Fix coverage build fail on gbs (#4912)
author이춘석/On-Device Lab(SR)/Staff Engineer/삼성전자 <chunseok.lee@samsung.com>
Mon, 1 Apr 2019 10:22:25 +0000 (19:22 +0900)
committer오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 <hseok82.oh@samsung.com>
Mon, 1 Apr 2019 10:22:25 +0000 (19:22 +0900)
On gbs, CMAKE_C_FLAGS_DEBUG seems to apply -O0 flag on coverage build.
This patch cancels -O0 flag in the case of coverage build.
Note that arm-ubuntu build does not show this kinds of error.

Signed-off-by: Chunseok Lee <chunseok.lee@samsung.com>
cmake/buildtool/config/config_linux.cmake

index 61909a7..a17bbb2 100644 (file)
@@ -8,6 +8,8 @@ if("${COVERAGE_BUILD}" STREQUAL "1")
   set(FLAGS_COMMON "${FLAGS_COMMON} -fprofile-arcs -ftest-coverage")
   set(CMAKE_EXE_LINKER_FLAGS
     "${CMAKE_EXE_LINKER_FLAGS} -fprofile-arcs -ftest-coverage")
+  set(CMAKE_C_FLAGS_DEBUG     "-O -g -DDEBUG")
+  set(CMAKE_CXX_FLAGS_DEBUG   "-O -g -DDEBUG")
 endif()
 
 #