summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2019-03-24 09:02:04 +0100
committerSébastien Helleu <flashcode@flashtux.org>2019-03-24 09:38:43 +0100
commit2612adf8993acf3925f636dd415921c4ff06727f (patch)
tree3fe7b92d60c759a7d8c542c40f1c9ce32913f113
parentdebian: update changelog (diff)
downloadweechat-2612adf8993acf3925f636dd415921c4ff06727f.tar.xz
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.
-rw-r--r--CMakeLists.txt72
-rw-r--r--ChangeLog.adoc3
-rw-r--r--doc/de/weechat_user.de.adoc5
-rw-r--r--doc/en/weechat_user.en.adoc4
-rw-r--r--doc/fr/weechat_user.fr.adoc5
-rw-r--r--doc/it/weechat_user.it.adoc5
-rw-r--r--doc/ja/weechat_user.ja.adoc5
-rw-r--r--doc/pl/weechat_user.pl.adoc5
-rw-r--r--src/core/CMakeLists.txt1
-rw-r--r--src/gui/CMakeLists.txt1
-rw-r--r--src/gui/curses/headless/CMakeLists.txt2
-rw-r--r--src/gui/curses/normal/CMakeLists.txt2
-rw-r--r--src/plugins/CMakeLists.txt1
-rw-r--r--src/plugins/alias/CMakeLists.txt2
-rw-r--r--src/plugins/buflist/CMakeLists.txt2
-rw-r--r--src/plugins/charset/CMakeLists.txt4
-rw-r--r--src/plugins/exec/CMakeLists.txt2
-rw-r--r--src/plugins/fifo/CMakeLists.txt2
-rw-r--r--src/plugins/fset/CMakeLists.txt2
-rw-r--r--src/plugins/guile/CMakeLists.txt2
-rw-r--r--src/plugins/irc/CMakeLists.txt2
-rw-r--r--src/plugins/javascript/CMakeLists.txt2
-rw-r--r--src/plugins/logger/CMakeLists.txt2
-rw-r--r--src/plugins/lua/CMakeLists.txt2
-rw-r--r--src/plugins/perl/CMakeLists.txt4
-rw-r--r--src/plugins/php/CMakeLists.txt2
-rw-r--r--src/plugins/python/CMakeLists.txt2
-rw-r--r--src/plugins/relay/CMakeLists.txt2
-rw-r--r--src/plugins/ruby/CMakeLists.txt2
-rw-r--r--src/plugins/script/CMakeLists.txt2
-rw-r--r--src/plugins/spell/CMakeLists.txt4
-rw-r--r--src/plugins/tcl/CMakeLists.txt2
-rw-r--r--src/plugins/trigger/CMakeLists.txt2
-rw-r--r--src/plugins/xfer/CMakeLists.txt2
-rw-r--r--tests/CMakeLists.txt14
35 files changed, 107 insertions, 66 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f1a62fb9b..00016bc6a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -82,38 +82,46 @@ else()
set(INCLUDEDIR ${CMAKE_INSTALL_PREFIX}/include/${PROJECT_NAME})
endif()
-option(ENABLE_NCURSES "Compile the Ncurses interface" ON)
-option(ENABLE_HEADLESS "Compile the headless binary (required for tests)" ON)
-option(ENABLE_NLS "Enable Native Language Support" ON)
-option(ENABLE_GNUTLS "Enable SSLv3/TLS support" ON)
-option(ENABLE_LARGEFILE "Enable Large File Support" ON)
-option(ENABLE_ALIAS "Enable Alias plugin" ON)
-option(ENABLE_BUFLIST "Enable Buflist plugin" ON)
-option(ENABLE_CHARSET "Enable Charset plugin" ON)
-option(ENABLE_EXEC "Enable Exec plugin" ON)
-option(ENABLE_FIFO "Enable FIFO plugin" ON)
-option(ENABLE_FSET "Enable Fast Set plugin" ON)
-option(ENABLE_IRC "Enable IRC plugin" ON)
-option(ENABLE_LOGGER "Enable Logger plugin" ON)
-option(ENABLE_RELAY "Enable Relay plugin" ON)
-option(ENABLE_SCRIPT "Enable Script plugin (script manager)" ON)
-option(ENABLE_SCRIPTS "Enable script plugins (perl, python, ...)" ON)
-option(ENABLE_PERL "Enable Perl scripting language" ON)
-option(ENABLE_PYTHON "Enable Python scripting language" ON)
-option(ENABLE_PYTHON3 "Use Python 3.x if found (NOT recommended because many \"official\" scripts won't work)" OFF)
-option(ENABLE_RUBY "Enable Ruby scripting language" ON)
-option(ENABLE_LUA "Enable Lua scripting language" ON)
-option(ENABLE_TCL "Enable Tcl scripting language" ON)
-option(ENABLE_GUILE "Enable Scheme (guile) scripting language" ON)
-option(ENABLE_JAVASCRIPT "Enable JavaScript scripting language" ON)
-option(ENABLE_PHP "Enable PHP scripting language" ON)
-option(ENABLE_SPELL "Enable Spell checker plugin" ON)
-option(ENABLE_ENCHANT "Enable Enchant lib for Spell checker plugin" OFF)
-option(ENABLE_TRIGGER "Enable Trigger plugin" ON)
-option(ENABLE_XFER "Enable Xfer plugin" ON)
-option(ENABLE_MAN "Enable build of man page" OFF)
-option(ENABLE_DOC "Enable build of documentation" OFF)
-option(ENABLE_TESTS "Enable tests" OFF)
+option(ENABLE_NCURSES "Compile the Ncurses interface" ON)
+option(ENABLE_HEADLESS "Compile the headless binary (required for tests)" ON)
+option(ENABLE_NLS "Enable Native Language Support" ON)
+option(ENABLE_GNUTLS "Enable SSLv3/TLS support" ON)
+option(ENABLE_LARGEFILE "Enable Large File Support" ON)
+option(ENABLE_ALIAS "Enable Alias plugin" ON)
+option(ENABLE_BUFLIST "Enable Buflist plugin" ON)
+option(ENABLE_CHARSET "Enable Charset plugin" ON)
+option(ENABLE_EXEC "Enable Exec plugin" ON)
+option(ENABLE_FIFO "Enable FIFO plugin" ON)
+option(ENABLE_FSET "Enable Fast Set plugin" ON)
+option(ENABLE_IRC "Enable IRC plugin" ON)
+option(ENABLE_LOGGER "Enable Logger plugin" ON)
+option(ENABLE_RELAY "Enable Relay plugin" ON)
+option(ENABLE_SCRIPT "Enable Script plugin (script manager)" ON)
+option(ENABLE_SCRIPTS "Enable script plugins (perl, python, ...)" ON)
+option(ENABLE_PERL "Enable Perl scripting language" ON)
+option(ENABLE_PYTHON "Enable Python scripting language" ON)
+option(ENABLE_PYTHON3 "Use Python 3.x if found (NOT recommended because many \"official\" scripts won't work)" OFF)
+option(ENABLE_RUBY "Enable Ruby scripting language" ON)
+option(ENABLE_LUA "Enable Lua scripting language" ON)
+option(ENABLE_TCL "Enable Tcl scripting language" ON)
+option(ENABLE_GUILE "Enable Scheme (guile) scripting language" ON)
+option(ENABLE_JAVASCRIPT "Enable JavaScript scripting language" ON)
+option(ENABLE_PHP "Enable PHP scripting language" ON)
+option(ENABLE_SPELL "Enable Spell checker plugin" ON)
+option(ENABLE_ENCHANT "Enable Enchant lib for Spell checker plugin" OFF)
+option(ENABLE_TRIGGER "Enable Trigger plugin" ON)
+option(ENABLE_XFER "Enable Xfer plugin" ON)
+option(ENABLE_MAN "Enable build of man page" OFF)
+option(ENABLE_DOC "Enable build of documentation" OFF)
+option(ENABLE_TESTS "Enable tests" OFF)
+option(ENABLE_CODE_COVERAGE "Enable code coverage" OFF)
+
+# code coverage
+add_library(coverage_config INTERFACE)
+if(ENABLE_CODE_COVERAGE)
+ target_compile_options(coverage_config INTERFACE -O0 -g --coverage)
+ target_link_libraries(coverage_config INTERFACE --coverage)
+endif()
# headless mode is required for tests
if(ENABLE_TESTS AND NOT ENABLE_HEADLESS)
diff --git a/ChangeLog.adoc b/ChangeLog.adoc
index 5ad385f74..22c4bbb46 100644
--- a/ChangeLog.adoc
+++ b/ChangeLog.adoc
@@ -43,8 +43,9 @@ Bug fixes::
Build::
- * lua: add detection of Lua 5.3 with autotools
+ * core: add CMake option "ENABLE_CODE_COVERAGE" to compile with code coverage options
* core: fix compilation on Mac OS (issue #1308)
+ * lua: add detection of Lua 5.3 with autotools
[[v2.4]]
== Version 2.4 (2019-02-17)
diff --git a/doc/de/weechat_user.de.adoc b/doc/de/weechat_user.de.adoc
index 27d049e66..278b58c64 100644
--- a/doc/de/weechat_user.de.adoc
+++ b/doc/de/weechat_user.de.adoc
@@ -293,6 +293,11 @@ Liste von häufig verwendeten Optionen:
| ENABLE_TESTS | `ON`, `OFF` | OFF |
kompiliert Testumgebung.
+
+// TRANSLATION MISSING
+| ENABLE_CODE_COVERAGE | `ON`, `OFF` | OFF |
+ Compile with code coverage options. +
+ This option should be used only for tests, to measure test coverage.
|===
Weitere Optionen können mit folgendem Befehl angezeigt werden:
diff --git a/doc/en/weechat_user.en.adoc b/doc/en/weechat_user.en.adoc
index b8bb4d665..b7af63581 100644
--- a/doc/en/weechat_user.en.adoc
+++ b/doc/en/weechat_user.en.adoc
@@ -285,6 +285,10 @@ List of commonly used options:
| ENABLE_TESTS | `ON`, `OFF` | OFF |
Compile tests.
+
+| ENABLE_CODE_COVERAGE | `ON`, `OFF` | OFF |
+ Compile with code coverage options. +
+ This option should be used only for tests, to measure test coverage.
|===
The other options can be displayed with this command:
diff --git a/doc/fr/weechat_user.fr.adoc b/doc/fr/weechat_user.fr.adoc
index 2a2164bcf..c89e40776 100644
--- a/doc/fr/weechat_user.fr.adoc
+++ b/doc/fr/weechat_user.fr.adoc
@@ -289,6 +289,11 @@ Liste des options couramment utilisées :
| ENABLE_TESTS | `ON`, `OFF` | OFF |
Compiler les tests.
+
+| ENABLE_CODE_COVERAGE | `ON`, `OFF` | OFF |
+ Compiler avec les options de couverture de code. +
+ Cette option ne devrait être utilisée que pour les tests, pour mesurer la
+ couverture de tests.
|===
Les autres options peuvent être affichées avec cette commande :
diff --git a/doc/it/weechat_user.it.adoc b/doc/it/weechat_user.it.adoc
index 33dfb4f08..5d6019880 100644
--- a/doc/it/weechat_user.it.adoc
+++ b/doc/it/weechat_user.it.adoc
@@ -320,6 +320,11 @@ List of commonly used options:
// TRANSLATION MISSING
| ENABLE_TESTS | `ON`, `OFF` | OFF |
Compile tests.
+
+// TRANSLATION MISSING
+| ENABLE_CODE_COVERAGE | `ON`, `OFF` | OFF |
+ Compile with code coverage options. +
+ This option should be used only for tests, to measure test coverage.
|===
The other options can be displayed with this command:
diff --git a/doc/ja/weechat_user.ja.adoc b/doc/ja/weechat_user.ja.adoc
index 5f5d860cf..72045a4a5 100644
--- a/doc/ja/weechat_user.ja.adoc
+++ b/doc/ja/weechat_user.ja.adoc
@@ -289,6 +289,11 @@ cmake に対するオプションを指定するには、以下の書式を使
| ENABLE_TESTS | `ON`, `OFF` | OFF |
コンパイルテスト。
+
+// TRANSLATION MISSING
+| ENABLE_CODE_COVERAGE | `ON`, `OFF` | OFF |
+ Compile with code coverage options. +
+ This option should be used only for tests, to measure test coverage.
|===
その他のオプションは以下のコマンドで確認してください:
diff --git a/doc/pl/weechat_user.pl.adoc b/doc/pl/weechat_user.pl.adoc
index c8c78996f..6e1f32135 100644
--- a/doc/pl/weechat_user.pl.adoc
+++ b/doc/pl/weechat_user.pl.adoc
@@ -291,6 +291,11 @@ Lista popularnych opcji:
| ENABLE_TESTS | `ON`, `OFF` | OFF |
Kompiluje testy.
+
+// TRANSLATION MISSING
+| ENABLE_CODE_COVERAGE | `ON`, `OFF` | OFF |
+ Compile with code coverage options. +
+ This option should be used only for tests, to measure test coverage.
|===
Pozostałe opcje można wyświetlić poleceniem:
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt
index e7ff4578b..55c1e1112 100644
--- a/src/core/CMakeLists.txt
+++ b/src/core/CMakeLists.txt
@@ -88,4 +88,5 @@ include_directories(${CURL_INCLUDE_DIRS})
include_directories(${CMAKE_BINARY_DIR})
add_library(weechat_core STATIC ${LIB_CORE_SRC})
+target_link_libraries(weechat_core coverage_config)
add_dependencies(weechat_core version_git)
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.
diff --git a/src/plugins/CMakeLists.txt b/src/plugins/CMakeLists.txt
index 609a55eaf..fc8d2eed4 100644
--- a/src/plugins/CMakeLists.txt
+++ b/src/plugins/CMakeLists.txt
@@ -34,6 +34,7 @@ set(LIB_PLUGINS_SCRIPTS_SRC
include_directories(${CMAKE_BINARY_DIR})
add_library(weechat_plugins STATIC ${LIB_PLUGINS_SRC})
+target_link_libraries(weechat_plugins coverage_config)
add_definitions(${CMAKE_SHARED_LIBRARY_C_FLAGS})
if(NOT CYGWIN)
diff --git a/src/plugins/alias/CMakeLists.txt b/src/plugins/alias/CMakeLists.txt
index 1e752ad87..ef01f319f 100644
--- a/src/plugins/alias/CMakeLists.txt
+++ b/src/plugins/alias/CMakeLists.txt
@@ -25,6 +25,6 @@ alias-config.c alias-config.h
alias-info.c alias-info.h)
set_target_properties(alias PROPERTIES PREFIX "")
-target_link_libraries(alias)
+target_link_libraries(alias coverage_config)
install(TARGETS alias LIBRARY DESTINATION ${LIBDIR}/plugins)
diff --git a/src/plugins/buflist/CMakeLists.txt b/src/plugins/buflist/CMakeLists.txt
index bdfbf8b91..e6bfe92f9 100644
--- a/src/plugins/buflist/CMakeLists.txt
+++ b/src/plugins/buflist/CMakeLists.txt
@@ -25,6 +25,6 @@ buflist-config.c buflist-config.h
buflist-mouse.c buflist-mouse.h)
set_target_properties(buflist PROPERTIES PREFIX "")
-target_link_libraries(buflist)
+target_link_libraries(buflist coverage_config)
install(TARGETS buflist LIBRARY DESTINATION ${LIBDIR}/plugins)
diff --git a/src/plugins/charset/CMakeLists.txt b/src/plugins/charset/CMakeLists.txt
index f62995bfe..50851b49f 100644
--- a/src/plugins/charset/CMakeLists.txt
+++ b/src/plugins/charset/CMakeLists.txt
@@ -23,9 +23,9 @@ set_target_properties(charset PROPERTIES PREFIX "")
if(ICONV_FOUND)
include_directories(${ICONV_INCLUDE_PATH})
if(ICONV_LIBRARY)
- target_link_libraries(charset ${ICONV_LIBRARY})
+ target_link_libraries(charset ${ICONV_LIBRARY} coverage_config)
else()
- target_link_libraries(charset)
+ target_link_libraries(charset coverage_config)
endif()
endif()
diff --git a/src/plugins/exec/CMakeLists.txt b/src/plugins/exec/CMakeLists.txt
index 8016b4540..84fa71ded 100644
--- a/src/plugins/exec/CMakeLists.txt
+++ b/src/plugins/exec/CMakeLists.txt
@@ -25,6 +25,6 @@ exec-completion.c exec-completion.h
exec-config.c exec-config.h)
set_target_properties(exec PROPERTIES PREFIX "")
-target_link_libraries(exec)
+target_link_libraries(exec coverage_config)
install(TARGETS exec LIBRARY DESTINATION ${LIBDIR}/plugins)
diff --git a/src/plugins/fifo/CMakeLists.txt b/src/plugins/fifo/CMakeLists.txt
index 34210e0a8..2885e095e 100644
--- a/src/plugins/fifo/CMakeLists.txt
+++ b/src/plugins/fifo/CMakeLists.txt
@@ -24,6 +24,6 @@ fifo-config.c fifo-config.h
fifo-info.c fifo-info.h)
set_target_properties(fifo PROPERTIES PREFIX "")
-target_link_libraries(fifo)
+target_link_libraries(fifo coverage_config)
install(TARGETS fifo LIBRARY DESTINATION ${LIBDIR}/plugins)
diff --git a/src/plugins/fset/CMakeLists.txt b/src/plugins/fset/CMakeLists.txt
index 5c2454742..c7b4098ca 100644
--- a/src/plugins/fset/CMakeLists.txt
+++ b/src/plugins/fset/CMakeLists.txt
@@ -29,6 +29,6 @@ fset-mouse.c fset-mouse.h
fset-option.c fset-option.h)
set_target_properties(fset PROPERTIES PREFIX "")
-target_link_libraries(fset)
+target_link_libraries(fset coverage_config)
install(TARGETS fset LIBRARY DESTINATION ${LIBDIR}/plugins)
diff --git a/src/plugins/guile/CMakeLists.txt b/src/plugins/guile/CMakeLists.txt
index b4f55d8ae..aee626837 100644
--- a/src/plugins/guile/CMakeLists.txt
+++ b/src/plugins/guile/CMakeLists.txt
@@ -26,7 +26,7 @@ if(GUILE_FOUND)
include_directories(${GUILE_INCLUDE_DIRS})
set(LINK_LIBS)
list(APPEND LINK_LIBS ${GUILE_LDFLAGS})
- target_link_libraries(guile ${LINK_LIBS} weechat_plugins_scripts)
+ target_link_libraries(guile ${LINK_LIBS} weechat_plugins_scripts coverage_config)
endif()
install(TARGETS guile LIBRARY DESTINATION ${LIBDIR}/plugins)
diff --git a/src/plugins/irc/CMakeLists.txt b/src/plugins/irc/CMakeLists.txt
index 28083f533..92609edf7 100644
--- a/src/plugins/irc/CMakeLists.txt
+++ b/src/plugins/irc/CMakeLists.txt
@@ -59,6 +59,6 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
list(APPEND LINK_LIBS "resolv")
endif()
-target_link_libraries(irc ${LINK_LIBS})
+target_link_libraries(irc ${LINK_LIBS} coverage_config)
install(TARGETS irc LIBRARY DESTINATION ${LIBDIR}/plugins)
diff --git a/src/plugins/javascript/CMakeLists.txt b/src/plugins/javascript/CMakeLists.txt
index cf8d9c98b..ceb5a99f5 100644
--- a/src/plugins/javascript/CMakeLists.txt
+++ b/src/plugins/javascript/CMakeLists.txt
@@ -27,7 +27,7 @@ set_target_properties(javascript PROPERTIES PREFIX "")
if(V8_FOUND)
include_directories(${V8_INCLUDE_DIR})
- target_link_libraries(javascript ${V8_LIBRARY} weechat_plugins_scripts)
+ target_link_libraries(javascript ${V8_LIBRARY} weechat_plugins_scripts coverage_config)
endif()
install(TARGETS javascript LIBRARY DESTINATION ${LIBDIR}/plugins)
diff --git a/src/plugins/logger/CMakeLists.txt b/src/plugins/logger/CMakeLists.txt
index 0c50556cf..ecd25d2bd 100644
--- a/src/plugins/logger/CMakeLists.txt
+++ b/src/plugins/logger/CMakeLists.txt
@@ -26,6 +26,6 @@ logger-info.c logger-info.h
logger-tail.c logger-tail.h)
set_target_properties(logger PROPERTIES PREFIX "")
-target_link_libraries(logger)
+target_link_libraries(logger coverage_config)
install(TARGETS logger LIBRARY DESTINATION ${LIBDIR}/plugins)
diff --git a/src/plugins/lua/CMakeLists.txt b/src/plugins/lua/CMakeLists.txt
index bad4268a5..d28a716fb 100644
--- a/src/plugins/lua/CMakeLists.txt
+++ b/src/plugins/lua/CMakeLists.txt
@@ -25,7 +25,7 @@ set_target_properties(lua PROPERTIES PREFIX "")
if(LUA_FOUND)
include_directories(${LUA_INCLUDE_DIRS})
- target_link_libraries(lua ${LUA_LDFLAGS} weechat_plugins_scripts)
+ target_link_libraries(lua ${LUA_LDFLAGS} weechat_plugins_scripts coverage_config)
endif()
install(TARGETS lua LIBRARY DESTINATION ${LIBDIR}/plugins)
diff --git a/src/plugins/perl/CMakeLists.txt b/src/plugins/perl/CMakeLists.txt
index 1d9a22a6b..234f3e70c 100644
--- a/src/plugins/perl/CMakeLists.txt
+++ b/src/plugins/perl/CMakeLists.txt
@@ -36,10 +36,10 @@ if(PERL_FOUND)
string(REPLACE "${PERL_DYNALOADER}" "" PERL_LFLAGS "${PERL_LFLAGS}")
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${PERL_LFLAGS}")
execute_process(COMMAND ${CMAKE_COMMAND} -E copy ${PERL_DYNALOADER} ${CMAKE_CURRENT_BINARY_DIR}/libDynaLoader.a)
- target_link_libraries(perl ${PERL_LIBRARY} weechat_plugins_scripts ${CMAKE_CURRENT_BINARY_DIR}/libDynaLoader.a)
+ target_link_libraries(perl ${PERL_LIBRARY} weechat_plugins_scripts ${CMAKE_CURRENT_BINARY_DIR}/libDynaLoader.a coverage_config)
else()
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${PERL_LFLAGS}")
- target_link_libraries(perl ${PERL_LIBRARY} weechat_plugins_scripts)
+ target_link_libraries(perl ${PERL_LIBRARY} weechat_plugins_scripts coverage_config)
endif()
endif()
diff --git a/src/plugins/php/CMakeLists.txt b/src/plugins/php/CMakeLists.txt
index 0fc8c3dc4..1c04ac0c7 100644
--- a/src/plugins/php/CMakeLists.txt
+++ b/src/plugins/php/CMakeLists.txt
@@ -25,7 +25,7 @@ set_target_properties(php PROPERTIES PREFIX "")
if(PHP_FOUND)
include_directories(${PHP_INCLUDE_DIRS})
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${PHP_LDFLAGS}")
- target_link_libraries(php ${PHP_LIB} weechat_plugins_scripts)
+ target_link_libraries(php ${PHP_LIB} weechat_plugins_scripts coverage_config)
endif()
install(TARGETS php LIBRARY DESTINATION ${LIBDIR}/plugins)
diff --git a/src/plugins/python/CMakeLists.txt b/src/plugins/python/CMakeLists.txt
index 63ff4ec24..a6ca8d2b5 100644
--- a/src/plugins/python/CMakeLists.txt
+++ b/src/plugins/python/CMakeLists.txt
@@ -25,7 +25,7 @@ set_target_properties(python PROPERTIES PREFIX "")
if(PYTHON_FOUND)
include_directories(${PYTHON_INCLUDE_PATH})
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${PYTHON_LFLAGS}")
- target_link_libraries(python ${PYTHON_LIBRARY} weechat_plugins_scripts)
+ target_link_libraries(python ${PYTHON_LIBRARY} weechat_plugins_scripts coverage_config)
endif()
install(TARGETS python LIBRARY DESTINATION ${LIBDIR}/plugins)
diff --git a/src/plugins/relay/CMakeLists.txt b/src/plugins/relay/CMakeLists.txt
index d47bbdc55..a33df99ac 100644
--- a/src/plugins/relay/CMakeLists.txt
+++ b/src/plugins/relay/CMakeLists.txt
@@ -47,6 +47,6 @@ if(GNUTLS_FOUND)
list(APPEND LINK_LIBS ${GNUTLS_LIBRARY})
endif()
-target_link_libraries(relay ${LINK_LIBS})
+target_link_libraries(relay ${LINK_LIBS} coverage_config)
install(TARGETS relay LIBRARY DESTINATION ${LIBDIR}/plugins)
diff --git a/src/plugins/ruby/CMakeLists.txt b/src/plugins/ruby/CMakeLists.txt
index 7857f9989..1f14dbcfa 100644
--- a/src/plugins/ruby/CMakeLists.txt
+++ b/src/plugins/ruby/CMakeLists.txt
@@ -26,7 +26,7 @@ if(RUBY_FOUND)
include_directories(${RUBY_INCLUDE_DIRS})
set(LINK_LIBS)
list(APPEND LINK_LIBS ${RUBY_LDFLAGS})
- target_link_libraries(ruby ${LINK_LIBS} ${RUBY_LIB} weechat_plugins_scripts)
+ target_link_libraries(ruby ${LINK_LIBS} ${RUBY_LIB} weechat_plugins_scripts coverage_config)
endif(RUBY_FOUND)
install(TARGETS ruby LIBRARY DESTINATION ${LIBDIR}/plugins)
diff --git a/src/plugins/script/CMakeLists.txt b/src/plugins/script/CMakeLists.txt
index 9883c19af..8235dbddb 100644
--- a/src/plugins/script/CMakeLists.txt
+++ b/src/plugins/script/CMakeLists.txt
@@ -34,6 +34,6 @@ set(LINK_LIBS)
list(APPEND LINK_LIBS ${ZLIB_LIBRARY})
list(APPEND LINK_LIBS ${GCRYPT_LDFLAGS})
-target_link_libraries(script ${LINK_LIBS})
+target_link_libraries(script ${LINK_LIBS} coverage_config)
install(TARGETS script LIBRARY DESTINATION ${LIBDIR}/plugins)
diff --git a/src/plugins/spell/CMakeLists.txt b/src/plugins/spell/CMakeLists.txt
index 0a1c51bb1..e6e674796 100644
--- a/src/plugins/spell/CMakeLists.txt
+++ b/src/plugins/spell/CMakeLists.txt
@@ -30,12 +30,12 @@ set_target_properties(spell PROPERTIES PREFIX "")
if(ENCHANT_FOUND)
include_directories(${ENCHANT_INCLUDE_DIR})
- target_link_libraries(spell ${ENCHANT_LIBRARIES})
+ target_link_libraries(spell ${ENCHANT_LIBRARIES} coverage_config)
add_definitions(-DUSE_ENCHANT)
else()
if(ASPELL_FOUND)
include_directories(${ASPELL_INCLUDE_PATH})
- target_link_libraries(spell ${ASPELL_LIBRARY})
+ target_link_libraries(spell ${ASPELL_LIBRARY} coverage_config)
endif()
endif()
diff --git a/src/plugins/tcl/CMakeLists.txt b/src/plugins/tcl/CMakeLists.txt
index befbda04b..f7aeca3b3 100644
--- a/src/plugins/tcl/CMakeLists.txt
+++ b/src/plugins/tcl/CMakeLists.txt
@@ -29,7 +29,7 @@ if(TCL_FOUND)
set(CMAKE_REQUIRED_LIBRARIES "${TCL_LIBRARY}")
include_directories(${TCL_INCLUDE_PATH})
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${TCL_LFLAGS}")
- target_link_libraries(tcl ${TCL_LIBRARY} weechat_plugins_scripts)
+ target_link_libraries(tcl ${TCL_LIBRARY} weechat_plugins_scripts coverage_config)
endif()
install(TARGETS tcl LIBRARY DESTINATION ${LIBDIR}/plugins)
diff --git a/src/plugins/trigger/CMakeLists.txt b/src/plugins/trigger/CMakeLists.txt
index 8965a7661..c0e9bb05b 100644
--- a/src/plugins/trigger/CMakeLists.txt
+++ b/src/plugins/trigger/CMakeLists.txt
@@ -26,6 +26,6 @@ trigger-completion.c trigger-completion.h
trigger-config.c trigger-config.h)
set_target_properties(trigger PROPERTIES PREFIX "")
-target_link_libraries(trigger)
+target_link_libraries(trigger coverage_config)
install(TARGETS trigger LIBRARY DESTINATION ${LIBDIR}/plugins)
diff --git a/src/plugins/xfer/CMakeLists.txt b/src/plugins/xfer/CMakeLists.txt
index 077a079cc..74f2c456b 100644
--- a/src/plugins/xfer/CMakeLists.txt
+++ b/src/plugins/xfer/CMakeLists.txt
@@ -40,6 +40,6 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
list(APPEND LINK_LIBS "resolv")
endif()
-target_link_libraries(xfer ${LINK_LIBS})
+target_link_libraries(xfer ${LINK_LIBS} coverage_config)
install(TARGETS xfer LIBRARY DESTINATION ${LIBDIR}/plugins)
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 77b7bdb00..0d7ed2b02 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -62,14 +62,14 @@ set(WEECHAT_TESTS_SRC tests.cpp tests.h)
add_executable(tests ${WEECHAT_TESTS_SRC})
set(LIBS
${LIBS}
- ${PROJECT_BINARY_DIR}/src/core/libweechat_core.a
- ${PROJECT_BINARY_DIR}/src/plugins/libweechat_plugins.a
- ${PROJECT_BINARY_DIR}/src/gui/libweechat_gui_common.a
- ${PROJECT_BINARY_DIR}/src/gui/curses/headless/libweechat_gui_headless.a
- ${PROJECT_BINARY_DIR}/src/gui/curses/headless/libweechat_ncurses_fake.a
- ${CMAKE_CURRENT_BINARY_DIR}/libweechat_unit_tests_core.a
+ weechat_core
+ weechat_plugins
+ weechat_gui_common
+ weechat_gui_headless
+ weechat_ncurses_fake
+ weechat_unit_tests_core
# due to circular references, we must link two times with libweechat_core.a
- ${PROJECT_BINARY_DIR}/src/core/libweechat_core.a
+ weechat_core
${EXTRA_LIBS}
${CURL_LIBRARIES}
${CPPUTEST_LIBRARIES}