Build: GNUARM: add color diagnostics while using ninja generator
Add compile option '-fdiagnostics-color=always' as a workaround to a
bug in GCC for ninja build where the compiler output doesn't add color.
For reference: https://github.com/ninja-build/ninja/issues/174
Signed-off-by: Arnold Gabriel Benedict <arnoldgabriel.benedict@arm.com>
Change-Id: I36da3d659216e92c6e40ff4923f4548306fe712d
diff --git a/toolchain_GNUARM.cmake b/toolchain_GNUARM.cmake
index 689f959..3ecb795 100644
--- a/toolchain_GNUARM.cmake
+++ b/toolchain_GNUARM.cmake
@@ -134,6 +134,14 @@
message(FATAL_ERROR "BRANCH_PROTECTION NOT supported for GNU-ARM")
endif()
+# Workaround to add diagnostics color while using Ninja generator.
+# For reference: https://github.com/ninja-build/ninja/issues/174
+if (CMAKE_GENERATOR STREQUAL "Ninja")
+ add_compile_options(
+ -fdiagnostics-color=always
+ )
+endif()
+
add_link_options(
--entry=Reset_Handler
-specs=nano.specs