Skip to content

Commit

Permalink
Minor cmake update
Browse files Browse the repository at this point in the history
  • Loading branch information
walbourn committed Aug 16, 2024
1 parent 96847bd commit f33d51c
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion build/CompilerAndLinker.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,20 @@ elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
list(APPEND COMPILER_SWITCHES $<$<NOT:$<CONFIG:Debug>>:/Gy /Gw>)
endif()

if(OpenMP_CXX_FOUND)
if(OpenMP_CXX_FOUND
OR (XBOX_CONSOLE_TARGET STREQUAL "durango"))
# OpenMP in MSVC is not compatible with /permissive- unless you disable two-phase lookup
list(APPEND COMPILER_SWITCHES /Zc:twoPhase-)
endif()

if((CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 19.20)
AND (XBOX_CONSOLE_TARGET STREQUAL "durango"))
list(APPEND COMPILER_SWITCHES /d2FH4-)
if(CMAKE_INTERPROCEDURAL_OPTIMIZATION)
list(APPEND LINKER_SWITCHES -d2:-FH4-)
endif()
endif()

if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 19.24)
list(APPEND COMPILER_SWITCHES /ZH:SHA_256)
endif()
Expand Down

0 comments on commit f33d51c

Please sign in to comment.