diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2019-03-24 09:02:04 +0100 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2019-03-24 09:38:43 +0100 |
commit | 2612adf8993acf3925f636dd415921c4ff06727f (patch) | |
tree | 3fe7b92d60c759a7d8c542c40f1c9ce32913f113 /src/gui | |
parent | 47c4329404e0b79731bdaff6ddd57c729bebf76b (diff) | |
download | weechat-2612adf8993acf3925f636dd415921c4ff06727f.zip |
core: add CMake option "ENABLE_CODE_COVERAGE" to compile with code coverage options
This option is OFF by default and should be enabled only for tests, to measure
test coverage.
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/CMakeLists.txt | 1 | ||||
-rw-r--r-- | src/gui/curses/headless/CMakeLists.txt | 2 | ||||
-rw-r--r-- | src/gui/curses/normal/CMakeLists.txt | 2 |
3 files changed, 3 insertions, 2 deletions
diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt index f94a05ba8..689624a60 100644 --- a/src/gui/CMakeLists.txt +++ b/src/gui/CMakeLists.txt @@ -43,6 +43,7 @@ set(LIB_GUI_COMMON_SRC include_directories(${CMAKE_BINARY_DIR}) add_library(weechat_gui_common STATIC ${LIB_GUI_COMMON_SRC}) +target_link_libraries(weechat_gui_common coverage_config) list(APPEND STATIC_LIBS weechat_gui_common) subdirs(curses) diff --git a/src/gui/curses/headless/CMakeLists.txt b/src/gui/curses/headless/CMakeLists.txt index 205628ccd..847bba612 100644 --- a/src/gui/curses/headless/CMakeLists.txt +++ b/src/gui/curses/headless/CMakeLists.txt @@ -51,7 +51,7 @@ add_executable(${EXECUTABLE} ${WEECHAT_CURSES_MAIN_HEADLESS_SRC}) add_dependencies(${EXECUTABLE} weechat_gui_headless weechat_ncurses_fake) # Due to circular references, we must link two times with libweechat_core.a and libweechat_gui_common.a -target_link_libraries(${EXECUTABLE} ${STATIC_LIBS} weechat_gui_headless weechat_ncurses_fake ${EXTRA_LIBS} ${STATIC_LIBS}) +target_link_libraries(${EXECUTABLE} ${STATIC_LIBS} weechat_gui_headless weechat_ncurses_fake ${EXTRA_LIBS} ${STATIC_LIBS} coverage_config) # Install executable install(TARGETS ${EXECUTABLE} RUNTIME DESTINATION bin) diff --git a/src/gui/curses/normal/CMakeLists.txt b/src/gui/curses/normal/CMakeLists.txt index 760a21fb1..db9f5826a 100644 --- a/src/gui/curses/normal/CMakeLists.txt +++ b/src/gui/curses/normal/CMakeLists.txt @@ -57,7 +57,7 @@ add_dependencies(${EXECUTABLE} weechat_gui_curses_normal) list(APPEND EXTRA_LIBS ${NCURSES_LIBRARY}) # Due to circular references, we must link two times with libweechat_core.a and libweechat_gui_common.a -target_link_libraries(${EXECUTABLE} ${STATIC_LIBS} weechat_gui_curses_normal ${EXTRA_LIBS} ${STATIC_LIBS}) +target_link_libraries(${EXECUTABLE} ${STATIC_LIBS} weechat_gui_curses_normal ${EXTRA_LIBS} ${STATIC_LIBS} coverage_config) # Create a symbolic link weechat-curses -> weechat # This link is created for compatibility with old versions on /upgrade. |