1
0
mirror of https://github.com/anope/anope.git synced 2026-07-07 07:13:12 +02:00

Disable unity builds for targets with only one source file.

This commit is contained in:
Sadie Powell
2026-06-29 17:17:30 +01:00
parent 5819c1fcf3
commit e3bff85339
2 changed files with 7 additions and 0 deletions
+6
View File
@@ -77,6 +77,12 @@ macro(build_module SRC MODULE_SRC)
PREFIX ""
SUFFIX ""
)
list(LENGTH MODULE_SRC MODULE_SRC_COUNT)
if(MODULE_SRC_COUNT LESS_EQUAL 1)
set_target_properties(${SO} PROPERTIES
UNITY_BUILD OFF
)
endif()
add_dependencies(${SO} ${PROGRAM_NAME})
if(HAVE_LOCALIZATION)
add_dependencies(${SO} module_language)
+1
View File
@@ -14,6 +14,7 @@ foreach(LIBRARY IN LISTS LIBRARIES)
set_target_properties(${LIBRARY_TARGET} PROPERTIES
FOLDER "VendoredLibraries"
PREFIX ""
UNITY_BUILD OFF
)
endif()
endif()