diff --git a/CMakeLists.txt b/CMakeLists.txt index f102511..76836ba 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/build/DirectXMesh-GitHub-GDK-Dev17.yml b/build/DirectXMesh-GitHub-GDK-Dev17.yml index 4dab47e..b9a2582 100644 --- a/build/DirectXMesh-GitHub-GDK-Dev17.yml +++ b/build/DirectXMesh-GitHub-GDK-Dev17.yml @@ -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: diff --git a/build/DirectXMesh-GitHub-GDK.yml b/build/DirectXMesh-GitHub-GDK.yml index 345fc25..8a3daa3 100644 --- a/build/DirectXMesh-GitHub-GDK.yml +++ b/build/DirectXMesh-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: diff --git a/build/DirectXMesh-GitHub-SDK-prerelease.yml b/build/DirectXMesh-GitHub-SDK-prerelease.yml index a84f9c8..422a73f 100644 --- a/build/DirectXMesh-GitHub-SDK-prerelease.yml +++ b/build/DirectXMesh-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-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: diff --git a/build/DirectXMesh-GitHub-SDK-release.yml b/build/DirectXMesh-GitHub-SDK-release.yml index 9f9543d..ecd1038 100644 --- a/build/DirectXMesh-GitHub-SDK-release.yml +++ b/build/DirectXMesh-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-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: