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 authored and Brad King committed 2024-03-25 15:06:13 -04:00
1 parent 9ac78c777f
commit ff7a09d719
1 file changed
+2
+2
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)