Mercurial > irccd
changeset 659:e9adad05580f
CMake: style #782
author | David Demelier <markand@malikania.fr> |
---|---|
date | Tue, 27 Mar 2018 21:15:44 +0200 |
parents | e0714513ed1d |
children | 80640d2c01c5 |
files | cmake/IrccdOptions.cmake cmake/IrccdSystem.cmake cmake/function/IrccdBuildHtml.cmake cmake/function/IrccdDefineExecutable.cmake cmake/function/IrccdDefineLibrary.cmake cmake/function/IrccdDefineMan.cmake cmake/function/IrccdDefinePlugin.cmake cmake/function/IrccdDefineTest.cmake cmake/function/IrccdIndentMessage.cmake cmake/internal/sysconfig.hpp.in cmake/packages/FindEditline.cmake |
diffstat | 11 files changed, 30 insertions(+), 42 deletions(-) [+] |
line wrap: on
line diff
--- a/cmake/IrccdOptions.cmake Tue Mar 27 13:35:53 2018 +0200 +++ b/cmake/IrccdOptions.cmake Tue Mar 27 21:15:44 2018 +0200 @@ -19,21 +19,21 @@ # # Options that controls the build: # -# WITH_LIBEDIT Enable libedit support (default: on) -# WITH_SSL Enable OpenSSL (default: on) -# WITH_JS Enable JavaScript (default: on) -# WITH_TESTS Enable unit testing (default: off) -# WITH_SYSTEMD Install systemd service (default: on for Linux) # WITH_DOCS Enable building of all documentation (default: on) # WITH_DOXYGEN Enable internal irccd documentation (default: on) # WITH_HTML Enable HTML documentation +# WITH_JS Enable JavaScript (default: on) +# WITH_LIBEDIT Enable libedit support (default: on) # WITH_MAN Install manpages (default: on, off for Windows) # WITH_PKGCONFIG Install pkg-config files (default: on, off for Windows (except MinGW)) # WITH_PLUGIN_<NAME> Enable or disable the specified plugin (default: on) +# WITH_SSL Enable OpenSSL (default: on) +# WITH_SYSTEMD Install systemd service (default: on for Linux) +# WITH_TESTS Enable unit testing (default: off) # WITH_VERA Enable style checking using vera (default: on) # -# Note: the option() commands for WITH_PLUGIN_<name> variables are defined automatically from the IRCCD_PLUGINS -# list. +# Note: the option() commands for WITH_PLUGIN_<name> variables are defined +# automatically from the IRCCD_PLUGINS list. # # @@ -72,16 +72,16 @@ set(DEFAULT_PKGCONFIG "No") endif () -option(WITH_LIBEDIT "Enable libedit support" On) -option(WITH_SSL "Enable SSL" On) +option(WITH_DOCS "Enable building of all documentation" On) +option(WITH_DOXYGEN "Enable doxygen" Off) +option(WITH_HTML "Enable building of HTML documentation" On) option(WITH_JS "Enable embedded Duktape" On) -option(WITH_TESTS "Enable unit testing" Off) -option(WITH_SYSTEMD "Install systemd service" ${DEFAULT_SYSTEMD}) -option(WITH_DOCS "Enable building of all documentation" On) -option(WITH_HTML "Enable building of HTML documentation" On) -option(WITH_DOXYGEN "Enable doxygen" Off) +option(WITH_LIBEDIT "Enable libedit support" On) option(WITH_MAN "Install man pages" ${DEFAULT_MAN}) option(WITH_PKGCONFIG "Enable pkg-config file" ${DEFAULT_PKGCONFIG}) +option(WITH_SSL "Enable SSL" On) +option(WITH_SYSTEMD "Install systemd service" ${DEFAULT_SYSTEMD}) +option(WITH_TESTS "Enable unit testing" Off) option(WITH_VERA "Enable vera++" On) #
--- a/cmake/IrccdSystem.cmake Tue Mar 27 13:35:53 2018 +0200 +++ b/cmake/IrccdSystem.cmake Tue Mar 27 21:15:44 2018 +0200 @@ -116,7 +116,6 @@ # # The following variables are defined in irccd/sysconfig.h # -# HAVE_ACCESS True if has access(2) function (and sys/types.h and sys/stat.h), # HAVE_DAEMON True if daemon(3), # HAVE_GETLOGIN True if getlogin(3) function (and unistd.h) # HAVE_GETPID True if has getpid(2) function (and sys/types.h and unistd.h and grp.h), @@ -155,17 +154,6 @@ # #include <cstdlib> check_function_exists(setprogname HAVE_SETPROGNAME) -# access() POSIX function -# -# If HAVE_ACCESS is defined, include: -# -# #include <unistd.h> -check_function_exists(access HAVE_ACCESS) - -if (NOT HAVE_UNISTD_H) - set(HAVE_ACCESS FALSE) -endif () - # getlogin() function # # If HAVE_GETLOGIN is defined, include:
--- a/cmake/function/IrccdBuildHtml.cmake Tue Mar 27 13:35:53 2018 +0200 +++ b/cmake/function/IrccdBuildHtml.cmake Tue Mar 27 21:15:44 2018 +0200 @@ -20,7 +20,7 @@ # # irccd_build_html -# ------------------------------------------------------------------- +# ---------------- # # irccd_build_html( # COMPONENT (Optional) install the output documentation as the given component
--- a/cmake/function/IrccdDefineExecutable.cmake Tue Mar 27 13:35:53 2018 +0200 +++ b/cmake/function/IrccdDefineExecutable.cmake Tue Mar 27 21:15:44 2018 +0200 @@ -18,7 +18,7 @@ # # irccd_define_executable -# ------------------------------------------------------------------- +# ----------------------- # # irccd_define_executable( # TARGET target name
--- a/cmake/function/IrccdDefineLibrary.cmake Tue Mar 27 13:35:53 2018 +0200 +++ b/cmake/function/IrccdDefineLibrary.cmake Tue Mar 27 21:15:44 2018 +0200 @@ -18,7 +18,7 @@ # # irccd_define_library -# ------------------------------------------------------------------- +# -------------------- # # irccd_define_library( # TARGET target name @@ -31,8 +31,6 @@ # PUBLIC_INCLUDES (Optional) includes to share with target dependencies # ) # -# Create a static library for internal use. -# include(${CMAKE_CURRENT_LIST_DIR}/IrccdVeraCheck.cmake)
--- a/cmake/function/IrccdDefineMan.cmake Tue Mar 27 13:35:53 2018 +0200 +++ b/cmake/function/IrccdDefineMan.cmake Tue Mar 27 21:15:44 2018 +0200 @@ -16,8 +16,11 @@ # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. # -# irccd_define_man(file man) -# ------------------------------------------------------------------- +# +# irccd_define_man +# ---------------- +# +# irccd_define_man(file, man) # # Parameters: # file The file name to build
--- a/cmake/function/IrccdDefinePlugin.cmake Tue Mar 27 13:35:53 2018 +0200 +++ b/cmake/function/IrccdDefinePlugin.cmake Tue Mar 27 21:15:44 2018 +0200 @@ -18,7 +18,7 @@ # # irccd_define_plugin -# ------------------------------------------------------------------- +# ------------------- # # irccd_define_plugin( # NAME canonical plugin name
--- a/cmake/function/IrccdDefineTest.cmake Tue Mar 27 13:35:53 2018 +0200 +++ b/cmake/function/IrccdDefineTest.cmake Tue Mar 27 21:15:44 2018 +0200 @@ -18,7 +18,7 @@ # # irccd_define_test -# ------------------------------------------------------------------- +# ----------------- # # irccd_define_test( # NAME the test name
--- a/cmake/function/IrccdIndentMessage.cmake Tue Mar 27 13:35:53 2018 +0200 +++ b/cmake/function/IrccdIndentMessage.cmake Tue Mar 27 21:15:44 2018 +0200 @@ -18,7 +18,7 @@ # # irccd_indent_message -# ------------------------------------------------------------------- +# -------------------- # # irccd_indent_message(variable value padding) #
--- a/cmake/internal/sysconfig.hpp.in Tue Mar 27 13:35:53 2018 +0200 +++ b/cmake/internal/sysconfig.hpp.in Tue Mar 27 21:15:44 2018 +0200 @@ -1,5 +1,5 @@ /* - * sysconfig.h -- configuration for irccd + * sysconfig.hpp -- configuration for irccd * * Copyright (c) 2013-2018 David Demelier <markand@malikania.fr> * @@ -16,8 +16,8 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#ifndef IRCCD_SYSCONFIG_H -#define IRCCD_SYSCONFIG_H +#ifndef IRCCD_SYSCONFIG_HPP +#define IRCCD_SYSCONFIG_HPP /* * Fix annoying "Please include winsock2.h before windows.h" @@ -80,7 +80,6 @@ * ------------------------------------------------------------------ */ -#cmakedefine HAVE_ACCESS #cmakedefine HAVE_DAEMON #cmakedefine HAVE_GETLOGIN #cmakedefine HAVE_GETPID @@ -125,4 +124,4 @@ # define IRCCD_EXPORT #endif -#endif // !IRCCD_SYSCONFIG_H +#endif // !IRCCD_SYSCONFIG_HPP