1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-10 03:33:12 +02:00

core: make cpputest optional in cmake compilation

With this fix, WeeChat can be built without tests (if cpputest is not found),
without having to explicitely disable tests ("-DENABLE_TESTS=OFF").
This commit is contained in:
Sébastien Helleu
2015-05-17 14:58:10 +02:00
parent 81e037b1ce
commit 3262599413
3 changed files with 3 additions and 4 deletions
+2 -1
View File
@@ -212,7 +212,8 @@ endif()
add_subdirectory(src)
add_subdirectory(doc)
if(ENABLE_TESTS)
find_package(CppUTest)
if(ENABLE_TESTS AND CPPUTEST_FOUND)
enable_testing()
add_subdirectory(tests)
endif()
+1 -1
View File
@@ -33,5 +33,5 @@ endif()
find_package(PkgConfig)
if(PKG_CONFIG_FOUND)
pkg_search_module(CPPUTEST REQUIRED cpputest)
pkg_search_module(CPPUTEST cpputest)
endif()
-2
View File
@@ -19,8 +19,6 @@
enable_language(CXX)
find_package(CppUTest REQUIRED)
# fake ncurses lib (it does nothing)
set(LIB_WEECHAT_NCURSES_FAKE_SRC ncurses-fake.c)
add_library(weechat_ncurses_fake STATIC ${LIB_WEECHAT_NCURSES_FAKE_SRC})