CMake update to use /ZH:SHA_256 for clang v16 or later (#100)

This commit is contained in:
Chuck Walbourn 2023-05-18 20:08:23 -07:00 коммит произвёл GitHub
Родитель 1c0342d348
Коммит 5647700332
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
5 изменённых файлов: 25 добавлений и 12 удалений

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

@ -245,6 +245,13 @@ if(MSVC)
endforeach()
endif()
if((MSVC_VERSION GREATER_EQUAL 1924)
AND ((NOT (CMAKE_CXX_COMPILER_ID MATCHES "Clang")) OR (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 16.0)))
foreach(t IN LISTS TOOL_EXES ITEMS ${PROJECT_NAME})
target_compile_options(${t} PRIVATE /ZH:SHA_256)
endforeach()
endif()
if((MSVC_VERSION GREATER_EQUAL 1928)
AND (CMAKE_SIZEOF_VOID_P EQUAL 8)
AND ((NOT (CMAKE_CXX_COMPILER_ID MATCHES "Clang")) OR (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 13.0)))
@ -309,12 +316,6 @@ elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
endforeach()
endif()
if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 19.24)
foreach(t IN LISTS TOOL_EXES ITEMS ${PROJECT_NAME})
target_compile_options(${t} PRIVATE /ZH:SHA_256)
endforeach()
endif()
if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 19.26)
foreach(t IN LISTS TOOL_EXES ITEMS ${PROJECT_NAME})
target_compile_options(${t} PRIVATE /Zc:preprocessor /wd5105)

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

@ -44,12 +44,14 @@ jobs:
fetchTags: false
- task: NuGetToolInstaller@1
displayName: 'Use NuGet'
inputs:
versionSpec: '6.5.x'
- task: NuGetCommand@2
# We have to use a nuget.config to provide the feed for the 'nuget install' option.
displayName: 'NuGet set package source to ADO feed'
inputs:
command: custom
arguments: sources add -Name xboxgdk -Source $(URL_FEED) -ConfigFile NuGet.config
arguments: sources add -Name xboxgdk -Source $(URL_FEED) -ConfigFile $(Build.SourcesDirectory)\NuGet.config
- task: PowerShell@2
displayName: 'Set nuget.config to single source'
inputs:

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

@ -65,12 +65,14 @@ jobs:
fetchTags: false
- task: NuGetToolInstaller@1
displayName: 'Use NuGet'
inputs:
versionSpec: '6.5.x'
- task: NuGetCommand@2
# We have to use a nuget.config to provide the feed for the 'nuget install' option.
displayName: 'NuGet set package source to ADO feed'
inputs:
command: custom
arguments: sources add -Name xboxgdk -Source $(URL_FEED) -ConfigFile NuGet.config
arguments: sources add -Name xboxgdk -Source $(URL_FEED) -ConfigFile $(Build.SourcesDirectory)\NuGet.config
- task: PowerShell@2
displayName: 'Set nuget.config to single source'
inputs:

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

@ -43,12 +43,14 @@ jobs:
fetchTags: false
- task: NuGetToolInstaller@1
displayName: 'Use NuGet'
inputs:
versionSpec: '6.5.x'
- task: NuGetCommand@2
# We have to use a nuget.config to provide the feed for the 'nuget install' option.
displayName: 'NuGet set package source to ADO feed'
inputs:
command: custom
arguments: sources add -Name xboxgdk-DirectXMesh -Source $(URL_FEED) -ConfigFile NuGet.config
arguments: sources add -Name xboxgdk-DirectXMesh -Source $(URL_FEED) -ConfigFile $(Build.SourcesDirectory)\NuGet.config
- task: PowerShell@2
displayName: 'Set nuget.config to single source'
inputs:
@ -162,11 +164,13 @@ jobs:
fetchTags: false
- task: NuGetToolInstaller@1
displayName: 'Use NuGet'
inputs:
versionSpec: '6.5.x'
- task: NuGetCommand@2
displayName: NuGet set package source to ADO feed
inputs:
command: custom
arguments: sources add -Name xboxgdk-DirectXMesh -Source $(URL_FEED) -ConfigFile NuGet.config
arguments: sources add -Name xboxgdk-DirectXMesh -Source $(URL_FEED) -ConfigFile $(Build.SourcesDirectory)\NuGet.config
- task: PowerShell@2
displayName: 'Set nuget.config to single source'
inputs:

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

@ -43,12 +43,14 @@ jobs:
fetchTags: false
- task: NuGetToolInstaller@1
displayName: 'Use NuGet'
inputs:
versionSpec: '6.5.x'
- task: NuGetCommand@2
# We have to use a nuget.config to provide the feed for the 'nuget install' option.
displayName: 'NuGet set package source to ADO feed'
inputs:
command: custom
arguments: sources add -Name xboxgdk-DirectXMesh -Source $(URL_FEED) -ConfigFile NuGet.config
arguments: sources add -Name xboxgdk-DirectXMesh -Source $(URL_FEED) -ConfigFile $(Build.SourcesDirectory)\NuGet.config
- task: PowerShell@2
displayName: 'Set nuget.config to single source'
inputs:
@ -162,11 +164,13 @@ jobs:
fetchTags: false
- task: NuGetToolInstaller@1
displayName: 'Use NuGet'
inputs:
versionSpec: '6.5.x'
- task: NuGetCommand@2
displayName: NuGet set package source to ADO feed
inputs:
command: custom
arguments: sources add -Name xboxgdk-DirectXMesh -Source $(URL_FEED) -ConfigFile NuGet.config
arguments: sources add -Name xboxgdk-DirectXMesh -Source $(URL_FEED) -ConfigFile $(Build.SourcesDirectory)\NuGet.config
- task: PowerShell@2
displayName: 'Set nuget.config to single source'
inputs: