We've seen some lingering odd issues with autocrlf. I think this will
resolve them all because our gitattrbutes sets text=auto which is only
overridden if autocrlf=input.

We'll know if this works based on whether or not the AppVeyor build
works.
This commit is contained in:
Chris B 2021-11-08 21:24:21 -06:00 коммит произвёл GitHub
Родитель 0c53d74705
Коммит 9e6453cefd
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 7 добавлений и 3 удалений

Просмотреть файл

@ -11,9 +11,13 @@ if (WIN32 AND NOT DEFINED HLSL_AUTOCRLF)
OUTPUT_VARIABLE output OUTPUT_VARIABLE output
OUTPUT_STRIP_TRAILING_WHITESPACE) OUTPUT_STRIP_TRAILING_WHITESPACE)
if( result EQUAL 0 ) if( result EQUAL 0 )
set(val Off) # This is a little counterintuitive... Because the repo's gitattributes set
if (output STREQUAL "true") # text=auto, autocrlf behavior will be enabled for autocrlf true or false.
set(val On) # For reasons unknown to me, autocrlf=input overrides the gitattributes, so
# that is the case we need special handling for.
set(val On)
if (output STREQUAL "input")
set(val Off)
endif() endif()
set(HLSL_AUTOCRLF ${val} CACHE BOOL "Is core.autocrlf enabled in this clone") set(HLSL_AUTOCRLF ${val} CACHE BOOL "Is core.autocrlf enabled in this clone")
message(STATUS "Git checkout autocrlf: ${HLSL_AUTOCRLF}") message(STATUS "Git checkout autocrlf: ${HLSL_AUTOCRLF}")