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

This commit is contained in:
Chuck Walbourn 2023-05-18 21:44:24 -07:00 committed by GitHub
parent 5ca9aab6fe
commit 052a81b8eb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 19 additions and 10 deletions

View File

@ -291,6 +291,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)))
@ -355,12 +362,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)

View File

@ -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:
@ -140,11 +142,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:

View File

@ -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:
@ -140,11 +142,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: