1
0
mirror of https://github.com/microsoft/DirectXTex synced 2024-11-21 12:00:06 +00:00

Update compiler build settings for CMake (#458)

This commit is contained in:
Chuck Walbourn 2024-04-05 14:37:53 -07:00 committed by GitHub
parent 0a85faddc1
commit fa22a4ec53
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 63 additions and 5 deletions

View File

@ -560,6 +560,14 @@ elseif(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
elseif(CMAKE_CXX_COMPILER_ID MATCHES "Intel")
set_target_properties(${PROJECT_NAME} PROPERTIES CXX_STANDARD 14)
elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
if((CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 19.37)
AND (NOT (${DIRECTX_ARCH} MATCHES "^arm"))
AND ((${DIRECTX_ARCH} MATCHES "x64") OR (CMAKE_SIZEOF_VOID_P EQUAL 8)))
# Enable since DirectXTex library has a lot of large switch statements
target_compile_options(${PROJECT_NAME} PRIVATE /jumptablerdata)
endif()
if(ENABLE_CODE_ANALYSIS)
foreach(t IN LISTS TOOL_EXES ITEMS ${PROJECT_NAME})
target_compile_options(${t} PRIVATE /analyze)

View File

@ -66,6 +66,10 @@ elseif(NOT (${DIRECTX_ARCH} MATCHES "^arm"))
set(ARCH_SSE2 $<$<NOT:$<CXX_COMPILER_ID:MSVC,Intel>>:-msse2>)
endif()
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
list(APPEND ARCH_SSE2 -mfpmath=sse)
endif()
list(APPEND COMPILER_SWITCHES ${ARCH_SSE2})
endif()

View File

@ -13,13 +13,24 @@ schedules:
- main
trigger: none
pr: none
pr:
branches:
include:
- main
paths:
include:
- CMake*
- build/*.cmake
- build/*.in
- build/DirectXTex-GitHub-CMake-Xbox-Dev17.yml
resources:
repositories:
- repository: self
type: git
ref: refs/heads/main
trigger: none
name: $(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r)

View File

@ -13,13 +13,21 @@ schedules:
- main
trigger: none
pr: none
pr:
branches:
include:
- main
paths:
include:
- build/DirectXTex-GitHub-Dev17.yml
resources:
repositories:
- repository: self
type: git
ref: refs/heads/main
trigger: none
name: $(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r)

View File

@ -13,13 +13,21 @@ schedules:
- main
trigger: none
pr: none
pr:
branches:
include:
- main
paths:
include:
- build/DirectXTex-GitHub-GDK-Dev17.yml
resources:
repositories:
- repository: self
type: git
ref: refs/heads/main
trigger: none
name: $(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r)

View File

@ -13,13 +13,21 @@ schedules:
- main
trigger: none
pr: none
pr:
branches:
include:
- main
paths:
include:
- build/DirectXTex-GitHub-Test-Dev17.yml
resources:
repositories:
- repository: self
type: git
ref: refs/heads/main
trigger: none
name: $(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r)

View File

@ -13,13 +13,24 @@ schedules:
- main
trigger: none
pr: none
pr:
branches:
include:
- main
paths:
include:
- CMake*
- build/*.cmake
- build/*.in
- build/DirectXTex-GitHub-WSL-11.yml
resources:
repositories:
- repository: self
type: git
ref: refs/heads/main
trigger: none
name: $(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r)