Commit d25b5b68 authored by unknown's avatar unknown

BUG#12549572 : CMake file does not include gcov option

This patch inserts an 'ENABLE_GCOV' option for enabling gcov compilation
on Linux machines. It modifies the CMakeLists.txt setting this option
to 'OFF' by default.

Note: The option requires a debug build. For example, 
      -DCMAKE_BUILD_TYPE:string="Debug" 
parent e9b8feef
...@@ -172,6 +172,13 @@ IF(ENABLE_DEBUG_SYNC) ...@@ -172,6 +172,13 @@ IF(ENABLE_DEBUG_SYNC)
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DENABLED_DEBUG_SYNC") SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DENABLED_DEBUG_SYNC")
ENDIF() ENDIF()
OPTION(ENABLE_GCOV "Enable gcov (debug, Linux builds only)" OFF)
IF (ENABLE_GCOV AND NOT WIN32 AND NOT APPLE)
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fprofile-arcs -ftest-coverage")
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -fprofile-arcs -ftest-coverage")
SET(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} -fprofile-arcs -ftest-coverage -lgcov")
ENDIF()
OPTION(ENABLED_LOCAL_INFILE OPTION(ENABLED_LOCAL_INFILE
"If we should should enable LOAD DATA LOCAL by default" ${IF_WIN}) "If we should should enable LOAD DATA LOCAL by default" ${IF_WIN})
MARK_AS_ADVANCED(ENABLED_LOCAL_INFILE) MARK_AS_ADVANCED(ENABLED_LOCAL_INFILE)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment