mirror of
https://github.com/citra-emu/citra.git
synced 2024-11-25 23:20:15 +00:00
Added comments, tested on MSVC and MINGW, should not cause troubles on Clang and Linux.
This commit is contained in:
parent
958818d438
commit
d5dbfeca99
@ -47,10 +47,11 @@ set(CPU_TARGET "base" CACHE STRING "CPU minimum for this build, use base as defa
|
||||
if (MSVC)
|
||||
set(CPU_TYPES "base;modern intel;modern amd;modern")
|
||||
else()
|
||||
set(CPU_TYPES "base;pentium4;haswell;skylake;modern")
|
||||
set(CPU_TYPES "base;pentium4;duo;sandybridge;haswell;skylake;modern")
|
||||
endif()
|
||||
set_property(CACHE CPU_TARGET PROPERTY STRINGS ${CPU_TYPES})
|
||||
|
||||
#CPU Tuning and Optimization Flags, Off by default, should only be used by particulars
|
||||
set(CC_OP_LEVEL "")
|
||||
set(CC_EXTRA "")
|
||||
set(CC_CPU_FLAGS "")
|
||||
@ -69,6 +70,7 @@ elseif (MINGW)
|
||||
set(CC_EXTRA "${CC_EXTRA} -pthread")
|
||||
set(CC_OP_LEVEL "-O2")
|
||||
if (ENABLE_HIGH_OP)
|
||||
#Citra benefits a lot from this option as my testing have conducted
|
||||
set(CC_OP_LEVEL "-O3")
|
||||
endif()
|
||||
if (CPU_TARGET MATCHES "skylake")
|
||||
@ -79,6 +81,10 @@ elseif (MINGW)
|
||||
set(CC_CPU_FLAGS "-march=pentium4")
|
||||
elseif (CPU_TARGET MATCHES "haswell")
|
||||
set(CC_CPU_FLAGS "-march=haswell -maccumulate-outgoing-args")
|
||||
elseif (CPU_TARGET MATCHES "duo")
|
||||
set(CC_CPU_FLAGS "-march=core2")
|
||||
elseif (CPU_TARGET MATCHES "sandybridge")
|
||||
set(CC_CPU_FLAGS "-march=sandybridge -maccumulate-outgoing-args")
|
||||
else ()
|
||||
set(CC_CPU_FLAGS "-mmmx -msse -msse2")
|
||||
endif()
|
||||
@ -109,6 +115,7 @@ message(STATUS "Target architecture: ${ARCHITECTURE}")
|
||||
set(CMAKE_CXX_STANDARD 14)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
#Tuning Flags
|
||||
set(COMP_FLAGS "${CC_OP_LEVEL} ${CC_CPU_FLAGS} ${CC_EXTRA}")
|
||||
|
||||
if (NOT MSVC)
|
||||
|
Loading…
Reference in New Issue
Block a user