diff options
author | louiz’ <louiz@louiz.org> | 2017-03-14 21:45:23 +0100 |
---|---|---|
committer | louiz’ <louiz@louiz.org> | 2017-03-14 21:45:23 +0100 |
commit | 0ab40dc1ab4e689921da54080b135e1d22b1c586 (patch) | |
tree | 238ac477aa6b29a8d1e187a8d97ecbcbbbc663ef | |
parent | 2d3806152e854ace7533fc3ad34d4ac1c44e9687 (diff) | |
download | biboumi-0ab40dc1ab4e689921da54080b135e1d22b1c586.tar.gz biboumi-0ab40dc1ab4e689921da54080b135e1d22b1c586.tar.bz2 biboumi-0ab40dc1ab4e689921da54080b135e1d22b1c586.tar.xz biboumi-0ab40dc1ab4e689921da54080b135e1d22b1c586.zip |
Refactoring louloulibs and cmake
Use OBJECT libraries
Remove the louloulibs directory
Write FOUND variables in the cache
-rw-r--r-- | .gitlab-ci.yml | 6 | ||||
-rw-r--r-- | CMakeLists.txt | 260 | ||||
-rw-r--r-- | biboumi.h.cmake | 11 | ||||
-rw-r--r-- | cmake/Modules/FindBOTAN.cmake (renamed from louloulibs/cmake/Modules/FindBOTAN.cmake) | 11 | ||||
-rw-r--r-- | cmake/Modules/FindGCRYPT.cmake (renamed from louloulibs/cmake/Modules/FindGCRYPT.cmake) | 6 | ||||
-rw-r--r-- | cmake/Modules/FindICONV.cmake (renamed from louloulibs/cmake/Modules/FindICONV.cmake) | 5 | ||||
-rw-r--r-- | cmake/Modules/FindLIBIDN.cmake (renamed from louloulibs/cmake/Modules/FindLIBIDN.cmake) | 6 | ||||
-rw-r--r-- | cmake/Modules/FindLIBUUID.cmake (renamed from louloulibs/cmake/Modules/FindLIBUUID.cmake) | 6 | ||||
-rw-r--r-- | cmake/Modules/FindLITESQL.cmake | 2 | ||||
-rw-r--r-- | cmake/Modules/FindSYSTEMD.cmake (renamed from louloulibs/cmake/Modules/FindSYSTEMD.cmake) | 6 | ||||
-rw-r--r-- | cmake/Modules/FindUDNS.cmake (renamed from louloulibs/cmake/Modules/FindUDNS.cmake) | 6 | ||||
-rw-r--r-- | louloulibs/CMakeLists.txt | 129 | ||||
-rw-r--r-- | louloulibs/louloulibs.h.cmake | 11 | ||||
-rw-r--r-- | src/config/config.cpp (renamed from louloulibs/config/config.cpp) | 0 | ||||
-rw-r--r-- | src/config/config.hpp (renamed from louloulibs/config/config.hpp) | 0 | ||||
-rw-r--r-- | src/irc/irc_client.cpp | 1 | ||||
-rw-r--r-- | src/logger/logger.cpp (renamed from louloulibs/logger/logger.cpp) | 0 | ||||
-rw-r--r-- | src/logger/logger.hpp (renamed from louloulibs/logger/logger.hpp) | 2 | ||||
-rw-r--r-- | src/network/credentials_manager.cpp (renamed from louloulibs/network/credentials_manager.cpp) | 2 | ||||
-rw-r--r-- | src/network/credentials_manager.hpp (renamed from louloulibs/network/credentials_manager.hpp) | 2 | ||||
-rw-r--r-- | src/network/dns_handler.cpp (renamed from louloulibs/network/dns_handler.cpp) | 2 | ||||
-rw-r--r-- | src/network/dns_handler.hpp (renamed from louloulibs/network/dns_handler.hpp) | 2 | ||||
-rw-r--r-- | src/network/dns_socket_handler.cpp (renamed from louloulibs/network/dns_socket_handler.cpp) | 2 | ||||
-rw-r--r-- | src/network/dns_socket_handler.hpp (renamed from louloulibs/network/dns_socket_handler.hpp) | 2 | ||||
-rw-r--r-- | src/network/poller.cpp (renamed from louloulibs/network/poller.cpp) | 0 | ||||
-rw-r--r-- | src/network/poller.hpp (renamed from louloulibs/network/poller.hpp) | 2 | ||||
-rw-r--r-- | src/network/resolver.cpp (renamed from louloulibs/network/resolver.cpp) | 0 | ||||
-rw-r--r-- | src/network/resolver.hpp (renamed from louloulibs/network/resolver.hpp) | 2 | ||||
-rw-r--r-- | src/network/socket_handler.hpp (renamed from louloulibs/network/socket_handler.hpp) | 2 | ||||
-rw-r--r-- | src/network/tcp_client_socket_handler.cpp (renamed from louloulibs/network/tcp_client_socket_handler.cpp) | 0 | ||||
-rw-r--r-- | src/network/tcp_client_socket_handler.hpp (renamed from louloulibs/network/tcp_client_socket_handler.hpp) | 0 | ||||
-rw-r--r-- | src/network/tcp_server_socket.hpp (renamed from louloulibs/network/tcp_server_socket.hpp) | 0 | ||||
-rw-r--r-- | src/network/tcp_socket_handler.cpp (renamed from louloulibs/network/tcp_socket_handler.cpp) | 0 | ||||
-rw-r--r-- | src/network/tcp_socket_handler.hpp (renamed from louloulibs/network/tcp_socket_handler.hpp) | 2 | ||||
-rw-r--r-- | src/utils/encoding.cpp (renamed from louloulibs/utils/encoding.cpp) | 0 | ||||
-rw-r--r-- | src/utils/encoding.hpp (renamed from louloulibs/utils/encoding.hpp) | 0 | ||||
-rw-r--r-- | src/utils/get_first_non_empty.cpp (renamed from louloulibs/utils/get_first_non_empty.cpp) | 0 | ||||
-rw-r--r-- | src/utils/get_first_non_empty.hpp (renamed from louloulibs/utils/get_first_non_empty.hpp) | 0 | ||||
-rw-r--r-- | src/utils/revstr.cpp (renamed from louloulibs/utils/revstr.cpp) | 0 | ||||
-rw-r--r-- | src/utils/revstr.hpp (renamed from louloulibs/utils/revstr.hpp) | 0 | ||||
-rw-r--r-- | src/utils/scopeguard.hpp (renamed from louloulibs/utils/scopeguard.hpp) | 0 | ||||
-rw-r--r-- | src/utils/sha1.cpp (renamed from louloulibs/utils/sha1.cpp) | 2 | ||||
-rw-r--r-- | src/utils/sha1.hpp (renamed from louloulibs/utils/sha1.hpp) | 0 | ||||
-rw-r--r-- | src/utils/split.cpp (renamed from louloulibs/utils/split.cpp) | 0 | ||||
-rw-r--r-- | src/utils/split.hpp (renamed from louloulibs/utils/split.hpp) | 0 | ||||
-rw-r--r-- | src/utils/string.cpp (renamed from louloulibs/utils/string.cpp) | 0 | ||||
-rw-r--r-- | src/utils/string.hpp (renamed from louloulibs/utils/string.hpp) | 0 | ||||
-rw-r--r-- | src/utils/system.cpp (renamed from louloulibs/utils/system.cpp) | 0 | ||||
-rw-r--r-- | src/utils/system.hpp (renamed from louloulibs/utils/system.hpp) | 0 | ||||
-rw-r--r-- | src/utils/time.cpp (renamed from louloulibs/utils/time.cpp) | 2 | ||||
-rw-r--r-- | src/utils/time.hpp (renamed from louloulibs/utils/time.hpp) | 0 | ||||
-rw-r--r-- | src/utils/timed_events.cpp (renamed from louloulibs/utils/timed_events.cpp) | 0 | ||||
-rw-r--r-- | src/utils/timed_events.hpp (renamed from louloulibs/utils/timed_events.hpp) | 0 | ||||
-rw-r--r-- | src/utils/timed_events_manager.cpp (renamed from louloulibs/utils/timed_events_manager.cpp) | 0 | ||||
-rw-r--r-- | src/utils/tolower.cpp (renamed from louloulibs/utils/tolower.cpp) | 0 | ||||
-rw-r--r-- | src/utils/tolower.hpp (renamed from louloulibs/utils/tolower.hpp) | 0 | ||||
-rw-r--r-- | src/utils/xdg.cpp (renamed from louloulibs/utils/xdg.cpp) | 2 | ||||
-rw-r--r-- | src/utils/xdg.hpp (renamed from louloulibs/utils/xdg.hpp) | 0 | ||||
-rw-r--r-- | src/xmpp/adhoc_command.cpp (renamed from louloulibs/xmpp/adhoc_command.cpp) | 0 | ||||
-rw-r--r-- | src/xmpp/adhoc_command.hpp (renamed from louloulibs/xmpp/adhoc_command.hpp) | 0 | ||||
-rw-r--r-- | src/xmpp/adhoc_commands_handler.cpp (renamed from louloulibs/xmpp/adhoc_commands_handler.cpp) | 0 | ||||
-rw-r--r-- | src/xmpp/adhoc_commands_handler.hpp (renamed from louloulibs/xmpp/adhoc_commands_handler.hpp) | 0 | ||||
-rw-r--r-- | src/xmpp/adhoc_session.cpp (renamed from louloulibs/xmpp/adhoc_session.cpp) | 0 | ||||
-rw-r--r-- | src/xmpp/adhoc_session.hpp (renamed from louloulibs/xmpp/adhoc_session.hpp) | 0 | ||||
-rw-r--r-- | src/xmpp/auth.cpp (renamed from louloulibs/xmpp/auth.cpp) | 0 | ||||
-rw-r--r-- | src/xmpp/auth.hpp (renamed from louloulibs/xmpp/auth.hpp) | 0 | ||||
-rw-r--r-- | src/xmpp/biboumi_component.cpp | 1 | ||||
-rw-r--r-- | src/xmpp/body.hpp (renamed from louloulibs/xmpp/body.hpp) | 0 | ||||
-rw-r--r-- | src/xmpp/jid.cpp (renamed from louloulibs/xmpp/jid.cpp) | 2 | ||||
-rw-r--r-- | src/xmpp/jid.hpp (renamed from louloulibs/xmpp/jid.hpp) | 0 | ||||
-rw-r--r-- | src/xmpp/xmpp_component.cpp (renamed from louloulibs/xmpp/xmpp_component.cpp) | 2 | ||||
-rw-r--r-- | src/xmpp/xmpp_component.hpp (renamed from louloulibs/xmpp/xmpp_component.hpp) | 0 | ||||
-rw-r--r-- | src/xmpp/xmpp_parser.cpp (renamed from louloulibs/xmpp/xmpp_parser.cpp) | 0 | ||||
-rw-r--r-- | src/xmpp/xmpp_parser.hpp (renamed from louloulibs/xmpp/xmpp_parser.hpp) | 0 | ||||
-rw-r--r-- | src/xmpp/xmpp_stanza.cpp (renamed from louloulibs/xmpp/xmpp_stanza.cpp) | 0 | ||||
-rw-r--r-- | src/xmpp/xmpp_stanza.hpp (renamed from louloulibs/xmpp/xmpp_stanza.hpp) | 0 | ||||
-rw-r--r-- | tests/jid.cpp | 2 |
77 files changed, 220 insertions, 281 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 21cd32e..c202a0e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -31,7 +31,7 @@ variables: script: - "echo Running cmake with the following parameters: -DCMAKE_CXX_COMPILER=${COMPILER} -DCMAKE_BUILD_TYPE=${BUILD_TYPE} ${BOTAN} ${UDNS} ${SYSTEMD} ${LIBIDN} ${LITESQL}" - cmake .. -DCMAKE_CXX_COMPILER=${COMPILER} -DCMAKE_BUILD_TYPE=${BUILD_TYPE} ${BOTAN} ${UDNS} ${SYSTEMD} ${LIBIDN} ${LITESQL} - - make biboumi -j$(nproc || echo 1) + - make -j$(nproc || echo 1) - make coverage_check -j$(nproc || echo 1) artifacts: expire_in: 8 hours @@ -140,7 +140,7 @@ test:freebsd: stage: test script: - cmake .. -DCMAKE_BUILD_TYPE=${BUILD_TYPE} ${BOTAN} ${UDNS} ${SYSTEMD} ${LIBIDN} ${LITESQL} - - make biboumi + - make - make check - make e2e @@ -226,7 +226,7 @@ coverity: script: - export PATH=$PATH:~/coverity/bin - cmake .. -DWITHOUT_SYSTEMD=1 - - cov-build --dir cov-int make biboumi test_suite -j$(nproc || echo 1) + - cov-build --dir cov-int make -j$(nproc || echo 1) - tar czvf biboumi_coverity.tgz cov-int - curl --form token=$COVERITY_TOKEN --form email=louiz@louiz.org --form file=@biboumi_coverity.tgz --form version="$(git rev-parse --short HEAD)" --form description="Automatic submission by gitlab-ci" https://scan.coverity.com/builds?project=louiz%2Fbiboumi diff --git a/CMakeLists.txt b/CMakeLists.txt index 155e995..55cee2b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,34 +6,28 @@ set(${PROJECT_NAME}_VERSION_MAJOR 5) set(${PROJECT_NAME}_VERSION_MINOR 0) set(${PROJECT_NAME}_VERSION_SUFFIX "~dev") +# +## Find optional instrumentation libraries that will be used in debug only +# find_library(LIBASAN NAMES asan libasan.so.3 libasan.so.2 libasan.so.1) find_library(LIBUBSAN NAMES ubsan libubsan.so.0) +# +## Set various debug flags (instrumentation libs, coverage, …) +# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++1y -pedantic -Wall -Wextra") if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fprofile-arcs -ftest-coverage --coverage") endif() if(LIBASAN) - message(STATUS "Libasan found.") set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fsanitize=address") -else() - message(STATUS "Libasan NOT found.") endif() if(LIBUBSAN) - message(STATUS "Libubsan found.") set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fsanitize=undefined") -else() - message(STATUS "Libubsan NOT found.") endif() - # -## Look for external libraries -# -set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules/") - -# -## Get the software version +## Set the software version, archive name, RPM name etc # 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}) @@ -62,16 +56,8 @@ endif() set(SOFTWARE_VERSION ${${PROJECT_NAME}_VERSION_MAJOR}.${${PROJECT_NAME}_VERSION_MINOR}${${PROJECT_NAME}_VERSION_SUFFIX}) -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/") -include_directories("${CMAKE_CURRENT_SOURCE_DIR}/src/") -include_directories("${CMAKE_CURRENT_BINARY_DIR}/") - # -## Documentation +## The rule that generates the documentation # execute_process(COMMAND "date" "+%Y-%m-%d" OUTPUT_VARIABLE DOC_DATE OUTPUT_STRIP_TRAILING_WHITESPACE) @@ -94,28 +80,57 @@ if (NOT PANDOC_EXECUTABLE) endif() mark_as_advanced(PANDOC_EXECUTABLE) -# Look for litesql and enable the database if found -if(WITH_LITESQL) - find_package(LITESQL REQUIRED) -elseif(NOT WITHOUT_LITESQL) - find_package(LITESQL) +# +## Set this search path for cmake, to find our custom search modules +# +set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules/") +find_package(ICONV REQUIRED) +find_package(LIBUUID REQUIRED) +find_package(EXPAT REQUIRED) + +# +## Find all the libraries (optional or not) +# +if(WITH_LIBIDN) + find_package(LIBIDN REQUIRED) +elseif(NOT WITHOUT_LIBIDN) + find_package(LIBIDN) endif() -if(LITESQL_FOUND) - LITESQL_GENERATE_CPP("database/database.xml" - "biboudb" - LITESQL_GENERATED_SOURCES) +if(WITH_SYSTEMD) + find_package(SYSTEMD REQUIRED) +elseif(NOT WITHOUT_SYSTEMD) + find_package(SYSTEMD) +endif() - set(source_database src/database/database.cpp ${LITESQL_GENERATED_SOURCES}) - set(USE_DATABASE TRUE) -else() - set(source_database) +if(WITH_BOTAN) + find_package(BOTAN REQUIRED) +elseif(NOT WITHOUT_BOTAN) + find_package(BOTAN) endif() -add_subdirectory("louloulibs") -include_directories("louloulibs") +if(NOT BOTAN_FOUND) + find_package(GCRYPT REQUIRED) +endif() -# If they are found in louloulibs CMakeLists.txt, we inherite these values +if(WITH_UDNS) + find_package(UDNS REQUIRED) +elseif(NOT WITHOUT_UDNS) + find_package(UDNS) +endif() + +if(WITH_LITESQL) + find_package(LITESQL REQUIRED) +elseif(NOT WITHOUT_LITESQL) + find_package(LITESQL) +endif() + +# +## Set all the include directories, depending on what libraries are used +# +include_directories(${EXPAT_INCLUDE_DIRS}) +include_directories(${ICONV_INCLUDE_DIRS}) +include_directories(${LIBUUID_INCLUDE_DIRS}) if(SYSTEMD_FOUND) include_directories(${SYSTEMD_INCLUDE_DIRS}) endif() @@ -126,70 +141,92 @@ if(UDNS_FOUND) include_directories(${UDNS_INCLUDE_DIRS}) endif() -# -## utils -# -file(GLOB source_src_utils - src/utils/*.[hc]pp) +# 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}/") # -## irclib +## Define all the modules # + +file(GLOB source_utils + src/utils/*.[hc]pp) +add_library(utils OBJECT ${source_utils}) + file(GLOB source_irc - src/irc/*.[hc]pp) + src/irc/*.[hc]pp) +add_library(irc OBJECT ${source_irc}) -# -## xmpp -# file(GLOB source_xmpp - src/xmpp/*.[hc]pp) + src/xmpp/*.[hc]pp) +add_library(xmpp OBJECT ${source_xmpp}) -# -## identd -# file(GLOB source_identd - src/identd/*.[hc]pp) + src/identd/*.[hc]pp) +add_library(identd OBJECT ${source_identd}) -# -## bridge -# file(GLOB source_bridge - src/bridge/*.[hc]pp) + src/bridge/*.[hc]pp) +add_library(bridge OBJECT ${source_bridge}) -# -## Main executable -# -add_executable(${PROJECT_NAME} src/main.cpp - ${source_utils} - ${source_config} - ${source_logger} - ${source_network} - ${source_xmpplib} - ${source_xmpp} - ${source_src_utils} - ${source_bridge} - ${source_irc} - ${source_identd} - ${source_database}) +file(GLOB source_config + src/config/*.[hc]pp) +add_library(config OBJECT ${source_config}) + +file(GLOB source_logger + src/logger/*.[hc]pp) +add_library(logger OBJECT ${source_logger}) + +file(GLOB source_network + src/network/*.[hc]pp) +add_library(network OBJECT ${source_network}) + +if(LITESQL_FOUND) + LITESQL_GENERATE_CPP("database/database.xml" + "biboudb" + LITESQL_GENERATED_SOURCES) + + add_library(database OBJECT src/database/database.cpp + ${LITESQL_GENERATED_SOURCES}) + set(USE_DATABASE TRUE) +else() + add_library(database OBJECT "") +endif() # -## Tests +## Define the executables # + +## main +add_executable(${PROJECT_NAME} src/main.cpp + $<TARGET_OBJECTS:utils> + $<TARGET_OBJECTS:config> + $<TARGET_OBJECTS:logger> + $<TARGET_OBJECTS:network> + $<TARGET_OBJECTS:xmpp> + $<TARGET_OBJECTS:bridge> + $<TARGET_OBJECTS:irc> + $<TARGET_OBJECTS:identd> + $<TARGET_OBJECTS:database>) + +## test_suite file(GLOB source_tests tests/*.cpp) -add_executable(test_suite EXCLUDE_FROM_ALL ${source_tests} - ${source_utils} - ${source_config} - ${source_logger} - ${source_network} - ${source_xmpplib} - ${source_xmpp} - ${source_src_utils} - ${source_bridge} - ${source_irc} - ${source_identd} - ${source_database}) +add_executable(test_suite ${source_tests} + $<TARGET_OBJECTS:utils> + $<TARGET_OBJECTS:config> + $<TARGET_OBJECTS:logger> + $<TARGET_OBJECTS:network> + $<TARGET_OBJECTS:xmpp> + $<TARGET_OBJECTS:bridge> + $<TARGET_OBJECTS:irc> + $<TARGET_OBJECTS:identd> + $<TARGET_OBJECTS:database>) +# +## Link the executables with their libraries +# target_link_libraries(${PROJECT_NAME} ${ICONV_LIBRARIES} ${LIBUUID_LIBRARIES} @@ -230,6 +267,9 @@ foreach(file ${source_all}) set_property(SOURCE ${file} APPEND PROPERTY COMPILE_DEFINITIONS __FILENAME__="${shorter_file}") endforeach() +# +## Add a rule to download the catch unit test framework +# include(ExternalProject) ExternalProject_Add(catch GIT_REPOSITORY "https://lab.louiz.org/louiz/Catch.git" @@ -247,17 +287,16 @@ if(NOT EXISTS ${CMAKE_SOURCE_DIR}/tests/catch.hpp) ) add_dependencies(test_suite catch) endif() + +# +## Add some custom rules to launch the tests +# 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_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) - - -# -## Code coverage -# if(CMAKE_BUILD_TYPE MATCHES Debug) include(CodeCoverage) SETUP_TARGET_FOR_COVERAGE(coverage_check @@ -278,7 +317,6 @@ if(CMAKE_BUILD_TYPE MATCHES Debug) WORKING_DIRECTORY ${CMAKE_BINARY_DIR} ) - endif() # @@ -315,8 +353,9 @@ add_custom_target(rpm COMMAND rpmbuild --define "_topdir `pwd`/rpmbuild/" --define "_sourcedir `pwd`" -ba biboumi.spec ) -configure_file(biboumi.h.cmake src/biboumi.h) - +# +## Set some variables that will be used in the cmake-generated files +# 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) @@ -334,7 +373,6 @@ set(SERVICE_GROUP_DOCSTRING "The value used as the Group= in the systemd unit fi if(NOT DEFINED SERVICE_GROUP) set(SERVICE_GROUP "nobody" CACHE STRING ${SERVICE_GROUP_DOCSTRING}) endif() -configure_file(unit/biboumi.service.cmake biboumi.service) # Force the format of the date output set(ENV{LANG} "C") @@ -342,4 +380,38 @@ execute_process(COMMAND "date" "+%a %b %d %Y" OUTPUT_VARIABLE RPM_DATE OUTPUT_STRIP_TRAILING_WHITESPACE) unset(ENV{LANG}) +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() + +# +## Check if we have std::get_time and put_time +# +include(CheckCXXSourceCompiles) + +check_cxx_source_compiles(" + #include <iomanip> + int main() + { std::get_time(nullptr, \"\"); }" + HAS_GET_TIME) + +mark_as_advanced(HAS_GET_TIME) + +check_cxx_source_compiles(" + #include <iomanip> + int main() + { std::put_time(nullptr, \"\"); }" + HAS_PUT_TIME) + +mark_as_advanced(HAS_PUT_TIME) + +configure_file(unit/biboumi.service.cmake biboumi.service) configure_file(packaging/biboumi.spec.cmake biboumi.spec) +configure_file(biboumi.h.cmake src/biboumi.h) diff --git a/biboumi.h.cmake b/biboumi.h.cmake index beb67d0..1ad9a40 100644 --- a/biboumi.h.cmake +++ b/biboumi.h.cmake @@ -1 +1,12 @@ #cmakedefine USE_DATABASE +#cmakedefine ICONV_SECOND_ARGUMENT_IS_CONST +#cmakedefine LIBIDN_FOUND +#cmakedefine SYSTEMD_FOUND +#cmakedefine POLLER ${POLLER} +#cmakedefine BOTAN_FOUND +#cmakedefine GCRYPT_FOUND +#cmakedefine UDNS_FOUND +#cmakedefine SOFTWARE_VERSION "${SOFTWARE_VERSION}" +#cmakedefine PROJECT_NAME "${PROJECT_NAME}" +#cmakedefine HAS_GET_TIME +#cmakedefine HAS_PUT_TIME diff --git a/louloulibs/cmake/Modules/FindBOTAN.cmake b/cmake/Modules/FindBOTAN.cmake index 27f82a7..13d2de4 100644 --- a/louloulibs/cmake/Modules/FindBOTAN.cmake +++ b/cmake/Modules/FindBOTAN.cmake @@ -16,10 +16,9 @@ # This file is in the public domain include(FindPkgConfig) + pkg_check_modules(BOTAN botan-2) -if(NOT BOTAN_FOUND) - pkg_check_modules(BOTAN botan-1.11) -endif() +pkg_check_modules(BOTAN botan-1.11) if(NOT BOTAN_FOUND) find_path(BOTAN_INCLUDE_DIRS NAMES botan/botan.h @@ -35,9 +34,9 @@ if(NOT BOTAN_FOUND) find_package_handle_standard_args(BOTAN REQUIRED_VARS BOTAN_LIBRARIES BOTAN_INCLUDE_DIRS) if(BOTAN_FOUND) - set(BOTAN_LIBRARY ${BOTAN_LIBRARIES} PARENT_SCOPE) - set(BOTAN_INCLUDE_DIR ${BOTAN_INCLUDE_DIRS} PARENT_SCOPE) - set(BOTAN_FOUND ${BOTAN_FOUND} PARENT_SCOPE) + set(BOTAN_LIBRARY ${BOTAN_LIBRARIES} CACHE INTERNAL "") + set(BOTAN_INCLUDE_DIR ${BOTAN_INCLUDE_DIRS} CACHE INTERNAL "") + set(BOTAN_FOUND ${BOTAN_FOUND} CACHE INTERNAL "") endif() endif() diff --git a/louloulibs/cmake/Modules/FindGCRYPT.cmake b/cmake/Modules/FindGCRYPT.cmake index 62f5c7a..b73bfd0 100644 --- a/louloulibs/cmake/Modules/FindGCRYPT.cmake +++ b/cmake/Modules/FindGCRYPT.cmake @@ -32,9 +32,9 @@ if(NOT GCRYPT_FOUND) find_package_handle_standard_args(GCRYPT REQUIRED_VARS GCRYPT_LIBRARIES GCRYPT_INCLUDE_DIRS) if(GCRYPT_FOUND) - set(GCRYPT_LIBRARY ${GCRYPT_LIBRARIES} PARENT_SCOPE) - set(GCRYPT_INCLUDE_DIR ${GCRYPT_INCLUDE_DIRS} PARENT_SCOPE) - set(GCRYPT_FOUND ${GCRYPT_FOUND} PARENT_SCOPE) + set(GCRYPT_LIBRARY ${GCRYPT_LIBRARIES} CACHE INTERNAL "") + set(GCRYPT_INCLUDE_DIR ${GCRYPT_INCLUDE_DIRS} CACHE INTERNAL "") + set(GCRYPT_FOUND ${GCRYPT_FOUND} CACHE INTERNAL "") endif() endif() diff --git a/louloulibs/cmake/Modules/FindICONV.cmake b/cmake/Modules/FindICONV.cmake index 9e5bde6..fb78ac7 100644 --- a/louloulibs/cmake/Modules/FindICONV.cmake +++ b/cmake/Modules/FindICONV.cmake @@ -53,9 +53,8 @@ if(ICONV_FOUND) ICONV_SECOND_ARGUMENT_IS_CONST) # Compatibility for all the ways of writing these variables - set(ICONV_LIBRARY ${ICONV_LIBRARIES} PARENT_SCOPE) - set(ICONV_INCLUDE_DIR ${ICONV_INCLUDE_DIRS} PARENT_SCOPE) - set(ICONV_FOUND ${ICONV_FOUND} PARENT_SCOPE) + set(ICONV_LIBRARY ${ICONV_LIBRARIES}) + set(ICONV_INCLUDE_DIR ${ICONV_INCLUDE_DIRS}) endif() mark_as_advanced(ICONV_INCLUDE_DIRS ICONV_LIBRARIES ICONV_SECOND_ARGUMENT_IS_CONST) diff --git a/louloulibs/cmake/Modules/FindLIBIDN.cmake b/cmake/Modules/FindLIBIDN.cmake index 716714f..d42257f 100644 --- a/louloulibs/cmake/Modules/FindLIBIDN.cmake +++ b/cmake/Modules/FindLIBIDN.cmake @@ -33,9 +33,9 @@ if(NOT LIBIDN_FOUND) # Compatibility for all the ways of writing these variables if(LIBIDN_FOUND) - set(LIBIDN_INCLUDE_DIR ${LIBIDN_INCLUDE_DIRS} PARENT_SCOPE) - set(LIBIDN_LIBRARY ${LIBIDN_LIBRARIES} PARENT_SCOPE) - set(LIBIDN_FOUND ${LIBIDN_FOUND} PARENT_SCOPE) + set(LIBIDN_INCLUDE_DIR ${LIBIDN_INCLUDE_DIRS} CACHE INTERNAL "") + set(LIBIDN_LIBRARY ${LIBIDN_LIBRARIES} CACHE INTERNAL "") + set(LIBIDN_FOUN ${LIBIDN_FOUND} CACHE INTERNAL "") endif() endif() diff --git a/louloulibs/cmake/Modules/FindLIBUUID.cmake b/cmake/Modules/FindLIBUUID.cmake index 9269978..b4bf341 100644 --- a/louloulibs/cmake/Modules/FindLIBUUID.cmake +++ b/cmake/Modules/FindLIBUUID.cmake @@ -33,9 +33,9 @@ if(NOT LIBUUID_FOUND) # Compatibility for all the ways of writing these variables if(LIBUUID_FOUND) - set(LIBUUID_INCLUDE_DIR ${LIBUUID_INCLUDE_DIRS} PARENT_SCOPE) - set(LIBUUID_LIBRARY ${LIBUUID_LIBRARIES} PARENT_SCOPE) - set(LIBUUID_FOUND ${LIBUUID_FOUND} PARENT_SCOPE) + set(LIBUUID_INCLUDE_DIR ${LIBUUID_INCLUDE_DIRS} CACHE INTERNAL "") + set(LIBUUID_LIBRARY ${LIBUUID_LIBRARIES} CACHE INTERNAL "") + set(LIBUUID_FOUND ${LIBUUID_FOUND} CACHE INTERNAL "") endif() endif() diff --git a/cmake/Modules/FindLITESQL.cmake b/cmake/Modules/FindLITESQL.cmake index 91155bb..18f0bfa 100644 --- a/cmake/Modules/FindLITESQL.cmake +++ b/cmake/Modules/FindLITESQL.cmake @@ -64,7 +64,7 @@ function(LITESQL_GENERATE_CPP set(${OUTPUT_SOURCES}) add_custom_command( OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${OUTPUT_NAME}.cpp" - "${CMAKE_CURRENT_BINARY_DIR}/${OUTPUT_NAME}.hpp" + "${CMAKE_CURRENT_BINARY_DIR}/${OUTPUT_NAME}.hpp" COMMAND ${LITESQLGEN_EXECUTABLE} ARGS -t c++ --output-dir=${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/${SOURCE_FILE} DEPENDS ${SOURCE_FILE} diff --git a/louloulibs/cmake/Modules/FindSYSTEMD.cmake b/cmake/Modules/FindSYSTEMD.cmake index 43db6c4..899d07a 100644 --- a/louloulibs/cmake/Modules/FindSYSTEMD.cmake +++ b/cmake/Modules/FindSYSTEMD.cmake @@ -31,9 +31,9 @@ if(NOT SYSTEMD_FOUND) find_package_handle_standard_args(SYSTEMD REQUIRED_VARS SYSTEMD_LIBRARIES SYSTEMD_INCLUDE_DIRS) if(SYSTEMD_FOUND) - set(SYSTEMD_LIBRARY ${SYSTEMD_LIBRARIES} PARENT_SCOPE) - set(SYSTEMD_INCLUDE_DIR ${SYSTEMD_INCLUDE_DIRS} PARENT_SCOPE) - set(SYSTEMD_FOUND ${SYSTEMD_FOUND} PARENT_SCOPE) + set(SYSTEMD_LIBRARY ${SYSTEMD_LIBRARIES} CACHE INTERNAL "") + set(SYSTEMD_INCLUDE_DIR ${SYSTEMD_INCLUDE_DIRS} CACHE INTERNAL "") + set(SYSTEMD_FOUND ${SYSTEMD_FOUND} CACHE INTERNAL "") endif() endif() diff --git a/louloulibs/cmake/Modules/FindUDNS.cmake b/cmake/Modules/FindUDNS.cmake index 33fbc4c..9576b2a 100644 --- a/louloulibs/cmake/Modules/FindUDNS.cmake +++ b/cmake/Modules/FindUDNS.cmake @@ -29,9 +29,9 @@ if(NOT UDNS_FOUND) # Compatibility for all the ways of writing these variables if(UDNS_FOUND) - set(UDNS_INCLUDE_DIR ${UDNS_INCLUDE_DIRS} PARENT_SCOPE) - set(UDNS_LIBRARY ${UDNS_LIBRARIES} PARENT_SCOPE) - set(UDNS_FOUND ${UDNS_FOUND} PARENT_SCOPE) + set(UDNS_INCLUDE_DIR ${UDNS_INCLUDE_DIRS} CACHE INTERNAL "") + set(UDNS_LIBRARY ${UDNS_LIBRARIES} CACHE INTERNAL "") + set(UDNS_FOUND ${UDNS_FOUND} CACHE INTERNAL "") endif() endif() diff --git a/louloulibs/CMakeLists.txt b/louloulibs/CMakeLists.txt deleted file mode 100644 index b3056f2..0000000 --- a/louloulibs/CMakeLists.txt +++ /dev/null @@ -1,129 +0,0 @@ -cmake_minimum_required(VERSION 3.0) - -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") - -# -## Look for external libraries -# -set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules/") -find_package(ICONV REQUIRED) -find_package(LIBUUID REQUIRED) -find_package(EXPAT REQUIRED) -set(EXPAT_FOUND ${EXPAT_FOUND} PARENT_SCOPE) - -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(NOT BOTAN_FOUND) - find_package(GCRYPT REQUIRED) -endif() - -if(WITH_UDNS) - find_package(UDNS REQUIRED) -elseif(NOT WITHOUT_UDNS) - find_package(UDNS) -endif() - -# To be able to include the config.h file generated by cmake -include_directories(${CMAKE_CURRENT_BINARY_DIR}) -include_directories(${CMAKE_CURRENT_SOURCE_DIR}) - -include_directories(${EXPAT_INCLUDE_DIRS}) -include_directories(${ICONV_INCLUDE_DIRS}) -include_directories(${LIBUUID_INCLUDE_DIRS}) - -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() - -# -## utils -# -file(GLOB source_utils - utils/*.[hc]pp) -set(source_utils ${source_utils} PARENT_SCOPE) - -# -## config -# -file(GLOB source_config - config/*.[hc]pp) -set(source_config ${source_config} PARENT_SCOPE) - -# -## logger -# -file(GLOB source_logger - logger/*.[hc]pp) -set(source_logger ${source_logger} PARENT_SCOPE) - -# -## network -# -file(GLOB source_network - network/*.[hc]pp) -set(source_network ${source_network} PARENT_SCOPE) - -# -## xmpplib -# -file(GLOB source_xmpplib - xmpp/*.[hc]pp) -set(source_xmpplib ${source_xmpplib} PARENT_SCOPE) - -# Define a __FILENAME__ macro with the relative path (from the base project directory) -# of each source file -file(GLOB_RECURSE source_all *.[hc]pp) -foreach(file ${source_all}) - file(RELATIVE_PATH shorter_file ${CMAKE_CURRENT_SOURCE_DIR} ${file}) - set_property(SOURCE ${file} APPEND PROPERTY COMPILE_DEFINITIONS __FILENAME__="${shorter_file}") -endforeach() - -# -## Check if we have std::get_time -# -include(CheckCXXSourceCompiles) - -check_cxx_source_compiles(" - #include <iomanip> - int main() - { std::get_time(nullptr, \"\"); }" - HAS_GET_TIME) - -mark_as_advanced(HAS_GET_TIME) - -check_cxx_source_compiles(" - #include <iomanip> - int main() - { std::put_time(nullptr, \"\"); }" - HAS_PUT_TIME) - -mark_as_advanced(HAS_PUT_TIME) - -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/louloulibs.h.cmake ${CMAKE_BINARY_DIR}/src/louloulibs.h) diff --git a/louloulibs/louloulibs.h.cmake b/louloulibs/louloulibs.h.cmake deleted file mode 100644 index 5777d92..0000000 --- a/louloulibs/louloulibs.h.cmake +++ /dev/null @@ -1,11 +0,0 @@ -#cmakedefine ICONV_SECOND_ARGUMENT_IS_CONST -#cmakedefine LIBIDN_FOUND -#cmakedefine SYSTEMD_FOUND -#cmakedefine POLLER ${POLLER} -#cmakedefine BOTAN_FOUND -#cmakedefine GCRYPT_FOUND -#cmakedefine UDNS_FOUND -#cmakedefine SOFTWARE_VERSION "${SOFTWARE_VERSION}" -#cmakedefine PROJECT_NAME "${PROJECT_NAME}" -#cmakedefine HAS_GET_TIME -#cmakedefine HAS_PUT_TIME diff --git a/louloulibs/config/config.cpp b/src/config/config.cpp index 24a1c87..24a1c87 100644 --- a/louloulibs/config/config.cpp +++ b/src/config/config.cpp diff --git a/louloulibs/config/config.hpp b/src/config/config.hpp index 4e01281..4e01281 100644 --- a/louloulibs/config/config.hpp +++ b/src/config/config.hpp diff --git a/src/irc/irc_client.cpp b/src/irc/irc_client.cpp index d0970c1..93e463b 100644 --- a/src/irc/irc_client.cpp +++ b/src/irc/irc_client.cpp @@ -21,7 +21,6 @@ #include <string> #include "biboumi.h" -#include "louloulibs.h" using namespace std::string_literals; using namespace std::chrono_literals; diff --git a/louloulibs/logger/logger.cpp b/src/logger/logger.cpp index 92a3d9b..92a3d9b 100644 --- a/louloulibs/logger/logger.cpp +++ b/src/logger/logger.cpp diff --git a/louloulibs/logger/logger.hpp b/src/logger/logger.hpp index b3284a6..ff6a82b 100644 --- a/louloulibs/logger/logger.hpp +++ b/src/logger/logger.hpp @@ -17,7 +17,7 @@ #define warning_lvl 2 #define error_lvl 3 -#include "louloulibs.h" +#include "biboumi.h" #ifdef SYSTEMD_FOUND # include <systemd/sd-daemon.h> #else diff --git a/louloulibs/network/credentials_manager.cpp b/src/network/credentials_manager.cpp index 289307b..f9f8c94 100644 --- a/louloulibs/network/credentials_manager.cpp +++ b/src/network/credentials_manager.cpp @@ -1,4 +1,4 @@ -#include "louloulibs.h" +#include "biboumi.h" #ifdef BOTAN_FOUND #include <network/tcp_socket_handler.hpp> diff --git a/louloulibs/network/credentials_manager.hpp b/src/network/credentials_manager.hpp index 29ee024..c463ad4 100644 --- a/louloulibs/network/credentials_manager.hpp +++ b/src/network/credentials_manager.hpp @@ -1,6 +1,6 @@ #pragma once -#include "louloulibs.h" +#include "biboumi.h" #ifdef BOTAN_FOUND diff --git a/louloulibs/network/dns_handler.cpp b/src/network/dns_handler.cpp index 641c087..7f0c96a 100644 --- a/louloulibs/network/dns_handler.cpp +++ b/src/network/dns_handler.cpp @@ -1,4 +1,4 @@ -#include <louloulibs.h> +#include <biboumi.h> #ifdef UDNS_FOUND #include <network/dns_socket_handler.hpp> diff --git a/louloulibs/network/dns_handler.hpp b/src/network/dns_handler.hpp index 416f85f..c694452 100644 --- a/louloulibs/network/dns_handler.hpp +++ b/src/network/dns_handler.hpp @@ -1,6 +1,6 @@ #pragma once -#include <louloulibs.h> +#include <biboumi.h> #ifdef UDNS_FOUND class Poller; diff --git a/louloulibs/network/dns_socket_handler.cpp b/src/network/dns_socket_handler.cpp index 84e5625..5c286c4 100644 --- a/louloulibs/network/dns_socket_handler.cpp +++ b/src/network/dns_socket_handler.cpp @@ -1,4 +1,4 @@ -#include <louloulibs.h> +#include <biboumi.h> #ifdef UDNS_FOUND #include <network/dns_socket_handler.hpp> diff --git a/louloulibs/network/dns_socket_handler.hpp b/src/network/dns_socket_handler.hpp index fc5f41f..6e83e87 100644 --- a/louloulibs/network/dns_socket_handler.hpp +++ b/src/network/dns_socket_handler.hpp @@ -1,6 +1,6 @@ #pragma once -#include <louloulibs.h> +#include <biboumi.h> #ifdef UDNS_FOUND #include <network/socket_handler.hpp> diff --git a/louloulibs/network/poller.cpp b/src/network/poller.cpp index 9f5bcfb..9f5bcfb 100644 --- a/louloulibs/network/poller.cpp +++ b/src/network/poller.cpp diff --git a/louloulibs/network/poller.hpp b/src/network/poller.hpp index e39e438..3cc2710 100644 --- a/louloulibs/network/poller.hpp +++ b/src/network/poller.hpp @@ -10,7 +10,7 @@ #define POLL 1 #define EPOLL 2 #define KQUEUE 3 -#include <louloulibs.h> +#include <biboumi.h> #ifndef POLLER #define POLLER POLL #endif diff --git a/louloulibs/network/resolver.cpp b/src/network/resolver.cpp index db7fb32..db7fb32 100644 --- a/louloulibs/network/resolver.cpp +++ b/src/network/resolver.cpp diff --git a/louloulibs/network/resolver.hpp b/src/network/resolver.hpp index a560819..f65ff86 100644 --- a/louloulibs/network/resolver.hpp +++ b/src/network/resolver.hpp @@ -1,6 +1,6 @@ #pragma once -#include "louloulibs.h" +#include "biboumi.h" #include <functional> #include <vector> diff --git a/louloulibs/network/socket_handler.hpp b/src/network/socket_handler.hpp index 6a7220e..181a6c0 100644 --- a/louloulibs/network/socket_handler.hpp +++ b/src/network/socket_handler.hpp @@ -1,6 +1,6 @@ #pragma once -#include <louloulibs.h> +#include <biboumi.h> #include <memory> class Poller; diff --git a/louloulibs/network/tcp_client_socket_handler.cpp b/src/network/tcp_client_socket_handler.cpp index 4628703..4628703 100644 --- a/louloulibs/network/tcp_client_socket_handler.cpp +++ b/src/network/tcp_client_socket_handler.cpp diff --git a/louloulibs/network/tcp_client_socket_handler.hpp b/src/network/tcp_client_socket_handler.hpp index 74caca9..74caca9 100644 --- a/louloulibs/network/tcp_client_socket_handler.hpp +++ b/src/network/tcp_client_socket_handler.hpp diff --git a/louloulibs/network/tcp_server_socket.hpp b/src/network/tcp_server_socket.hpp index c511962..c511962 100644 --- a/louloulibs/network/tcp_server_socket.hpp +++ b/src/network/tcp_server_socket.hpp diff --git a/louloulibs/network/tcp_socket_handler.cpp b/src/network/tcp_socket_handler.cpp index 7eebae0..7eebae0 100644 --- a/louloulibs/network/tcp_socket_handler.cpp +++ b/src/network/tcp_socket_handler.cpp diff --git a/louloulibs/network/tcp_socket_handler.hpp b/src/network/tcp_socket_handler.hpp index 3ee2f47..ba23861 100644 --- a/louloulibs/network/tcp_socket_handler.hpp +++ b/src/network/tcp_socket_handler.hpp @@ -1,6 +1,6 @@ #pragma once -#include "louloulibs.h" +#include "biboumi.h" #include <network/socket_handler.hpp> #include <network/resolver.hpp> diff --git a/louloulibs/utils/encoding.cpp b/src/utils/encoding.cpp index aa91dac..aa91dac 100644 --- a/louloulibs/utils/encoding.cpp +++ b/src/utils/encoding.cpp diff --git a/louloulibs/utils/encoding.hpp b/src/utils/encoding.hpp index 586edd8..586edd8 100644 --- a/louloulibs/utils/encoding.hpp +++ b/src/utils/encoding.hpp diff --git a/louloulibs/utils/get_first_non_empty.cpp b/src/utils/get_first_non_empty.cpp index 5b3bedb..5b3bedb 100644 --- a/louloulibs/utils/get_first_non_empty.cpp +++ b/src/utils/get_first_non_empty.cpp diff --git a/louloulibs/utils/get_first_non_empty.hpp b/src/utils/get_first_non_empty.hpp index a38f5fb..a38f5fb 100644 --- a/louloulibs/utils/get_first_non_empty.hpp +++ b/src/utils/get_first_non_empty.hpp diff --git a/louloulibs/utils/revstr.cpp b/src/utils/revstr.cpp index 87fd801..87fd801 100644 --- a/louloulibs/utils/revstr.cpp +++ b/src/utils/revstr.cpp diff --git a/louloulibs/utils/revstr.hpp b/src/utils/revstr.hpp index 8e521ea..8e521ea 100644 --- a/louloulibs/utils/revstr.hpp +++ b/src/utils/revstr.hpp diff --git a/louloulibs/utils/scopeguard.hpp b/src/utils/scopeguard.hpp index e697fc3..e697fc3 100644 --- a/louloulibs/utils/scopeguard.hpp +++ b/src/utils/scopeguard.hpp diff --git a/louloulibs/utils/sha1.cpp b/src/utils/sha1.cpp index 71ad18d..b77446e 100644 --- a/louloulibs/utils/sha1.cpp +++ b/src/utils/sha1.cpp @@ -1,6 +1,6 @@ #include <utils/sha1.hpp> -#include <louloulibs.h> +#include <biboumi.h> #ifdef BOTAN_FOUND # include <botan/hash.h> diff --git a/louloulibs/utils/sha1.hpp b/src/utils/sha1.hpp index 6c551ac..6c551ac 100644 --- a/louloulibs/utils/sha1.hpp +++ b/src/utils/sha1.hpp diff --git a/louloulibs/utils/split.cpp b/src/utils/split.cpp index 80f8dae..80f8dae 100644 --- a/louloulibs/utils/split.cpp +++ b/src/utils/split.cpp diff --git a/louloulibs/utils/split.hpp b/src/utils/split.hpp index 3755ef8..3755ef8 100644 --- a/louloulibs/utils/split.hpp +++ b/src/utils/split.hpp diff --git a/louloulibs/utils/string.cpp b/src/utils/string.cpp index 635e71a..635e71a 100644 --- a/louloulibs/utils/string.cpp +++ b/src/utils/string.cpp diff --git a/louloulibs/utils/string.hpp b/src/utils/string.hpp index 84ba101..84ba101 100644 --- a/louloulibs/utils/string.hpp +++ b/src/utils/string.hpp diff --git a/louloulibs/utils/system.cpp b/src/utils/system.cpp index c0bee11..c0bee11 100644 --- a/louloulibs/utils/system.cpp +++ b/src/utils/system.cpp diff --git a/louloulibs/utils/system.hpp b/src/utils/system.hpp index 7ea1677..7ea1677 100644 --- a/louloulibs/utils/system.hpp +++ b/src/utils/system.hpp diff --git a/louloulibs/utils/time.cpp b/src/utils/time.cpp index e9f3943..8fa3fcd 100644 --- a/louloulibs/utils/time.cpp +++ b/src/utils/time.cpp @@ -5,7 +5,7 @@ #include <iomanip> #include <locale> -#include "louloulibs.h" +#include "biboumi.h" namespace utils { diff --git a/louloulibs/utils/time.hpp b/src/utils/time.hpp index c71cd9c..c71cd9c 100644 --- a/louloulibs/utils/time.hpp +++ b/src/utils/time.hpp diff --git a/louloulibs/utils/timed_events.cpp b/src/utils/timed_events.cpp index 5077199..5077199 100644 --- a/louloulibs/utils/timed_events.cpp +++ b/src/utils/timed_events.cpp diff --git a/louloulibs/utils/timed_events.hpp b/src/utils/timed_events.hpp index 6e28206..6e28206 100644 --- a/louloulibs/utils/timed_events.hpp +++ b/src/utils/timed_events.hpp diff --git a/louloulibs/utils/timed_events_manager.cpp b/src/utils/timed_events_manager.cpp index 67d61fe..67d61fe 100644 --- a/louloulibs/utils/timed_events_manager.cpp +++ b/src/utils/timed_events_manager.cpp diff --git a/louloulibs/utils/tolower.cpp b/src/utils/tolower.cpp index 3e518bd..3e518bd 100644 --- a/louloulibs/utils/tolower.cpp +++ b/src/utils/tolower.cpp diff --git a/louloulibs/utils/tolower.hpp b/src/utils/tolower.hpp index 650e05d..650e05d 100644 --- a/louloulibs/utils/tolower.hpp +++ b/src/utils/tolower.hpp diff --git a/louloulibs/utils/xdg.cpp b/src/utils/xdg.cpp index 48212a1..b0fa7be 100644 --- a/louloulibs/utils/xdg.cpp +++ b/src/utils/xdg.cpp @@ -1,7 +1,7 @@ #include <utils/xdg.hpp> #include <cstdlib> -#include "louloulibs.h" +#include "biboumi.h" std::string xdg_path(const std::string& filename, const char* env_var) { diff --git a/louloulibs/utils/xdg.hpp b/src/utils/xdg.hpp index 56e11da..56e11da 100644 --- a/louloulibs/utils/xdg.hpp +++ b/src/utils/xdg.hpp diff --git a/louloulibs/xmpp/adhoc_command.cpp b/src/xmpp/adhoc_command.cpp index 825cc92..825cc92 100644 --- a/louloulibs/xmpp/adhoc_command.cpp +++ b/src/xmpp/adhoc_command.cpp diff --git a/louloulibs/xmpp/adhoc_command.hpp b/src/xmpp/adhoc_command.hpp index 7c4de47..7c4de47 100644 --- a/louloulibs/xmpp/adhoc_command.hpp +++ b/src/xmpp/adhoc_command.hpp diff --git a/louloulibs/xmpp/adhoc_commands_handler.cpp b/src/xmpp/adhoc_commands_handler.cpp index 040d0ff..040d0ff 100644 --- a/louloulibs/xmpp/adhoc_commands_handler.cpp +++ b/src/xmpp/adhoc_commands_handler.cpp diff --git a/louloulibs/xmpp/adhoc_commands_handler.hpp b/src/xmpp/adhoc_commands_handler.hpp index e37d913..e37d913 100644 --- a/louloulibs/xmpp/adhoc_commands_handler.hpp +++ b/src/xmpp/adhoc_commands_handler.hpp diff --git a/louloulibs/xmpp/adhoc_session.cpp b/src/xmpp/adhoc_session.cpp index dda4bea..dda4bea 100644 --- a/louloulibs/xmpp/adhoc_session.cpp +++ b/src/xmpp/adhoc_session.cpp diff --git a/louloulibs/xmpp/adhoc_session.hpp b/src/xmpp/adhoc_session.hpp index 0de8d13..0de8d13 100644 --- a/louloulibs/xmpp/adhoc_session.hpp +++ b/src/xmpp/adhoc_session.hpp diff --git a/louloulibs/xmpp/auth.cpp b/src/xmpp/auth.cpp index 8a34a4e..8a34a4e 100644 --- a/louloulibs/xmpp/auth.cpp +++ b/src/xmpp/auth.cpp diff --git a/louloulibs/xmpp/auth.hpp b/src/xmpp/auth.hpp index 34a2116..34a2116 100644 --- a/louloulibs/xmpp/auth.hpp +++ b/src/xmpp/auth.hpp diff --git a/src/xmpp/biboumi_component.cpp b/src/xmpp/biboumi_component.cpp index 4ba5e65..1c0f65c 100644 --- a/src/xmpp/biboumi_component.cpp +++ b/src/xmpp/biboumi_component.cpp @@ -16,7 +16,6 @@ #include <cstdlib> -#include <louloulibs.h> #include <biboumi.h> #include <uuid/uuid.h> diff --git a/louloulibs/xmpp/body.hpp b/src/xmpp/body.hpp index 068d1a4..068d1a4 100644 --- a/louloulibs/xmpp/body.hpp +++ b/src/xmpp/body.hpp diff --git a/louloulibs/xmpp/jid.cpp b/src/xmpp/jid.cpp index 46e01ea..0751387 100644 --- a/louloulibs/xmpp/jid.cpp +++ b/src/xmpp/jid.cpp @@ -3,7 +3,7 @@ #include <cstring> #include <map> -#include <louloulibs.h> +#include <biboumi.h> #ifdef LIBIDN_FOUND #include <stringprep.h> #include <sys/types.h> diff --git a/louloulibs/xmpp/jid.hpp b/src/xmpp/jid.hpp index 85e835c..85e835c 100644 --- a/louloulibs/xmpp/jid.hpp +++ b/src/xmpp/jid.hpp diff --git a/louloulibs/xmpp/xmpp_component.cpp b/src/xmpp/xmpp_component.cpp index 5d98e58..1453b18 100644 --- a/louloulibs/xmpp/xmpp_component.cpp +++ b/src/xmpp/xmpp_component.cpp @@ -19,7 +19,7 @@ #include <cstdlib> #include <set> -#include <louloulibs.h> +#include <biboumi.h> #ifdef SYSTEMD_FOUND # include <systemd/sd-daemon.h> #endif diff --git a/louloulibs/xmpp/xmpp_component.hpp b/src/xmpp/xmpp_component.hpp index 16d7480..16d7480 100644 --- a/louloulibs/xmpp/xmpp_component.hpp +++ b/src/xmpp/xmpp_component.hpp diff --git a/louloulibs/xmpp/xmpp_parser.cpp b/src/xmpp/xmpp_parser.cpp index 0488be9..0488be9 100644 --- a/louloulibs/xmpp/xmpp_parser.cpp +++ b/src/xmpp/xmpp_parser.cpp diff --git a/louloulibs/xmpp/xmpp_parser.hpp b/src/xmpp/xmpp_parser.hpp index 9d67228..9d67228 100644 --- a/louloulibs/xmpp/xmpp_parser.hpp +++ b/src/xmpp/xmpp_parser.hpp diff --git a/louloulibs/xmpp/xmpp_stanza.cpp b/src/xmpp/xmpp_stanza.cpp index ac6ce9b..ac6ce9b 100644 --- a/louloulibs/xmpp/xmpp_stanza.cpp +++ b/src/xmpp/xmpp_stanza.cpp diff --git a/louloulibs/xmpp/xmpp_stanza.hpp b/src/xmpp/xmpp_stanza.hpp index f4b3948..f4b3948 100644 --- a/louloulibs/xmpp/xmpp_stanza.hpp +++ b/src/xmpp/xmpp_stanza.hpp diff --git a/tests/jid.cpp b/tests/jid.cpp index 089f797..480827b 100644 --- a/tests/jid.cpp +++ b/tests/jid.cpp @@ -1,7 +1,7 @@ #include "catch.hpp" #include <xmpp/jid.hpp> -#include <louloulibs.h> +#include <biboumi.h> TEST_CASE("Jid") { |