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:
Vendored
+7
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user