Fix whitespaces in CMakeLists files

Uses 2 space indentation as standard
This commit is contained in:
Jean Flach 2018-01-19 09:18:52 +01:00
parent 59b34846e8
commit 1da6b2c883
24 changed files with 183 additions and 182 deletions

View File

@ -24,8 +24,8 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/third-party/cmake")
if(NOT CMAKE_BUILD_TYPE) if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release CACHE STRING set(CMAKE_BUILD_TYPE Release CACHE STRING
"Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel." "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel."
FORCE) FORCE)
endif() endif()
option(ICINGA2_WITH_MYSQL "Build the MySQL IDO module" ON) option(ICINGA2_WITH_MYSQL "Build the MySQL IDO module" ON)

View File

@ -16,7 +16,7 @@
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
if(NOT WIN32) 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) configure_file(icinga2.sysconfig.cmake ${CMAKE_CURRENT_BINARY_DIR}/initsystem/icinga2.sysconfig @ONLY)
get_filename_component(ICINGA2_SYSCONFIGFILE_NAME ${ICINGA2_SYSCONFIGFILE} NAME) get_filename_component(ICINGA2_SYSCONFIGFILE_NAME ${ICINGA2_SYSCONFIGFILE} NAME)
@ -35,11 +35,11 @@ if(NOT WIN32)
) )
option (USE_SYSTEMD 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 # required for packaging on Gentoo, see Bug #6498
option (INSTALL_SYSTEMD_SERVICE_AND_INITSCRIPT 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) if (NOT USE_SYSTEMD OR INSTALL_SYSTEMD_SERVICE_AND_INITSCRIPT)
configure_file(icinga2.init.d.cmake ${CMAKE_CURRENT_BINARY_DIR}/initsystem/icinga2) configure_file(icinga2.init.d.cmake ${CMAKE_CURRENT_BINARY_DIR}/initsystem/icinga2)

View File

@ -16,11 +16,11 @@
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
foreach(flag_var foreach(flag_var
CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE
CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO) CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO)
if(${flag_var} MATCHES "/MD") if(${flag_var} MATCHES "/MD")
string(REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}") string(REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}")
endif(${flag_var} MATCHES "/MD") endif(${flag_var} MATCHES "/MD")
endforeach(flag_var) endforeach(flag_var)
set(icinga_installer_SOURCES set(icinga_installer_SOURCES
@ -40,13 +40,13 @@ target_link_libraries(icinga-installer shlwapi)
install(CODE " install(CODE "
execute_process(COMMAND \${CMAKE_COMMAND} -E copy \"${CMAKE_CURRENT_BINARY_DIR}/icinga2.wixpatch.\${BUILD_TYPE}\" execute_process(COMMAND \${CMAKE_COMMAND} -E copy \"${CMAKE_CURRENT_BINARY_DIR}/icinga2.wixpatch.\${BUILD_TYPE}\"
\"${CMAKE_CURRENT_BINARY_DIR}/icinga2.wixpatch\" \"${CMAKE_CURRENT_BINARY_DIR}/icinga2.wixpatch\"
RESULT_VARIABLE copy_result RESULT_VARIABLE copy_result
ERROR_VARIABLE error_output) ERROR_VARIABLE error_output)
if(copy_result) if(copy_result)
message(FATAL_ERROR \${error_output}) message(FATAL_ERROR \${error_output})
endif() endif()"
") )
file( file(
GENERATE GENERATE

View File

@ -94,7 +94,7 @@ set(base_SOURCES
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)
if(ICINGA2_UNITY_BUILD) if(ICINGA2_UNITY_BUILD)
mkunity_target(base base base_SOURCES) mkunity_target(base base base_SOURCES)
endif() endif()
add_library(base OBJECT ${base_SOURCES}) add_library(base OBJECT ${base_SOURCES})

View File

@ -22,7 +22,7 @@ set(checker_SOURCES
) )
if(ICINGA2_UNITY_BUILD) if(ICINGA2_UNITY_BUILD)
mkunity_target(checker checker checker_SOURCES) mkunity_target(checker checker checker_SOURCES)
endif() endif()
add_library(checker OBJECT ${checker_SOURCES}) add_library(checker OBJECT ${checker_SOURCES})

View File

@ -48,7 +48,7 @@ set(cli_SOURCES
) )
if(ICINGA2_UNITY_BUILD) if(ICINGA2_UNITY_BUILD)
mkunity_target(cli cli cli_SOURCES) mkunity_target(cli cli cli_SOURCES)
endif() endif()
add_library(cli OBJECT ${cli_SOURCES}) add_library(cli OBJECT ${cli_SOURCES})

View File

@ -28,7 +28,7 @@ set(compat_SOURCES
) )
if(ICINGA2_UNITY_BUILD) if(ICINGA2_UNITY_BUILD)
mkunity_target(compat compat compat_SOURCES) mkunity_target(compat compat compat_SOURCES)
endif() endif()
add_library(compat OBJECT ${compat_SOURCES}) add_library(compat OBJECT ${compat_SOURCES})

View File

@ -49,7 +49,7 @@ set(config_SOURCES
) )
if(ICINGA2_UNITY_BUILD) if(ICINGA2_UNITY_BUILD)
mkunity_target(config config config_SOURCES) mkunity_target(config config config_SOURCES)
endif() endif()
add_library(config OBJECT ${config_SOURCES}) add_library(config OBJECT ${config_SOURCES})

View File

@ -42,7 +42,7 @@ set(db_ido_SOURCES
) )
if(ICINGA2_UNITY_BUILD) if(ICINGA2_UNITY_BUILD)
mkunity_target(db_ido db_ido db_ido_SOURCES) mkunity_target(db_ido db_ido db_ido_SOURCES)
endif() endif()
add_library(db_ido OBJECT ${db_ido_SOURCES}) add_library(db_ido OBJECT ${db_ido_SOURCES})

View File

@ -22,7 +22,7 @@ set(db_ido_mysql_SOURCES
) )
if(ICINGA2_UNITY_BUILD) 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() endif()
add_library(db_ido_mysql OBJECT ${db_ido_mysql_SOURCES}) add_library(db_ido_mysql OBJECT ${db_ido_mysql_SOURCES})

View File

@ -22,7 +22,7 @@ set(db_ido_pgsql_SOURCES
) )
if(ICINGA2_UNITY_BUILD) 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() endif()
add_library(db_ido_pgsql OBJECT ${db_ido_pgsql_SOURCES}) add_library(db_ido_pgsql OBJECT ${db_ido_pgsql_SOURCES})

View File

@ -77,7 +77,7 @@ set(icinga_SOURCES
) )
if(ICINGA2_UNITY_BUILD) if(ICINGA2_UNITY_BUILD)
mkunity_target(icinga icinga icinga_SOURCES) mkunity_target(icinga icinga icinga_SOURCES)
endif() endif()
add_library(icinga OBJECT ${icinga_SOURCES}) add_library(icinga OBJECT ${icinga_SOURCES})

View File

@ -58,7 +58,7 @@ set(livestatus_SOURCES
) )
if(ICINGA2_UNITY_BUILD) if(ICINGA2_UNITY_BUILD)
mkunity_target(livestatus livestatus livestatus_SOURCES) mkunity_target(livestatus livestatus livestatus_SOURCES)
endif() endif()
add_library(livestatus OBJECT ${livestatus_SOURCES}) add_library(livestatus OBJECT ${livestatus_SOURCES})

View File

@ -41,7 +41,7 @@ set(methods_SOURCES
) )
if(ICINGA2_UNITY_BUILD) if(ICINGA2_UNITY_BUILD)
mkunity_target(methods methods methods_SOURCES) mkunity_target(methods methods methods_SOURCES)
endif() endif()
add_library(methods OBJECT ${methods_SOURCES}) add_library(methods OBJECT ${methods_SOURCES})

View File

@ -23,7 +23,7 @@ set(mysql_shim_SOURCES
) )
if(ICINGA2_UNITY_BUILD) if(ICINGA2_UNITY_BUILD)
mkunity_target(mysql_shim mysql_shim mysql_shim_SOURCES) mkunity_target(mysql_shim mysql_shim mysql_shim_SOURCES)
endif() endif()
add_library(mysql_shim SHARED ${mysql_shim_SOURCES}) add_library(mysql_shim SHARED ${mysql_shim_SOURCES})

View File

@ -22,7 +22,7 @@ set(notification_SOURCES
) )
if(ICINGA2_UNITY_BUILD) if(ICINGA2_UNITY_BUILD)
mkunity_target(notification notification notification_SOURCES) mkunity_target(notification notification notification_SOURCES)
endif() endif()
add_library(notification OBJECT ${notification_SOURCES}) add_library(notification OBJECT ${notification_SOURCES})

View File

@ -32,7 +32,7 @@ set(perfdata_SOURCES
) )
if(ICINGA2_UNITY_BUILD) if(ICINGA2_UNITY_BUILD)
mkunity_target(perfdata perfdata perfdata_SOURCES) mkunity_target(perfdata perfdata perfdata_SOURCES)
endif() endif()
add_library(perfdata OBJECT ${perfdata_SOURCES}) add_library(perfdata OBJECT ${perfdata_SOURCES})

View File

@ -24,7 +24,7 @@ set(pgsql_shim_SOURCES
) )
if(ICINGA2_UNITY_BUILD) if(ICINGA2_UNITY_BUILD)
mkunity_target(pgsql_shim pgsql_shim pgsql_shim_SOURCES) mkunity_target(pgsql_shim pgsql_shim pgsql_shim_SOURCES)
endif() endif()
add_library(pgsql_shim SHARED ${pgsql_shim_SOURCES}) add_library(pgsql_shim SHARED ${pgsql_shim_SOURCES})

View File

@ -64,7 +64,7 @@ set(remote_SOURCES
) )
if(ICINGA2_UNITY_BUILD) if(ICINGA2_UNITY_BUILD)
mkunity_target(remote remote remote_SOURCES) mkunity_target(remote remote remote_SOURCES)
endif() endif()
add_library(remote OBJECT ${remote_SOURCES}) add_library(remote OBJECT ${remote_SOURCES})

View File

@ -31,31 +31,31 @@ set_target_properties (
# 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 set(thresholds_SOURCES
thresholds.cpp thresholds.h thresholds.cpp thresholds.h
) )
add_library(thresholds ${thresholds_SOURCES}) add_library(thresholds ${thresholds_SOURCES})
set_target_properties( set_target_properties(
thresholds PROPERTIES thresholds PROPERTIES
INSTALL_RPATH ${CMAKE_INSTALL_FULL_LIBDIR}/icinga2 INSTALL_RPATH ${CMAKE_INSTALL_FULL_LIBDIR}/icinga2
FOLDER Plugins FOLDER Plugins
) )
set(check_SOURCES set(check_SOURCES
check_disk.cpp check_load.cpp check_memory.cpp check_network.cpp check_perfmon.cpp 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_ping.cpp check_procs.cpp check_service.cpp check_swap.cpp check_update.cpp check_uptime.cpp
check_users.cpp check_users.cpp
) )
foreach(source ${check_SOURCES}) foreach(source ${check_SOURCES})
string(REGEX REPLACE ".cpp\$" "" check_OUT "${source}") string(REGEX REPLACE ".cpp\$" "" check_OUT "${source}")

View File

@ -51,95 +51,96 @@ set(base_test_SOURCES
) )
if(ICINGA2_UNITY_BUILD) if(ICINGA2_UNITY_BUILD)
mkunity_target(base test base_test_SOURCES) mkunity_target(base test base_test_SOURCES)
endif() endif()
add_boost_test(base add_boost_test(base
SOURCES test-runner.cpp ${base_test_SOURCES} SOURCES test-runner.cpp ${base_test_SOURCES}
LIBRARIES ${base_DEPS} LIBRARIES ${base_DEPS}
TESTS base_array/construct TESTS
base_array/getset base_array/construct
base_array/resize base_array/getset
base_array/insert base_array/resize
base_array/remove base_array/insert
base_array/foreach base_array/remove
base_array/clone base_array/foreach
base_array/json base_array/clone
base_base64/base64 base_array/json
base_convert/tolong base_base64/base64
base_convert/todouble base_convert/tolong
base_convert/tostring base_convert/todouble
base_convert/tobool base_convert/tostring
base_dictionary/construct base_convert/tobool
base_dictionary/get1 base_dictionary/construct
base_dictionary/get2 base_dictionary/get1
base_dictionary/foreach base_dictionary/get2
base_dictionary/remove base_dictionary/foreach
base_dictionary/clone base_dictionary/remove
base_dictionary/json base_dictionary/clone
base_fifo/construct base_dictionary/json
base_fifo/io base_fifo/construct
base_json/invalid1 base_fifo/io
base_match/tolong base_json/invalid1
base_netstring/netstring base_match/tolong
base_object/construct base_netstring/netstring
base_object/getself base_object/construct
base_serialize/scalar base_object/getself
base_serialize/array base_serialize/scalar
base_serialize/dictionary base_serialize/array
base_serialize/object base_serialize/dictionary
base_shellescape/escape_basic base_serialize/object
base_shellescape/escape_quoted base_shellescape/escape_basic
base_stacktrace/stacktrace base_shellescape/escape_quoted
base_stream/readline_stdio base_stacktrace/stacktrace
base_string/construct base_stream/readline_stdio
base_string/equal base_string/construct
base_string/clear base_string/equal
base_string/append base_string/clear
base_string/trim base_string/append
base_string/contains base_string/trim
base_string/replace base_string/contains
base_string/index base_string/replace
base_string/find base_string/index
base_timer/construct base_string/find
base_timer/interval base_timer/construct
base_timer/invoke base_timer/interval
base_timer/scope base_timer/invoke
base_type/gettype base_timer/scope
base_type/assign base_type/gettype
base_type/byname base_type/assign
base_type/instantiate base_type/byname
base_value/scalar base_type/instantiate
base_value/convert base_value/scalar
base_value/format base_value/convert
config_ops/simple base_value/format
config_ops/advanced config_ops/simple
icinga_checkresult/host_1attempt config_ops/advanced
icinga_checkresult/host_2attempts icinga_checkresult/host_1attempt
icinga_checkresult/host_3attempts icinga_checkresult/host_2attempts
icinga_checkresult/service_1attempt icinga_checkresult/host_3attempts
icinga_checkresult/service_2attempts icinga_checkresult/service_1attempt
icinga_checkresult/service_3attempts icinga_checkresult/service_2attempts
icinga_checkresult/host_flapping_notification icinga_checkresult/service_3attempts
icinga_checkresult/service_flapping_notification icinga_checkresult/host_flapping_notification
icinga_notification/state_filter icinga_checkresult/service_flapping_notification
icinga_notification/type_filter icinga_notification/state_filter
icinga_macros/simple icinga_notification/type_filter
icinga_legacytimeperiod/simple icinga_macros/simple
icinga_perfdata/empty icinga_legacytimeperiod/simple
icinga_perfdata/simple icinga_perfdata/empty
icinga_perfdata/quotes icinga_perfdata/simple
icinga_perfdata/multiple icinga_perfdata/quotes
icinga_perfdata/uom icinga_perfdata/multiple
icinga_perfdata/warncritminmax icinga_perfdata/uom
icinga_perfdata/ignore_invalid_warn_crit_min_max icinga_perfdata/warncritminmax
icinga_perfdata/invalid icinga_perfdata/ignore_invalid_warn_crit_min_max
icinga_perfdata/multi icinga_perfdata/invalid
remote_url/id_and_path icinga_perfdata/multi
remote_url/parameters remote_url/id_and_path
remote_url/get_and_set remote_url/parameters
remote_url/format remote_url/get_and_set
remote_url/illegal_legal_strings remote_url/format
remote_url/illegal_legal_strings
) )
if(ICINGA2_WITH_LIVESTATUS) if(ICINGA2_WITH_LIVESTATUS)

View File

@ -48,11 +48,11 @@ set_target_properties (
) )
macro(MKCLASS_TARGET ClassInput ClassImplOutput ClassHeaderOutput) macro(MKCLASS_TARGET ClassInput ClassImplOutput ClassHeaderOutput)
add_custom_command( add_custom_command(
OUTPUT ${ClassImplOutput} ${ClassHeaderOutput} OUTPUT ${ClassImplOutput} ${ClassHeaderOutput}
COMMAND mkclass COMMAND mkclass
ARGS ${ClassInput} ${CMAKE_CURRENT_BINARY_DIR}/${ClassImplOutput} ${CMAKE_CURRENT_BINARY_DIR}/${ClassHeaderOutput} ARGS ${ClassInput} ${CMAKE_CURRENT_BINARY_DIR}/${ClassImplOutput} ${CMAKE_CURRENT_BINARY_DIR}/${ClassHeaderOutput}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
DEPENDS mkclass ${ClassInput} DEPENDS mkclass ${ClassInput}
) )
endmacro() endmacro()

View File

@ -27,13 +27,13 @@ set_target_properties (
) )
macro(MKEMBEDCONFIG_TARGET EmbedInput EmbedOutput) macro(MKEMBEDCONFIG_TARGET EmbedInput EmbedOutput)
add_custom_command( add_custom_command(
OUTPUT ${EmbedOutput} OUTPUT ${EmbedOutput}
COMMAND mkembedconfig COMMAND mkembedconfig
ARGS ${EmbedInput} ${CMAKE_CURRENT_BINARY_DIR}/${EmbedOutput} ARGS ${EmbedInput} ${CMAKE_CURRENT_BINARY_DIR}/${EmbedOutput}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
DEPENDS mkembedconfig ${EmbedInput} DEPENDS mkembedconfig ${EmbedInput}
) )
set_property(SOURCE ${CMAKE_CURRENT_BINARY_DIR}/${EmbedOutput} PROPERTY EXCLUDE_UNITY_BUILD TRUE) set_property(SOURCE ${CMAKE_CURRENT_BINARY_DIR}/${EmbedOutput} PROPERTY EXCLUDE_UNITY_BUILD TRUE)
endmacro() endmacro()

View File

@ -23,40 +23,40 @@ define_property(
) )
if(ICINGA2_UNITY_BUILD) if(ICINGA2_UNITY_BUILD)
set(mkunity_SOURCES set(mkunity_SOURCES
mkunity.c mkunity.c
)
add_executable(mkunity ${mkunity_SOURCES})
set_target_properties (
mkunity PROPERTIES
FOLDER Bin
)
function(MKUNITY_TARGET Target Prefix UnityInputRef)
set(UnityInput ${${UnityInputRef}})
set(UnityOutput ${CMAKE_CURRENT_BINARY_DIR}/${Target}_unity.cpp)
set(RealSources "")
set(UnitySources "")
foreach(UnitySource ${UnityInput})
get_property(SourceExcluded SOURCE ${UnitySource} PROPERTY EXCLUDE_UNITY_BUILD)
if(SourceExcluded MATCHES TRUE OR NOT ${UnitySource} MATCHES "\\.(cpp|cxx|cc)\$")
list(APPEND RealSources ${UnitySource})
else()
list(APPEND UnitySources ${UnitySource})
endif()
endforeach()
add_custom_command(
OUTPUT ${UnityOutput}
COMMAND mkunity
ARGS ${Prefix} ${UnitySources} > ${UnityOutput}.tmp
COMMAND ${CMAKE_COMMAND}
ARGS -E copy ${UnityOutput}.tmp ${UnityOutput}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
DEPENDS mkunity ${UnitySources}
) )
list(APPEND RealSources ${UnityOutput})
add_executable(mkunity ${mkunity_SOURCES}) set(${UnityInputRef} ${RealSources} PARENT_SCOPE)
endfunction()
set_target_properties (
mkunity PROPERTIES
FOLDER Bin
)
function(MKUNITY_TARGET Target Prefix UnityInputRef)
set(UnityInput ${${UnityInputRef}})
set(UnityOutput ${CMAKE_CURRENT_BINARY_DIR}/${Target}_unity.cpp)
set(RealSources "")
set(UnitySources "")
foreach(UnitySource ${UnityInput})
get_property(SourceExcluded SOURCE ${UnitySource} PROPERTY EXCLUDE_UNITY_BUILD)
if(SourceExcluded MATCHES TRUE OR NOT ${UnitySource} MATCHES "\\.(cpp|cxx|cc)\$")
list(APPEND RealSources ${UnitySource})
else()
list(APPEND UnitySources ${UnitySource})
endif()
endforeach()
add_custom_command(
OUTPUT ${UnityOutput}
COMMAND mkunity
ARGS ${Prefix} ${UnitySources} > ${UnityOutput}.tmp
COMMAND ${CMAKE_COMMAND}
ARGS -E copy ${UnityOutput}.tmp ${UnityOutput}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
DEPENDS mkunity ${UnitySources}
)
list(APPEND RealSources ${UnityOutput})
set(${UnityInputRef} ${RealSources} PARENT_SCOPE)
endfunction()
endif() endif()