Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mon 11220 unified sql #112

Merged
merged 123 commits into from
Dec 8, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
123 commits
Select commit Hold shift + click to select a range
360566d
wip(storage): attempt to make a rebuild message with protobuf
bouda1 Oct 11, 2021
025291c
wip(storage): new protobuf files added
bouda1 Oct 11, 2021
85a722b
wip(bbdo): serialization with protobuf
bouda1 Oct 12, 2021
a8a62b5
wip(storage): protobuf serialization
bouda1 Oct 12, 2021
f6110c1
wip(storage): serialization/deserialization work with bbdo.
bouda1 Oct 12, 2021
2e42384
cleanup(events_io): several warnings fixed
bouda1 Oct 13, 2021
e717004
fix(storage): rebuild with protobuf is better
bouda1 Oct 14, 2021
23f7bae
fix(storage): rebuild with grpc should almost work
bouda1 Oct 14, 2021
5bcdb9f
cleanup(collect): dos ascii => unix ascii and warnings removed.
bouda1 Oct 15, 2021
196b810
fix(storage): de_rebuild2 numeration must not be aligned with others …
bouda1 Oct 15, 2021
1509391
fix(rrd): this patch to fix a link error
bouda1 Oct 15, 2021
f6322ef
enh(cmake): protobuf events are a little better
bouda1 Nov 2, 2021
3b1c85b
fix(mysql): ping has a timeout now.
bouda1 Nov 2, 2021
b0a79a2
fix(cmake): unused files removed
bouda1 Nov 2, 2021
907b842
fix(cmake): protobuf dependencies are better now.
bouda1 Nov 3, 2021
e9322a7
wip(broker/unified_sql): first step for this new module
bouda1 Nov 3, 2021
5aa7c97
wip(broker/unified_sql): factory and connector should be ok
bouda1 Nov 3, 2021
e137de7
wip(unified_sql): conflict_manager a almost a stream now
bouda1 Nov 5, 2021
b12c96a
enh(unified_sql): this new module compiles
bouda1 Nov 5, 2021
74d650c
cleanup(neb): coding style applied on neb headers
bouda1 Nov 5, 2021
05fcdb8
cleanup(tests): coding style applied and warnings removed
bouda1 Nov 5, 2021
80fb6de
enh(protobuf): work on harmonization of events in collect
bouda1 Nov 5, 2021
35706f3
cleanup(various): coding style reapplied
bouda1 Nov 5, 2021
067ef3b
cleanup(various): coding style reapplied
bouda1 Nov 5, 2021
cf28576
fix(cmake/storage): no more needed hack removed
bouda1 Nov 5, 2021
aab8cfb
fix(connector/test): embedded_perl includes order
bouda1 Nov 5, 2021
24335d0
enh(broker/test): new unit test for unified_sql config
bouda1 Nov 5, 2021
4e97048
fix(unified_sql): a first working version.
bouda1 Nov 8, 2021
e94ca7a
enh(protobuf): namespace updated
bouda1 Nov 9, 2021
f84a908
enh(broker/config/state): bbdo_version introduced in configuration
bouda1 Nov 12, 2021
7701007
fix(bbdo/bbdo_version): It is no more a static value
bouda1 Nov 12, 2021
c23fd0f
fix(broker/storage): events are external to broker now
bouda1 Nov 12, 2021
16c7e12
enh(bbdo/protobuf): event generator script added
bouda1 Nov 12, 2021
6e546ee
fix(unified_sql): the unit test passes
bouda1 Nov 5, 2021
c904cc0
enh(storage/events): on the road of externalization
bouda1 Nov 13, 2021
1ef97cd
cleanup(parse_perfdata): the perfdata parser is moved to misc.
bouda1 Nov 15, 2021
ea408d9
fix(exceptions::perfdata): no more exceptions::perfdata exceptions
bouda1 Nov 15, 2021
3f0c47d
fix(parse_perfdata): does not thrw exception anymore and changed api
bouda1 Nov 15, 2021
2eb2a74
fix(misc::parse_perfdata): this fix is needed because of another func…
bouda1 Nov 16, 2021
62db314
wip(broker): Just tests commented to have something that compiles
bouda1 Nov 16, 2021
2b62fd4
fix(cmake): compilation is back and in C++14 with cmake3
bouda1 Nov 16, 2021
617d8cc
fix(broker/unified_sql/test): code re-established
bouda1 Nov 16, 2021
92074d7
cleanup(broker/events): coding style and optimization
bouda1 Nov 16, 2021
af2232f
fix(broker/stats/tests): A test is disabled.
bouda1 Nov 16, 2021
8649081
fix(bam): bam event types are stored in bbdo folder now.
bouda1 Nov 17, 2021
77d65df
fix(broker/bam): bam events are moved to bbdo.
bouda1 Nov 17, 2021
a8e0825
enh(cmake): bbdo events are faster to compile
bouda1 Nov 17, 2021
dd53e1e
fix(broker/unified_sql): Thread is started and unified_sql works now.
bouda1 Nov 18, 2021
578cd2d
fix(unified_sql): mfifo was still read from two inputs.
bouda1 Nov 18, 2021
c07758d
fix(unified_sql): mfifo removed from stream
bouda1 Nov 19, 2021
c0cbbf4
fix(broker/unified_sql): events badly acknowledged
bouda1 Nov 19, 2021
b74fead
fix(broker/unified_sql): acknowledgement is better now
bouda1 Nov 19, 2021
cedb632
fix(broker/unified_sql): not needed stat removed
bouda1 Nov 20, 2021
75d7c67
enh(broker/notification): This module is no more used.
bouda1 Nov 20, 2021
ce6c83d
cleanup(hook): tests about them are also removed
bouda1 Nov 22, 2021
b2c0b4c
fix(broker/hook): hook and hookers are removed.
bouda1 Nov 22, 2021
eb7101a
cleanup(broker/tets): tests on engine are more apropriate to gtest
bouda1 Nov 22, 2021
d5d544e
enh(broker/engine): attempt to simplify and optimize engine
bouda1 Nov 22, 2021
67a31ae
fix(unified_sql): no more thread in unified_sql
bouda1 Nov 23, 2021
40b98d1
enh(broker/unified_sql): indices/metrics deletion re-enabled.
bouda1 Nov 23, 2021
1c9ed0f
fix(broker/remove_graph): it works also with unified_sql
bouda1 Nov 23, 2021
e7e9be2
enh(robot/broker): new test for unified_sql
bouda1 Nov 24, 2021
05e296f
wip(broker/tests): try to fix the issue with duplicated events
bouda1 Nov 29, 2021
4604c95
fix(broker/status): status events could be sent several times
bouda1 Nov 30, 2021
51e52e6
cleanup(broker/kpi_event.hh): unused functions removed.
bouda1 Nov 30, 2021
33a1287
fix(bbdo/generate-accessor.py): several fixes in the python script.
bouda1 Nov 30, 2021
27fbd74
cleanup(bbdo/metric.hh): comments removed
bouda1 Nov 30, 2021
7abf99d
cleanup(broker/kpi.hh): coding style applied.
bouda1 Nov 30, 2021
b5b42ce
fix(broker/io): comment removed in events.hh
bouda1 Nov 30, 2021
bfadcb7
cleanup(broker/io::protobuf): comments added.
bouda1 Dec 1, 2021
ec4dce5
cleanup(broker/brokerrpc): new comments
bouda1 Dec 1, 2021
93184d1
fix(broker/lua): no need anymore of bam module.
bouda1 Dec 1, 2021
03e6e7f
cleanup(broker/lua): coding style applied on main.cc
bouda1 Dec 1, 2021
c8c5067
cleanup(broker/rrd): coding style
bouda1 Dec 1, 2021
bcbf34f
fix(broker/lua/simu): tests re-enabled
bouda1 Dec 1, 2021
a182b4a
fix(broker/mysql_connection): mysql_ping must be called just when needed
bouda1 Dec 1, 2021
809b658
fix(tests/broker-database): tests are more stable
bouda1 Dec 1, 2021
534fb37
fix(tests/broker-database): Two timeouts are set to greater values
bouda1 Dec 1, 2021
943059e
fix(cmake): table_max_size file generation dependency fixed
bouda1 Dec 1, 2021
a48a693
fix(cmake): dependency added
bouda1 Dec 1, 2021
c2d4c3a
fix(packaging): new spec file
bouda1 Dec 2, 2021
dd5f198
fix(cmake): clib library should have a better place
bouda1 Dec 2, 2021
7bb8558
wip(packaging): new packaging almost finished
bouda1 Dec 3, 2021
9e7e743
fix(cmake/connector): two rpm added
bouda1 Dec 3, 2021
fa147d7
fix(cmake/packaging): collect is packaged in one step
bouda1 Dec 3, 2021
31f8e6e
fix(cmake/packaging): rsync not on the ci
bouda1 Dec 4, 2021
76eecd9
fix(cmake/packaging): this is shorter and better
bouda1 Dec 4, 2021
c3c4074
fix(cmake/packaging): typo
bouda1 Dec 4, 2021
b2f5bff
fix(packagine/specfile): file packaged twice
bouda1 Dec 4, 2021
9d826b6
fix(packaging/script): bad path to the spec file
bouda1 Dec 4, 2021
47eb7e6
fix(cmake/packaging): new debug message
bouda1 Dec 4, 2021
ad05d10
fix(packaging/script): variable not interpreted
bouda1 Dec 4, 2021
e9151f6
fix(cmake/engine): No need to look for centreon-clib
bouda1 Dec 4, 2021
85d9bd3
fix(cmake/connector): no need to look for the clib
bouda1 Dec 4, 2021
af438b6
fix(packaging/clib): its detection is useless
bouda1 Dec 4, 2021
6b34c6c
fix(packaging/debian): clib files changed path
bouda1 Dec 4, 2021
fc8e050
fix(packaging/debian): centreon-clib.pc is no more distributed
bouda1 Dec 5, 2021
f3c8cf3
fix(packaging/debian): bad paths fixed
bouda1 Dec 5, 2021
97e8545
fix(packaging/debian): missing files fixed
bouda1 Dec 5, 2021
1a9b938
fix(packaging/debian): a bad path fixed again
bouda1 Dec 5, 2021
f90e87a
fix(packaging/rpm): unused variables removed
bouda1 Dec 5, 2021
d6df6d2
cleanup(packaging/clib): this is no more used
bouda1 Dec 5, 2021
f23eb59
fix(packaging/engine): old packaging removed
bouda1 Dec 5, 2021
be8499b
fix(packaging): last changes
bouda1 Dec 5, 2021
d21a46e
fix(packaging/debian): little update of the packagin script
bouda1 Dec 6, 2021
1630a32
fix(packagine/rpm): centreon-engine user not defined
bouda1 Dec 6, 2021
8e8d875
fix(packaging/global): services had old conf variables
bouda1 Dec 6, 2021
a74241c
fix(packaging/debian): the distrib directory could fail
bouda1 Dec 6, 2021
684ff74
fix(tests/resources): two little fixes in specific-duplication.py
bouda1 Dec 6, 2021
9b8d1b4
fix(packaging/rpm): services should be better
bouda1 Dec 6, 2021
9cf5969
fix(various): several remarks fixed after PR review
bouda1 Dec 6, 2021
0806e81
fix(packaging): let's try to make paths more standard
bouda1 Dec 6, 2021
e256800
fix(packagine/connectors): standard paths are used
bouda1 Dec 6, 2021
557921b
fix(packaging): paths become standard
bouda1 Dec 7, 2021
a7c4ce0
fix(packaging): absolute paths for sbin were missing
bouda1 Dec 7, 2021
3b1e801
fix(broker/influxdb/graphite): compilation errors fixed
bouda1 Dec 7, 2021
74e7e55
fix(packaging/debian): bad variables definitions
bouda1 Dec 7, 2021
cf2a388
fix(broker/config): new errors when a directory is not accessible
bouda1 Dec 7, 2021
7ec2612
fix(cmake/libdir): libdir changes from a distrib to another
bouda1 Dec 7, 2021
541cc53
fix(packaging/debian): libdir has changed
bouda1 Dec 7, 2021
1de398a
fix(packaging/debian): bad paths in debian packaging
bouda1 Dec 7, 2021
c148aaf
fix(broker/config/test): the parser checks paths now
bouda1 Dec 7, 2021
b07fd65
fix(broker/test): the parser failed because of new checks
bouda1 Dec 7, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix(cmake): protobuf dependencies are better now.
Still an issue with ninja but it works with make
  • Loading branch information
bouda1 committed Dec 3, 2021
commit 907b842f611fae36bb3079f849c2dfdd6df0491e
23 changes: 23 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,36 @@ endif ()

set(protobuf_MODULE_COMPATIBLE True)

find_package(asio REQUIRED)
find_package(fmt REQUIRED)
find_package(spdlog REQUIRED)
find_package(OpenSSL REQUIRED)
find_package(c-ares REQUIRED)
find_package(ZLIB REQUIRED)
find_package(nlohmann_json REQUIRED)
find_package(Protobuf REQUIRED)
find_package(gRPC REQUIRED)

add_definitions(${spdlog_DEFINITIONS})

include_directories(${nlohmann_json_INCLUDE_DIRS})
include_directories(${fmt_INCLUDE_DIRS})
include_directories(${spdlog_INCLUDE_DIRS})
include_directories(${asio_INCLUDE_DIRS})
include_directories(${protobuf_INCLUDE_DIRS})
include_directories(${absl_INCLUDE_DIRS})
include_directories(${gRPC_INCLUDE_DIRS})
include_directories(${ZLIB_INCLUDE_DIRS})
include_directories(${CMAKE_SOURCE_DIR})

link_directories(${nlohmann_json_LIB_DIRS})
link_directories(${fmt_LIB_DIRS})
link_directories(${spdlog_LIB_DIRS})
link_directories(${protobuf_LIB_DIRS})
link_directories(${gRPC_LIB_DIRS})
link_directories(${c-ares_LIB_DIRS})
link_directories(${OpenSSL_LIB_DIRS})
link_directories(${ZLIB_LIB_DIRS})

set(PROTOBUF_PREFIX "${protobuf_LIB_DIRS}/..")

Expand Down
30 changes: 3 additions & 27 deletions centreon-broker/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -77,33 +77,12 @@ add_custom_target(table_max_size DEPENDS ${INC_DIR}/database/table_max_size.hh)

set_source_files_properties(${INC_DIR}/database/table_max_size.hh PROPERTIES GENERATED TRUE)

find_package(fmt REQUIRED)
find_package(spdlog REQUIRED)
find_package(asio REQUIRED)
find_package(OpenSSL REQUIRED)
find_package(c-ares REQUIRED)
find_package(ZLIB REQUIRED)
find_package(mariadb-connector-c REQUIRED)

add_definitions(${spdlog_DEFINITIONS} ${mariadb-connector-c_DEFINITIONS})

include_directories(${nlohmann_json_INCLUDE_DIRS})
include_directories(${fmt_INCLUDE_DIRS})
include_directories(${spdlog_INCLUDE_DIRS})
include_directories(${asio_INCLUDE_DIRS})
include_directories(${absl_INCLUDE_DIRS})
include_directories(${gRPC_INCLUDE_DIRS})
include_directories(${ZLIB_INCLUDE_DIRS})
include_directories(${OpenSSL_INCLUDE_DIRS})
include_directories(${mariadb-connector-c_INCLUDE_DIRS})

link_directories(${nlohmann_json_LIB_DIRS})
link_directories(${fmt_LIB_DIRS})
link_directories(${spdlog_LIB_DIRS})
link_directories(${gRPC_LIB_DIRS})
link_directories(${c-ares_LIB_DIRS})
link_directories(${OpenSSL_LIB_DIRS})
link_directories(${ZLIB_LIB_DIRS})
link_directories(${mariadb-connector-c_LIB_DIRS})

message(STATUS "${PROTOBUF_PREFIX}/bin/protoc")
Expand Down Expand Up @@ -137,15 +116,12 @@ target_link_libraries(berpc ${protobuf_LIBS})
set_target_properties(berpc PROPERTIES COMPILE_FLAGS "-fPIC")

# Version.
set(CENTREON_BROKER_MAJOR 21)
set(CENTREON_BROKER_MINOR 10)
set(CENTREON_BROKER_PATCH 0)
if (CENTREON_BROKER_PRERELEASE)
set(CENTREON_BROKER_VERSION "${CENTREON_BROKER_MAJOR}.${CENTREON_BROKER_MINOR}.${CENTREON_BROKER_PATCH}-${CENTREON_BROKER_PRERELEASE}")
set(CENTREON_BROKER_VERSION "${COLLECT_MAJOR}.${COLLECT_MINOR}.${COLLECT_PATCH}-${CENTREON_BROKER_PRERELEASE}")
else ()
set(CENTREON_BROKER_VERSION "${CENTREON_BROKER_MAJOR}.${CENTREON_BROKER_MINOR}.${CENTREON_BROKER_PATCH}")
set(CENTREON_BROKER_VERSION "${COLLECT_MAJOR}.${COLLECT_MINOR}.${COLLECT_PATCH}")
endif ()
add_definitions(-DCENTREON_BROKER_VERSION=\"${CENTREON_BROKER_VERSION}\" -DCENTREON_BROKER_PATCH=${CENTREON_BROKER_PATCH})
add_definitions(-DCENTREON_BROKER_VERSION=\"${CENTREON_BROKER_VERSION}\" -DCENTREON_BROKER_PATCH=${COLLECT_PATCH})
configure_file(
${INC_DIR}/version.hh.in
${INC_DIR}/version.hh
Expand Down
6 changes: 3 additions & 3 deletions centreon-broker/cmake/package.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ if (WITH_PACKAGE_SH
OR WITH_PACKAGE_NSIS)
# Default settings.
set(CPACK_PACKAGE_VENDOR "Centreon")
set(CPACK_PACKAGE_VERSION_MAJOR "${CENTREON_BROKER_MAJOR}")
set(CPACK_PACKAGE_VERSION_MINOR "${CENTREON_BROKER_MINOR}")
set(CPACK_PACKAGE_VERSION_PATCH "${CENTREON_BROKER_PATCH}")
set(CPACK_PACKAGE_VERSION_MAJOR "${COLLECT_MAJOR}")
set(CPACK_PACKAGE_VERSION_MINOR "${COLLECT_MINOR}")
set(CPACK_PACKAGE_VERSION_PATCH "${COLLECT_PATCH}")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY
"Centreon Broker is a monitoring addon fully compatible with Nagios and Centreon Engine.")
set(CPACK_PACKAGE_FILE_NAME
Expand Down
8 changes: 0 additions & 8 deletions centreon-broker/cmake/tool.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,3 @@ function(add_broker_module name activate)
endif (WITH_MODULE_${name})
endfunction(add_broker_module name activate)

function(get_protobuf_files name)
set(proto_${name}
"${CMAKE_SOURCE_DIR}/protobuf/${name}.pb.cc"
"${CMAKE_SOURCE_DIR}/protobuf/${name}.pb.h"
PARENT_SCOPE)
set_source_files_properties("${CMAKE_SOURCE_DIR}/protobuf/${name}.pb.cc" PROPERTIES GENERATED TRUE)
set_source_files_properties("${CMAKE_SOURCE_DIR}/protobuf/${name}.pb.h" PROPERTIES GENERATED TRUE)
endfunction()
6 changes: 3 additions & 3 deletions centreon-broker/core/inc/com/centreon/broker/version.hh.in
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ CCB_BEGIN()

namespace version {
// Compile-time values.
unsigned int const major = @CENTREON_BROKER_MAJOR@;
unsigned int const minor = @CENTREON_BROKER_MINOR@;
unsigned int const patch = @CENTREON_BROKER_PATCH@;
unsigned int const major = @COLLECT_MAJOR@;
unsigned int const minor = @COLLECT_MINOR@;
unsigned int const patch = @COLLECT_PATCH@;
char const* const string = "@CENTREON_BROKER_VERSION@";
}

Expand Down
20 changes: 10 additions & 10 deletions centreon-broker/neb/inc/com/centreon/clib/version.hh.in
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
# define CC_CLIB_VERSION_HH

// Compile-time values.
# define CENTREON_CLIB_VERSION_MAJOR @CLIB_MAJOR@
# define CENTREON_CLIB_VERSION_MINOR @CLIB_MINOR@
# define CENTREON_CLIB_VERSION_PATCH @CLIB_PATCH@
# define CENTREON_CLIB_VERSION_MAJOR @COLLECT_MAJOR@
# define CENTREON_CLIB_VERSION_MINOR @COLLECT_MINOR@
# define CENTREON_CLIB_VERSION_PATCH @COLLECT_PATCH@
# define CENTREON_CLIB_VERSION_STRING "@CLIB_VERSION@"

# include "com/centreon/namespace.hh"
Expand All @@ -32,16 +32,16 @@ CC_BEGIN()
namespace clib {
namespace version {
// Compile-time values.
unsigned int const major = @CLIB_MAJOR@;
unsigned int const minor = @CLIB_MINOR@;
unsigned int const patch = @CLIB_PATCH@;
unsigned int const major = @COLLECT_MAJOR@;
unsigned int const minor = @COLLECT_MINOR@;
unsigned int const patch = @COLLECT_PATCH@;
char const* const string = "@CLIB_VERSION@";

// Run-time values.
unsigned int get_major() throw ();
unsigned int get_minor() throw ();
unsigned int get_patch() throw ();
char const* get_string() throw ();
unsigned int get_major() noexcept;
unsigned int get_minor() noexcept;
unsigned int get_patch() noexcept;
char const* get_string() noexcept;
}
}

Expand Down
6 changes: 3 additions & 3 deletions centreon-broker/neb/inc/com/centreon/engine/version.hh.in
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
#define CCE_VERSION_HH

// Compile-time values.
#define CENTREON_ENGINE_VERSION_MAJOR @CENTREON_ENGINE_MAJOR@
#define CENTREON_ENGINE_VERSION_MINOR @CENTREON_ENGINE_MINOR@
#define CENTREON_ENGINE_VERSION_PATCH @CENTREON_ENGINE_PATCH@
#define CENTREON_ENGINE_VERSION_MAJOR @COLLECT_MAJOR@
#define CENTREON_ENGINE_VERSION_MINOR @COLLECT_MINOR@
#define CENTREON_ENGINE_VERSION_PATCH @COLLECT_PATCH@
#define CENTREON_ENGINE_VERSION_STRING "@CENTREON_ENGINE_VERSION@"

#endif // !CCE_VERSION_HH
2 changes: 1 addition & 1 deletion centreon-broker/rrd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ add_library("${RRD}" SHARED
"${INC_DIR}/com/centreon/broker/rrd/lib.hh"
"${INC_DIR}/com/centreon/broker/rrd/output.hh"
)
add_dependencies("${RRD}" ${proto_rebuild})
set_target_properties("${RRD}" PROPERTIES PREFIX "")
add_dependencies("${RRD}" "${STORAGE}")

# Compile with librrd flags.
if (LIBRRD_CFLAGS)
Expand Down
2 changes: 1 addition & 1 deletion centreon-broker/storage/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,11 @@ add_library("${STORAGE}" SHARED
"${INC_DIR}/status.hh"
"${INC_DIR}/stream.hh"
)
add_dependencies("${STORAGE}" ${proto_rebuild})
set_target_properties("${STORAGE}" PROPERTIES
PREFIX ""
COMPILE_FLAGS "-fPIC")
target_link_libraries(${STORAGE} conflictmgr)
add_dependencies(${STORAGE} centreon_proto)

# Testing.
if (WITH_TESTING)
Expand Down
7 changes: 2 additions & 5 deletions centreon-clib/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
##
## Copyright 2011-2014,2018-2019 Centreon
## Copyright 2011-2014,2018-2021 Centreon
##
## Licensed under the Apache License, Version 2.0 (the "License");
## you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -32,10 +32,7 @@ set(SCRIPT_DIR "${PROJECT_SOURCE_DIR}/script")


# Version.
set(CLIB_MAJOR 21)
set(CLIB_MINOR 10)
set(CLIB_PATCH 0)
set(CLIB_VERSION "${CLIB_MAJOR}.${CLIB_MINOR}.${CLIB_PATCH}")
set(CLIB_VERSION "${COLLECT_MAJOR}.${COLLECT_MINOR}.${COLLECT_PATCH}")


# Include module to check existing libraries.
Expand Down
6 changes: 3 additions & 3 deletions centreon-clib/cmake/package.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ if (WITH_PACKAGE_SH
# Default settings.
set(CPACK_PACKAGE_NAME "centreon-clib")
set(CPACK_PACKAGE_VENDOR "Centreon")
set(CPACK_PACKAGE_VERSION_MAJOR "${CLIB_MAJOR}")
set(CPACK_PACKAGE_VERSION_MINOR "${CLIB_MINOR}")
set(CPACK_PACKAGE_VERSION_PATCH "${CLIB_PATCH}")
set(CPACK_PACKAGE_VERSION_MAJOR "${COLLECT_MAJOR}")
set(CPACK_PACKAGE_VERSION_MINOR "${COLLECT_MINOR}")
set(CPACK_PACKAGE_VERSION_PATCH "${COLLECT_PATCH}")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY
"Centreon C/C++ library used in multiple monitoring-related projects.")
set(CPACK_PACKAGE_FILE_NAME
Expand Down
20 changes: 10 additions & 10 deletions centreon-clib/inc/com/centreon/clib/version.hh.in
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
# define CC_CLIB_VERSION_HH

// Compile-time values.
# define CENTREON_CLIB_VERSION_MAJOR @CLIB_MAJOR@
# define CENTREON_CLIB_VERSION_MINOR @CLIB_MINOR@
# define CENTREON_CLIB_VERSION_PATCH @CLIB_PATCH@
# define CENTREON_CLIB_VERSION_MAJOR @COLLECT_MAJOR@
# define CENTREON_CLIB_VERSION_MINOR @COLLECT_MINOR@
# define CENTREON_CLIB_VERSION_PATCH @COLLECT_PATCH@
# define CENTREON_CLIB_VERSION_STRING "@CLIB_VERSION@"

# include "com/centreon/namespace.hh"
Expand All @@ -32,16 +32,16 @@ CC_BEGIN()
namespace clib {
namespace version {
// Compile-time values.
unsigned int const major = @CLIB_MAJOR@;
unsigned int const minor = @CLIB_MINOR@;
unsigned int const patch = @CLIB_PATCH@;
unsigned int const major = @COLLECT_MAJOR@;
unsigned int const minor = @COLLECT_MINOR@;
unsigned int const patch = @COLLECT_PATCH@;
char const* const string = "@CLIB_VERSION@";

// Run-time values.
unsigned int get_major() throw ();
unsigned int get_minor() throw ();
unsigned int get_patch() throw ();
char const* get_string() throw ();
unsigned int get_major() noexcept;
unsigned int get_minor() noexcept;
unsigned int get_patch() noexcept;
char const* get_string() noexcept;
}
}

Expand Down
12 changes: 1 addition & 11 deletions centreon-connector/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,14 @@ project(connectors CXX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14")
add_definitions("-D_GLIBCXX_USE_CXX11_ABI=1")

set(CONNECTOR_MAJOR 21)
set(CONNECTOR_MINOR 10)
set(CONNECTOR_PATCH 0)
set(CONNECTOR_VERSION "${CONNECTOR_MAJOR}.${CONNECTOR_MINOR}.${CONNECTOR_PATCH}")
set(CONNECTOR_VERSION "${COLLECT_MAJOR}.${COLLECT_MINOR}.${COLLECT_PATCH}")
add_definitions(-DCENTREON_CONNECTOR_VERSION=\"${CONNECTOR_VERSION}\")

include(${PROJECT_SOURCE_DIR}/cmake/Findclib.cmake)
include(${PROJECT_SOURCE_DIR}/cmake/FindSSH.cmake)
include(${PROJECT_SOURCE_DIR}/cmake/Findperl.cmake)

include(${CMAKE_BINARY_DIR}/conan_paths.cmake)
find_package(fmt REQUIRED)
find_package(spdlog REQUIRED)

add_definitions(${spdlog_DEFINITIONS})

include_directories(${fmt_INCLUDE_DIRS})
include_directories(${spdlog_INCLUDE_DIRS})

# Generate code to dynamically load modules.

Expand Down
26 changes: 2 additions & 24 deletions centreon-engine/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,35 +49,13 @@ include_directories("${INC_DIR}/compatibility")

include(${CMAKE_BINARY_DIR}/conan_paths.cmake)

set(protobuf_MODULE_COMPATIBLE True)
find_package(Protobuf REQUIRED)
find_package(c-ares REQUIRED)
find_package(ZLIB REQUIRED)
find_package(fmt REQUIRED)
find_package(spdlog REQUIRED)

include_directories(${gRPC_INCLUDE_DIRS})
include_directories(${absl_INCLUDE_DIRS})
include_directories(${protobuf_INCLUDE_DIRS})
include_directories(${nlohmann_json_INCLUDE_DIRS})
include_directories(${fmt_INCLUDE_DIRS})

link_directories(${protobuf_LIB_DIRS})
link_directories(${gRPC_LIB_DIRS})
link_directories(${OpenSSL_LIB_DIRS})
link_directories(${c-ares_LIB_DIRS})
link_directories(${ZLIB_LIB_DIRS})
link_directories(${nlohmann_json_LIB_DIRS})
link_directories(${CMAKE_SOURCE_DIR}/build/centreon-clib/)

# Version.
set(CENTREON_ENGINE_MAJOR 21)
set(CENTREON_ENGINE_MINOR 10)
set(CENTREON_ENGINE_PATCH 0)
if (CENTREON_ENGINE_PRERELEASE)
set(CENTREON_ENGINE_VERSION "${CENTREON_ENGINE_MAJOR}.${CENTREON_ENGINE_MINOR}.${CENTREON_ENGINE_PATCH}-${CENTREON_ENGINE_PRERELEASE}")
set(CENTREON_ENGINE_VERSION "${COLLECT_MAJOR}.${COLLECT_MINOR}.${COLLECT_PATCH}-${CENTREON_ENGINE_PRERELEASE}")
else ()
set(CENTREON_ENGINE_VERSION "${CENTREON_ENGINE_MAJOR}.${CENTREON_ENGINE_MINOR}.${CENTREON_ENGINE_PATCH}")
set(CENTREON_ENGINE_VERSION "${COLLECT_MAJOR}.${COLLECT_MINOR}.${COLLECT_PATCH}")
endif()
message(STATUS "Generating version header (${CENTREON_ENGINE_VERSION}).")
configure_file("${INC_DIR}/com/centreon/engine/version.hh.in"
Expand Down
6 changes: 3 additions & 3 deletions centreon-engine/cmake/package.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ if (WITH_PACKAGE_SH
OR WITH_PACKAGE_NSIS)
# Default settings.
set(CPACK_PACKAGE_VENDOR "Merethis")
set(CPACK_PACKAGE_VERSION_MAJOR "${CENTREON_ENGINE_MAJOR}")
set(CPACK_PACKAGE_VERSION_MINOR "${CENTREON_ENGINE_MINOR}")
set(CPACK_PACKAGE_VERSION_PATCH "${CENTREON_ENGINE_PATCH}")
set(CPACK_PACKAGE_VERSION_MAJOR "${COLLECT_MAJOR}")
set(CPACK_PACKAGE_VERSION_MINOR "${COLLECT_MINOR}")
set(CPACK_PACKAGE_VERSION_PATCH "${COLLECT_PATCH}")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY
"Centreon Engine is a monitoring engine fully Nagios-compatible but with additionnal features and performance improvements.")
set(CPACK_PACKAGE_FILE_NAME
Expand Down
6 changes: 3 additions & 3 deletions centreon-engine/inc/com/centreon/engine/version.hh.in
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
#define CCE_VERSION_HH

// Compile-time values.
#define CENTREON_ENGINE_VERSION_MAJOR @CENTREON_ENGINE_MAJOR@
#define CENTREON_ENGINE_VERSION_MINOR @CENTREON_ENGINE_MINOR@
#define CENTREON_ENGINE_VERSION_PATCH @CENTREON_ENGINE_PATCH@
#define CENTREON_ENGINE_VERSION_MAJOR @COLLECT_MAJOR@
#define CENTREON_ENGINE_VERSION_MINOR @COLLECT_MINOR@
#define CENTREON_ENGINE_VERSION_PATCH @COLLECT_PATCH@
#define CENTREON_ENGINE_VERSION_STRING "@CENTREON_ENGINE_VERSION@"

#endif // !CCE_VERSION_HH
2 changes: 1 addition & 1 deletion ci/scripts/collect-sources-delivery.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@ RELEASE=$RELEASE
COMMIT=$COMMIT
COMMITTER=$COMMITTER
MAJOR=$MAJOR
EOF
EOF
Loading