diff --git a/CMakeLists.txt b/CMakeLists.txt index bb43ab5..8dfb858 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -384,6 +384,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))) @@ -448,12 +455,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) diff --git a/build/DirectXTK-GitHub-GDK-Dev17.yml b/build/DirectXTK-GitHub-GDK-Dev17.yml index 2f03643..d042047 100644 --- a/build/DirectXTK-GitHub-GDK-Dev17.yml +++ b/build/DirectXTK-GitHub-GDK-Dev17.yml @@ -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 -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: diff --git a/build/DirectXTK-GitHub-GDK.yml b/build/DirectXTK-GitHub-GDK.yml index 47341c0..c68a894 100644 --- a/build/DirectXTK-GitHub-GDK.yml +++ b/build/DirectXTK-GitHub-GDK.yml @@ -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: @@ -132,11 +134,13 @@ jobs: failOnStderr: true - 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 -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: diff --git a/build/DirectXTK-GitHub-SDK-prerelease.yml b/build/DirectXTK-GitHub-SDK-prerelease.yml index ce706dd..3a0d89d 100644 --- a/build/DirectXTK-GitHub-SDK-prerelease.yml +++ b/build/DirectXTK-GitHub-SDK-prerelease.yml @@ -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-DirectXTK -Source $(URL_FEED) -ConfigFile NuGet.config + arguments: sources add -Name xboxgdk-DirectXTK -Source $(URL_FEED) -ConfigFile $(Build.SourcesDirectory)\NuGet.config - task: PowerShell@2 displayName: 'Set nuget.config to single source' inputs: @@ -210,11 +212,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-DirectXTK -Source $(URL_FEED) -ConfigFile NuGet.config + arguments: sources add -Name xboxgdk-DirectXTK -Source $(URL_FEED) -ConfigFile $(Build.SourcesDirectory)\NuGet.config - task: PowerShell@2 displayName: 'Set nuget.config to single source' inputs: @@ -279,11 +283,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-DirectXTK -Source $(URL_FEED) -ConfigFile NuGet.config + arguments: sources add -Name xboxgdk-DirectXTK -Source $(URL_FEED) -ConfigFile $(Build.SourcesDirectory)\NuGet.config - task: PowerShell@2 displayName: 'Set nuget.config to single source' inputs: diff --git a/build/DirectXTK-GitHub-SDK-release.yml b/build/DirectXTK-GitHub-SDK-release.yml index 094f19f..f93fc5a 100644 --- a/build/DirectXTK-GitHub-SDK-release.yml +++ b/build/DirectXTK-GitHub-SDK-release.yml @@ -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-DirectXTK -Source $(URL_FEED) -ConfigFile NuGet.config + arguments: sources add -Name xboxgdk-DirectXTK -Source $(URL_FEED) -ConfigFile $(Build.SourcesDirectory)\NuGet.config - task: PowerShell@2 displayName: 'Set nuget.config to single source' inputs: @@ -210,11 +212,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-DirectXTK -Source $(URL_FEED) -ConfigFile NuGet.config + arguments: sources add -Name xboxgdk-DirectXTK -Source $(URL_FEED) -ConfigFile $(Build.SourcesDirectory)\NuGet.config - task: PowerShell@2 displayName: 'Set nuget.config to single source' inputs: @@ -279,11 +283,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-DirectXTK -Source $(URL_FEED) -ConfigFile NuGet.config + arguments: sources add -Name xboxgdk-DirectXTK -Source $(URL_FEED) -ConfigFile $(Build.SourcesDirectory)\NuGet.config - task: PowerShell@2 displayName: 'Set nuget.config to single source' inputs: