mirror of
https://github.com/microsoft/DirectXMath
synced 2024-11-08 05:30:07 +00:00
CMake updated to build ARM64EC (#195)
This commit is contained in:
parent
8bda2a091b
commit
6433b53910
@ -47,6 +47,15 @@
|
||||
"cacheVariables": { "DXMATH_ARCHITECTURE": "arm64" },
|
||||
"hidden": true
|
||||
},
|
||||
{
|
||||
"name": "ARM64EC",
|
||||
"architecture": {
|
||||
"value": "arm64ec",
|
||||
"strategy": "external"
|
||||
},
|
||||
"cacheVariables": { "DXMATH_ARCHITECTURE": "arm64ec" },
|
||||
"hidden": true
|
||||
},
|
||||
|
||||
{
|
||||
"name": "Debug",
|
||||
@ -149,6 +158,8 @@
|
||||
{ "name": "arm-Release" , "description": "MSVC for ARM (Release) - ARM-NEON", "inherits": [ "base", "ARM", "Release", "MSVC" ] },
|
||||
{ "name": "arm64-Debug" , "description": "MSVC for ARM64 (Debug) - ARM-NEON", "inherits": [ "base", "ARM64", "Debug", "MSVC" ] },
|
||||
{ "name": "arm64-Release", "description": "MSVC for ARM64 (Release) - ARM-NEON", "inherits": [ "base", "ARM64", "Release", "MSVC" ] },
|
||||
{ "name": "arm64ec-Debug" , "description": "MSVC for ARM64EC (Debug) - ARM-NEON", "inherits": [ "base", "ARM64EC", "Debug", "MSVC" ], "environment": { "CXXFLAGS": "/arm64EC" } },
|
||||
{ "name": "arm64ec-Release", "description": "MSVC for ARM64EC (Release) - ARM-NEON", "inherits": [ "base", "ARM64EC", "Release", "MSVC" ], "environment": { "CXXFLAGS": "/arm64EC" } },
|
||||
|
||||
{ "name": "x64-Debug-Clang" , "description": "Clang/LLVM for x64 (Debug) - SSE/SSE2", "inherits": [ "base", "x64", "Debug", "Clang" ] },
|
||||
{ "name": "x64-Release-Clang" , "description": "Clang/LLVM for x64 (Release) - SSE/SSE2", "inherits": [ "base", "x64", "Release", "Clang" ] },
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#if defined(_M_ARM) || defined(_M_ARM64) || defined(_M_HYBRID_X86_ARM64) || __arm__ || __aarch64__
|
||||
#if defined(_M_ARM) || defined(_M_ARM64) || defined(_M_HYBRID_X86_ARM64) || defined(_M_ARM64EC) || __arm__ || __aarch64__
|
||||
#error AVX not supported on ARM platform
|
||||
#endif
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#if defined(_M_ARM) || defined(_M_ARM64) || defined(_M_HYBRID_X86_ARM64) || __arm__ || __aarch64__
|
||||
#if defined(_M_ARM) || defined(_M_ARM64) || defined(_M_HYBRID_X86_ARM64) || defined(_M_ARM64EC) || __arm__ || __aarch64__
|
||||
#error AVX2 not supported on ARM platform
|
||||
#endif
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#if (defined(_M_IX86) || defined(_M_X64) || __i386__ || __x86_64__) && !defined(_M_HYBRID_X86_ARM64)
|
||||
#if (defined(_M_IX86) || defined(_M_X64) || __i386__ || __x86_64__) && !defined(_M_HYBRID_X86_ARM64) && !defined(_M_ARM64EC)
|
||||
#include <tmmintrin.h>
|
||||
#endif
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#if defined(_M_ARM) || defined(_M_ARM64) || defined(_M_HYBRID_X86_ARM64) || __arm__ || __aarch64__
|
||||
#if defined(_M_ARM) || defined(_M_ARM64) || defined(_M_HYBRID_X86_ARM64) || defined(_M_ARM64EC) || __arm__ || __aarch64__
|
||||
#error F16C not supported on ARM platform
|
||||
#endif
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#if defined(_M_ARM) || defined(_M_ARM64) || defined(_M_HYBRID_X86_ARM64) || __arm__ || __aarch64__
|
||||
#if defined(_M_ARM) || defined(_M_ARM64) || defined(_M_HYBRID_X86_ARM64) || defined(_M_ARM64EC) || __arm__ || __aarch64__
|
||||
#error FMA3 not supported on ARM platform
|
||||
#endif
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#if defined(_M_ARM) || defined(_M_ARM64) || defined(_M_HYBRID_X86_ARM64) || __arm__ || __aarch64__
|
||||
#if defined(_M_ARM) || defined(_M_ARM64) || defined(_M_HYBRID_X86_ARM64) || defined(_M_ARM64EC) || __arm__ || __aarch64__
|
||||
#error FMA4 not supported on ARM platform
|
||||
#endif
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#if defined(_M_ARM) || defined(_M_ARM64) || defined(_M_HYBRID_X86_ARM64) || __arm__ || __aarch64__
|
||||
#if defined(_M_ARM) || defined(_M_ARM64) || defined(_M_HYBRID_X86_ARM64) || defined(_M_ARM64EC) || __arm__ || __aarch64__
|
||||
#error SSE3 not supported on ARM platform
|
||||
#endif
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#if defined(_M_ARM) || defined(_M_ARM64) || defined(_M_HYBRID_X86_ARM64) || __arm__ || __aarch64__
|
||||
#if defined(_M_ARM) || defined(_M_ARM64) || defined(_M_HYBRID_X86_ARM64) || defined(_M_ARM64EC) || __arm__ || __aarch64__
|
||||
#error SSE4 not supported on ARM platform
|
||||
#endif
|
||||
|
||||
|
@ -52,6 +52,7 @@ pool:
|
||||
|
||||
variables:
|
||||
Codeql.Enabled: false
|
||||
VC_PATH: 'C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC'
|
||||
GITHUB_PAT: $(GITHUBPUBLICTOKEN)
|
||||
|
||||
jobs:
|
||||
@ -345,3 +346,179 @@ jobs:
|
||||
platform: x64
|
||||
configuration: Release
|
||||
msbuildArchitecture: x64
|
||||
|
||||
- job: CMAKE_BUILD_X64
|
||||
displayName: 'CMake for X64 BUILD_TESTING=ON'
|
||||
timeoutInMinutes: 60
|
||||
workspace:
|
||||
clean: all
|
||||
steps:
|
||||
- checkout: self
|
||||
clean: true
|
||||
fetchTags: false
|
||||
- task: DeleteFiles@1
|
||||
displayName: Delete files from Tests
|
||||
inputs:
|
||||
SourceFolder: Tests
|
||||
Contents: '**'
|
||||
RemoveSourceFolder: true
|
||||
RemoveDotFiles: true
|
||||
- task: CmdLine@2
|
||||
displayName: Fetch Tests
|
||||
inputs:
|
||||
script: git clone --quiet --no-tags https://%GITHUB_PAT%@github.com/walbourn/directxmathtest.git Tests
|
||||
workingDirectory: $(Build.SourcesDirectory)
|
||||
failOnStderr: true
|
||||
- task: CmdLine@2
|
||||
displayName: Setup environment for CMake to use VS
|
||||
inputs:
|
||||
script: |
|
||||
call "$(VC_PATH)\Auxiliary\Build\vcvars64.bat"
|
||||
echo ##vso[task.setvariable variable=WindowsSdkVerBinPath;]%WindowsSdkVerBinPath%
|
||||
echo ##vso[task.prependpath]%VSINSTALLDIR%Common7\IDE\CommonExtensions\Microsoft\CMake\Ninja
|
||||
echo ##vso[task.prependpath]%VCINSTALLDIR%Tools\Llvm\x64\bin
|
||||
echo ##vso[task.prependpath]%WindowsSdkBinPath%x64
|
||||
echo ##vso[task.prependpath]%WindowsSdkVerBinPath%x64
|
||||
echo ##vso[task.prependpath]%VCToolsInstallDir%bin\Hostx64\x64
|
||||
echo ##vso[task.setvariable variable=EXTERNAL_INCLUDE;]%EXTERNAL_INCLUDE%
|
||||
echo ##vso[task.setvariable variable=INCLUDE;]%INCLUDE%
|
||||
echo ##vso[task.setvariable variable=LIB;]%LIB%
|
||||
|
||||
- task: CMake@1
|
||||
displayName: CMake (MSVC; x64-Debug) Config
|
||||
inputs:
|
||||
cwd: '$(Build.SourcesDirectory)'
|
||||
cmakeArgs: --preset=x64-Debug
|
||||
- task: CMake@1
|
||||
displayName: CMake (MSVC; x64-Debug) Build
|
||||
inputs:
|
||||
cwd: '$(Build.SourcesDirectory)'
|
||||
cmakeArgs: --build out/build/x64-Debug -v
|
||||
- task: CMake@1
|
||||
displayName: CMake (MSVC; x64-Release) Config
|
||||
inputs:
|
||||
cwd: '$(Build.SourcesDirectory)'
|
||||
cmakeArgs: --preset=x64-Release
|
||||
- task: CMake@1
|
||||
displayName: CMake (MSVC; x64-Release) Build
|
||||
inputs:
|
||||
cwd: '$(Build.SourcesDirectory)'
|
||||
cmakeArgs: --build out/build/x64-Release -v
|
||||
- task: CMake@1
|
||||
displayName: CMake (clang/LLVM; x64-Debug) Config
|
||||
inputs:
|
||||
cwd: '$(Build.SourcesDirectory)'
|
||||
cmakeArgs: --preset=x64-Debug-Clang
|
||||
- task: CMake@1
|
||||
displayName: CMake (clang/LLVM; x64-Debug) Build
|
||||
inputs:
|
||||
cwd: '$(Build.SourcesDirectory)'
|
||||
cmakeArgs: --build out/build/x64-Debug-Clang -v
|
||||
- task: CMake@1
|
||||
displayName: CMake (clang/LLVM; x64-Release) Config
|
||||
inputs:
|
||||
cwd: '$(Build.SourcesDirectory)'
|
||||
cmakeArgs: --preset=x64-Release-Clang
|
||||
- task: CMake@1
|
||||
displayName: CMake (clang/LLVM; x64-Release) Build
|
||||
inputs:
|
||||
cwd: '$(Build.SourcesDirectory)'
|
||||
cmakeArgs: --build out/build/x64-Release-Clang -v
|
||||
|
||||
- job: CMAKE_BUILD_ARM64
|
||||
displayName: 'CMake for ARM64 BUILD_TESTING=ON'
|
||||
timeoutInMinutes: 60
|
||||
workspace:
|
||||
clean: all
|
||||
steps:
|
||||
- checkout: self
|
||||
clean: true
|
||||
fetchTags: false
|
||||
- task: DeleteFiles@1
|
||||
displayName: Delete files from Tests
|
||||
inputs:
|
||||
SourceFolder: Tests
|
||||
Contents: '**'
|
||||
RemoveSourceFolder: true
|
||||
RemoveDotFiles: true
|
||||
- task: CmdLine@2
|
||||
displayName: Fetch Tests
|
||||
inputs:
|
||||
script: git clone --quiet --no-tags https://%GITHUB_PAT%@github.com/walbourn/directxmathtest.git Tests
|
||||
workingDirectory: $(Build.SourcesDirectory)
|
||||
failOnStderr: true
|
||||
- task: CmdLine@2
|
||||
displayName: Setup environment for CMake to use VS
|
||||
inputs:
|
||||
script: |
|
||||
call "$(VC_PATH)\Auxiliary\Build\vcvarsamd64_arm64.bat"
|
||||
echo ##vso[task.setvariable variable=WindowsSdkVerBinPath;]%WindowsSdkVerBinPath%
|
||||
echo ##vso[task.prependpath]%VSINSTALLDIR%Common7\IDE\CommonExtensions\Microsoft\CMake\Ninja
|
||||
echo ##vso[task.prependpath]%VCINSTALLDIR%Tools\Llvm\x64\bin
|
||||
echo ##vso[task.prependpath]%WindowsSdkBinPath%x64
|
||||
echo ##vso[task.prependpath]%WindowsSdkVerBinPath%x64
|
||||
echo ##vso[task.prependpath]%VCToolsInstallDir%bin\Hostx64\arm64
|
||||
echo ##vso[task.setvariable variable=EXTERNAL_INCLUDE;]%EXTERNAL_INCLUDE%
|
||||
echo ##vso[task.setvariable variable=INCLUDE;]%INCLUDE%
|
||||
echo ##vso[task.setvariable variable=LIB;]%LIB%
|
||||
|
||||
- task: CMake@1
|
||||
displayName: CMake (MSVC; arm64-Debug) Config
|
||||
inputs:
|
||||
cwd: '$(Build.SourcesDirectory)'
|
||||
cmakeArgs: --preset=arm64-Debug
|
||||
- task: CMake@1
|
||||
displayName: CMake (MSVC; arm64-Debug) Build
|
||||
inputs:
|
||||
cwd: '$(Build.SourcesDirectory)'
|
||||
cmakeArgs: --build out/build/arm64-Debug -v
|
||||
- task: CMake@1
|
||||
displayName: CMake (MSVC; arm64-Release) Config
|
||||
inputs:
|
||||
cwd: '$(Build.SourcesDirectory)'
|
||||
cmakeArgs: --preset=arm64-Release
|
||||
- task: CMake@1
|
||||
displayName: CMake (MSVC; arm64-Release) Build
|
||||
inputs:
|
||||
cwd: '$(Build.SourcesDirectory)'
|
||||
cmakeArgs: --build out/build/arm64-Release -v
|
||||
- task: CMake@1
|
||||
displayName: CMake (clang/LLVM; arm64-Debug) Config
|
||||
inputs:
|
||||
cwd: '$(Build.SourcesDirectory)'
|
||||
cmakeArgs: --preset=arm64-Debug-Clang
|
||||
- task: CMake@1
|
||||
displayName: CMake (clang/LLVM; arm64-Debug) Build
|
||||
inputs:
|
||||
cwd: '$(Build.SourcesDirectory)'
|
||||
cmakeArgs: --build out/build/arm64-Debug-Clang -v
|
||||
- task: CMake@1
|
||||
displayName: CMake (clang/LLVM; arm64-Release) Config
|
||||
inputs:
|
||||
cwd: '$(Build.SourcesDirectory)'
|
||||
cmakeArgs: --preset=arm64-Release-Clang
|
||||
- task: CMake@1
|
||||
displayName: CMake (clang/LLVM; arm64-Release) Build
|
||||
inputs:
|
||||
cwd: '$(Build.SourcesDirectory)'
|
||||
cmakeArgs: --build out/build/arm64-Release-Clang -v
|
||||
- task: CMake@1
|
||||
displayName: CMake (MSVC; arm64ec-Debug) Config
|
||||
inputs:
|
||||
cwd: '$(Build.SourcesDirectory)'
|
||||
cmakeArgs: --preset=arm64ec-Debug
|
||||
- task: CMake@1
|
||||
displayName: CMake (MSVC; arm64ec-Debug) Build
|
||||
inputs:
|
||||
cwd: '$(Build.SourcesDirectory)'
|
||||
cmakeArgs: --build out/build/arm64ec-Debug -v
|
||||
- task: CMake@1
|
||||
displayName: CMake (MSVC; arm64ec-Release) Config
|
||||
inputs:
|
||||
cwd: '$(Build.SourcesDirectory)'
|
||||
cmakeArgs: --preset=arm64ec-Release
|
||||
- task: CMake@1
|
||||
displayName: CMake (MSVC; arm64ec-Release) Build
|
||||
inputs:
|
||||
cwd: '$(Build.SourcesDirectory)'
|
||||
cmakeArgs: --build out/build/arm64ec-Release -v
|
||||
|
Loading…
Reference in New Issue
Block a user