feat: add Unity color and check target

Enable UNITY_OUTPUT_COLOR and UNITY_INCLUDE_PRINT_FORMATTED via
compile definitions on the unity target so colors propagate to all
test suites automatically.

Add a 'check' custom target that builds all suites and runs CTest
with --output-on-failure and USES_TERMINAL, keeping ANSI colors
alive through Ninja's buffering.
This commit is contained in:
2026-05-09 21:32:58 +02:00
parent 701c644408
commit cd19cc14c0
4 changed files with 32 additions and 9 deletions
+7
View File
@@ -55,4 +55,11 @@ if (Unity_INCLUDE_DIR AND TARGET unity)
)
endif()
if (TARGET unity)
target_compile_definitions(unity PUBLIC
UNITY_OUTPUT_COLOR
UNITY_INCLUDE_PRINT_FORMATTED
)
endif()
set(UNITY_LICENSE_FILE "${unity_SOURCE_DIR}/LICENSE.txt" CACHE FILEPATH "Path to Unity license file")