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:
+2
-1
@@ -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()
|
||||
|
||||
@@ -33,5 +33,5 @@ endif()
|
||||
|
||||
find_package(PkgConfig)
|
||||
if(PKG_CONFIG_FOUND)
|
||||
pkg_search_module(CPPUTEST REQUIRED cpputest)
|
||||
pkg_search_module(CPPUTEST cpputest)
|
||||
endif()
|
||||
|
||||
@@ -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})
|
||||
|
||||
Reference in New Issue
Block a user