Merge pull request #5936 from Icinga/feature/source-lists

Clean up source lists in the CMakeLists.txt files
This commit is contained in:
Michael Friedrich 2018-01-03 11:59:35 +01:00 committed by GitHub
commit cd33b8b508
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
29 changed files with 385 additions and 141 deletions

View File

@ -23,7 +23,11 @@ foreach(flag_var
endif(${flag_var} MATCHES "/MD") endif(${flag_var} MATCHES "/MD")
endforeach(flag_var) endforeach(flag_var)
add_executable(icinga-installer icinga-installer.cpp) set(icinga_installer_SOURCES
icinga-installer.cpp
)
add_executable(icinga-installer ${icinga_installer_SOURCES})
set_target_properties( set_target_properties(
icinga-installer PROPERTIES icinga-installer PROPERTIES

View File

@ -25,9 +25,16 @@ else()
set(WindowsSources "") set(WindowsSources "")
endif() endif()
add_executable(icinga-studio MACOSX_BUNDLE WIN32 icinga-studio.cpp set(icinga_studio_SOURCES
forms.cpp aboutform.cpp connectform.cpp mainform.cpp icinga-studio.cpp
icinga.icns ${WindowsSources}) forms.cpp
aboutform.cpp aboutform.hpp
connectform.cpp connectform.hpp
mainform.cpp mainform.hpp
icinga.icns ${WindowsSources}
)
add_executable(icinga-studio MACOSX_BUNDLE WIN32 ${icinga_studio_SOURCES})
include_directories(${Boost_INCLUDE_DIRS}) include_directories(${Boost_INCLUDE_DIRS})
target_link_libraries(icinga-studio ${Boost_LIBRARIES} ${wxWidgets_LIBRARIES}) target_link_libraries(icinga-studio ${Boost_LIBRARIES} ${wxWidgets_LIBRARIES})

View File

@ -26,21 +26,69 @@ mkclass_target(streamlogger.ti streamlogger.tcpp streamlogger.thpp)
mkclass_target(sysloglogger.ti sysloglogger.tcpp sysloglogger.thpp) mkclass_target(sysloglogger.ti sysloglogger.tcpp sysloglogger.thpp)
set(base_SOURCES set(base_SOURCES
application.cpp application.thpp application-version.cpp array.cpp i2-base.hpp
array-script.cpp boolean.cpp boolean-script.cpp base64.cpp console.cpp context.cpp application.cpp application.hpp application.thpp application-version.cpp
convert.cpp datetime.cpp datetime.thpp datetime-script.cpp debuginfo.cpp dictionary.cpp dictionary-script.cpp array.cpp array.hpp array-script.cpp
configobject.cpp configobject.thpp configobject-script.cpp configtype.cpp configwriter.cpp dependencygraph.cpp base64.cpp base64.hpp
exception.cpp fifo.cpp filelogger.cpp filelogger.thpp initialize.cpp json.cpp boolean.cpp boolean.hpp boolean-script.cpp
json-script.cpp library.cpp loader.cpp logger.cpp logger.thpp math-script.cpp configobject.cpp configobject.hpp configobject.thpp configobject-script.cpp
netstring.cpp networkstream.cpp number.cpp number-script.cpp object.cpp configtype.cpp configtype.hpp
object-script.cpp objectlock.cpp objecttype.cpp primitivetype.cpp process.cpp ringbuffer.cpp scriptframe.cpp configwriter.cpp configwriter.hpp
function.cpp function.thpp function-script.cpp console.cpp console.hpp
perfdatavalue.cpp perfdatavalue.thpp scriptglobal.cpp context.cpp context.hpp
scriptutils.cpp serializer.cpp socket.cpp socketevents.cpp socketevents-epoll.cpp socketevents-poll.cpp stacktrace.cpp convert.cpp convert.hpp
stdiostream.cpp stream.cpp streamlogger.cpp streamlogger.thpp string.cpp string-script.cpp datetime.cpp datetime.hpp datetime.thpp datetime-script.cpp
sysloglogger.cpp sysloglogger.thpp tcpsocket.cpp threadpool.cpp timer.cpp debug.hpp
tlsstream.cpp tlsutility.cpp type.cpp typetype-script.cpp unixsocket.cpp utility.cpp value.cpp debuginfo.cpp debuginfo.hpp
value-operators.cpp workqueue.cpp dependencygraph.cpp dependencygraph.hpp
dictionary.cpp dictionary.hpp dictionary-script.cpp
exception.cpp exception.hpp
fifo.cpp fifo.hpp
filelogger.cpp filelogger.hpp filelogger.thpp
function.cpp function.hpp function.thpp function-script.cpp functionwrapper.hpp
initialize.cpp initialize.hpp
json.cpp json.hpp json-script.cpp
library.cpp library.hpp
loader.cpp loader.hpp
logger.cpp logger.hpp logger.thpp
math-script.cpp
netstring.cpp netstring.hpp
networkstream.cpp networkstream.hpp
number.cpp number.hpp number-script.cpp
object.cpp object.hpp object-script.cpp
objectlock.cpp objectlock.hpp
objecttype.cpp objecttype.hpp
perfdatavalue.cpp perfdatavalue.hpp perfdatavalue.thpp
primitivetype.cpp primitivetype.hpp
process.cpp process.hpp
registry.hpp
ringbuffer.cpp ringbuffer.hpp
scriptframe.cpp scriptframe.hpp
scriptglobal.cpp scriptglobal.hpp
scriptutils.cpp scriptutils.hpp
serializer.cpp serializer.hpp
singleton.hpp
socket.cpp socket.hpp
socketevents.cpp socketevents-epoll.cpp socketevents-poll.cpp socketevents.hpp
stacktrace.cpp stacktrace.hpp
statsfunction.hpp
stdiostream.cpp stdiostream.hpp
stream.cpp stream.hpp
streamlogger.cpp streamlogger.hpp streamlogger.thpp
string.cpp string.hpp string-script.cpp
sysloglogger.cpp sysloglogger.hpp sysloglogger.thpp
tcpsocket.cpp tcpsocket.hpp
threadpool.cpp threadpool.hpp
timer.cpp timer.hpp
tlsstream.cpp tlsstream.hpp
tlsutility.cpp tlsutility.hpp
type.cpp type.hpp typetype-script.cpp
unix.hpp
unixsocket.cpp unixsocket.hpp
utility.cpp utility.hpp
value.cpp value.hpp value-operators.cpp
win32.hpp
workqueue.cpp workqueue.hpp
) )
set_property(SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/application-version.cpp PROPERTY EXCLUDE_UNITY_BUILD TRUE) set_property(SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/application-version.cpp PROPERTY EXCLUDE_UNITY_BUILD TRUE)

View File

@ -18,7 +18,7 @@
mkclass_target(checkercomponent.ti checkercomponent.tcpp checkercomponent.thpp) mkclass_target(checkercomponent.ti checkercomponent.tcpp checkercomponent.thpp)
set(checker_SOURCES set(checker_SOURCES
checkercomponent.cpp checkercomponent.thpp checkercomponent.cpp checkercomponent.hpp checkercomponent.thpp
) )
if(ICINGA2_UNITY_BUILD) if(ICINGA2_UNITY_BUILD)

View File

@ -16,17 +16,35 @@
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
set(cli_SOURCES set(cli_SOURCES
apisetupcommand.cpp apisetuputility.cpp i2-cli.hpp
calistcommand.cpp casigncommand.cpp apisetupcommand.cpp apisetupcommand.hpp
nodesetupcommand.cpp nodewizardcommand.cpp nodeutility.cpp apisetuputility.cpp apisetuputility.hpp
clicommand.cpp calistcommand.cpp calistcommand.hpp
consolecommand.cpp casigncommand.cpp casigncommand.hpp
daemoncommand.cpp daemonutility.cpp clicommand.cpp clicommand.hpp
featureenablecommand.cpp featuredisablecommand.cpp featurelistcommand.cpp featureutility.cpp consolecommand.cpp consolecommand.hpp
objectlistcommand.cpp objectlistutility.cpp daemoncommand.cpp daemoncommand.hpp
pkinewcacommand.cpp pkinewcertcommand.cpp pkisigncsrcommand.cpp pkirequestcommand.cpp pkisavecertcommand.cpp pkiticketcommand.cpp daemonutility.cpp daemonutility.hpp
variablegetcommand.cpp variablelistcommand.cpp variableutility.cpp editline.hpp
troubleshootcommand.cpp featuredisablecommand.cpp featuredisablecommand.hpp
featureenablecommand.cpp featureenablecommand.hpp
featurelistcommand.cpp featurelistcommand.hpp
featureutility.cpp featureutility.hpp
nodesetupcommand.cpp nodesetupcommand.hpp
nodeutility.cpp nodeutility.hpp
nodewizardcommand.cpp nodewizardcommand.hpp
objectlistcommand.cpp objectlistcommand.hpp
objectlistutility.cpp objectlistutility.hpp
pkinewcacommand.cpp pkinewcacommand.hpp
pkinewcertcommand.cpp pkinewcertcommand.hpp
pkirequestcommand.cpp pkirequestcommand.hpp
pkisavecertcommand.cpp pkisavecertcommand.hpp
pkisigncsrcommand.cpp pkisigncsrcommand.hpp
pkiticketcommand.cpp pkiticketcommand.hpp
troubleshootcommand.cpp troubleshootcommand.hpp
variablegetcommand.cpp variablegetcommand.hpp
variablelistcommand.cpp variablelistcommand.hpp
variableutility.cpp variableutility.hpp
) )
if(ICINGA2_UNITY_BUILD) if(ICINGA2_UNITY_BUILD)

View File

@ -21,9 +21,10 @@ mkclass_target(externalcommandlistener.ti externalcommandlistener.tcpp externalc
mkclass_target(statusdatawriter.ti statusdatawriter.tcpp statusdatawriter.thpp) mkclass_target(statusdatawriter.ti statusdatawriter.tcpp statusdatawriter.thpp)
set(compat_SOURCES set(compat_SOURCES
checkresultreader.cpp checkresultreader.thpp compatlogger.cpp checkresultreader.cpp checkresultreader.hpp checkresultreader.thpp
compatlogger.thpp externalcommandlistener.cpp externalcommandlistener.thpp compatlogger.cpp compatlogger.hpp compatlogger.thpp
statusdatawriter.cpp statusdatawriter.thpp externalcommandlistener.cpp externalcommandlistener.hpp externalcommandlistener.thpp
statusdatawriter.cpp statusdatawriter.hpp statusdatawriter.thpp
) )
if(ICINGA2_UNITY_BUILD) if(ICINGA2_UNITY_BUILD)

View File

@ -34,10 +34,18 @@ add_flex_bison_dependency(config_lexer config_parser)
include_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}) include_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR})
set(config_SOURCES set(config_SOURCES
activationcontext.cpp applyrule.cpp i2-config.hpp
configcompilercontext.cpp configcompiler.cpp configitembuilder.cpp activationcontext.cpp activationcontext.hpp
configitem.cpp ${FLEX_config_lexer_OUTPUTS} ${BISON_config_parser_OUTPUTS} applyrule.cpp applyrule.hpp
expression.cpp objectrule.cpp configcompiler.cpp configcompiler.hpp
configcompilercontext.cpp configcompilercontext.hpp
configfragment.hpp
configitem.cpp configitem.hpp
configitembuilder.cpp configitembuilder.hpp
expression.cpp expression.hpp
objectrule.cpp objectrule.hpp
vmops.hpp
${FLEX_config_lexer_OUTPUTS} ${BISON_config_parser_OUTPUTS}
) )
if(ICINGA2_UNITY_BUILD) if(ICINGA2_UNITY_BUILD)

View File

@ -20,12 +20,25 @@ mkclass_target(dbconnection.ti dbconnection.tcpp dbconnection.thpp)
mkembedconfig_target(db_ido-itl.conf db_ido-itl.cpp) mkembedconfig_target(db_ido-itl.conf db_ido-itl.cpp)
set(db_ido_SOURCES set(db_ido_SOURCES
commanddbobject.cpp dbconnection.cpp dbconnection.thpp i2-db_ido.hpp db_ido-itl.cpp
db_ido-itl.cpp dbevents.cpp dbobject.cpp dbquery.cpp commanddbobject.cpp commanddbobject.hpp
dbreference.cpp dbtype.cpp dbvalue.cpp endpointdbobject.cpp hostdbobject.cpp dbconnection.cpp dbconnection.hpp dbconnection.thpp
hostgroupdbobject.cpp idochecktask.cpp servicedbobject.cpp dbevents.cpp dbevents.hpp
servicegroupdbobject.cpp timeperioddbobject.cpp userdbobject.cpp dbobject.cpp dbobject.hpp
usergroupdbobject.cpp zonedbobject.cpp dbquery.cpp dbquery.hpp
dbreference.cpp dbreference.hpp
dbtype.cpp dbtype.hpp
dbvalue.cpp dbvalue.hpp
endpointdbobject.cpp endpointdbobject.hpp
hostdbobject.cpp hostdbobject.hpp
hostgroupdbobject.cpp hostgroupdbobject.hpp
idochecktask.cpp idochecktask.hpp
servicedbobject.cpp servicedbobject.hpp
servicegroupdbobject.cpp servicegroupdbobject.hpp
timeperioddbobject.cpp timeperioddbobject.hpp
userdbobject.cpp userdbobject.hpp
usergroupdbobject.cpp usergroupdbobject.hpp
zonedbobject.cpp zonedbobject.hpp
) )
if(ICINGA2_UNITY_BUILD) if(ICINGA2_UNITY_BUILD)

View File

@ -18,7 +18,7 @@
mkclass_target(idomysqlconnection.ti idomysqlconnection.tcpp idomysqlconnection.thpp) mkclass_target(idomysqlconnection.ti idomysqlconnection.tcpp idomysqlconnection.thpp)
set(db_ido_mysql_SOURCES set(db_ido_mysql_SOURCES
idomysqlconnection.cpp idomysqlconnection.thpp idomysqlconnection.cpp idomysqlconnection.hpp idomysqlconnection.thpp
) )
if(ICINGA2_UNITY_BUILD) if(ICINGA2_UNITY_BUILD)

View File

@ -18,7 +18,7 @@
mkclass_target(idopgsqlconnection.ti idopgsqlconnection.tcpp idopgsqlconnection.thpp) mkclass_target(idopgsqlconnection.ti idopgsqlconnection.tcpp idopgsqlconnection.thpp)
set(db_ido_pgsql_SOURCES set(db_ido_pgsql_SOURCES
idopgsqlconnection.cpp idopgsqlconnection.thpp idopgsqlconnection.cpp idopgsqlconnection.hpp idopgsqlconnection.thpp
) )
if(ICINGA2_UNITY_BUILD) if(ICINGA2_UNITY_BUILD)

View File

@ -18,7 +18,7 @@
mkclass_target(demo.ti demo.tcpp demo.thpp) mkclass_target(demo.ti demo.tcpp demo.thpp)
set(demo_SOURCES set(demo_SOURCES
demo.cpp demo.thpp demo.cpp demo.hpp demo.thpp
) )
if(ICINGA2_UNITY_BUILD) if(ICINGA2_UNITY_BUILD)

View File

@ -18,7 +18,7 @@
mkclass_target(helloapplication.ti helloapplication.tcpp helloapplication.thpp) mkclass_target(helloapplication.ti helloapplication.tcpp helloapplication.thpp)
set(hello_SOURCES set(hello_SOURCES
helloapplication.cpp helloapplication.thpp helloapplication.cpp helloapplication.hpp helloapplication.thpp
) )
if(ICINGA2_UNITY_BUILD) if(ICINGA2_UNITY_BUILD)

View File

@ -39,17 +39,41 @@ mkclass_target(user.ti user.tcpp user.thpp)
mkembedconfig_target(icinga-itl.conf icinga-itl.cpp) mkembedconfig_target(icinga-itl.conf icinga-itl.cpp)
set(icinga_SOURCES set(icinga_SOURCES
apiactions.cpp apievents.cpp checkable.cpp checkable.thpp checkable-dependency.cpp checkable-downtime.cpp checkable-event.cpp i2-icinga.hpp icinga-itl.cpp
checkable-flapping.cpp checkable-script.cpp checkcommand.cpp checkcommand.thpp checkresult.cpp checkresult.thpp apiactions.cpp apiactions.hpp
cib.cpp clusterevents.cpp command.cpp command.thpp comment.cpp comment.thpp compatutility.cpp dependency.cpp dependency.thpp apievents.cpp apievents.hpp
dependency-apply.cpp downtime.cpp downtime.thpp eventcommand.cpp eventcommand.thpp checkable.cpp checkable.hpp checkable.thpp
externalcommandprocessor.cpp host.cpp host.thpp hostgroup.cpp hostgroup.thpp icingaapplication.cpp icingaapplication.thpp checkable-check.cpp checkable-comment.cpp checkable-dependency.cpp
icinga-itl.cpp customvarobject.cpp customvarobject.thpp checkable-downtime.cpp checkable-event.cpp checkable-flapping.cpp
legacytimeperiod.cpp macroprocessor.cpp notificationcommand.cpp notificationcommand.thpp notification.cpp notification.thpp checkable-notification.cpp checkable-script.cpp
notification-apply.cpp objectutils.cpp pluginutility.cpp scheduleddowntime.cpp scheduleddowntime.thpp checkcommand.cpp checkcommand.hpp checkcommand.thpp
scheduleddowntime-apply.cpp service-apply.cpp checkable-check.cpp checkable-comment.cpp checkresult.cpp checkresult.hpp checkresult.thpp
service.cpp service.thpp servicegroup.cpp servicegroup.thpp checkable-notification.cpp timeperiod.cpp timeperiod.thpp cib.cpp cib.hpp
user.cpp user.thpp usergroup.cpp usergroup.thpp clusterevents.cpp clusterevents.hpp
command.cpp command.hpp command.thpp
comment.cpp comment.hpp comment.thpp
compatutility.cpp compatutility.hpp
customvarobject.cpp customvarobject.hpp customvarobject.thpp
dependency.cpp dependency.hpp dependency.thpp dependency-apply.cpp
downtime.cpp downtime.hpp downtime.thpp
eventcommand.cpp eventcommand.hpp eventcommand.thpp
externalcommandprocessor.cpp externalcommandprocessor.hpp
host.cpp host.hpp host.thpp
hostgroup.cpp hostgroup.hpp hostgroup.thpp
icingaapplication.cpp icingaapplication.hpp icingaapplication.thpp
legacytimeperiod.cpp legacytimeperiod.hpp
macroprocessor.cpp macroprocessor.hpp
macroresolver.hpp
notification.cpp notification.hpp notification.thpp notification-apply.cpp
notificationcommand.cpp notificationcommand.hpp notificationcommand.thpp
objectutils.cpp objectutils.hpp
pluginutility.cpp pluginutility.hpp
scheduleddowntime.cpp scheduleddowntime.hpp scheduleddowntime.thpp scheduleddowntime-apply.cpp
service.cpp service.hpp service.thpp service-apply.cpp
servicegroup.cpp servicegroup.hpp servicegroup.thpp
timeperiod.cpp timeperiod.hpp timeperiod.thpp
user.cpp user.hpp user.thpp
usergroup.cpp usergroup.hpp usergroup.thpp
) )
if(ICINGA2_UNITY_BUILD) if(ICINGA2_UNITY_BUILD)

View File

@ -18,17 +18,43 @@
mkclass_target(livestatuslistener.ti livestatuslistener.tcpp livestatuslistener.thpp) mkclass_target(livestatuslistener.ti livestatuslistener.tcpp livestatuslistener.thpp)
set(livestatus_SOURCES set(livestatus_SOURCES
aggregator.cpp andfilter.cpp attributefilter.cpp i2-livestatus.hpp
avgaggregator.cpp column.cpp combinerfilter.cpp commandstable.cpp aggregator.cpp aggregator.hpp
commentstable.cpp contactgroupstable.cpp contactstable.cpp countaggregator.cpp andfilter.cpp andfilter.hpp
downtimestable.cpp endpointstable.cpp filter.cpp historytable.cpp attributefilter.cpp attributefilter.hpp
hostgroupstable.cpp hoststable.cpp invavgaggregator.cpp invsumaggregator.cpp avgaggregator.cpp avgaggregator.hpp
livestatuslistener.cpp livestatuslistener.thpp livestatusquery.cpp column.cpp column.hpp
livestatuslogutility.cpp logtable.cpp maxaggregator.cpp combinerfilter.cpp combinerfilter.hpp
minaggregator.cpp negatefilter.cpp orfilter.cpp commandstable.cpp commandstable.hpp
servicegroupstable.cpp servicestable.cpp statehisttable.cpp commentstable.cpp commentstable.hpp
statustable.cpp stdaggregator.cpp sumaggregator.cpp table.cpp contactgroupstable.cpp contactgroupstable.hpp
timeperiodstable.cpp zonestable.cpp contactstable.cpp contactstable.hpp
countaggregator.cpp countaggregator.hpp
downtimestable.cpp downtimestable.hpp
endpointstable.cpp endpointstable.hpp
filter.cpp filter.hpp
historytable.cpp historytable.hpp
hostgroupstable.cpp hostgroupstable.hpp
hoststable.cpp hoststable.hpp
invavgaggregator.cpp invavgaggregator.hpp
invsumaggregator.cpp invsumaggregator.hpp
livestatuslistener.cpp livestatuslistener.hpp livestatuslistener.thpp
livestatuslogutility.cpp livestatuslogutility.hpp
livestatusquery.cpp livestatusquery.hpp
logtable.cpp logtable.hpp
maxaggregator.cpp maxaggregator.hpp
minaggregator.cpp minaggregator.hpp
negatefilter.cpp negatefilter.hpp
orfilter.cpp orfilter.hpp
servicegroupstable.cpp servicegroupstable.hpp
servicestable.cpp servicestable.hpp
statehisttable.cpp statehisttable.hpp
statustable.cpp statustable.hpp
stdaggregator.cpp stdaggregator.hpp
sumaggregator.cpp sumaggregator.hpp
table.cpp table.hpp
timeperiodstable.cpp timeperiodstable.hpp
zonestable.cpp zonestable.hpp
) )
if(ICINGA2_UNITY_BUILD) if(ICINGA2_UNITY_BUILD)

View File

@ -18,17 +18,26 @@
mkembedconfig_target(methods-itl.conf methods-itl.cpp) mkembedconfig_target(methods-itl.conf methods-itl.cpp)
if(MSVC) if(MSVC)
set(WindowsSources clrchecktask.cpp) set(WindowsSources clrchecktask.cpp clrchecktask.hpp)
else() else()
set(WindowsSources "") set(WindowsSources "")
endif() endif()
set(methods_SOURCES set(methods_SOURCES
clusterchecktask.cpp clusterzonechecktask.cpp dummychecktask.cpp i2-methods.hpp methods-itl.cpp
exceptionchecktask.cpp icingachecktask.cpp methods-itl.cpp clusterchecktask.cpp clusterchecktask.hpp
nullchecktask.cpp nulleventtask.cpp clusterzonechecktask.cpp clusterzonechecktask.hpp
pluginchecktask.cpp plugineventtask.cpp pluginnotificationtask.cpp dummychecktask.cpp dummychecktask.hpp
randomchecktask.cpp timeperiodtask.cpp ${WindowsSources} exceptionchecktask.cpp exceptionchecktask.hpp
icingachecktask.cpp icingachecktask.hpp
nullchecktask.cpp nullchecktask.hpp
nulleventtask.cpp nulleventtask.hpp
pluginchecktask.cpp pluginchecktask.hpp
plugineventtask.cpp plugineventtask.hpp
pluginnotificationtask.cpp pluginnotificationtask.hpp
randomchecktask.cpp randomchecktask.hpp
timeperiodtask.cpp timeperiodtask.hpp
${WindowsSources}
) )
if(ICINGA2_UNITY_BUILD) if(ICINGA2_UNITY_BUILD)

View File

@ -19,7 +19,7 @@ include_directories(${MYSQL_INCLUDE_DIR})
set(mysql_shim_SOURCES set(mysql_shim_SOURCES
mysql_shim.def mysql_shim.def
mysqlinterface.cpp mysqlinterface.cpp mysqlinterface.hpp
) )
if(ICINGA2_UNITY_BUILD) if(ICINGA2_UNITY_BUILD)

View File

@ -18,7 +18,7 @@
mkclass_target(notificationcomponent.ti notificationcomponent.tcpp notificationcomponent.thpp) mkclass_target(notificationcomponent.ti notificationcomponent.tcpp notificationcomponent.thpp)
set(notification_SOURCES set(notification_SOURCES
notificationcomponent.cpp notificationcomponent.thpp notificationcomponent.cpp notificationcomponent.hpp notificationcomponent.thpp
) )
if(ICINGA2_UNITY_BUILD) if(ICINGA2_UNITY_BUILD)

View File

@ -23,7 +23,12 @@ mkclass_target(opentsdbwriter.ti opentsdbwriter.tcpp opentsdbwriter.thpp)
mkclass_target(perfdatawriter.ti perfdatawriter.tcpp perfdatawriter.thpp) mkclass_target(perfdatawriter.ti perfdatawriter.tcpp perfdatawriter.thpp)
set(perfdata_SOURCES set(perfdata_SOURCES
gelfwriter.cpp gelfwriter.thpp graphitewriter.cpp graphitewriter.thpp influxdbwriter.cpp influxdbwriter.thpp elasticsearchwriter.cpp elasticsearchwriter.thpp opentsdbwriter.cpp opentsdbwriter.thpp perfdatawriter.cpp perfdatawriter.thpp elasticsearchwriter.cpp elasticsearchwriter.hpp elasticsearchwriter.thpp
gelfwriter.cpp gelfwriter.hpp gelfwriter.thpp
graphitewriter.cpp graphitewriter.hpp graphitewriter.thpp
influxdbwriter.cpp influxdbwriter.hpp influxdbwriter.thpp
opentsdbwriter.cpp opentsdbwriter.hpp opentsdbwriter.thpp
perfdatawriter.cpp perfdatawriter.hpp perfdatawriter.thpp
) )
if(ICINGA2_UNITY_BUILD) if(ICINGA2_UNITY_BUILD)

View File

@ -20,7 +20,7 @@ include_directories(${PostgreSQL_INCLUDE_DIRS})
set(pgsql_shim_SOURCES set(pgsql_shim_SOURCES
pgsql_shim.def pgsql_shim.def
pgsqlinterface.cpp pgsqlinterface.cpp pgsqlinterface.hpp
) )
if(ICINGA2_UNITY_BUILD) if(ICINGA2_UNITY_BUILD)

View File

@ -21,17 +21,46 @@ mkclass_target(endpoint.ti endpoint.tcpp endpoint.thpp)
mkclass_target(zone.ti zone.tcpp zone.thpp) mkclass_target(zone.ti zone.tcpp zone.thpp)
set(remote_SOURCES set(remote_SOURCES
actionshandler.cpp apiaction.cpp apiclient.cpp i2-remote.hpp
apifunction.cpp apilistener.cpp apilistener.thpp apilistener-configsync.cpp actionshandler.cpp actionshandler.hpp
apilistener-filesync.cpp apiuser.cpp apiuser.thpp authority.cpp apiaction.cpp apiaction.hpp
consolehandler.cpp configfileshandler.cpp configpackageshandler.cpp configpackageutility.cpp configobjectutility.cpp apiclient.cpp apiclient.hpp
configstageshandler.cpp createobjecthandler.cpp deleteobjecthandler.cpp apifunction.cpp apifunction.hpp
endpoint.cpp endpoint.thpp eventshandler.cpp eventqueue.cpp filterutility.cpp apilistener.cpp apilistener.hpp apilistener.thpp apilistener-configsync.cpp apilistener-filesync.cpp
httpchunkedencoding.cpp httpclientconnection.cpp httpserverconnection.cpp httphandler.cpp httprequest.cpp httpresponse.cpp apiuser.cpp apiuser.hpp apiuser.thpp
httputility.cpp infohandler.cpp jsonrpc.cpp jsonrpcconnection.cpp jsonrpcconnection-heartbeat.cpp jsonrpcconnection-pki.cpp authority.cpp
messageorigin.cpp modifyobjecthandler.cpp statushandler.cpp objectqueryhandler.cpp templatequeryhandler.cpp configfileshandler.cpp configfileshandler.hpp
pkiutility.cpp configobjectutility.cpp configobjectutility.hpp
typequeryhandler.cpp url.cpp variablequeryhandler.cpp zone.cpp zone.thpp configpackageshandler.cpp configpackageshandler.hpp
configpackageutility.cpp configpackageutility.hpp
configstageshandler.cpp configstageshandler.hpp
consolehandler.cpp consolehandler.hpp
createobjecthandler.cpp createobjecthandler.hpp
deleteobjecthandler.cpp deleteobjecthandler.hpp
endpoint.cpp endpoint.hpp endpoint.thpp
eventqueue.cpp eventqueue.hpp
eventshandler.cpp eventshandler.hpp
filterutility.cpp filterutility.hpp
httpchunkedencoding.cpp httpchunkedencoding.hpp
httpclientconnection.cpp httpclientconnection.hpp
httphandler.cpp httphandler.hpp
httprequest.cpp httprequest.hpp
httpresponse.cpp httpresponse.hpp
httpserverconnection.cpp httpserverconnection.hpp
httputility.cpp httputility.hpp
infohandler.cpp infohandler.hpp
jsonrpc.cpp jsonrpc.hpp
jsonrpcconnection.cpp jsonrpcconnection.hpp jsonrpcconnection-heartbeat.cpp jsonrpcconnection-pki.cpp
messageorigin.cpp messageorigin.hpp
modifyobjecthandler.cpp modifyobjecthandler.hpp
objectqueryhandler.cpp objectqueryhandler.hpp
pkiutility.cpp pkiutility.hpp
statushandler.cpp statushandler.hpp
templatequeryhandler.cpp templatequeryhandler.hpp
typequeryhandler.cpp typequeryhandler.hpp
url.cpp url.hpp url-characters.hpp
variablequeryhandler.cpp variablequeryhandler.hpp
zone.cpp zone.hpp zone.thpp
) )
if(ICINGA2_UNITY_BUILD) if(ICINGA2_UNITY_BUILD)

View File

@ -24,57 +24,63 @@ set_target_properties (
check_nscp_api PROPERTIES check_nscp_api PROPERTIES
INSTALL_RPATH ${CMAKE_INSTALL_FULL_LIBDIR}/icinga2 INSTALL_RPATH ${CMAKE_INSTALL_FULL_LIBDIR}/icinga2
DEFINE_SYMBOL I2_PLUGINS_BUILD DEFINE_SYMBOL I2_PLUGINS_BUILD
FOLDER Plugins ) FOLDER Plugins)
# Prefer the PluginDir constant which is set to /sbin on Windows # Prefer the PluginDir constant which is set to /sbin on Windows
if ( WIN32 ) if(WIN32)
install ( TARGETS check_nscp_api RUNTIME DESTINATION ${CMAKE_INSTALL_SBINDIR} ) install(TARGETS check_nscp_api RUNTIME DESTINATION ${CMAKE_INSTALL_SBINDIR})
else() else()
install ( TARGETS check_nscp_api RUNTIME DESTINATION ${ICINGA2_PLUGINDIR} ) install(TARGETS check_nscp_api RUNTIME DESTINATION ${ICINGA2_PLUGINDIR})
endif() endif()
if ( WIN32 ) if (WIN32)
add_definitions(-DUNICODE -D_UNICODE)
add_definitions ( -DUNICODE -D_UNICODE ) set(thresholds_SOURCES
thresholds.cpp thresholds.h
)
add_library ( thresholds thresholds ) add_library(thresholds ${thresholds_SOURCES})
set_target_properties (
thresholds PROPERTIES
INSTALL_RPATH ${CMAKE_INSTALL_FULL_LIBDIR}/icinga2
FOLDER Plugins
)
list ( APPEND check_SOURCES set_target_properties(
check_disk.cpp check_load.cpp check_memory.cpp check_network.cpp check_perfmon.cpp thresholds PROPERTIES
check_ping.cpp check_procs.cpp check_service.cpp check_swap.cpp check_update.cpp check_uptime.cpp INSTALL_RPATH ${CMAKE_INSTALL_FULL_LIBDIR}/icinga2
check_users.cpp ) FOLDER Plugins
)
foreach ( source ${check_SOURCES} ) set(check_SOURCES
string ( REGEX REPLACE ".cpp\$" "" check_OUT "${source}" ) check_disk.cpp check_load.cpp check_memory.cpp check_network.cpp check_perfmon.cpp
string ( REGEX REPLACE ".cpp\$" ".h" check_HEADER "${source}" ) check_ping.cpp check_procs.cpp check_service.cpp check_swap.cpp check_update.cpp check_uptime.cpp
check_users.cpp
)
add_executable ( ${check_OUT} ${source} ${check_HEADER} ) foreach(source ${check_SOURCES})
target_link_libraries ( ${check_OUT} thresholds Shlwapi.lib ${Boost_PROGRAM_OPTIONS_LIBRARY} ) string(REGEX REPLACE ".cpp\$" "" check_OUT "${source}")
string(REGEX REPLACE ".cpp\$" ".h" check_HEADER "${source}")
set_target_properties ( add_executable(${check_OUT} ${source} ${check_HEADER})
target_link_libraries(${check_OUT} thresholds Shlwapi.lib ${Boost_PROGRAM_OPTIONS_LIBRARY})
set_target_properties(
${check_OUT} PROPERTIES ${check_OUT} PROPERTIES
INSTALL_RPATH ${CMAKE_INSTALL_FULL_LIBDIR}/icinga2 INSTALL_RPATH ${CMAKE_INSTALL_FULL_LIBDIR}/icinga2
DEFINE_SYMBOL I2_PLUGINS_BUILD DEFINE_SYMBOL I2_PLUGINS_BUILD
FOLDER Plugins ) FOLDER Plugins
endforeach ( source ) )
endforeach()
target_link_libraries ( check_load Pdh.lib ) target_link_libraries(check_load Pdh.lib)
target_link_libraries ( check_network Pdh.lib Iphlpapi.lib) target_link_libraries(check_network Pdh.lib Iphlpapi.lib)
target_link_libraries ( check_perfmon Pdh.lib ) target_link_libraries(check_perfmon Pdh.lib)
target_link_libraries ( check_ping Ntdll.lib iphlpapi.lib Ws2_32.lib ) target_link_libraries(check_ping Ntdll.lib iphlpapi.lib Ws2_32.lib)
target_link_libraries ( check_procs Pdh.lib ) target_link_libraries(check_procs Pdh.lib)
target_link_libraries ( check_uptime ${Boost_SYSTEM_LIBRARY} ) target_link_libraries(check_uptime ${Boost_SYSTEM_LIBRARY})
target_link_libraries ( check_users wtsapi32.lib ) target_link_libraries(check_users wtsapi32.lib)
install ( install(
TARGETS check_disk check_load check_memory check_network check_perfmon check_procs TARGETS check_disk check_load check_memory check_network check_perfmon check_procs
check_ping check_service check_swap check_update check_uptime check_users check_ping check_service check_swap check_update check_uptime check_users
RUNTIME DESTINATION ${CMAKE_INSTALL_SBINDIR} ) RUNTIME DESTINATION ${CMAKE_INSTALL_SBINDIR}
)
endif ( ) endif ( )

View File

@ -20,13 +20,30 @@ set(Boost_USE_STATIC_LIBS OFF)
include(BoostTestTargets) include(BoostTestTargets)
set(base_test_SOURCES set(base_test_SOURCES
base-array.cpp base-base64.cpp base-convert.cpp base-dictionary.cpp base-fifo.cpp base-array.cpp
base-json.cpp base-match.cpp base-netstring.cpp base-object.cpp base-base64.cpp
base-serialize.cpp base-shellescape.cpp base-stacktrace.cpp base-convert.cpp
base-stream.cpp base-string.cpp base-timer.cpp base-type.cpp base-dictionary.cpp
base-value.cpp config-ops.cpp icinga-checkresult.cpp icinga-legacytimeperiod.cpp base-fifo.cpp
icinga-macros.cpp icinga-notification.cpp base-json.cpp
icinga-perfdata.cpp remote-url.cpp base-match.cpp
base-netstring.cpp
base-object.cpp
base-serialize.cpp
base-shellescape.cpp
base-stacktrace.cpp
base-stream.cpp
base-string.cpp
base-timer.cpp
base-type.cpp
base-value.cpp
config-ops.cpp
icinga-checkresult.cpp
icinga-legacytimeperiod.cpp
icinga-macros.cpp
icinga-notification.cpp
icinga-perfdata.cpp
remote-url.cpp
) )
if(ICINGA2_UNITY_BUILD) if(ICINGA2_UNITY_BUILD)
@ -126,6 +143,7 @@ add_whole_static_library(${base_TARGET_NAME} icinga)
if(ICINGA2_WITH_LIVESTATUS) if(ICINGA2_WITH_LIVESTATUS)
set(livestatus_test_SOURCES set(livestatus_test_SOURCES
livestatus-fixture.cpp
livestatus.cpp livestatus.cpp
) )
@ -134,7 +152,7 @@ if(ICINGA2_WITH_LIVESTATUS)
endif() endif()
add_boost_test(livestatus add_boost_test(livestatus
SOURCES test-runner.cpp livestatus-fixture.cpp ${livestatus_test_SOURCES} SOURCES test-runner.cpp ${livestatus_test_SOURCES}
TESTS livestatus/hosts livestatus/services TESTS livestatus/hosts livestatus/services
) )
@ -146,7 +164,8 @@ if(ICINGA2_WITH_LIVESTATUS)
endif() endif()
set(icinga_checkable_test_SOURCES set(icinga_checkable_test_SOURCES
icinga-checkable-flapping.cpp icinga-checkable-fixture.cpp
icinga-checkable-flapping.cpp
) )
if(ICINGA2_UNITY_BUILD) if(ICINGA2_UNITY_BUILD)
@ -154,7 +173,7 @@ if(ICINGA2_UNITY_BUILD)
endif() endif()
add_boost_test(icinga_checkable add_boost_test(icinga_checkable
SOURCES test-runner.cpp icinga-checkable-test.cpp ${icinga_checkable_test_SOURCES} SOURCES test-runner.cpp ${icinga_checkable_test_SOURCES}
TESTS icinga_checkable_flapping/host_not_flapping TESTS icinga_checkable_flapping/host_not_flapping
icinga_checkable_flapping/host_flapping icinga_checkable_flapping/host_flapping
icinga_checkable_flapping/host_flapping_recover icinga_checkable_flapping/host_flapping_recover

View File

@ -15,7 +15,11 @@
# along with this program; if not, write to the Free Software Foundation # along with this program; if not, write to the Free Software Foundation
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
add_library(execvpe STATIC execvpe.c execvpe.h) set(execvpe_SOURCES
execvpe.c execvpe.h
)
add_library(execvpe STATIC ${execvpe_SOURCES})
set_target_properties ( set_target_properties (
execvpe PROPERTIES execvpe PROPERTIES

View File

@ -15,7 +15,11 @@
# along with this program; if not, write to the Free Software Foundation # along with this program; if not, write to the Free Software Foundation
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
add_library(mmatch STATIC mmatch.c mmatch.h) set(mmatch_SOURCES
mmatch.c mmatch.h
)
add_library(mmatch STATIC ${mmatch_SOURCES})
set_target_properties( set_target_properties(
mmatch PROPERTIES mmatch PROPERTIES

View File

@ -15,7 +15,11 @@
# along with this program; if not, write to the Free Software Foundation # along with this program; if not, write to the Free Software Foundation
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
add_library(socketpair STATIC socketpair.c socketpair.h) set(socketpair_SOURCES
socketpair.c socketpair.h
)
add_library(socketpair STATIC ${socketpair_SOURCES})
set_target_properties ( set_target_properties (
socketpair PROPERTIES socketpair PROPERTIES

View File

@ -29,7 +29,14 @@ endif()
include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}) include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
add_executable(mkclass mkclass.cpp classcompiler.cpp classcompiler.hpp ${FLEX_class_lexer_OUTPUTS} ${BISON_class_parser_OUTPUTS}) set(mkclass_SOURCES
mkclass.cpp
classcompiler.cpp classcompiler.hpp
${FLEX_class_lexer_OUTPUTS}
${BISON_class_parser_OUTPUTS}
)
add_executable(mkclass ${mkclass_SOURCES})
if(WIN32) if(WIN32)
target_link_libraries(mkclass shlwapi) target_link_libraries(mkclass shlwapi)

View File

@ -15,7 +15,11 @@
# along with this program; if not, write to the Free Software Foundation # along with this program; if not, write to the Free Software Foundation
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
add_executable(mkembedconfig mkembedconfig.c) set(mkembedconfig_SOURCES
mkembedconfig.c
)
add_executable(mkembedconfig ${mkembedconfig_SOURCES})
set_target_properties ( set_target_properties (
mkembedconfig PROPERTIES mkembedconfig PROPERTIES

View File

@ -23,7 +23,11 @@ define_property(
) )
if(ICINGA2_UNITY_BUILD) if(ICINGA2_UNITY_BUILD)
add_executable(mkunity mkunity.c) set(mkunity_SOURCES
mkunity.c
)
add_executable(mkunity ${mkunity_SOURCES})
set_target_properties ( set_target_properties (
mkunity PROPERTIES mkunity PROPERTIES