From d5dbfeca994e3024102f85324179317b202614e2 Mon Sep 17 00:00:00 2001 From: FernandoS27 Date: Sun, 11 Dec 2016 16:09:52 -0500 Subject: [PATCH] Added comments, tested on MSVC and MINGW, should not cause troubles on Clang and Linux. --- CMakeLists.txt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c3778134f..5c5b925ac 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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)