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").v2.8-utf8proc
parent
81e037b1ce
commit
3262599413
|
@ -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})
|
||||
|
|
Loading…
Reference in New Issue