summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2018-03-11 09:59:39 +0100
committerSébastien Helleu <flashcode@flashtux.org>2018-03-11 09:59:39 +0100
commit805717e9ec3f66c960928bca607eceb871438fae (patch)
treec1832f0815bd8ade4530ed3948f55f0672103184 /CMakeLists.txt
parent0126b03f47db7f7842aff497cdbb0e41a0a5be0a (diff)
downloadweechat-805717e9ec3f66c960928bca607eceb871438fae.zip
core: add binary weechat-headless to run WeeChat without interface (closes #1120)
The optional command line option "--daemon" runs WeeChat like a daemon (fork, new process group, file descriptors closed).
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt8
1 files changed, 7 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0885d566b..ff9ed87ef 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -82,7 +82,8 @@ else()
set(INCLUDEDIR ${CMAKE_INSTALL_PREFIX}/include/${PROJECT_NAME})
endif()
-option(ENABLE_NCURSES "Enable Ncurses interface" ON)
+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)
@@ -114,6 +115,11 @@ option(ENABLE_MAN "Enable build of man page" OFF)
option(ENABLE_DOC "Enable build of documentation" OFF)
option(ENABLE_TESTS "Enable tests" OFF)
+# headless mode is required for tests
+if(ENABLE_TESTS AND NOT ENABLE_HEADLESS)
+ message(FATAL_ERROR "Headless mode is required for tests.")
+endif()
+
# option WEECHAT_HOME
if(NOT DEFINED WEECHAT_HOME OR "${WEECHAT_HOME}" STREQUAL "")
set(WEECHAT_HOME "~/.weechat")