Skip to content

Commit

Permalink
Merge pull request #6015 from Icinga/fix/cmakelist-whitespace
Browse files Browse the repository at this point in the history
Fix whitespaces in CMakeLists files
  • Loading branch information
Michael Friedrich authored Jan 19, 2018
2 parents 59b3484 + 1da6b2c commit 627fddf
Show file tree
Hide file tree
Showing 24 changed files with 181 additions and 180 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/third-party/cmake")

if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release CACHE STRING
"Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel."
FORCE)
"Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel."
FORCE)
endif()

option(ICINGA2_WITH_MYSQL "Build the MySQL IDO module" ON)
Expand Down
6 changes: 3 additions & 3 deletions etc/initsystem/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.

if(NOT WIN32)
set(ICINGA2_SYSCONFIGFILE "${CMAKE_INSTALL_FULL_SYSCONFDIR}/sysconfig/icinga2" CACHE PATH "where to store configuation for the init system, defaults to /etc/sysconfig/icinga2")
set(ICINGA2_SYSCONFIGFILE "${CMAKE_INSTALL_FULL_SYSCONFDIR}/sysconfig/icinga2" CACHE PATH "where to store configuation for the init system, defaults to /etc/sysconfig/icinga2")

configure_file(icinga2.sysconfig.cmake ${CMAKE_CURRENT_BINARY_DIR}/initsystem/icinga2.sysconfig @ONLY)
get_filename_component(ICINGA2_SYSCONFIGFILE_NAME ${ICINGA2_SYSCONFIGFILE} NAME)
Expand All @@ -35,11 +35,11 @@ if(NOT WIN32)
)

option (USE_SYSTEMD
"Configure icinga as native systemd service instead of a SysV initscript" OFF)
"Configure icinga as native systemd service instead of a SysV initscript" OFF)

# required for packaging on Gentoo, see Bug #6498
option (INSTALL_SYSTEMD_SERVICE_AND_INITSCRIPT
"Force install both the systemd service definition file and the SysV initscript in parallel, regardless of how USE_SYSTEMD is set. Only use this for special packaging purposes and if you know what you are doing" OFF)
"Force install both the systemd service definition file and the SysV initscript in parallel, regardless of how USE_SYSTEMD is set. Only use this for special packaging purposes and if you know what you are doing" OFF)

if (NOT USE_SYSTEMD OR INSTALL_SYSTEMD_SERVICE_AND_INITSCRIPT)
configure_file(icinga2.init.d.cmake ${CMAKE_CURRENT_BINARY_DIR}/initsystem/icinga2)
Expand Down
20 changes: 10 additions & 10 deletions icinga-installer/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.

foreach(flag_var
CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE
CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO)
if(${flag_var} MATCHES "/MD")
string(REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}")
endif(${flag_var} MATCHES "/MD")
CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE
CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO)
if(${flag_var} MATCHES "/MD")
string(REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}")
endif(${flag_var} MATCHES "/MD")
endforeach(flag_var)

set(icinga_installer_SOURCES
Expand All @@ -40,13 +40,13 @@ target_link_libraries(icinga-installer shlwapi)

install(CODE "
execute_process(COMMAND \${CMAKE_COMMAND} -E copy \"${CMAKE_CURRENT_BINARY_DIR}/icinga2.wixpatch.\${BUILD_TYPE}\"
\"${CMAKE_CURRENT_BINARY_DIR}/icinga2.wixpatch\"
RESULT_VARIABLE copy_result
ERROR_VARIABLE error_output)
\"${CMAKE_CURRENT_BINARY_DIR}/icinga2.wixpatch\"
RESULT_VARIABLE copy_result
ERROR_VARIABLE error_output)
if(copy_result)
message(FATAL_ERROR \${error_output})
endif()
")
endif()"
)

file(
GENERATE
Expand Down
2 changes: 1 addition & 1 deletion lib/base/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ set(base_SOURCES
set_property(SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/application-version.cpp PROPERTY EXCLUDE_UNITY_BUILD TRUE)

if(ICINGA2_UNITY_BUILD)
mkunity_target(base base base_SOURCES)
mkunity_target(base base base_SOURCES)
endif()

add_library(base OBJECT ${base_SOURCES})
Expand Down
2 changes: 1 addition & 1 deletion lib/checker/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ set(checker_SOURCES
)

if(ICINGA2_UNITY_BUILD)
mkunity_target(checker checker checker_SOURCES)
mkunity_target(checker checker checker_SOURCES)
endif()

add_library(checker OBJECT ${checker_SOURCES})
Expand Down
2 changes: 1 addition & 1 deletion lib/cli/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ set(cli_SOURCES
)

if(ICINGA2_UNITY_BUILD)
mkunity_target(cli cli cli_SOURCES)
mkunity_target(cli cli cli_SOURCES)
endif()

add_library(cli OBJECT ${cli_SOURCES})
Expand Down
2 changes: 1 addition & 1 deletion lib/compat/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ set(compat_SOURCES
)

if(ICINGA2_UNITY_BUILD)
mkunity_target(compat compat compat_SOURCES)
mkunity_target(compat compat compat_SOURCES)
endif()

add_library(compat OBJECT ${compat_SOURCES})
Expand Down
2 changes: 1 addition & 1 deletion lib/config/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ set(config_SOURCES
)

if(ICINGA2_UNITY_BUILD)
mkunity_target(config config config_SOURCES)
mkunity_target(config config config_SOURCES)
endif()

add_library(config OBJECT ${config_SOURCES})
Expand Down
2 changes: 1 addition & 1 deletion lib/db_ido/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ set(db_ido_SOURCES
)

if(ICINGA2_UNITY_BUILD)
mkunity_target(db_ido db_ido db_ido_SOURCES)
mkunity_target(db_ido db_ido db_ido_SOURCES)
endif()

add_library(db_ido OBJECT ${db_ido_SOURCES})
Expand Down
2 changes: 1 addition & 1 deletion lib/db_ido_mysql/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ set(db_ido_mysql_SOURCES
)

if(ICINGA2_UNITY_BUILD)
mkunity_target(db_ido_mysql db_ido_mysql db_ido_mysql_SOURCES)
mkunity_target(db_ido_mysql db_ido_mysql db_ido_mysql_SOURCES)
endif()

add_library(db_ido_mysql OBJECT ${db_ido_mysql_SOURCES})
Expand Down
2 changes: 1 addition & 1 deletion lib/db_ido_pgsql/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ set(db_ido_pgsql_SOURCES
)

if(ICINGA2_UNITY_BUILD)
mkunity_target(db_ido_pgsql db_ido_pgsql db_ido_pgsql_SOURCES)
mkunity_target(db_ido_pgsql db_ido_pgsql db_ido_pgsql_SOURCES)
endif()

add_library(db_ido_pgsql OBJECT ${db_ido_pgsql_SOURCES})
Expand Down
2 changes: 1 addition & 1 deletion lib/icinga/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ set(icinga_SOURCES
)

if(ICINGA2_UNITY_BUILD)
mkunity_target(icinga icinga icinga_SOURCES)
mkunity_target(icinga icinga icinga_SOURCES)
endif()

add_library(icinga OBJECT ${icinga_SOURCES})
Expand Down
2 changes: 1 addition & 1 deletion lib/livestatus/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ set(livestatus_SOURCES
)

if(ICINGA2_UNITY_BUILD)
mkunity_target(livestatus livestatus livestatus_SOURCES)
mkunity_target(livestatus livestatus livestatus_SOURCES)
endif()

add_library(livestatus OBJECT ${livestatus_SOURCES})
Expand Down
2 changes: 1 addition & 1 deletion lib/methods/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ set(methods_SOURCES
)

if(ICINGA2_UNITY_BUILD)
mkunity_target(methods methods methods_SOURCES)
mkunity_target(methods methods methods_SOURCES)
endif()

add_library(methods OBJECT ${methods_SOURCES})
Expand Down
2 changes: 1 addition & 1 deletion lib/mysql_shim/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ set(mysql_shim_SOURCES
)

if(ICINGA2_UNITY_BUILD)
mkunity_target(mysql_shim mysql_shim mysql_shim_SOURCES)
mkunity_target(mysql_shim mysql_shim mysql_shim_SOURCES)
endif()

add_library(mysql_shim SHARED ${mysql_shim_SOURCES})
Expand Down
2 changes: 1 addition & 1 deletion lib/notification/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ set(notification_SOURCES
)

if(ICINGA2_UNITY_BUILD)
mkunity_target(notification notification notification_SOURCES)
mkunity_target(notification notification notification_SOURCES)
endif()

add_library(notification OBJECT ${notification_SOURCES})
Expand Down
2 changes: 1 addition & 1 deletion lib/perfdata/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ set(perfdata_SOURCES
)

if(ICINGA2_UNITY_BUILD)
mkunity_target(perfdata perfdata perfdata_SOURCES)
mkunity_target(perfdata perfdata perfdata_SOURCES)
endif()

add_library(perfdata OBJECT ${perfdata_SOURCES})
Expand Down
2 changes: 1 addition & 1 deletion lib/pgsql_shim/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ set(pgsql_shim_SOURCES
)

if(ICINGA2_UNITY_BUILD)
mkunity_target(pgsql_shim pgsql_shim pgsql_shim_SOURCES)
mkunity_target(pgsql_shim pgsql_shim pgsql_shim_SOURCES)
endif()

add_library(pgsql_shim SHARED ${pgsql_shim_SOURCES})
Expand Down
2 changes: 1 addition & 1 deletion lib/remote/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ set(remote_SOURCES
)

if(ICINGA2_UNITY_BUILD)
mkunity_target(remote remote remote_SOURCES)
mkunity_target(remote remote remote_SOURCES)
endif()

add_library(remote OBJECT ${remote_SOURCES})
Expand Down
34 changes: 17 additions & 17 deletions plugins/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,31 +31,31 @@ set_target_properties (
# Prefer the PluginDir constant which is set to /sbin on Windows

if(WIN32)
install(TARGETS check_nscp_api RUNTIME DESTINATION ${CMAKE_INSTALL_SBINDIR})
install(TARGETS check_nscp_api RUNTIME DESTINATION ${CMAKE_INSTALL_SBINDIR})
else()
install(TARGETS check_nscp_api RUNTIME DESTINATION ${ICINGA2_PLUGINDIR})
install(TARGETS check_nscp_api RUNTIME DESTINATION ${ICINGA2_PLUGINDIR})
endif()

if (WIN32)
add_definitions(-DUNICODE -D_UNICODE)
add_definitions(-DUNICODE -D_UNICODE)

set(thresholds_SOURCES
thresholds.cpp thresholds.h
)
set(thresholds_SOURCES
thresholds.cpp thresholds.h
)

add_library(thresholds ${thresholds_SOURCES})
add_library(thresholds ${thresholds_SOURCES})

set_target_properties(
thresholds PROPERTIES
INSTALL_RPATH ${CMAKE_INSTALL_FULL_LIBDIR}/icinga2
FOLDER Plugins
)
set_target_properties(
thresholds PROPERTIES
INSTALL_RPATH ${CMAKE_INSTALL_FULL_LIBDIR}/icinga2
FOLDER Plugins
)

set(check_SOURCES
check_disk.cpp check_load.cpp check_memory.cpp check_network.cpp check_perfmon.cpp
check_ping.cpp check_procs.cpp check_service.cpp check_swap.cpp check_update.cpp check_uptime.cpp
check_users.cpp
)
set(check_SOURCES
check_disk.cpp check_load.cpp check_memory.cpp check_network.cpp check_perfmon.cpp
check_ping.cpp check_procs.cpp check_service.cpp check_swap.cpp check_update.cpp check_uptime.cpp
check_users.cpp
)

foreach(source ${check_SOURCES})
string(REGEX REPLACE ".cpp\$" "" check_OUT "${source}")
Expand Down
Loading

0 comments on commit 627fddf

Please sign in to comment.