Swift: Honor CMAKE_COLOR_DIAGNOSTICS for command-line build systems

Add the missing flags to enable and disable color diagnostics for Swift.

Fixes: #25815
This commit is contained in:
Evan Wilde
2024-03-22 12:12:01 -07:00
committed by Brad King
parent 9ac78c777f
commit ff7a09d719

View File

@@ -57,6 +57,8 @@ set(CMAKE_Swift_LINK_LIBRARY_FLAG "-l")
set(CMAKE_Swift_LINKER_WRAPPER_FLAG "-Xlinker" " ")
set(CMAKE_Swift_RESPONSE_FILE_LINK_FLAG @)
set(CMAKE_Swift_RESPONSE_FILE_FLAG @)
set(CMAKE_Swift_COMPILE_OPTIONS_COLOR_DIAGNOSTICS -color-diagnostics)
set(CMAKE_Swift_COMPILE_OPTIONS_COLOR_DIAGNOSTICS_OFF -no-color-diagnostics)
set(CMAKE_Swift_LINKER_PREFERENCE 50)
set(CMAKE_Swift_LINKER_PREFERENCE_PROPAGATES 1)