From e332d7a2c0900aec488ab508c3e9e389d2a71e32 Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Sat, 2 Nov 2013 23:44:45 +0100 Subject: Add initial CMakeLists.txt that compiles the current code --- CMakeLists.txt | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 CMakeLists.txt (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..163e361 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,39 @@ +cmake_minimum_required(VERSION 2.6) + +project(biboumi) + +set(${PROJECT_NAME}_VERSION_MAJOR 0) +set(${PROJECT_NAME}_VERSION_MINOR 1) + +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -pedantic -Wall -Wextra") +set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Og -fsanitize=address") + +include_directories("src/") + +# +## network +# +file(GLOB source_network + src/network/*.[hc]pp) +add_library(network STATIC ${source_network}) + +# +## irclib +# +file(GLOB source_libirc + src/libirc/*.[hc]pp) +add_library(libirc STATIC ${source_libirc}) +target_link_libraries(libirc network) + +# +## xmpplib +# +file(GLOB source_libxmpp + src/libxmpp/*.[hc]pp) +add_library(libxmpp STATIC ${source_libxmpp}) +target_link_libraries(libxmpp network) + +add_executable(${PROJECT_NAME} src/main.cpp) +target_link_libraries(${PROJECT_NAME} + libxmpp + libirc) \ No newline at end of file -- cgit v1.2.3 From 87aaacdb420341bf3619922332d58b95249971bc Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Sun, 3 Nov 2013 00:22:32 +0100 Subject: Rename libirc and libxmpp to irc and xmpp --- CMakeLists.txt | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 163e361..9f1eef6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,20 +20,20 @@ add_library(network STATIC ${source_network}) # ## irclib # -file(GLOB source_libirc - src/libirc/*.[hc]pp) -add_library(libirc STATIC ${source_libirc}) -target_link_libraries(libirc network) +file(GLOB source_irc + src/irc/*.[hc]pp) +add_library(irc STATIC ${source_irc}) +target_link_libraries(irc network ${CRYPTO++_LIBRARIES}) # ## xmpplib # -file(GLOB source_libxmpp - src/libxmpp/*.[hc]pp) -add_library(libxmpp STATIC ${source_libxmpp}) -target_link_libraries(libxmpp network) +file(GLOB source_xmpp + src/xmpp/*.[hc]pp) +add_library(xmpp STATIC ${source_xmpp}) +target_link_libraries(xmpp network ) add_executable(${PROJECT_NAME} src/main.cpp) target_link_libraries(${PROJECT_NAME} - libxmpp - libirc) \ No newline at end of file + xmpp + irc) \ No newline at end of file -- cgit v1.2.3 From 5bbd34a3a909fa904ee4402f01dac6bac59211b1 Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Sun, 3 Nov 2013 15:12:50 +0100 Subject: Add an XmppParser, and Stanza classes Generate events on stanza and stream open/close. Create Stanza and serialize them. Note: XML namespaces are not handled yet. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 9f1eef6..1c21b84 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -23,7 +23,7 @@ add_library(network STATIC ${source_network}) file(GLOB source_irc src/irc/*.[hc]pp) add_library(irc STATIC ${source_irc}) -target_link_libraries(irc network ${CRYPTO++_LIBRARIES}) +target_link_libraries(irc network ${CRYPTO++_LIBRARIES} expatpp) # ## xmpplib -- cgit v1.2.3 From f2f94618fcf87b4fc1ad86902c63a7a48be745b8 Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Sun, 3 Nov 2013 17:51:32 +0100 Subject: Add a basic XMPP component implementation, doing the authentication --- CMakeLists.txt | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 1c21b84..363eb79 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,7 +8,16 @@ set(${PROJECT_NAME}_VERSION_MINOR 1) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -pedantic -Wall -Wextra") set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Og -fsanitize=address") +# +## Look for external libraries +# +set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/") +find_package(Cryptopp REQUIRED) + include_directories("src/") +# the SYSTEM flag tells the compiler that we don't care about warnings +# coming from these headers. +include_directories(SYSTEM ${CRYPTO++_INCLUDE_DIR}) # ## network -- cgit v1.2.3 From bf7b05ef72bbdac97704d262ddfe418908267535 Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Wed, 6 Nov 2013 20:51:05 +0100 Subject: Implement the Bridge class to translate between the two protocols MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add all useful classes as well: Jid, Iid, IrcChannel, IrcUser etc to properly keep the informations about what we receive from the IRC server. Only handle the MUC join stanza, and send the list of users in the IRC channel to the XMPP user, and the IRC channel’s topic, for now. --- CMakeLists.txt | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 363eb79..bff724c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -32,7 +32,7 @@ add_library(network STATIC ${source_network}) file(GLOB source_irc src/irc/*.[hc]pp) add_library(irc STATIC ${source_irc}) -target_link_libraries(irc network ${CRYPTO++_LIBRARIES} expatpp) +target_link_libraries(irc network) # ## xmpplib @@ -40,9 +40,18 @@ target_link_libraries(irc network ${CRYPTO++_LIBRARIES} expatpp) file(GLOB source_xmpp src/xmpp/*.[hc]pp) add_library(xmpp STATIC ${source_xmpp}) -target_link_libraries(xmpp network ) +target_link_libraries(xmpp bridge network ${CRYPTO++_LIBRARIES} expatpp) + +# +## bridge +# +file(GLOB source_bridge + src/bridge/*.[hc]pp) +add_library(bridge STATIC ${source_bridge}) +target_link_libraries(bridge xmpp irc) add_executable(${PROJECT_NAME} src/main.cpp) target_link_libraries(${PROJECT_NAME} xmpp - irc) \ No newline at end of file + irc + bridge) \ No newline at end of file -- cgit v1.2.3 From ccebe901d7d76dfddc082d994efa54ef2aefee57 Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Sat, 9 Nov 2013 06:01:47 +0100 Subject: Check UTF-8 encoding, and convert strings to UTF-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Handle conversion errors properly by inserting � instead. Add a binary header to provide portable way to write binary literals (I like them) Also add a test file. ref #2404 --- CMakeLists.txt | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index bff724c..bd8ca76 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,6 +19,13 @@ include_directories("src/") # coming from these headers. include_directories(SYSTEM ${CRYPTO++_INCLUDE_DIR}) +# +## utils +# +file(GLOB source_utils + src/utils/*.[hc]pp) +add_library(utils STATIC ${source_utils}) + # ## network # @@ -32,7 +39,7 @@ add_library(network STATIC ${source_network}) file(GLOB source_irc src/irc/*.[hc]pp) add_library(irc STATIC ${source_irc}) -target_link_libraries(irc network) +target_link_libraries(irc network utils) # ## xmpplib @@ -40,7 +47,7 @@ target_link_libraries(irc network) file(GLOB source_xmpp src/xmpp/*.[hc]pp) add_library(xmpp STATIC ${source_xmpp}) -target_link_libraries(xmpp bridge network ${CRYPTO++_LIBRARIES} expatpp) +target_link_libraries(xmpp bridge network utils ${CRYPTO++_LIBRARIES} expatpp) # ## bridge @@ -54,4 +61,15 @@ add_executable(${PROJECT_NAME} src/main.cpp) target_link_libraries(${PROJECT_NAME} xmpp irc - bridge) \ No newline at end of file + bridge) + +# +## Tests +# + +add_executable(test src/test.cpp) +target_link_libraries(test + xmpp + irc + bridge + utils) -- cgit v1.2.3 From 3d92360310d8e35394109058ff723da57af5b380 Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Sun, 10 Nov 2013 02:26:07 +0100 Subject: Use the Expat library directly instead of relying on expatpp And now we handle namespaces, yay. And a nice little test. --- CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index bd8ca76..2ec9dd0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,11 +13,14 @@ set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Og -fsanitize=address") # set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/") find_package(Cryptopp REQUIRED) +include(FindEXPAT) +find_package(EXPAT REQUIRED) include_directories("src/") # the SYSTEM flag tells the compiler that we don't care about warnings # coming from these headers. include_directories(SYSTEM ${CRYPTO++_INCLUDE_DIR}) +include_directories(SYSTEM ${EXPAT_INCLUDE_DIRS}) # ## utils @@ -47,7 +50,8 @@ target_link_libraries(irc network utils) file(GLOB source_xmpp src/xmpp/*.[hc]pp) add_library(xmpp STATIC ${source_xmpp}) -target_link_libraries(xmpp bridge network utils ${CRYPTO++_LIBRARIES} expatpp) +target_link_libraries(xmpp bridge network utils + ${CRYPTO++_LIBRARIES} ${EXPAT_LIBRARIES}) # ## bridge -- cgit v1.2.3 From ef014f7ddf8fd603a4238f5ed4878d7038ce162d Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Sun, 10 Nov 2013 03:18:08 +0100 Subject: Properly detect iconv features to compile --- CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 2ec9dd0..f651723 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,14 +13,16 @@ set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Og -fsanitize=address") # set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/") find_package(Cryptopp REQUIRED) +find_package(Iconv REQUIRED) include(FindEXPAT) find_package(EXPAT REQUIRED) include_directories("src/") +include_directories(${EXPAT_INCLUDE_DIRS}) +include_directories(${ICONV_INCLUDE_DIR}) # the SYSTEM flag tells the compiler that we don't care about warnings # coming from these headers. include_directories(SYSTEM ${CRYPTO++_INCLUDE_DIR}) -include_directories(SYSTEM ${EXPAT_INCLUDE_DIRS}) # ## utils @@ -28,6 +30,7 @@ include_directories(SYSTEM ${EXPAT_INCLUDE_DIRS}) file(GLOB source_utils src/utils/*.[hc]pp) add_library(utils STATIC ${source_utils}) +target_link_libraries(utils ${ICONV_LIBRARIES}) # ## network -- cgit v1.2.3 From 5cb81cace08b016f50708bb8ef718e07865b435a Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Sun, 10 Nov 2013 03:29:12 +0100 Subject: And actually use the values found by cmake --- CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index f651723..b0d2801 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -80,3 +80,5 @@ target_link_libraries(test irc bridge utils) + +CONFIGURE_FILE(config.h.cmake config.h @ONLY) -- cgit v1.2.3 From af4fc92c215e48cf13be36a1f8e8e1a821dabb5a Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Sun, 10 Nov 2013 03:35:31 +0100 Subject: Fix the include of the config.h --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index b0d2801..a7ff1d4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -81,4 +81,4 @@ target_link_libraries(test bridge utils) -CONFIGURE_FILE(config.h.cmake config.h @ONLY) +CONFIGURE_FILE(config.h.cmake src/config.h @ONLY) -- cgit v1.2.3 From f0d9273da61ce154dbe460cf58c98de851d30615 Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Sun, 10 Nov 2013 20:47:11 +0100 Subject: Add a Config module, and use it to get the password from a file --- CMakeLists.txt | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index a7ff1d4..b0fae9e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -32,6 +32,14 @@ file(GLOB source_utils add_library(utils STATIC ${source_utils}) target_link_libraries(utils ${ICONV_LIBRARIES}) +# +## config +# +file(GLOB source_config + src/config/*.[hc]pp) +add_library(config STATIC ${source_config}) +target_link_libraries(config utils) + # ## network # @@ -64,11 +72,16 @@ file(GLOB source_bridge add_library(bridge STATIC ${source_bridge}) target_link_libraries(bridge xmpp irc) +# +## Main executable +# add_executable(${PROJECT_NAME} src/main.cpp) target_link_libraries(${PROJECT_NAME} xmpp irc - bridge) + bridge + utils + config) # ## Tests @@ -79,6 +92,7 @@ target_link_libraries(test xmpp irc bridge - utils) + utils + config) CONFIGURE_FILE(config.h.cmake src/config.h @ONLY) -- cgit v1.2.3 From 5817a95b5ee89480788832be35679dfcd2ed833b Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Tue, 12 Nov 2013 23:43:43 +0100 Subject: Basic handling of modes, both ways --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index b0fae9e..7f7633b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -70,7 +70,7 @@ target_link_libraries(xmpp bridge network utils file(GLOB source_bridge src/bridge/*.[hc]pp) add_library(bridge STATIC ${source_bridge}) -target_link_libraries(bridge xmpp irc) +target_link_libraries(bridge xmpp irc utils) # ## Main executable -- cgit v1.2.3 From 641166b037f73e47fe29eb9d7542c39349c28428 Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Thu, 14 Nov 2013 23:34:58 +0100 Subject: Link with pthread, required by cryptopp --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 7f7633b..21e82b4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -62,7 +62,7 @@ file(GLOB source_xmpp src/xmpp/*.[hc]pp) add_library(xmpp STATIC ${source_xmpp}) target_link_libraries(xmpp bridge network utils - ${CRYPTO++_LIBRARIES} ${EXPAT_LIBRARIES}) + ${CRYPTO++_LIBRARIES} ${EXPAT_LIBRARIES} pthread) # ## bridge -- cgit v1.2.3 From b72908548dc841de65dc9288a96c1abe648acc46 Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Thu, 21 Nov 2013 00:21:32 +0100 Subject: Let the user choose the poller to use through cmake POLLER option Use ccmake, or cmake -i, or cmake -DPOLLER=EPOLL, for example --- CMakeLists.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 21e82b4..2c01ee3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -24,6 +24,12 @@ include_directories(${ICONV_INCLUDE_DIR}) # coming from these headers. include_directories(SYSTEM ${CRYPTO++_INCLUDE_DIR}) +set(POLLER "POLL" CACHE STRING + "Choose the poller between POLL and EPOLL (Linux-only)") +if((NOT ${POLLER} MATCHES "POLL") AND + (NOT ${POLLER} MATCHES "EPOLL")) + message(FATAL_ERROR "POLLER must be either POLL or EPOLL") +endif() # ## utils # @@ -95,4 +101,4 @@ target_link_libraries(test utils config) -CONFIGURE_FILE(config.h.cmake src/config.h @ONLY) +configure_file(config.h.cmake src/config.h) -- cgit v1.2.3 From 31e18e49b699f606a8aeb1f529642a004781e704 Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Sun, 24 Nov 2013 15:37:48 +0100 Subject: =?UTF-8?q?fsanitize=3Daddress=20requires=20libasan,=20that?= =?UTF-8?q?=E2=80=99s=20a=20useless=20dependency.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Also we cannot use both this feature and valgrind at the same time. So, I’ll just specify this flag myself when I need it, this doesn’t need to be there by default --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 2c01ee3..daa6cf6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,7 +6,7 @@ set(${PROJECT_NAME}_VERSION_MAJOR 0) set(${PROJECT_NAME}_VERSION_MINOR 1) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -pedantic -Wall -Wextra") -set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Og -fsanitize=address") +set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Og") # ## Look for external libraries -- cgit v1.2.3 From 2662ed89e2cd41477582140e482f1ddbbfdb235e Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Tue, 3 Dec 2013 18:27:20 +0100 Subject: Add a logger class --- CMakeLists.txt | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index daa6cf6..51253cc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,6 +8,10 @@ set(${PROJECT_NAME}_VERSION_MINOR 1) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -pedantic -Wall -Wextra") set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Og") +# Define a __FILENAME__ macro to get the filename of each file, instead of +# the full path as in __FILE__ +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D__FILENAME__='\"$(subst ${CMAKE_SOURCE_DIR}/,,$(abspath $<))\"'") + # ## Look for external libraries # @@ -46,6 +50,14 @@ file(GLOB source_config add_library(config STATIC ${source_config}) target_link_libraries(config utils) +# +## logger +# +file(GLOB source_logger + src/logger/*.[hc]pp) +add_library(logger STATIC ${source_logger}) +target_link_libraries(logger config) + # ## network # @@ -99,6 +111,7 @@ target_link_libraries(test irc bridge utils - config) + config + logger) configure_file(config.h.cmake src/config.h) -- cgit v1.2.3 From a4c845ab6c54172ea305f33734c83238c75d421a Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Tue, 3 Dec 2013 19:10:44 +0100 Subject: Use the logger everywhere --- CMakeLists.txt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 51253cc..ea51db7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -64,6 +64,7 @@ target_link_libraries(logger config) file(GLOB source_network src/network/*.[hc]pp) add_library(network STATIC ${source_network}) +target_link_libraries(network logger) # ## irclib @@ -71,7 +72,7 @@ add_library(network STATIC ${source_network}) file(GLOB source_irc src/irc/*.[hc]pp) add_library(irc STATIC ${source_irc}) -target_link_libraries(irc network utils) +target_link_libraries(irc network utils logger) # ## xmpplib @@ -79,7 +80,7 @@ target_link_libraries(irc network utils) file(GLOB source_xmpp src/xmpp/*.[hc]pp) add_library(xmpp STATIC ${source_xmpp}) -target_link_libraries(xmpp bridge network utils +target_link_libraries(xmpp bridge network utils logger ${CRYPTO++_LIBRARIES} ${EXPAT_LIBRARIES} pthread) # @@ -88,7 +89,7 @@ target_link_libraries(xmpp bridge network utils file(GLOB source_bridge src/bridge/*.[hc]pp) add_library(bridge STATIC ${source_bridge}) -target_link_libraries(bridge xmpp irc utils) +target_link_libraries(bridge xmpp irc utils logger) # ## Main executable -- cgit v1.2.3 From 2c9680bc0392a33d32b90723228ec60753070a9f Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Sun, 8 Dec 2013 15:31:20 +0100 Subject: Rewrite the FindCryptopp cmake module cleanly --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index ea51db7..81ecaaf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -26,7 +26,7 @@ include_directories(${EXPAT_INCLUDE_DIRS}) include_directories(${ICONV_INCLUDE_DIR}) # the SYSTEM flag tells the compiler that we don't care about warnings # coming from these headers. -include_directories(SYSTEM ${CRYPTO++_INCLUDE_DIR}) +include_directories(SYSTEM ${CRYPTO++_INCLUDE_DIRS}) set(POLLER "POLL" CACHE STRING "Choose the poller between POLL and EPOLL (Linux-only)") -- cgit v1.2.3 From fb01f78b0ac840387613bf671e980cead27f8fc0 Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Sun, 8 Dec 2013 15:32:14 +0100 Subject: Rewrite the FindIconv module cleanly --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 81ecaaf..3011fd3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -23,7 +23,7 @@ find_package(EXPAT REQUIRED) include_directories("src/") include_directories(${EXPAT_INCLUDE_DIRS}) -include_directories(${ICONV_INCLUDE_DIR}) +include_directories(${ICONV_INCLUDE_DIRS}) # the SYSTEM flag tells the compiler that we don't care about warnings # coming from these headers. include_directories(SYSTEM ${CRYPTO++_INCLUDE_DIRS}) -- cgit v1.2.3 From cb718def0cb51aac4c2125e3864522740fcb2573 Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Sun, 8 Dec 2013 18:02:24 +0100 Subject: Put utils::tolower definition in its own cpp file --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 3011fd3..8a8ae9c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -34,6 +34,7 @@ if((NOT ${POLLER} MATCHES "POLL") AND (NOT ${POLLER} MATCHES "EPOLL")) message(FATAL_ERROR "POLLER must be either POLL or EPOLL") endif() + # ## utils # -- cgit v1.2.3 From b11126a19dbaadf4c32fb8dbec22754ad0712c26 Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Sun, 8 Dec 2013 20:14:12 +0100 Subject: Provide a JID for IRC users, and add a stringprep dependency for this --- CMakeLists.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 8a8ae9c..ac93ff1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,6 +20,7 @@ find_package(Cryptopp REQUIRED) find_package(Iconv REQUIRED) include(FindEXPAT) find_package(EXPAT REQUIRED) +find_package(Libidn) include_directories("src/") include_directories(${EXPAT_INCLUDE_DIRS}) @@ -28,6 +29,12 @@ include_directories(${ICONV_INCLUDE_DIRS}) # coming from these headers. include_directories(SYSTEM ${CRYPTO++_INCLUDE_DIRS}) +if(LIBIDN_FOUND) + include_directories(${LIBIDN_INCLUDE_DIRS}) +else() + message("Building without stringprep support.") +endif() + set(POLLER "POLL" CACHE STRING "Choose the poller between POLL and EPOLL (Linux-only)") if((NOT ${POLLER} MATCHES "POLL") AND @@ -35,6 +42,7 @@ if((NOT ${POLLER} MATCHES "POLL") AND message(FATAL_ERROR "POLLER must be either POLL or EPOLL") endif() + # ## utils # @@ -83,6 +91,9 @@ file(GLOB source_xmpp add_library(xmpp STATIC ${source_xmpp}) target_link_libraries(xmpp bridge network utils logger ${CRYPTO++_LIBRARIES} ${EXPAT_LIBRARIES} pthread) +if(LIBIDN_FOUND) + target_link_libraries(xmpp ${LIBIDN_LIBRARIES}) +endif() # ## bridge -- cgit v1.2.3 From 48b4f7b83f9f8e6d89d56f5e24f0ed1d7c4676a1 Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Sun, 12 Jan 2014 04:12:27 +0100 Subject: Remove cryptopp dependency, directly include a simple sha1 implementation --- CMakeLists.txt | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index ac93ff1..433b965 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,7 +16,6 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D__FILENAME__='\"$(subst ${CMAKE_SOURCE ## Look for external libraries # set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/") -find_package(Cryptopp REQUIRED) find_package(Iconv REQUIRED) include(FindEXPAT) find_package(EXPAT REQUIRED) @@ -25,9 +24,6 @@ find_package(Libidn) include_directories("src/") include_directories(${EXPAT_INCLUDE_DIRS}) include_directories(${ICONV_INCLUDE_DIRS}) -# the SYSTEM flag tells the compiler that we don't care about warnings -# coming from these headers. -include_directories(SYSTEM ${CRYPTO++_INCLUDE_DIRS}) if(LIBIDN_FOUND) include_directories(${LIBIDN_INCLUDE_DIRS}) @@ -90,7 +86,7 @@ file(GLOB source_xmpp src/xmpp/*.[hc]pp) add_library(xmpp STATIC ${source_xmpp}) target_link_libraries(xmpp bridge network utils logger - ${CRYPTO++_LIBRARIES} ${EXPAT_LIBRARIES} pthread) + ${EXPAT_LIBRARIES} pthread) if(LIBIDN_FOUND) target_link_libraries(xmpp ${LIBIDN_LIBRARIES}) endif() -- cgit v1.2.3 From b71547a32b9beefbe24465a5ba092d2f9b3b04e5 Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Tue, 14 Jan 2014 21:45:56 +0100 Subject: Fix the build system to correctly include config.h --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 433b965..222c609 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -21,6 +21,8 @@ include(FindEXPAT) find_package(EXPAT REQUIRED) find_package(Libidn) +# To be able to include the config.h file generated by cmake +include_directories(${CMAKE_CURRENT_BINARY_DIR}) include_directories("src/") include_directories(${EXPAT_INCLUDE_DIRS}) include_directories(${ICONV_INCLUDE_DIRS}) @@ -123,4 +125,4 @@ target_link_libraries(test config logger) -configure_file(config.h.cmake src/config.h) +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h) \ No newline at end of file -- cgit v1.2.3 From 7cfc79179c8dda5c4f8dbde467fe8c8a30010f5f Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Mon, 17 Feb 2014 02:12:12 +0100 Subject: Make install rule --- CMakeLists.txt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 222c609..660f238 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -125,4 +125,11 @@ target_link_libraries(test config logger) -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h) \ No newline at end of file +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h) + +# +## Install target +# +install(TARGETS ${PROJECT_NAME} + RUNTIME DESTINATION bin) +install(FILES doc/${PROJECT_NAME}.1 DESTINATION man/man1) -- cgit v1.2.3 From e43de640e9158ef396c9dc71a13bdcbfef740e7d Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Mon, 17 Feb 2014 03:07:27 +0100 Subject: Build the man page as part of the build process, if ronn is found --- CMakeLists.txt | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 660f238..edbc87e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -40,6 +40,18 @@ if((NOT ${POLLER} MATCHES "POLL") AND message(FATAL_ERROR "POLLER must be either POLL or EPOLL") endif() +# +## Documentation +# +find_program(RONN_EXECUTABLE NAMES ronn + DOC "The ronn software, to build the man page from the markdown documentation") +if(RONN_EXECUTABLE) + set(WITH_DOC true) + add_custom_target(doc + ${RONN_SOFTWARE} --roff ${CMAKE_CURRENT_BINARY_DIR}/doc/${PROJECT_NAME}.1.md + COMMENT "Generate the man page" VERBATIM) +endif() + # ## utils @@ -111,6 +123,9 @@ target_link_libraries(${PROJECT_NAME} bridge utils config) +if(WITH_DOC) + add_dependencies(${PROJECT_NAME} doc) +endif() # ## Tests @@ -132,4 +147,6 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake ${CMAKE_CURRENT_BINARY # install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION bin) -install(FILES doc/${PROJECT_NAME}.1 DESTINATION man/man1) +if(WITH_DOC) + install(FILES doc/${PROJECT_NAME}.1 DESTINATION man/man1) +endif() \ No newline at end of file -- cgit v1.2.3 From aeae88dd32b5130c87929fb0d0bf0f97a17286c2 Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Wed, 19 Feb 2014 02:49:22 +0100 Subject: =?UTF-8?q?Move=20CMake=E2=80=99s=20config.h(.cmake)=20files=20int?= =?UTF-8?q?o=20src/?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CMakeLists.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index edbc87e..21bfb78 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,7 +22,6 @@ find_package(EXPAT REQUIRED) find_package(Libidn) # To be able to include the config.h file generated by cmake -include_directories(${CMAKE_CURRENT_BINARY_DIR}) include_directories("src/") include_directories(${EXPAT_INCLUDE_DIRS}) include_directories(${ICONV_INCLUDE_DIRS}) @@ -140,7 +139,7 @@ target_link_libraries(test config logger) -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h) +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/src/config.h) # ## Install target -- cgit v1.2.3 From 3b1bf740a3299e3373916fd343492420550464e1 Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Fri, 14 Mar 2014 01:34:35 +0100 Subject: Fix the CMakeLists.txt regarding ronn --- CMakeLists.txt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 21bfb78..21e7fa6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,7 +6,7 @@ set(${PROJECT_NAME}_VERSION_MAJOR 0) set(${PROJECT_NAME}_VERSION_MINOR 1) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -pedantic -Wall -Wextra") -set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Og") +# set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fsanitize=address") # Define a __FILENAME__ macro to get the filename of each file, instead of # the full path as in __FILE__ @@ -47,11 +47,10 @@ find_program(RONN_EXECUTABLE NAMES ronn if(RONN_EXECUTABLE) set(WITH_DOC true) add_custom_target(doc - ${RONN_SOFTWARE} --roff ${CMAKE_CURRENT_BINARY_DIR}/doc/${PROJECT_NAME}.1.md + ${RONN_EXECUTABLE} --roff ${CMAKE_CURRENT_BINARY_DIR}/doc/${PROJECT_NAME}.1.md COMMENT "Generate the man page" VERBATIM) endif() - # ## utils # -- cgit v1.2.3 From 8246849fdfdbfa32c921203dbe9c3b2c29d3e853 Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Sun, 13 Apr 2014 19:16:18 +0200 Subject: Do not link with pthread --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 21e7fa6..acba720 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -98,7 +98,7 @@ file(GLOB source_xmpp src/xmpp/*.[hc]pp) add_library(xmpp STATIC ${source_xmpp}) target_link_libraries(xmpp bridge network utils logger - ${EXPAT_LIBRARIES} pthread) + ${EXPAT_LIBRARIES}) if(LIBIDN_FOUND) target_link_libraries(xmpp ${LIBIDN_LIBRARIES}) endif() -- cgit v1.2.3 From c64bb0bde9dbf572bd4d3bbaf478ec812a2f12d6 Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Sun, 13 Apr 2014 20:28:42 +0200 Subject: Improved doc rule in the cmake thing --- CMakeLists.txt | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index acba720..85c4138 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,7 +6,6 @@ set(${PROJECT_NAME}_VERSION_MAJOR 0) set(${PROJECT_NAME}_VERSION_MINOR 1) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -pedantic -Wall -Wextra") -# set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fsanitize=address") # Define a __FILENAME__ macro to get the filename of each file, instead of # the full path as in __FILE__ @@ -42,13 +41,17 @@ endif() # ## Documentation # +set(MAN_PAGE ${CMAKE_CURRENT_BINARY_DIR}/doc/${PROJECT_NAME}.1) +set(DOC_PAGE ${CMAKE_CURRENT_SOURCE_DIR}/doc/${PROJECT_NAME}.1.md) find_program(RONN_EXECUTABLE NAMES ronn DOC "The ronn software, to build the man page from the markdown documentation") if(RONN_EXECUTABLE) set(WITH_DOC true) - add_custom_target(doc - ${RONN_EXECUTABLE} --roff ${CMAKE_CURRENT_BINARY_DIR}/doc/${PROJECT_NAME}.1.md - COMMENT "Generate the man page" VERBATIM) + file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc/) + add_custom_command(OUTPUT ${MAN_PAGE} + COMMAND ${RONN_EXECUTABLE} --roff < ${DOC_PAGE} > ${MAN_PAGE} + DEPENDS ${DOC_PAGE}) + add_custom_target(doc DEPENDS ${MAN_PAGE}) endif() # @@ -146,5 +149,5 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/config.h.cmake ${CMAKE_CURRENT_BI install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION bin) if(WITH_DOC) - install(FILES doc/${PROJECT_NAME}.1 DESTINATION man/man1) + install(FILES ${MAN_PAGE} DESTINATION man/man1) endif() \ No newline at end of file -- cgit v1.2.3 From 9d8166f10d1f14acb936b58fd2907184b1eeadad Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Tue, 15 Apr 2014 07:02:09 +0200 Subject: Add support for systemd-daemon --- CMakeLists.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 85c4138..84d9be9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,6 +19,7 @@ find_package(Iconv REQUIRED) include(FindEXPAT) find_package(EXPAT REQUIRED) find_package(Libidn) +find_package(SystemdDaemon) # To be able to include the config.h file generated by cmake include_directories("src/") @@ -31,6 +32,12 @@ else() message("Building without stringprep support.") endif() +if(SYSTEMDDAEMON_FOUND) + include_directories(${SYSTEMDDAEMON_INCLUDE_DIRS}) +else() + message("Building without systemd daemon support.") +endif() + set(POLLER "POLL" CACHE STRING "Choose the poller between POLL and EPOLL (Linux-only)") if((NOT ${POLLER} MATCHES "POLL") AND @@ -124,6 +131,9 @@ target_link_libraries(${PROJECT_NAME} bridge utils config) +if(SYSTEMDDAEMON_FOUND) + target_link_libraries(xmpp ${SYSTEMDDAEMON_LIBRARIES}) +endif() if(WITH_DOC) add_dependencies(${PROJECT_NAME} doc) endif() -- cgit v1.2.3 From 0b4f761e314fe9055ed2bc353a699454a194a5d6 Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Tue, 22 Apr 2014 19:28:02 +0200 Subject: Fix the CMakeLists.txt to correctly have -Ibuild/src/ --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 84d9be9..361237a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,7 +22,8 @@ find_package(Libidn) find_package(SystemdDaemon) # To be able to include the config.h file generated by cmake -include_directories("src/") +include_directories("${CMAKE_CURRENT_SOURCE_DIR}/src/") +include_directories("${CMAKE_CURRENT_BINARY_DIR}/src/") include_directories(${EXPAT_INCLUDE_DIRS}) include_directories(${ICONV_INCLUDE_DIRS}) -- cgit v1.2.3 From c6059e5a215624e205cae401183f3a8bb1bf87d0 Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Mon, 28 Apr 2014 18:46:25 +0200 Subject: Upgrade to C++14 --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 361237a..9c1cc5f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,7 +5,7 @@ project(biboumi) set(${PROJECT_NAME}_VERSION_MAJOR 0) set(${PROJECT_NAME}_VERSION_MINOR 1) -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -pedantic -Wall -Wextra") +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++1y -pedantic -Wall -Wextra") # Define a __FILENAME__ macro to get the filename of each file, instead of # the full path as in __FILE__ -- cgit v1.2.3 From 18b27793de8863f58b284ee791a8207a79738b85 Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Wed, 30 Apr 2014 02:30:19 +0200 Subject: Use epoll on linux by default, poll otherwise --- CMakeLists.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 9c1cc5f..943206e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -39,8 +39,12 @@ else() message("Building without systemd daemon support.") endif() -set(POLLER "POLL" CACHE STRING - "Choose the poller between POLL and EPOLL (Linux-only)") +set(POLLER_DOCSTRING "Choose the poller between POLL and EPOLL (Linux-only)") +if(${CMAKE_SYSTEM_NAME} MATCHES "Linux") + set(POLLER "EPOLL" CACHE STRING ${POLLER_DOCSTRING}) +else() + set(POLLER "POLL" CACHE STRING ${POLLER_DOCSTRING}) +endif() if((NOT ${POLLER} MATCHES "POLL") AND (NOT ${POLLER} MATCHES "EPOLL")) message(FATAL_ERROR "POLLER must be either POLL or EPOLL") -- cgit v1.2.3 From 23db31cff199e5b05facb80d9534ae51ce0d63ed Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Sun, 11 May 2014 03:36:42 +0200 Subject: [cmake] Do not print useless messages when an optional lib is not found --- CMakeLists.txt | 4 ---- 1 file changed, 4 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 943206e..f29ceef 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -29,14 +29,10 @@ include_directories(${ICONV_INCLUDE_DIRS}) if(LIBIDN_FOUND) include_directories(${LIBIDN_INCLUDE_DIRS}) -else() - message("Building without stringprep support.") endif() if(SYSTEMDDAEMON_FOUND) include_directories(${SYSTEMDDAEMON_INCLUDE_DIRS}) -else() - message("Building without systemd daemon support.") endif() set(POLLER_DOCSTRING "Choose the poller between POLL and EPOLL (Linux-only)") -- cgit v1.2.3 From 634e7cf125a8870f49b3c99364d710b0da98decf Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Sun, 11 May 2014 03:37:07 +0200 Subject: mini reorder --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index f29ceef..1589399 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,9 +15,9 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D__FILENAME__='\"$(subst ${CMAKE_SOURCE ## Look for external libraries # set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/") -find_package(Iconv REQUIRED) include(FindEXPAT) find_package(EXPAT REQUIRED) +find_package(Iconv REQUIRED) find_package(Libidn) find_package(SystemdDaemon) -- cgit v1.2.3 From a63faf6fa95017dbbfeaf0ff43fdb526c4ae7068 Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Fri, 30 May 2014 13:39:00 +0200 Subject: Use libuuid to generate unique IDs for iq and adhoc sessions --- CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 1589399..90b5432 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,6 +18,7 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/") include(FindEXPAT) find_package(EXPAT REQUIRED) find_package(Iconv REQUIRED) +find_package(Libuuid REQUIRED) find_package(Libidn) find_package(SystemdDaemon) @@ -26,6 +27,7 @@ include_directories("${CMAKE_CURRENT_SOURCE_DIR}/src/") include_directories("${CMAKE_CURRENT_BINARY_DIR}/src/") include_directories(${EXPAT_INCLUDE_DIRS}) include_directories(${ICONV_INCLUDE_DIRS}) +include_directories(${LIBUUID_INCLUDE_DIRS}) if(LIBIDN_FOUND) include_directories(${LIBIDN_INCLUDE_DIRS}) @@ -109,7 +111,8 @@ file(GLOB source_xmpp src/xmpp/*.[hc]pp) add_library(xmpp STATIC ${source_xmpp}) target_link_libraries(xmpp bridge network utils logger - ${EXPAT_LIBRARIES}) + ${EXPAT_LIBRARIES} + ${LIBUUID_LIBRARIES}) if(LIBIDN_FOUND) target_link_libraries(xmpp ${LIBIDN_LIBRARIES}) endif() -- cgit v1.2.3 From 23f32ba39ebe5e9bbdfc4dd00d9914c0f0447ef4 Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Sun, 18 May 2014 20:23:08 +0200 Subject: Implement TLS support using Botan For now, it tries two TLS ports and then connects to the non-tls port. In the future we would like the user to be able to configure that. fix #2435 --- CMakeLists.txt | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 90b5432..a71df57 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -21,6 +21,7 @@ find_package(Iconv REQUIRED) find_package(Libuuid REQUIRED) find_package(Libidn) find_package(SystemdDaemon) +find_package(Botan) # To be able to include the config.h file generated by cmake include_directories("${CMAKE_CURRENT_SOURCE_DIR}/src/") @@ -37,6 +38,10 @@ if(SYSTEMDDAEMON_FOUND) include_directories(${SYSTEMDDAEMON_INCLUDE_DIRS}) endif() +if(BOTAN_FOUND) + include_directories(${BOTAN_INCLUDE_DIRS}) +endif() + set(POLLER_DOCSTRING "Choose the poller between POLL and EPOLL (Linux-only)") if(${CMAKE_SYSTEM_NAME} MATCHES "Linux") set(POLLER "EPOLL" CACHE STRING ${POLLER_DOCSTRING}) @@ -95,6 +100,9 @@ file(GLOB source_network src/network/*.[hc]pp) add_library(network STATIC ${source_network}) target_link_libraries(network logger) +if(BOTAN_FOUND) + target_link_libraries(network ${BOTAN_LIBRARIES}) +endif() # ## irclib -- cgit v1.2.3 From 349dc06e91bd1b944bd2a1770dba7b7a3a67ce61 Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Sun, 8 Jun 2014 13:03:05 +0200 Subject: Silence warnings coming from Botan headers --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index a71df57..2f21103 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -39,7 +39,7 @@ if(SYSTEMDDAEMON_FOUND) endif() if(BOTAN_FOUND) - include_directories(${BOTAN_INCLUDE_DIRS}) + include_directories(SYSTEM ${BOTAN_INCLUDE_DIRS}) endif() set(POLLER_DOCSTRING "Choose the poller between POLL and EPOLL (Linux-only)") -- cgit v1.2.3 From 9757c2c6956762263c247922ed3262d0d1b3c0aa Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Tue, 17 Jun 2014 21:38:56 +0200 Subject: includes from cmake BINARY_DIR should be included before considering SOURCE_DIR --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 2f21103..8a565ff 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -24,8 +24,8 @@ find_package(SystemdDaemon) find_package(Botan) # To be able to include the config.h file generated by cmake -include_directories("${CMAKE_CURRENT_SOURCE_DIR}/src/") include_directories("${CMAKE_CURRENT_BINARY_DIR}/src/") +include_directories("${CMAKE_CURRENT_SOURCE_DIR}/src/") include_directories(${EXPAT_INCLUDE_DIRS}) include_directories(${ICONV_INCLUDE_DIRS}) include_directories(${LIBUUID_INCLUDE_DIRS}) -- cgit v1.2.3 From aaf71774131198de2095c07e560fb420833c544d Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Tue, 17 Jun 2014 20:56:32 +0200 Subject: Write the software version, including the git hash, in config.h using cmake --- CMakeLists.txt | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 8a565ff..3d634b1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,8 +2,9 @@ cmake_minimum_required(VERSION 2.6) project(biboumi) -set(${PROJECT_NAME}_VERSION_MAJOR 0) -set(${PROJECT_NAME}_VERSION_MINOR 1) +set(${PROJECT_NAME}_VERSION_MAJOR 1) +set(${PROJECT_NAME}_VERSION_MINOR 0) +set(${PROJECT_NAME}_VERSION_SUFFIX "~dev") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++1y -pedantic -Wall -Wextra") @@ -23,6 +24,26 @@ find_package(Libidn) find_package(SystemdDaemon) find_package(Botan) +# +## Get the software version +# +if(${PROJECT_NAME}_VERSION_SUFFIX MATCHES "~dev") + # If we are on a dev version, append the hash of the current git HEAD to + # the version + include(FindGit) + if(GIT_FOUND) + execute_process(COMMAND git --git-dir=${CMAKE_SOURCE_DIR}/.git rev-parse --short HEAD + OUTPUT_VARIABLE GIT_REVISION + OUTPUT_STRIP_TRAILING_WHITESPACE) + if(GIT_REVISION) + set(${PROJECT_NAME}_VERSION_SUFFIX "${${PROJECT_NAME}_VERSION_SUFFIX} (${GIT_REVISION})") + endif() + endif() +endif() + +set(BIBOUMI_VERSION + ${${PROJECT_NAME}_VERSION_MAJOR}.${${PROJECT_NAME}_VERSION_MINOR}${${PROJECT_NAME}_VERSION_SUFFIX}) + # To be able to include the config.h file generated by cmake include_directories("${CMAKE_CURRENT_BINARY_DIR}/src/") include_directories("${CMAKE_CURRENT_SOURCE_DIR}/src/") -- cgit v1.2.3 From a2d55e4bead65d211b1c84e3b2a2a55b70f852d8 Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Mon, 23 Jun 2014 01:00:21 +0200 Subject: Rename cmake target test->test_suite for cmake 3.0 See CMP0037 --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 3d634b1..947e8fe 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -175,8 +175,8 @@ endif() ## Tests # -add_executable(test src/test.cpp) -target_link_libraries(test +add_executable(test_suite src/test.cpp) +target_link_libraries(test_suite xmpp irc bridge -- cgit v1.2.3 From 2cf64e10b51579d0bb1d270f82c4fdebf92a6ce6 Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Tue, 24 Jun 2014 17:45:50 +0200 Subject: Provide a make dist target --- CMakeLists.txt | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 947e8fe..a33fffe 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -27,16 +27,22 @@ find_package(Botan) # ## Get the software version # -if(${PROJECT_NAME}_VERSION_SUFFIX MATCHES "~dev") +set(ARCHIVE_NAME ${CMAKE_PROJECT_NAME}-${${PROJECT_NAME}_VERSION_MAJOR}.${${PROJECT_NAME}_VERSION_MINOR}) +if(${PROJECT_NAME}_VERSION_SUFFIX MATCHES ".+") + set(ARCHIVE_NAME ${ARCHIVE_NAME}-${${PROJECT_NAME}_VERSION_SUFFIX}) +endif() + +if(${PROJECT_NAME}_VERSION_SUFFIX MATCHES "^~dev$") # If we are on a dev version, append the hash of the current git HEAD to # the version include(FindGit) - if(GIT_FOUND) + if(GIT_FOUND AND EXISTS "${CMAKE_SOURCE_DIR}/.git") execute_process(COMMAND git --git-dir=${CMAKE_SOURCE_DIR}/.git rev-parse --short HEAD OUTPUT_VARIABLE GIT_REVISION OUTPUT_STRIP_TRAILING_WHITESPACE) if(GIT_REVISION) set(${PROJECT_NAME}_VERSION_SUFFIX "${${PROJECT_NAME}_VERSION_SUFFIX} (${GIT_REVISION})") + set(ARCHIVE_NAME ${ARCHIVE_NAME}-${GIT_REVISION}) endif() endif() endif() @@ -193,4 +199,13 @@ install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION bin) if(WITH_DOC) install(FILES ${MAN_PAGE} DESTINATION man/man1) -endif() \ No newline at end of file +endif() + +# +## Dist target +## Generate a release tarball from the git sources +# +add_custom_target(dist + COMMAND git archive --prefix=${ARCHIVE_NAME}/ --format=tar HEAD + | xz > ${CMAKE_CURRENT_BINARY_DIR}/${ARCHIVE_NAME}.tar.xz + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}) \ No newline at end of file -- cgit v1.2.3 From a165e5924012c82d2598495d962597ae896e9cf7 Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Thu, 26 Jun 2014 13:53:06 +0200 Subject: Fix some cmake issues fix #2551 --- CMakeLists.txt | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index a33fffe..70ead76 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -173,15 +173,13 @@ target_link_libraries(${PROJECT_NAME} if(SYSTEMDDAEMON_FOUND) target_link_libraries(xmpp ${SYSTEMDDAEMON_LIBRARIES}) endif() -if(WITH_DOC) - add_dependencies(${PROJECT_NAME} doc) -endif() + # ## Tests # - -add_executable(test_suite src/test.cpp) +add_executable(test_suite EXCLUDE_FROM_ALL + src/test.cpp) target_link_libraries(test_suite xmpp irc @@ -190,6 +188,7 @@ target_link_libraries(test_suite config logger) + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/src/config.h) # @@ -198,7 +197,7 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/config.h.cmake ${CMAKE_CURRENT_BI install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION bin) if(WITH_DOC) - install(FILES ${MAN_PAGE} DESTINATION man/man1) + install(FILES ${MAN_PAGE} DESTINATION share/man/man1 OPTIONAL) endif() # @@ -208,4 +207,4 @@ endif() add_custom_target(dist COMMAND git archive --prefix=${ARCHIVE_NAME}/ --format=tar HEAD | xz > ${CMAKE_CURRENT_BINARY_DIR}/${ARCHIVE_NAME}.tar.xz - WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}) \ No newline at end of file + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}) -- cgit v1.2.3 From b578aebc039a38b9c9234af98ae106d78b48c450 Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Sat, 12 Jul 2014 14:17:23 +0200 Subject: Release version 1.0 --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 70ead76..48ce504 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,7 +4,7 @@ project(biboumi) set(${PROJECT_NAME}_VERSION_MAJOR 1) set(${PROJECT_NAME}_VERSION_MINOR 0) -set(${PROJECT_NAME}_VERSION_SUFFIX "~dev") +set(${PROJECT_NAME}_VERSION_SUFFIX "") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++1y -pedantic -Wall -Wextra") -- cgit v1.2.3 From 4582f1079767f53bb6bd9b96c358ea3c641aaa96 Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Sat, 12 Jul 2014 14:30:27 +0200 Subject: Bump master version to 2.0~dev --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 48ce504..f68e7db 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,9 +2,9 @@ cmake_minimum_required(VERSION 2.6) project(biboumi) -set(${PROJECT_NAME}_VERSION_MAJOR 1) +set(${PROJECT_NAME}_VERSION_MAJOR 2) set(${PROJECT_NAME}_VERSION_MINOR 0) -set(${PROJECT_NAME}_VERSION_SUFFIX "") +set(${PROJECT_NAME}_VERSION_SUFFIX "~dev") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++1y -pedantic -Wall -Wextra") -- cgit v1.2.3 From b94247813bfdcb95b2b3cde9a7d27f90254f2a2f Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Tue, 15 Jul 2014 15:44:19 +0200 Subject: Provide WITHOUT_BOTAN and WITHOUT_SYSTEMD cmake flags Use them to build without linking to them, even if they are on your system --- CMakeLists.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index f68e7db..14c002c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -21,8 +21,12 @@ find_package(EXPAT REQUIRED) find_package(Iconv REQUIRED) find_package(Libuuid REQUIRED) find_package(Libidn) -find_package(SystemdDaemon) -find_package(Botan) +if(NOT WITHOUT_SYSTEMD) + find_package(SystemdDaemon) +endif() +if(NOT WITHOUT_BOTAN) + find_package(Botan) +endif() # ## Get the software version -- cgit v1.2.3 From 2bb4a347cdfbee92334d5340ba640c8680a81d9e Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Thu, 13 Nov 2014 06:22:17 +0100 Subject: Improve dependencies checks in the build process - Rename all Find*.cmake files to uppercase, to make things more consistent, and fix some issues with them (notably the REQUIRED flag) - Rename SYSTEMDDAEMON to SYSTEMD and only use the libsystemd instead of libsystemd-daemon because it's deprecated for a long time now - Provide a WITH_* and WITHOUT_* switch for all optional dependencies - Document things in the INSTALL file --- CMakeLists.txt | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 14c002c..138bdeb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,14 +18,25 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D__FILENAME__='\"$(subst ${CMAKE_SOURCE set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/") include(FindEXPAT) find_package(EXPAT REQUIRED) -find_package(Iconv REQUIRED) -find_package(Libuuid REQUIRED) -find_package(Libidn) -if(NOT WITHOUT_SYSTEMD) - find_package(SystemdDaemon) +find_package(ICONV REQUIRED) +find_package(LIBUUID REQUIRED) + +if(WITH_LIBIDN) + find_package(LIBIDN REQUIRED) +elseif(NOT WITHOUT_LIBIDN) + find_package(LIBIDN) +endif() + +if(WITH_SYSTEMD) + find_package(SYSTEMD REQUIRED) +elseif(NOT WITHOUT_SYSTEMD) + find_package(SYSTEMD) endif() -if(NOT WITHOUT_BOTAN) - find_package(Botan) + +if(WITH_BOTAN) + find_package(BOTAN REQUIRED) +elseif(NOT WITHOUT_BOTAN) + find_package(BOTAN) endif() # -- cgit v1.2.3 From b86547dc1ef407ca3838444533bc7145e32a0d90 Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Wed, 9 Jul 2014 13:02:37 +0200 Subject: Implement async DNS resolution using c-ares fix #2533 --- CMakeLists.txt | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 138bdeb..6272811 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -39,6 +39,12 @@ elseif(NOT WITHOUT_BOTAN) find_package(BOTAN) endif() +if(WITH_CARES) + find_package(CARES REQUIRED) +elseif(NOT WITHOUT_CARES) + find_package(CARES) +endif() + # ## Get the software version # @@ -84,6 +90,10 @@ if(BOTAN_FOUND) include_directories(SYSTEM ${BOTAN_INCLUDE_DIRS}) endif() +if(CARES_FOUND) + include_directories(${CARES_INCLUDE_DIRS}) +endif() + set(POLLER_DOCSTRING "Choose the poller between POLL and EPOLL (Linux-only)") if(${CMAKE_SYSTEM_NAME} MATCHES "Linux") set(POLLER "EPOLL" CACHE STRING ${POLLER_DOCSTRING}) @@ -145,6 +155,9 @@ target_link_libraries(network logger) if(BOTAN_FOUND) target_link_libraries(network ${BOTAN_LIBRARIES}) endif() +if(CARES_FOUND) + target_link_libraries(network ${CARES_LIBRARIES}) +endif() # ## irclib -- cgit v1.2.3 From 53e6b1da69199f54303e4cb2b00db3205f62ce6e Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Thu, 26 Feb 2015 02:56:46 +0100 Subject: Fix the systemd-conditional code MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit By using SYSTEMD_FOUND instead of SYSTEMDDAEMON_FOUND, where I forgot to rename it… --- CMakeLists.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 6272811..df634b5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -82,8 +82,8 @@ if(LIBIDN_FOUND) include_directories(${LIBIDN_INCLUDE_DIRS}) endif() -if(SYSTEMDDAEMON_FOUND) - include_directories(${SYSTEMDDAEMON_INCLUDE_DIRS}) +if(SYSTEMD_FOUND) + include_directories(${SYSTEMD_INCLUDE_DIRS}) endif() if(BOTAN_FOUND) @@ -198,8 +198,8 @@ target_link_libraries(${PROJECT_NAME} bridge utils config) -if(SYSTEMDDAEMON_FOUND) - target_link_libraries(xmpp ${SYSTEMDDAEMON_LIBRARIES}) +if(SYSTEMD_FOUND) + target_link_libraries(xmpp ${SYSTEMD_LIBRARIES}) endif() -- cgit v1.2.3 From d600a2843f1dbe3b1ba2dead9a020cc73d7d10ae Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Fri, 27 Feb 2015 12:16:09 +0100 Subject: Remove all the libs that are now in louloulibs --- CMakeLists.txt | 123 +++++++++------------------------------------------------ 1 file changed, 18 insertions(+), 105 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index df634b5..808d9e4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,35 +15,7 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D__FILENAME__='\"$(subst ${CMAKE_SOURCE # ## Look for external libraries # -set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/") -include(FindEXPAT) -find_package(EXPAT REQUIRED) -find_package(ICONV REQUIRED) -find_package(LIBUUID REQUIRED) - -if(WITH_LIBIDN) - find_package(LIBIDN REQUIRED) -elseif(NOT WITHOUT_LIBIDN) - find_package(LIBIDN) -endif() - -if(WITH_SYSTEMD) - find_package(SYSTEMD REQUIRED) -elseif(NOT WITHOUT_SYSTEMD) - find_package(SYSTEMD) -endif() - -if(WITH_BOTAN) - find_package(BOTAN REQUIRED) -elseif(NOT WITHOUT_BOTAN) - find_package(BOTAN) -endif() - -if(WITH_CARES) - find_package(CARES REQUIRED) -elseif(NOT WITHOUT_CARES) - find_package(CARES) -endif() +set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules/") # ## Get the software version @@ -68,42 +40,12 @@ if(${PROJECT_NAME}_VERSION_SUFFIX MATCHES "^~dev$") endif() endif() -set(BIBOUMI_VERSION +set(SOFTWARE_VERSION ${${PROJECT_NAME}_VERSION_MAJOR}.${${PROJECT_NAME}_VERSION_MINOR}${${PROJECT_NAME}_VERSION_SUFFIX}) # To be able to include the config.h file generated by cmake include_directories("${CMAKE_CURRENT_BINARY_DIR}/src/") include_directories("${CMAKE_CURRENT_SOURCE_DIR}/src/") -include_directories(${EXPAT_INCLUDE_DIRS}) -include_directories(${ICONV_INCLUDE_DIRS}) -include_directories(${LIBUUID_INCLUDE_DIRS}) - -if(LIBIDN_FOUND) - include_directories(${LIBIDN_INCLUDE_DIRS}) -endif() - -if(SYSTEMD_FOUND) - include_directories(${SYSTEMD_INCLUDE_DIRS}) -endif() - -if(BOTAN_FOUND) - include_directories(SYSTEM ${BOTAN_INCLUDE_DIRS}) -endif() - -if(CARES_FOUND) - include_directories(${CARES_INCLUDE_DIRS}) -endif() - -set(POLLER_DOCSTRING "Choose the poller between POLL and EPOLL (Linux-only)") -if(${CMAKE_SYSTEM_NAME} MATCHES "Linux") - set(POLLER "EPOLL" CACHE STRING ${POLLER_DOCSTRING}) -else() - set(POLLER "POLL" CACHE STRING ${POLLER_DOCSTRING}) -endif() -if((NOT ${POLLER} MATCHES "POLL") AND - (NOT ${POLLER} MATCHES "EPOLL")) - message(FATAL_ERROR "POLLER must be either POLL or EPOLL") -endif() # ## Documentation @@ -121,43 +63,21 @@ if(RONN_EXECUTABLE) add_custom_target(doc DEPENDS ${MAN_PAGE}) endif() -# -## utils -# -file(GLOB source_utils - src/utils/*.[hc]pp) -add_library(utils STATIC ${source_utils}) -target_link_libraries(utils ${ICONV_LIBRARIES}) - -# -## config -# -file(GLOB source_config - src/config/*.[hc]pp) -add_library(config STATIC ${source_config}) -target_link_libraries(config utils) +if(NOT IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/louloulibs") + message(FATAL_ERROR "louloulibs/ directory not found. Make sure you fetched the submodules with 'git submodule init && git submodule update'") +endif() +add_subdirectory("louloulibs") +include_directories("louloulibs") -# -## logger -# -file(GLOB source_logger - src/logger/*.[hc]pp) -add_library(logger STATIC ${source_logger}) -target_link_libraries(logger config) +include_directories(${EXPAT_INCLUDE_DIRS}) +include_directories(${ICONV_INCLUDE_DIRS}) +include_directories(${LIBUUID_INCLUDE_DIRS}) -# -## network -# -file(GLOB source_network - src/network/*.[hc]pp) -add_library(network STATIC ${source_network}) -target_link_libraries(network logger) -if(BOTAN_FOUND) - target_link_libraries(network ${BOTAN_LIBRARIES}) -endif() -if(CARES_FOUND) - target_link_libraries(network ${CARES_LIBRARIES}) -endif() +# If they are found in louloulibs CMakeLists.txt, we inherite these values +include_directories(${LIBIDN_INCLUDE_DIRS}) +include_directories(${SYSTEMD_INCLUDE_DIRS}) +include_directories(SYSTEM ${BOTAN_INCLUDE_DIRS}) +include_directories(${CARES_INCLUDE_DIRS}) # ## irclib @@ -168,17 +88,12 @@ add_library(irc STATIC ${source_irc}) target_link_libraries(irc network utils logger) # -## xmpplib +## xmpp # file(GLOB source_xmpp src/xmpp/*.[hc]pp) add_library(xmpp STATIC ${source_xmpp}) -target_link_libraries(xmpp bridge network utils logger - ${EXPAT_LIBRARIES} - ${LIBUUID_LIBRARIES}) -if(LIBIDN_FOUND) - target_link_libraries(xmpp ${LIBIDN_LIBRARIES}) -endif() +target_link_libraries(xmpp xmpplib bridge network utils logger) # ## bridge @@ -209,6 +124,7 @@ endif() add_executable(test_suite EXCLUDE_FROM_ALL src/test.cpp) target_link_libraries(test_suite + xmpplib xmpp irc bridge @@ -216,9 +132,6 @@ target_link_libraries(test_suite config logger) - -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/src/config.h) - # ## Install target # -- cgit v1.2.3 From e6569a1090be063f34624474f0d4578f37a169ae Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Fri, 27 Feb 2015 12:40:50 +0100 Subject: Only use include_directory() if the directory path is defined --- CMakeLists.txt | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 808d9e4..a516589 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -74,10 +74,18 @@ include_directories(${ICONV_INCLUDE_DIRS}) include_directories(${LIBUUID_INCLUDE_DIRS}) # If they are found in louloulibs CMakeLists.txt, we inherite these values -include_directories(${LIBIDN_INCLUDE_DIRS}) -include_directories(${SYSTEMD_INCLUDE_DIRS}) -include_directories(SYSTEM ${BOTAN_INCLUDE_DIRS}) -include_directories(${CARES_INCLUDE_DIRS}) +if(LIBIDN_FOUND) + include_directories(${LIBIDN_INCLUDE_DIRS}) +endif() +if(SYSTEMD_FOUND) + include_directories(${SYSTEMD_INCLUDE_DIRS}) +endif() +if(BOTAN_FOUND) + include_directories(SYSTEM ${BOTAN_INCLUDE_DIRS}) +endif() +if(CARES_FOUND) + include_directories(${CARES_INCLUDE_DIRS}) +endif() # ## irclib -- cgit v1.2.3 From b3503bf11297a7982bf9e9008b408e3bf8121224 Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Fri, 27 Feb 2015 12:46:22 +0100 Subject: Also check if the louloulibs/CMakeLists.txt file is missing Because apparently when cloning a repository with submodules, git creates empty sub-directories --- CMakeLists.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index a516589..9d9f073 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -63,8 +63,10 @@ if(RONN_EXECUTABLE) add_custom_target(doc DEPENDS ${MAN_PAGE}) endif() -if(NOT IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/louloulibs") - message(FATAL_ERROR "louloulibs/ directory not found. Make sure you fetched the submodules with 'git submodule init && git submodule update'") +if(NOT IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/louloulibs" OR + NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/loulou/CMakeLists.txt") + message(FATAL_ERROR "louloulibs/ not found or empty. Make sure you fetched + the submodules with 'git submodule init && git submodule update'") endif() add_subdirectory("louloulibs") include_directories("louloulibs") -- cgit v1.2.3 From cc6a2295c38cb1044d21cddf3c9049df1210e929 Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Fri, 27 Feb 2015 17:50:42 +0100 Subject: Fix a typo --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 9d9f073..297166b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -64,7 +64,7 @@ if(RONN_EXECUTABLE) endif() if(NOT IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/louloulibs" OR - NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/loulou/CMakeLists.txt") + NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/louloulibs/CMakeLists.txt") message(FATAL_ERROR "louloulibs/ not found or empty. Make sure you fetched the submodules with 'git submodule init && git submodule update'") endif() -- cgit v1.2.3 From 649ebaf1b90a10ddf6da07b28a9b9b7a74297588 Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Fri, 27 Feb 2015 18:32:30 +0100 Subject: Suggest the command git submodule update --init --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 297166b..29d3c74 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -66,7 +66,7 @@ endif() if(NOT IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/louloulibs" OR NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/louloulibs/CMakeLists.txt") message(FATAL_ERROR "louloulibs/ not found or empty. Make sure you fetched - the submodules with 'git submodule init && git submodule update'") + the submodules with 'git submodule update --init'") endif() add_subdirectory("louloulibs") include_directories("louloulibs") -- cgit v1.2.3 From f0e07beacb1ca14822d5ad52a7b4462f15ee47cc Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Mon, 2 Mar 2015 10:21:01 +0100 Subject: Forgot to remove some XMPP files that are now in louloulibs instead --- CMakeLists.txt | 3 --- 1 file changed, 3 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 29d3c74..617c113 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -76,9 +76,6 @@ include_directories(${ICONV_INCLUDE_DIRS}) include_directories(${LIBUUID_INCLUDE_DIRS}) # If they are found in louloulibs CMakeLists.txt, we inherite these values -if(LIBIDN_FOUND) - include_directories(${LIBIDN_INCLUDE_DIRS}) -endif() if(SYSTEMD_FOUND) include_directories(${SYSTEMD_INCLUDE_DIRS}) endif() -- cgit v1.2.3 From 54f96debcaa80ea2d49f722b0df11d227943ebba Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Tue, 26 May 2015 14:00:25 +0200 Subject: Use git-archive-all in the make dist, to include the submodules in the archive --- CMakeLists.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 617c113..301d91d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -153,6 +153,5 @@ endif() ## Generate a release tarball from the git sources # add_custom_target(dist - COMMAND git archive --prefix=${ARCHIVE_NAME}/ --format=tar HEAD - | xz > ${CMAKE_CURRENT_BINARY_DIR}/${ARCHIVE_NAME}.tar.xz + COMMAND git-archive-all ${CMAKE_CURRENT_BINARY_DIR}/${ARCHIVE_NAME}.tar.xz WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}) -- cgit v1.2.3 From 427df5fc2a5f1ea0ee4e31ceafba9c6cc5803fd2 Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Thu, 28 May 2015 23:44:44 +0200 Subject: Revert "Use git-archive-all in the make dist, to include the submodules in the archive" This reverts commit 54f96debcaa80ea2d49f722b0df11d227943ebba. --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 301d91d..617c113 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -153,5 +153,6 @@ endif() ## Generate a release tarball from the git sources # add_custom_target(dist - COMMAND git-archive-all ${CMAKE_CURRENT_BINARY_DIR}/${ARCHIVE_NAME}.tar.xz + COMMAND git archive --prefix=${ARCHIVE_NAME}/ --format=tar HEAD + | xz > ${CMAKE_CURRENT_BINARY_DIR}/${ARCHIVE_NAME}.tar.xz WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}) -- cgit v1.2.3 From c649e56deb0d107931980b622de4d1cb832a2c33 Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Fri, 29 May 2015 00:00:00 +0200 Subject: Release version 2.0 --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 617c113..a362b7e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,7 +4,7 @@ project(biboumi) set(${PROJECT_NAME}_VERSION_MAJOR 2) set(${PROJECT_NAME}_VERSION_MINOR 0) -set(${PROJECT_NAME}_VERSION_SUFFIX "~dev") +set(${PROJECT_NAME}_VERSION_SUFFIX "") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++1y -pedantic -Wall -Wextra") -- cgit v1.2.3 From a0042617335386abfba3f36917e6ab9b8a4bf0e2 Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Thu, 4 Jun 2015 04:32:03 +0200 Subject: Bump to 3.0~dev --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index a362b7e..cd7aed7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,9 +2,9 @@ cmake_minimum_required(VERSION 2.6) project(biboumi) -set(${PROJECT_NAME}_VERSION_MAJOR 2) +set(${PROJECT_NAME}_VERSION_MAJOR 3) set(${PROJECT_NAME}_VERSION_MINOR 0) -set(${PROJECT_NAME}_VERSION_SUFFIX "") +set(${PROJECT_NAME}_VERSION_SUFFIX "~dev") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++1y -pedantic -Wall -Wextra") -- cgit v1.2.3 From 525f452cbca1741112dbfd830998eb4dd79bdd3d Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Wed, 15 Jul 2015 21:17:34 +0200 Subject: louloulibs is part of the repository, so no need to check for its presence --- CMakeLists.txt | 5 ----- 1 file changed, 5 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index cd7aed7..93e91ba 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -63,11 +63,6 @@ if(RONN_EXECUTABLE) add_custom_target(doc DEPENDS ${MAN_PAGE}) endif() -if(NOT IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/louloulibs" OR - NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/louloulibs/CMakeLists.txt") - message(FATAL_ERROR "louloulibs/ not found or empty. Make sure you fetched - the submodules with 'git submodule update --init'") -endif() add_subdirectory("louloulibs") include_directories("louloulibs") -- cgit v1.2.3 From 88ae2599f6dbf655e8806c9b4619ec089425683b Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Fri, 18 Sep 2015 21:49:54 +0200 Subject: Introduce an optional Database module Uses litesql --- CMakeLists.txt | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 93e91ba..1bad544 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -44,8 +44,11 @@ set(SOFTWARE_VERSION ${${PROJECT_NAME}_VERSION_MAJOR}.${${PROJECT_NAME}_VERSION_MINOR}${${PROJECT_NAME}_VERSION_SUFFIX}) # To be able to include the config.h file generated by cmake + +# To be able to include the config.h and other files generated by cmake include_directories("${CMAKE_CURRENT_BINARY_DIR}/src/") include_directories("${CMAKE_CURRENT_SOURCE_DIR}/src/") +include_directories("${CMAKE_CURRENT_BINARY_DIR}/") # ## Documentation @@ -63,6 +66,24 @@ if(RONN_EXECUTABLE) add_custom_target(doc DEPENDS ${MAN_PAGE}) endif() +# Look for litesql and enable the database if found +if(WITH_LITESQL) + find_package(LITESQL REQUIRED) +elseif(NOT WITHOUT_LITESQL) + find_package(LITESQL) +endif() + +if(LITESQL_FOUND) + LITESQL_GENERATE_CPP("database/database.xml" + "biboudb" + LITESQL_GENERATED_SOURCES) + + add_library(database STATIC src/database/database.cpp + ${LITESQL_GENERATED_SOURCES}) + target_link_libraries(database ${LITESQL_LIBRARIES} ${BOTAN_LIBRARIES}) + set(USE_DATABASE TRUE) +endif() + add_subdirectory("louloulibs") include_directories("louloulibs") @@ -97,6 +118,9 @@ file(GLOB source_xmpp add_library(xmpp STATIC ${source_xmpp}) target_link_libraries(xmpp xmpplib bridge network utils logger) +if(USE_DATABASE) + target_link_libraries(xmpp database) +endif() # ## bridge # @@ -134,6 +158,11 @@ target_link_libraries(test_suite config logger) +if(USE_DATABASE) + target_link_libraries(test_suite + database) +endif() + # ## Install target # @@ -151,3 +180,5 @@ add_custom_target(dist COMMAND git archive --prefix=${ARCHIVE_NAME}/ --format=tar HEAD | xz > ${CMAKE_CURRENT_BINARY_DIR}/${ARCHIVE_NAME}.tar.xz WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}) + +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/biboumi.h.cmake ${CMAKE_BINARY_DIR}/src/biboumi.h) \ No newline at end of file -- cgit v1.2.3 From f904d57940699e332f75a77062912431c6e51188 Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Wed, 23 Sep 2015 18:24:06 +0200 Subject: Provide username and realname IRC server options Used in the USER command when connecting to the IRC server, instead of the first nick. fix #3028 --- CMakeLists.txt | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 1bad544..e9560cc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -43,7 +43,8 @@ endif() set(SOFTWARE_VERSION ${${PROJECT_NAME}_VERSION_MAJOR}.${${PROJECT_NAME}_VERSION_MINOR}${${PROJECT_NAME}_VERSION_SUFFIX}) -# To be able to include the config.h file generated by cmake +include(CheckFunctionExists) +check_function_exists(ppoll HAVE_PPOLL_FUNCTION) # To be able to include the config.h and other files generated by cmake include_directories("${CMAKE_CURRENT_BINARY_DIR}/src/") @@ -121,6 +122,7 @@ target_link_libraries(xmpp xmpplib bridge network utils logger) if(USE_DATABASE) target_link_libraries(xmpp database) endif() + # ## bridge # @@ -181,4 +183,17 @@ add_custom_target(dist | xz > ${CMAKE_CURRENT_BINARY_DIR}/${ARCHIVE_NAME}.tar.xz WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}) +if(BOTAN_FOUND) + set(STR_WITH_BOTAN "Botan: yes") +else() + set(STR_WITH_BOTAN "Botan: no") +endif() +if(CARES_FOUND) + set(STR_WITH_CARES "c-ares: yes") +else() + set(STR_WITH_CARES "c-ares: no") +endif() +add_custom_target(PrintBuildParameters ALL + ${CMAKE_COMMAND} -E cmake_echo_color --cyan "Compiling ${PROJECT_NAME} with ${STR_WITH_BOTAN}, ${STR_WITH_CARES}") + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/biboumi.h.cmake ${CMAKE_BINARY_DIR}/src/biboumi.h) \ No newline at end of file -- cgit v1.2.3 From bf30b4498fc919ecd10d98b4ac551dca227c9ed5 Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Sat, 24 Oct 2015 15:16:58 +0200 Subject: Add the network module to the test_suite Because we added a network unit test --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index e9560cc..b16b906 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -158,7 +158,8 @@ target_link_libraries(test_suite bridge utils config - logger) + logger + network) if(USE_DATABASE) target_link_libraries(test_suite -- cgit v1.2.3 From 3c1889fbd0d7b96aae16f3479ac8aae70a7e15f7 Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Wed, 28 Oct 2015 19:13:53 +0100 Subject: Use Catch for our test suite `make check` is also added to compile and run the tests Catch is fetched with cmake automatically into the build directory when needed --- CMakeLists.txt | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index b16b906..960b5d1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -145,12 +145,13 @@ if(SYSTEMD_FOUND) target_link_libraries(xmpp ${SYSTEMD_LIBRARIES}) endif() - # ## Tests # +file(GLOB source_tests + tests/*.cpp) add_executable(test_suite EXCLUDE_FROM_ALL - src/test.cpp) + ${source_tests}) target_link_libraries(test_suite xmpplib xmpp @@ -160,11 +161,26 @@ target_link_libraries(test_suite config logger network) - if(USE_DATABASE) target_link_libraries(test_suite database) endif() +include(ExternalProject) +ExternalProject_Add(catch + GIT_REPOSITORY "https://github.com/philsquared/Catch.git" + PREFIX "external" + UPDATE_COMMAND "" + CONFIGURE_COMMAND "" + BUILD_COMMAND "" + INSTALL_COMMAND "" +) +ExternalProject_Get_Property(catch SOURCE_DIR) +target_include_directories(test_suite + PUBLIC "${SOURCE_DIR}/include/" +) +add_dependencies(test_suite catch) +add_custom_target(check COMMAND "test_suite" + DEPENDS test_suite) # ## Install target -- cgit v1.2.3 From 6ae7e08c5211fc01155295df4f706dad1836cb80 Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Wed, 28 Oct 2015 19:22:26 +0100 Subject: Add code coverage support make coverage runs the test_suite and generates a report --- CMakeLists.txt | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 960b5d1..b6411ab 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,6 +7,7 @@ set(${PROJECT_NAME}_VERSION_MINOR 0) set(${PROJECT_NAME}_VERSION_SUFFIX "~dev") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++1y -pedantic -Wall -Wextra") +set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fprofile-arcs -ftest-coverage --coverage") # Define a __FILENAME__ macro to get the filename of each file, instead of # the full path as in __FILE__ @@ -182,6 +183,15 @@ add_dependencies(test_suite catch) add_custom_target(check COMMAND "test_suite" DEPENDS test_suite) +# +## Code coverage +# +include(CodeCoverage) +SETUP_TARGET_FOR_COVERAGE(coverage + test_suite + coverage +) + # ## Install target # @@ -213,4 +223,4 @@ endif() add_custom_target(PrintBuildParameters ALL ${CMAKE_COMMAND} -E cmake_echo_color --cyan "Compiling ${PROJECT_NAME} with ${STR_WITH_BOTAN}, ${STR_WITH_CARES}") -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/biboumi.h.cmake ${CMAKE_BINARY_DIR}/src/biboumi.h) \ No newline at end of file +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/biboumi.h.cmake ${CMAKE_BINARY_DIR}/src/biboumi.h) -- cgit v1.2.3 From 3b7bbe147229ee06de8b024e42e86d435cb0f72e Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Thu, 29 Oct 2015 02:52:24 +0100 Subject: make coverage is only available with a debug build --- CMakeLists.txt | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index b6411ab..d8633d8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -186,11 +186,13 @@ add_custom_target(check COMMAND "test_suite" # ## Code coverage # -include(CodeCoverage) -SETUP_TARGET_FOR_COVERAGE(coverage - test_suite - coverage -) +if(CMAKE_BUILD_TYPE MATCHES DEBUG) + include(CodeCoverage) + SETUP_TARGET_FOR_COVERAGE(coverage + test_suite + coverage + ) +endif() # ## Install target -- cgit v1.2.3 From 9fe94215daecf21246e19ba59ef83755129a4a8b Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Thu, 29 Oct 2015 03:20:39 +0100 Subject: Make lcov gcov etc optional make coverage will display an error instead --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index d8633d8..64e21e0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -186,7 +186,7 @@ add_custom_target(check COMMAND "test_suite" # ## Code coverage # -if(CMAKE_BUILD_TYPE MATCHES DEBUG) +if(CMAKE_BUILD_TYPE MATCHES Debug) include(CodeCoverage) SETUP_TARGET_FOR_COVERAGE(coverage test_suite -- cgit v1.2.3 From f03d1a16ddca85ccfabc9cad01ed206d75301043 Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Thu, 29 Oct 2015 03:55:57 +0100 Subject: Only download Catch when the test_suite target is built --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 64e21e0..060fa11 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -175,6 +175,7 @@ ExternalProject_Add(catch BUILD_COMMAND "" INSTALL_COMMAND "" ) +set_target_properties(catch PROPERTIES EXCLUDE_FROM_ALL TRUE) ExternalProject_Get_Property(catch SOURCE_DIR) target_include_directories(test_suite PUBLIC "${SOURCE_DIR}/include/" -- cgit v1.2.3 From 73dffca24e6926d2bd573d9223b2b7f3efd8f31d Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Thu, 5 Nov 2015 16:40:09 +0100 Subject: Only include the coverage flags when compiling with gcc --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 060fa11..7c27477 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,7 +7,9 @@ set(${PROJECT_NAME}_VERSION_MINOR 0) set(${PROJECT_NAME}_VERSION_SUFFIX "~dev") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++1y -pedantic -Wall -Wextra") -set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fprofile-arcs -ftest-coverage --coverage") +if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") + set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fprofile-arcs -ftest-coverage --coverage") +endif() # Define a __FILENAME__ macro to get the filename of each file, instead of # the full path as in __FILE__ -- cgit v1.2.3 From 25475b60ab363299ddbe5e81ded8968b76838b44 Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Wed, 13 Jan 2016 19:44:58 +0100 Subject: Generate systemd file from template and make installs it and the conf MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The unit file Type=, as well as the executable path should now be correct with a simple “make install”, whatever the install prefix and the DESTDIR values are. ref #3152 --- CMakeLists.txt | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 7c27477..3ff7be6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -200,11 +200,10 @@ endif() # ## Install target # -install(TARGETS ${PROJECT_NAME} - RUNTIME DESTINATION bin) -if(WITH_DOC) - install(FILES ${MAN_PAGE} DESTINATION share/man/man1 OPTIONAL) -endif() +install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION bin) +install(FILES ${MAN_PAGE} DESTINATION share/man/man1 OPTIONAL COMPONENT documentation) +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/biboumi.service DESTINATION /etc/systemd/system COMPONENT init) +install(FILES conf/biboumi.cfg DESTINATION /etc/biboumi COMPONENT configuration) # ## Dist target @@ -228,4 +227,11 @@ endif() add_custom_target(PrintBuildParameters ALL ${CMAKE_COMMAND} -E cmake_echo_color --cyan "Compiling ${PROJECT_NAME} with ${STR_WITH_BOTAN}, ${STR_WITH_CARES}") -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/biboumi.h.cmake ${CMAKE_BINARY_DIR}/src/biboumi.h) +configure_file(biboumi.h.cmake src/biboumi.h) + +if(SYSTEMD_FOUND) + set(SYSTEMD_SERVICE_TYPE "notify") +else() + set(SYSTEMD_SERVICE_TYPE "simple") +endif() +configure_file(unit/biboumi.service.cmake biboumi.service) -- cgit v1.2.3 From 1e79705628af79b2cf6f87a67268f8202774bb9b Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Wed, 13 Jan 2016 13:50:34 +0100 Subject: Build the doc with the default make target --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 3ff7be6..3683c39 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -67,7 +67,7 @@ if(RONN_EXECUTABLE) add_custom_command(OUTPUT ${MAN_PAGE} COMMAND ${RONN_EXECUTABLE} --roff < ${DOC_PAGE} > ${MAN_PAGE} DEPENDS ${DOC_PAGE}) - add_custom_target(doc DEPENDS ${MAN_PAGE}) + add_custom_target(doc ALL DEPENDS ${MAN_PAGE}) endif() # Look for litesql and enable the database if found @@ -124,6 +124,7 @@ target_link_libraries(xmpp xmpplib bridge network utils logger) if(USE_DATABASE) target_link_libraries(xmpp database) + target_link_libraries(irc database) endif() # -- cgit v1.2.3 From 6bebb2f67b73219c455579d5d414418e317e06b9 Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Wed, 13 Jan 2016 13:51:34 +0100 Subject: Remove the second '-' from the package when ~dev is there --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 3683c39..f38d5d6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -25,7 +25,7 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Mo # set(ARCHIVE_NAME ${CMAKE_PROJECT_NAME}-${${PROJECT_NAME}_VERSION_MAJOR}.${${PROJECT_NAME}_VERSION_MINOR}) if(${PROJECT_NAME}_VERSION_SUFFIX MATCHES ".+") - set(ARCHIVE_NAME ${ARCHIVE_NAME}-${${PROJECT_NAME}_VERSION_SUFFIX}) + set(ARCHIVE_NAME ${ARCHIVE_NAME}${${PROJECT_NAME}_VERSION_SUFFIX}) endif() if(${PROJECT_NAME}_VERSION_SUFFIX MATCHES "^~dev$") @@ -38,7 +38,7 @@ if(${PROJECT_NAME}_VERSION_SUFFIX MATCHES "^~dev$") OUTPUT_STRIP_TRAILING_WHITESPACE) if(GIT_REVISION) set(${PROJECT_NAME}_VERSION_SUFFIX "${${PROJECT_NAME}_VERSION_SUFFIX} (${GIT_REVISION})") - set(ARCHIVE_NAME ${ARCHIVE_NAME}-${GIT_REVISION}) + set(ARCHIVE_NAME ${ARCHIVE_NAME}${GIT_REVISION}) endif() endif() endif() -- cgit v1.2.3 From 3497b330dc4aa848582da085e94ac20e6871731e Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Wed, 13 Jan 2016 23:24:44 +0100 Subject: If catch.hpp is found in tests/, use it without cloning the git repo --- CMakeLists.txt | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index f38d5d6..562b21f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -169,6 +169,7 @@ if(USE_DATABASE) target_link_libraries(test_suite database) endif() + include(ExternalProject) ExternalProject_Add(catch GIT_REPOSITORY "https://github.com/philsquared/Catch.git" @@ -177,13 +178,15 @@ ExternalProject_Add(catch CONFIGURE_COMMAND "" BUILD_COMMAND "" INSTALL_COMMAND "" -) + ) set_target_properties(catch PROPERTIES EXCLUDE_FROM_ALL TRUE) ExternalProject_Get_Property(catch SOURCE_DIR) -target_include_directories(test_suite - PUBLIC "${SOURCE_DIR}/include/" -) -add_dependencies(test_suite catch) +if(NOT EXISTS ${CMAKE_SOURCE_DIR}/tests/catch.hpp) + target_include_directories(test_suite + PUBLIC "${SOURCE_DIR}/include/" + ) + add_dependencies(test_suite catch) +endif() add_custom_target(check COMMAND "test_suite" DEPENDS test_suite) -- cgit v1.2.3 From 85dfe066655654eca18d180e5b165485bcbc20ab Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Wed, 13 Jan 2016 16:13:45 +0100 Subject: Include catch.hpp in the dist tarball --- CMakeLists.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 562b21f..1e8f7dd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -215,7 +215,13 @@ install(FILES conf/biboumi.cfg DESTINATION /etc/bib # add_custom_target(dist COMMAND git archive --prefix=${ARCHIVE_NAME}/ --format=tar HEAD - | xz > ${CMAKE_CURRENT_BINARY_DIR}/${ARCHIVE_NAME}.tar.xz + > ${CMAKE_CURRENT_BINARY_DIR}/${ARCHIVE_NAME}.tar + # Append this specific file that is not part of the git repo + COMMAND tar -rf ${CMAKE_CURRENT_BINARY_DIR}/${ARCHIVE_NAME}.tar -P ${SOURCE_DIR}/single_include/catch.hpp --xform 's|/.*/|${ARCHIVE_NAME}/tests/|g' + # Remove a potential existing archive + COMMAND rm -f ${CMAKE_CURRENT_BINARY_DIR}/${ARCHIVE_NAME}.tar.xz + # Compress the archive + COMMAND xz ${CMAKE_CURRENT_BINARY_DIR}/${ARCHIVE_NAME}.tar WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}) if(BOTAN_FOUND) -- cgit v1.2.3 From 3fdc4cb334d04dd6688299271bc30f9b9ccb6c02 Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Thu, 14 Jan 2016 00:25:17 +0100 Subject: Install the unit file in lib/, not etc/ --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 1e8f7dd..f2f521f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -206,7 +206,7 @@ endif() # install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION bin) install(FILES ${MAN_PAGE} DESTINATION share/man/man1 OPTIONAL COMPONENT documentation) -install(FILES ${CMAKE_CURRENT_BINARY_DIR}/biboumi.service DESTINATION /etc/systemd/system COMPONENT init) +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/biboumi.service DESTINATION lib/systemd/system COMPONENT init) install(FILES conf/biboumi.cfg DESTINATION /etc/biboumi COMPONENT configuration) # -- cgit v1.2.3 From 1f8e2431647169f4b377dd16520fba7b247378c9 Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Thu, 14 Jan 2016 00:28:53 +0100 Subject: Display an info message on make dist --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index f2f521f..b51444a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -222,6 +222,7 @@ add_custom_target(dist COMMAND rm -f ${CMAKE_CURRENT_BINARY_DIR}/${ARCHIVE_NAME}.tar.xz # Compress the archive COMMAND xz ${CMAKE_CURRENT_BINARY_DIR}/${ARCHIVE_NAME}.tar + COMMAND ${CMAKE_COMMAND} -E cmake_echo_color --cyan "${ARCHIVE_NAME}.tar.xz created." WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}) if(BOTAN_FOUND) -- cgit v1.2.3 From d58dcde856aa1885e0eb4a1286eeaa6e4861557b Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Thu, 14 Jan 2016 14:33:49 +0100 Subject: =?UTF-8?q?Only=20activate=20systemd=E2=80=99s=20watchdog=20if=20w?= =?UTF-8?q?e=20are=20compiling=20with=20systemd?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ref #3152 --- CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index b51444a..ba3213b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -242,7 +242,9 @@ configure_file(biboumi.h.cmake src/biboumi.h) if(SYSTEMD_FOUND) set(SYSTEMD_SERVICE_TYPE "notify") + set(WATCHDOG_SEC "20") else() set(SYSTEMD_SERVICE_TYPE "simple") + set(WATCHDOG_SEC "") endif() configure_file(unit/biboumi.service.cmake biboumi.service) -- cgit v1.2.3 From ccfdb60cc1b63cec2a97eaaaec23ca547b7f2a09 Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Fri, 15 Jan 2016 11:54:33 +0100 Subject: Fix a build when litesql is found but not botan fix #3157 --- CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index ba3213b..7e356c9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -84,7 +84,10 @@ if(LITESQL_FOUND) add_library(database STATIC src/database/database.cpp ${LITESQL_GENERATED_SOURCES}) - target_link_libraries(database ${LITESQL_LIBRARIES} ${BOTAN_LIBRARIES}) + target_link_libraries(database ${LITESQL_LIBRARIES}) + if(BOTAN_FOUND) + target_link_libraries(database ${BOTAN_LIBRARIES}) + endif() set(USE_DATABASE TRUE) endif() -- cgit v1.2.3 From ae7c54f3737b3646edfa5c4d4d7fd553aa296da6 Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Fri, 22 Jan 2016 00:47:24 +0100 Subject: Spec file becomes a template, auto filled with the date and version --- CMakeLists.txt | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 7e356c9..167415e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -24,8 +24,11 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Mo ## Get the software version # set(ARCHIVE_NAME ${CMAKE_PROJECT_NAME}-${${PROJECT_NAME}_VERSION_MAJOR}.${${PROJECT_NAME}_VERSION_MINOR}) +set(RPM_VERSION ${${PROJECT_NAME}_VERSION_MAJOR}.${${PROJECT_NAME}_VERSION_MINOR}) + if(${PROJECT_NAME}_VERSION_SUFFIX MATCHES ".+") set(ARCHIVE_NAME ${ARCHIVE_NAME}${${PROJECT_NAME}_VERSION_SUFFIX}) + set(RPM_VERSION ${RPM_VERSION}${${PROJECT_NAME}_VERSION_SUFFIX}) endif() if(${PROJECT_NAME}_VERSION_SUFFIX MATCHES "^~dev$") @@ -39,6 +42,7 @@ if(${PROJECT_NAME}_VERSION_SUFFIX MATCHES "^~dev$") if(GIT_REVISION) set(${PROJECT_NAME}_VERSION_SUFFIX "${${PROJECT_NAME}_VERSION_SUFFIX} (${GIT_REVISION})") set(ARCHIVE_NAME ${ARCHIVE_NAME}${GIT_REVISION}) + set(RPM_VERSION ${RPM_VERSION}${GIT_REVISION}) endif() endif() endif() @@ -251,3 +255,8 @@ else() set(WATCHDOG_SEC "") endif() configure_file(unit/biboumi.service.cmake biboumi.service) + +execute_process(COMMAND "date" "+%a %b %d %Y" OUTPUT_VARIABLE RPM_DATE + OUTPUT_STRIP_TRAILING_WHITESPACE) + +configure_file(packaging/biboumi.spec.cmake biboumi.spec) -- cgit v1.2.3 From 85867976dcf27427708927ebebd3d8a4866e706b Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Thu, 21 Jan 2016 16:48:42 +0100 Subject: =?UTF-8?q?Add=20a=20=E2=80=9Crpm=E2=80=9D=20target=20in=20the=20m?= =?UTF-8?q?akefile,=20building=20a=20RPM?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CMakeLists.txt | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 167415e..e371bf6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -230,7 +230,15 @@ add_custom_target(dist # Compress the archive COMMAND xz ${CMAKE_CURRENT_BINARY_DIR}/${ARCHIVE_NAME}.tar COMMAND ${CMAKE_COMMAND} -E cmake_echo_color --cyan "${ARCHIVE_NAME}.tar.xz created." - WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}) + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} + ) +add_dependencies(dist catch) + +add_custom_target(rpm + COMMAND mkdir -p rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS} + COMMAND rpmbuild --define "_topdir `pwd`/rpmbuild/" --define "_sourcedir `pwd`" -ba biboumi.spec + ) +add_dependencies(rpm dist) if(BOTAN_FOUND) set(STR_WITH_BOTAN "Botan: yes") -- cgit v1.2.3 From 51a34f83f9cae36f65b021e379e411cacf84c054 Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Tue, 23 Feb 2016 19:20:00 +0100 Subject: Add a basic integration test in python --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index e371bf6..2f1bdd8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -195,7 +195,8 @@ if(NOT EXISTS ${CMAKE_SOURCE_DIR}/tests/catch.hpp) add_dependencies(test_suite catch) endif() add_custom_target(check COMMAND "test_suite" - DEPENDS test_suite) + COMMAND "python3" "${CMAKE_CURRENT_SOURCE_DIR}/tests/end_to_end/" + DEPENDS test_suite biboumi) # ## Code coverage -- cgit v1.2.3 From 14930284a71772a5a31c263b6f4bbdac1a036876 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Thu, 24 Mar 2016 10:06:02 +0100 Subject: Fetch Catch from our own clone, instead of the github one. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Avoids: - Relying on github’s services - Fetching a new (malicious) version, automatically, without any “check” --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 2f1bdd8..8bfc2e2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -179,7 +179,7 @@ endif() include(ExternalProject) ExternalProject_Add(catch - GIT_REPOSITORY "https://github.com/philsquared/Catch.git" + GIT_REPOSITORY "https://lab.louiz.org/louiz/Catch.git" PREFIX "external" UPDATE_COMMAND "" CONFIGURE_COMMAND "" -- cgit v1.2.3 From 3119ec72f32abf0dbd1edf7fc2f302fc9dd60ced Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Fri, 22 Apr 2016 10:36:14 +0200 Subject: Force LANG to en_US when generating biboumi.spec (fixes the date format) --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 8bfc2e2..ec6ae73 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -265,7 +265,10 @@ else() endif() configure_file(unit/biboumi.service.cmake biboumi.service) +# The date MUST be in english format +set(ENV{LANG} "en_US.utf-8") execute_process(COMMAND "date" "+%a %b %d %Y" OUTPUT_VARIABLE RPM_DATE OUTPUT_STRIP_TRAILING_WHITESPACE) +unset(ENV{LANG}) configure_file(packaging/biboumi.spec.cmake biboumi.spec) -- cgit v1.2.3 From 747f04ee6d104f466014a0b0e810ac9f855fa547 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Fri, 22 Apr 2016 10:44:29 +0200 Subject: Move the e2e tests out of make check --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index ec6ae73..b3321cd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -195,8 +195,10 @@ if(NOT EXISTS ${CMAKE_SOURCE_DIR}/tests/catch.hpp) add_dependencies(test_suite catch) endif() add_custom_target(check COMMAND "test_suite" - COMMAND "python3" "${CMAKE_CURRENT_SOURCE_DIR}/tests/end_to_end/" DEPENDS test_suite biboumi) +add_custom_target(e2e COMMAND "python3" "${CMAKE_CURRENT_SOURCE_DIR}/tests/end_to_end/" + DEPENDS biboumi) + # ## Code coverage -- cgit v1.2.3 From 38202e5f6e16d8fc1e07811049851bfa417fb9c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Mon, 23 May 2016 11:51:03 +0200 Subject: Update the build process to take into account the rst files --- CMakeLists.txt | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index b3321cd..bb13460 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -61,15 +61,17 @@ include_directories("${CMAKE_CURRENT_BINARY_DIR}/") # ## Documentation # +execute_process(COMMAND "date" "+%Y-%m-%d" OUTPUT_VARIABLE DOC_DATE + OUTPUT_STRIP_TRAILING_WHITESPACE) set(MAN_PAGE ${CMAKE_CURRENT_BINARY_DIR}/doc/${PROJECT_NAME}.1) -set(DOC_PAGE ${CMAKE_CURRENT_SOURCE_DIR}/doc/${PROJECT_NAME}.1.md) -find_program(RONN_EXECUTABLE NAMES ronn - DOC "The ronn software, to build the man page from the markdown documentation") -if(RONN_EXECUTABLE) +set(DOC_PAGE ${CMAKE_CURRENT_SOURCE_DIR}/doc/${PROJECT_NAME}.1.rst) +find_program(PANDOC_EXECUTABLE NAMES pandoc + DOC "The pandoc software, to build the man page from the rst documentation") +if(PANDOC_EXECUTABLE) set(WITH_DOC true) file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc/) add_custom_command(OUTPUT ${MAN_PAGE} - COMMAND ${RONN_EXECUTABLE} --roff < ${DOC_PAGE} > ${MAN_PAGE} + COMMAND ${PANDOC_EXECUTABLE} -M date="${DOC_DATE}" -s -t man ${DOC_PAGE} -o ${MAN_PAGE} DEPENDS ${DOC_PAGE}) add_custom_target(doc ALL DEPENDS ${MAN_PAGE}) endif() -- cgit v1.2.3 From ad15924ac3f0852214fd35d93482fc18dbbe4bec Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Sat, 11 Jun 2016 01:34:03 +0100 Subject: =?UTF-8?q?Allow=20cmake=20to=20configure=20the=20systemd=20unit?= =?UTF-8?q?=E2=80=99s=20user=20and=20group?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index bb13460..4559201 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -267,6 +267,12 @@ else() set(SYSTEMD_SERVICE_TYPE "simple") set(WATCHDOG_SEC "") endif() +if(NOT DEFINED SERVICE_USER) + set(SERVICE_USER "nobody") +endif() +if(NOT DEFINED SERVICE_GROUP) + set(SERVICE_GROUP "nobody") +endif() configure_file(unit/biboumi.service.cmake biboumi.service) # The date MUST be in english format -- cgit v1.2.3 From ad4ccdbbea129cfbab89773bea040d4149afcb2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Mon, 13 Jun 2016 16:41:02 +0200 Subject: Display a message to tell if we found pandoc or not fix #3177 --- CMakeLists.txt | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 4559201..dc3a707 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -65,15 +65,20 @@ execute_process(COMMAND "date" "+%Y-%m-%d" OUTPUT_VARIABLE DOC_DATE OUTPUT_STRIP_TRAILING_WHITESPACE) set(MAN_PAGE ${CMAKE_CURRENT_BINARY_DIR}/doc/${PROJECT_NAME}.1) set(DOC_PAGE ${CMAKE_CURRENT_SOURCE_DIR}/doc/${PROJECT_NAME}.1.rst) -find_program(PANDOC_EXECUTABLE NAMES pandoc - DOC "The pandoc software, to build the man page from the rst documentation") -if(PANDOC_EXECUTABLE) - set(WITH_DOC true) - file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc/) - add_custom_command(OUTPUT ${MAN_PAGE} - COMMAND ${PANDOC_EXECUTABLE} -M date="${DOC_DATE}" -s -t man ${DOC_PAGE} -o ${MAN_PAGE} - DEPENDS ${DOC_PAGE}) - add_custom_target(doc ALL DEPENDS ${MAN_PAGE}) +if (NOT PANDOC_EXECUTABLE) + find_program(PANDOC_EXECUTABLE NAMES pandoc + DOC "The pandoc software, to build the man page from the rst documentation") + if(PANDOC_EXECUTABLE) + message(STATUS "Found Pandoc: ${PANDOC_EXECUTABLE}") + set(WITH_DOC true) + file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc/) + add_custom_command(OUTPUT ${MAN_PAGE} + COMMAND ${PANDOC_EXECUTABLE} -M date="${DOC_DATE}" -s -t man ${DOC_PAGE} -o ${MAN_PAGE} + DEPENDS ${DOC_PAGE}) + add_custom_target(doc ALL DEPENDS ${MAN_PAGE}) + else() + message(STATUS "Pandoc not found, documentation cannot be built") + endif() endif() # Look for litesql and enable the database if found -- cgit v1.2.3 From 79002aa5c9ada3a09d5f09cde0cac4c456adaa47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Wed, 29 Jun 2016 19:52:43 +0200 Subject: Run e2e through with valgrind if BIBOUMI_E2E_VALGRIND is set in the env --- CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index dc3a707..7249aa4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -205,6 +205,8 @@ add_custom_target(check COMMAND "test_suite" DEPENDS test_suite biboumi) add_custom_target(e2e COMMAND "python3" "${CMAKE_CURRENT_SOURCE_DIR}/tests/end_to_end/" DEPENDS biboumi) +add_custom_target(e2e_valgrind COMMAND "E2E_BIBOUMI_VALGRIND=1" "python3" "${CMAKE_CURRENT_SOURCE_DIR}/tests/end_to_end/" + DEPENDS biboumi) # -- cgit v1.2.3 From 8cef7303187297bc98d8a9ddceef4674a9297e9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Sat, 2 Jul 2016 15:08:40 +0200 Subject: Add a valgrind suppression file --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 7249aa4..132e353 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -205,8 +205,8 @@ add_custom_target(check COMMAND "test_suite" DEPENDS test_suite biboumi) add_custom_target(e2e COMMAND "python3" "${CMAKE_CURRENT_SOURCE_DIR}/tests/end_to_end/" DEPENDS biboumi) -add_custom_target(e2e_valgrind COMMAND "E2E_BIBOUMI_VALGRIND=1" "python3" "${CMAKE_CURRENT_SOURCE_DIR}/tests/end_to_end/" - DEPENDS biboumi) +add_custom_target(e2e_valgrind COMMAND "E2E_BIBOUMI_SUPP_DIR=${CMAKE_CURRENT_SOURCE_DIR}/tests/end_to_end/" "E2E_BIBOUMI_VALGRIND=1" "python3" "${CMAKE_CURRENT_SOURCE_DIR}/tests/end_to_end/" + DEPENDS biboumi) # -- cgit v1.2.3 From 9fb2e116c47a9d4e2866d34450d12dcb90d4a26c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Tue, 12 Jul 2016 01:15:34 +0200 Subject: Move reload.*pp from louloulibs to src --- CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 132e353..06733bd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -120,6 +120,13 @@ if(CARES_FOUND) include_directories(${CARES_INCLUDE_DIRS}) endif() +# +## utils +# +file(GLOB source_utils + src/utils/*.[hc]pp) +target_sources(utils PUBLIC ${source_utils}) + # ## irclib # -- cgit v1.2.3 From 4f730f93fa6c993f584ea07aadca19a0def7642f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Tue, 12 Jul 2016 11:21:43 +0200 Subject: Don't use target_sources() in cmake because it's >=3.1 only --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 06733bd..d8f95f1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -125,7 +125,7 @@ endif() # file(GLOB source_utils src/utils/*.[hc]pp) -target_sources(utils PUBLIC ${source_utils}) +set_property(TARGET utils APPEND PROPERTY SOURCES ${source_utils}) # ## irclib -- cgit v1.2.3 From b0d60c0c1a69a3588de42511698dea17857b6092 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Tue, 12 Jul 2016 11:22:01 +0200 Subject: Set the required cmake version to 3.0 --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index d8f95f1..31df11f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.6) +cmake_minimum_required(VERSION 3.0) project(biboumi) -- cgit v1.2.3 From f212b47830b4ef6473bbcfaab33297a169643d8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Tue, 12 Jul 2016 11:39:27 +0200 Subject: Use an ugly way, because SOURCES property does not work in cmake 3.0 --- CMakeLists.txt | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 31df11f..06121a7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -123,9 +123,14 @@ endif() # ## utils # -file(GLOB source_utils +file(GLOB source_src_utils src/utils/*.[hc]pp) -set_property(TARGET utils APPEND PROPERTY SOURCES ${source_utils}) +# Todo, switch to target_sources(utils) when we go cmake >=3.1 only +add_library(src_utils STATIC ${source_src_utils}) +target_link_libraries(src_utils logger config) +if(USE_DATABASE) + target_link_libraries(src_utils database) +endif() # ## irclib @@ -141,7 +146,7 @@ target_link_libraries(irc network utils logger) file(GLOB source_xmpp src/xmpp/*.[hc]pp) add_library(xmpp STATIC ${source_xmpp}) -target_link_libraries(xmpp xmpplib bridge network utils logger) +target_link_libraries(xmpp xmpplib bridge network utils src_utils logger) if(USE_DATABASE) target_link_libraries(xmpp database) @@ -165,6 +170,7 @@ target_link_libraries(${PROJECT_NAME} irc bridge utils + src_utils config) if(SYSTEMD_FOUND) target_link_libraries(xmpp ${SYSTEMD_LIBRARIES}) -- cgit v1.2.3 From 2307f94e5b02c7cfbc39ca57eb8c9133f6b10ee5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Tue, 12 Jul 2016 11:57:01 +0200 Subject: Clean the list of options visible in non-advanced ccmake --- CMakeLists.txt | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 06121a7..2b1736d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -80,6 +80,7 @@ if (NOT PANDOC_EXECUTABLE) message(STATUS "Pandoc not found, documentation cannot be built") endif() endif() +mark_as_advanced(PANDOC_EXECUTABLE) # Look for litesql and enable the database if found if(WITH_LITESQL) @@ -280,18 +281,22 @@ add_custom_target(PrintBuildParameters ALL configure_file(biboumi.h.cmake src/biboumi.h) +set(SYSTEMD_SERVICE_TYPE_DOCSTRING "The value used as the Type= in the systemd unit file.") +set(WATCHDOG_SEC_DOCSTRING "The value used as WatchdogSec= in the systemd unit file.") if(SYSTEMD_FOUND) - set(SYSTEMD_SERVICE_TYPE "notify") - set(WATCHDOG_SEC "20") + set(SYSTEMD_SERVICE_TYPE "notify" CACHE STRING SYSTEMD_SERVICE_TYPE_DOCSTRING) + set(WATCHDOG_SEC "20" CACHE STRING WATCHDOG_SEC_DOCSTRING) else() - set(SYSTEMD_SERVICE_TYPE "simple") - set(WATCHDOG_SEC "") + set(SYSTEMD_SERVICE_TYPE "simple" CACHE STRING SYSTEMD_SERVICE_TYPE_DOCSTRING) + set(WATCHDOG_SEC "" CACHE STRING WATCHDOG_SEC_DOCSTRING) endif() +set(SERVICE_USER_DOCSTRING "The value used as the User= in the systemd unit file.") if(NOT DEFINED SERVICE_USER) - set(SERVICE_USER "nobody") + set(SERVICE_USER "nobody" CACHE STRING SERVICE_USER_DOCSTRING) endif() +set(SERVICE_GROUP_DOCSTRING "The value used as the Group= in the systemd unit file.") if(NOT DEFINED SERVICE_GROUP) - set(SERVICE_GROUP "nobody") + set(SERVICE_GROUP "nobody" CACHE STRING SERVICE_GROUP_DOCSTRING) endif() configure_file(unit/biboumi.service.cmake biboumi.service) -- cgit v1.2.3 From 8ded8cd33ee2d171f2a6da207e01130787da7ccf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Tue, 12 Jul 2016 11:59:27 +0200 Subject: Properly use the docstring variables --- CMakeLists.txt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 2b1736d..a7bccd7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -284,19 +284,19 @@ configure_file(biboumi.h.cmake src/biboumi.h) set(SYSTEMD_SERVICE_TYPE_DOCSTRING "The value used as the Type= in the systemd unit file.") set(WATCHDOG_SEC_DOCSTRING "The value used as WatchdogSec= in the systemd unit file.") if(SYSTEMD_FOUND) - set(SYSTEMD_SERVICE_TYPE "notify" CACHE STRING SYSTEMD_SERVICE_TYPE_DOCSTRING) - set(WATCHDOG_SEC "20" CACHE STRING WATCHDOG_SEC_DOCSTRING) + set(SYSTEMD_SERVICE_TYPE "notify" CACHE STRING ${SYSTEMD_SERVICE_TYPE_DOCSTRING}) + set(WATCHDOG_SEC "20" CACHE STRING ${WATCHDOG_SEC_DOCSTRING}) else() - set(SYSTEMD_SERVICE_TYPE "simple" CACHE STRING SYSTEMD_SERVICE_TYPE_DOCSTRING) - set(WATCHDOG_SEC "" CACHE STRING WATCHDOG_SEC_DOCSTRING) + set(SYSTEMD_SERVICE_TYPE "simple" CACHE STRING ${SYSTEMD_SERVICE_TYPE_DOCSTRING}) + set(WATCHDOG_SEC "" CACHE STRING ${WATCHDOG_SEC_DOCSTRING}) endif() set(SERVICE_USER_DOCSTRING "The value used as the User= in the systemd unit file.") if(NOT DEFINED SERVICE_USER) - set(SERVICE_USER "nobody" CACHE STRING SERVICE_USER_DOCSTRING) + set(SERVICE_USER "nobody" CACHE STRING ${SERVICE_USER_DOCSTRING}) endif() set(SERVICE_GROUP_DOCSTRING "The value used as the Group= in the systemd unit file.") if(NOT DEFINED SERVICE_GROUP) - set(SERVICE_GROUP "nobody" CACHE STRING SERVICE_GROUP_DOCSTRING) + set(SERVICE_GROUP "nobody" CACHE STRING ${SERVICE_GROUP_DOCSTRING}) endif() configure_file(unit/biboumi.service.cmake biboumi.service) -- cgit v1.2.3 From 0cf7fac20217aaffc7e7d0b818a55ebd30ecdc72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Wed, 3 Aug 2016 15:17:14 +0200 Subject: Be verbose with make check --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index a7bccd7..73eb02d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -215,7 +215,7 @@ if(NOT EXISTS ${CMAKE_SOURCE_DIR}/tests/catch.hpp) ) add_dependencies(test_suite catch) endif() -add_custom_target(check COMMAND "test_suite" +add_custom_target(check COMMAND "test_suite" "-s" DEPENDS test_suite biboumi) add_custom_target(e2e COMMAND "python3" "${CMAKE_CURRENT_SOURCE_DIR}/tests/end_to_end/" DEPENDS biboumi) -- cgit v1.2.3 From 0f14fe83ef53b08bd8fa09670c82f4996c329bdc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Thu, 4 Aug 2016 11:32:45 +0200 Subject: Release 3.0 --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 73eb02d..d6d5ce8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,7 +4,7 @@ project(biboumi) set(${PROJECT_NAME}_VERSION_MAJOR 3) set(${PROJECT_NAME}_VERSION_MINOR 0) -set(${PROJECT_NAME}_VERSION_SUFFIX "~dev") +set(${PROJECT_NAME}_VERSION_SUFFIX "") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++1y -pedantic -Wall -Wextra") if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") -- cgit v1.2.3