Update compiler build settings for CMake (#458)
This commit is contained in:
Родитель
0a85faddc1
Коммит
fa22a4ec53
|
@ -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)
|
||||
|
|
|
@ -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()
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче