You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/games-emulation/pcsx2/files/pcsx2-1.3.1-cflags.patch

777 lines
20 KiB

From 683b871c320ec14b777ec3937dc609b69b3cf5a5 Mon Sep 17 00:00:00 2001
From: nE0sIghT <ykonotopov@gmail.com>
Date: Sat, 8 Aug 2015 19:12:37 +0300
Subject: [PATCH 3/3] Use global compiler optimization flags instead of
defining them for every plugin/binary
---
cmake/BuildParameters.cmake | 35 ++++++++++-------
common/src/Utilities/CMakeLists.txt | 45 +---------------------
common/src/x86emitter/CMakeLists.txt | 45 +---------------------
pcsx2/CMakeLists.txt | 45 +---------------------
plugins/CDVDiso/src/CMakeLists.txt | 16 +-------
plugins/CDVDlinuz/Src/CMakeLists.txt | 21 +---------
plugins/CDVDnull/CMakeLists.txt | 16 +-------
plugins/FWnull/CMakeLists.txt | 16 +-------
plugins/GSdx/CMakeLists.txt | 9 +----
plugins/GSnull/CMakeLists.txt | 16 +-------
plugins/PadNull/CMakeLists.txt | 16 +-------
plugins/SPU2null/CMakeLists.txt | 16 +-------
plugins/USBnull/CMakeLists.txt | 16 +-------
plugins/dev9null/CMakeLists.txt | 16 +-------
plugins/onepad/CMakeLists.txt | 16 +-------
plugins/spu2-x/src/CMakeLists.txt | 16 +-------
plugins/zerogs/opengl/CMakeLists.txt | 8 +---
plugins/zerospu2/CMakeLists.txt | 16 +-------
plugins/zzogl-pg/opengl/CMakeLists.txt | 8 +---
.../zzogl-pg/opengl/ZeroGSShaders/CMakeLists.txt | 8 +---
tools/bin2cpp/CMakeLists.txt | 6 +--
21 files changed, 51 insertions(+), 355 deletions(-)
diff --git a/cmake/BuildParameters.cmake b/cmake/BuildParameters.cmake
index 48b167c..82e4ded 100644
--- a/cmake/BuildParameters.cmake
+++ b/cmake/BuildParameters.cmake
@@ -117,14 +117,17 @@ if(${PCSX2_TARGET_ARCHITECTURES} MATCHES "i386")
# - Only plugins. No package will link to them.
set(CMAKE_POSITION_INDEPENDENT_CODE OFF)
- if (DISABLE_ADVANCE_SIMD)
- set(ARCH_FLAG "-msse -msse2 -march=i686")
- else()
- # AVX requires some fix of the ABI (mangling) (default 2)
- # Note: V6 requires GCC 4.7
- #set(ARCH_FLAG "-march=native -fabi-version=6")
- set(ARCH_FLAG "-march=native")
+ if(NOT DEFINED ARCH_FLAG)
+ if (DISABLE_ADVANCE_SIMD)
+ set(ARCH_FLAG "-msse -msse2 -march=i686")
+ else()
+ # AVX requires some fix of the ABI (mangling) (default 2)
+ # Note: V6 requires GCC 4.7
+ #set(ARCH_FLAG "-march=native -fabi-version=6")
+ set(ARCH_FLAG "-march=native")
+ endif()
endif()
+
add_definitions(-D_ARCH_32=1 -D_M_X86=1 -D_M_X86_32=1)
set(_ARCH_32 1)
set(_M_X86 1)
@@ -136,11 +139,13 @@ elseif(${PCSX2_TARGET_ARCHITECTURES} MATCHES "x86_64")
# SuperVU will not be ported
set(DISABLE_SVU TRUE)
- if (DISABLE_ADVANCE_SIMD)
- set(ARCH_FLAG "-msse -msse2")
- else()
- #set(ARCH_FLAG "-march=native -fabi-version=6")
- set(ARCH_FLAG "-march=native")
+ if(NOT DEFINED ARCH_FLAG)
+ if (DISABLE_ADVANCE_SIMD)
+ set(ARCH_FLAG "-msse -msse2")
+ else()
+ #set(ARCH_FLAG "-march=native -fabi-version=6")
+ set(ARCH_FLAG "-march=native")
+ endif()
endif()
add_definitions(-D_ARCH_64=1 -D_M_X86=1 -D_M_X86_64=1)
set(_ARCH_64 1)
@@ -256,8 +261,12 @@ else()
set(ASAN_FLAG "")
endif()
+if(NOT DEFINED OPTIMIZATION_FLAG)
+ set(OPTIMIZATION_FLAG -O2)
+endif()
+
# Note: -DGTK_DISABLE_DEPRECATED can be used to test a build without gtk deprecated feature. It could be useful to port to a newer API
-set(DEFAULT_GCC_FLAG "${ARCH_FLAG} ${COMMON_FLAG} ${DEFAULT_WARNINGS} ${AGGRESSIVE_WARNING} ${HARDENING_FLAG} ${DEBUG_FLAG} ${ASAN_FLAG}")
+set(DEFAULT_GCC_FLAG "${ARCH_FLAG} ${COMMON_FLAG} ${DEFAULT_WARNINGS} ${AGGRESSIVE_WARNING} ${HARDENING_FLAG} ${DEBUG_FLAG} ${ASAN_FLAG} ${OPTIMIZATION_FLAG}")
# c++ only flags
set(DEFAULT_CPP_FLAG "${DEFAULT_GCC_FLAG} -Wno-invalid-offsetof")
diff --git a/common/src/Utilities/CMakeLists.txt b/common/src/Utilities/CMakeLists.txt
index 8f97604..f4b6e27 100644
--- a/common/src/Utilities/CMakeLists.txt
+++ b/common/src/Utilities/CMakeLists.txt
@@ -14,47 +14,6 @@ set(CommonFlags
-fno-strict-aliasing
)
-# set optimization flags
-set(OptimizationFlags
- -falign-functions
- -falign-jumps
- -falign-labels
- -falign-loops
- -fcaller-saves
- -fcprop-registers
- -fcrossjumping
- -fcse-follow-jumps
- -fcse-skip-blocks
- -fdefer-pop
- -fdelete-null-pointer-checks
- -fgcse
- -fgcse-lm
- -fif-conversion
- -fif-conversion2
- -fmerge-constants
- -foptimize-sibling-calls
- -fpeephole2
- -fregmove
- -freorder-blocks
- -freorder-functions
- -frerun-cse-after-loop
- -fsched-interblock
- -fsched-spec
- -fstrict-overflow
- -fthread-jumps
- -ftree-ccp
- -ftree-ch
- -ftree-copyrename
- -ftree-dce
- -ftree-dominator-opts
- -ftree-fre
- -ftree-lrs
- -ftree-pre
- -ftree-sra
- -ftree-ter
- -ftree-vrp
- -funit-at-a-time)
-
#Clang doesn't support a few common flags that GCC does.
if(NOT USE_CLANG)
set(UtilitiesFinalFlags
@@ -79,7 +38,7 @@ if(CMAKE_BUILD_TYPE STREQUAL Devel)
# add defines
set(UtilitiesFinalFlags
${UtilitiesFinalFlags}
- ${CommonFlags} ${OptimizationFlags} -DPCSX2_DEVBUILD
+ ${CommonFlags} -DPCSX2_DEVBUILD
)
endif(CMAKE_BUILD_TYPE STREQUAL Devel)
@@ -89,7 +48,7 @@ if(CMAKE_BUILD_TYPE STREQUAL Release)
# add defines
set(UtilitiesFinalFlags
${UtilitiesFinalFlags}
- ${CommonFlags} ${OptimizationFlags}
+ ${CommonFlags}
)
endif(CMAKE_BUILD_TYPE STREQUAL Release)
diff --git a/common/src/x86emitter/CMakeLists.txt b/common/src/x86emitter/CMakeLists.txt
index b37e22a..a8217fc 100644
--- a/common/src/x86emitter/CMakeLists.txt
+++ b/common/src/x86emitter/CMakeLists.txt
@@ -14,47 +14,6 @@ set(CommonFlags
-fno-strict-aliasing
)
-# set optimization flags
-set(OptimizationFlags
- -falign-functions
- -falign-jumps
- -falign-labels
- -falign-loops
- -fcaller-saves
- -fcprop-registers
- -fcrossjumping
- -fcse-follow-jumps
- -fcse-skip-blocks
- -fdefer-pop
- -fdelete-null-pointer-checks
- -fgcse
- -fgcse-lm
- -fif-conversion
- -fif-conversion2
- -fmerge-constants
- -foptimize-sibling-calls
- -fpeephole2
- -fregmove
- -freorder-blocks
- -freorder-functions
- -frerun-cse-after-loop
- -fsched-interblock
- -fsched-spec
- -fstrict-overflow
- -fthread-jumps
- -ftree-ccp
- -ftree-ch
- -ftree-copyrename
- -ftree-dce
- -ftree-dominator-opts
- -ftree-fre
- -ftree-lrs
- -ftree-pre
- -ftree-sra
- -ftree-ter
- -ftree-vrp
- -funit-at-a-time)
-
#Clang doesn't support a few common flags that GCC does.
if(NOT USE_CLANG)
set(x86emitterFinalFlags
@@ -77,7 +36,7 @@ if(CMAKE_BUILD_TYPE STREQUAL Devel)
# add defines
set(x86emitterFinalFlags
${x86emitterFinalFlags}
- ${CommonFlags} ${OptimizationFlags} -DPCSX2_DEVBUILD
+ ${CommonFlags} -DPCSX2_DEVBUILD
)
endif(CMAKE_BUILD_TYPE STREQUAL Devel)
@@ -87,7 +46,7 @@ if(CMAKE_BUILD_TYPE STREQUAL Release)
# add defines
set(x86emitterFinalFlags
${x86emitterFinalFlags}
- ${CommonFlags} ${OptimizationFlags}
+ ${CommonFlags}
)
endif(CMAKE_BUILD_TYPE STREQUAL Release)
diff --git a/pcsx2/CMakeLists.txt b/pcsx2/CMakeLists.txt
index 871713e..a98843d 100644
--- a/pcsx2/CMakeLists.txt
+++ b/pcsx2/CMakeLists.txt
@@ -27,47 +27,6 @@ set(CommonFlags
-DWX_PRECOMP
)
-# set optimization flags
-set(OptimizationFlags
- -falign-functions
- -falign-jumps
- -falign-labels
- -falign-loops
- -fcaller-saves
- -fcprop-registers
- -fcrossjumping
- -fcse-follow-jumps
- -fcse-skip-blocks
- -fdefer-pop
- -fdelete-null-pointer-checks
- -fgcse
- -fgcse-lm
- -fif-conversion
- -fif-conversion2
- -fmerge-constants
- -foptimize-sibling-calls
- -fpeephole2
- -fregmove
- -freorder-blocks
- -freorder-functions
- -frerun-cse-after-loop
- -fsched-interblock
- -fsched-spec
- -fstrict-overflow
- -fthread-jumps
- -ftree-ccp
- -ftree-ch
- -ftree-copyrename
- -ftree-dce
- -ftree-dominator-opts
- -ftree-fre
- -ftree-lrs
- -ftree-pre
- -ftree-sra
- -ftree-ter
- -ftree-vrp
- -funit-at-a-time)
-
#Clang doesn't support a few common flags that GCC does.
if(NOT USE_CLANG)
set(pcsx2FinalFlags ${CommonFlags} -fno-guess-branch-probability -fno-dse -fno-tree-dse)
@@ -80,11 +39,11 @@ if(CMAKE_BUILD_TYPE STREQUAL Debug)
elseif(CMAKE_BUILD_TYPE STREQUAL Devel)
set(Output pcsx2-dev)
- set(pcsx2FinalFlags ${pcsx2FinalFlags} ${CommonFlags} ${OptimizationFlags} -DPCSX2_DEVBUILD)
+ set(pcsx2FinalFlags ${pcsx2FinalFlags} ${CommonFlags} -DPCSX2_DEVBUILD)
elseif(CMAKE_BUILD_TYPE STREQUAL Release)
set(Output pcsx2)
- set(pcsx2FinalFlags ${pcsx2FinalFlags} ${CommonFlags} ${OptimizationFlags})
+ set(pcsx2FinalFlags ${pcsx2FinalFlags} ${CommonFlags})
endif()
diff --git a/plugins/CDVDiso/src/CMakeLists.txt b/plugins/CDVDiso/src/CMakeLists.txt
index 519c92a..97cb832 100644
--- a/plugins/CDVDiso/src/CMakeLists.txt
+++ b/plugins/CDVDiso/src/CMakeLists.txt
@@ -8,21 +8,7 @@ endif()
# plugin name
set(Output CDVDiso)
-
-set(OptimizationFlags
- -O2
- )
-
-if(CMAKE_BUILD_TYPE STREQUAL Debug)
- set(CDVDisoFinalFlags "")
-
-elseif(CMAKE_BUILD_TYPE STREQUAL Devel)
- set(CDVDisoFinalFlags ${OptimizationFlags})
-
-elseif(CMAKE_BUILD_TYPE STREQUAL Release)
- set(CDVDisoFinalFlags ${OptimizationFlags})
-
-endif()
+set(CDVDisoFinalFlags "")
# CDVDiso sources
set(CDVDisoSources
diff --git a/plugins/CDVDlinuz/Src/CMakeLists.txt b/plugins/CDVDlinuz/Src/CMakeLists.txt
index 943780f..f02198d 100644
--- a/plugins/CDVDlinuz/Src/CMakeLists.txt
+++ b/plugins/CDVDlinuz/Src/CMakeLists.txt
@@ -2,26 +2,7 @@
# plugin name
set(Output CDVDlinuz)
-
-set(CommonFlags
- -D_LARGEFILE64_SOURCE
- )
-
-set(OptimizationFlags
- -O2
- -fomit-frame-pointer
- )
-
-if(CMAKE_BUILD_TYPE STREQUAL Debug)
- set(CDVDlinuzFinalFlags ${CommonFlags})
-
-elseif(CMAKE_BUILD_TYPE STREQUAL Devel)
- set(CDVDlinuzFinalFlags ${CommonFlags} ${OptimizationFlags})
-
-elseif(CMAKE_BUILD_TYPE STREQUAL Release)
- set(CDVDlinuzFinalFlags ${CommonFlags} ${OptimizationFlags})
-
-endif()
+set(CDVDlinuzFinalFlags -D_LARGEFILE64_SOURCE)
# CDVDlinuz sources
set(CDVDlinuzSources
diff --git a/plugins/CDVDnull/CMakeLists.txt b/plugins/CDVDnull/CMakeLists.txt
index 4fde2f7..5c84959 100644
--- a/plugins/CDVDnull/CMakeLists.txt
+++ b/plugins/CDVDnull/CMakeLists.txt
@@ -8,21 +8,7 @@ endif()
# plugin name
set(Output CDVDnull)
-
-set(OptimizationFlags
- -O2
- )
-
-if(CMAKE_BUILD_TYPE STREQUAL Debug)
- set(CDVDnullFinalFlags "")
-
-elseif(CMAKE_BUILD_TYPE STREQUAL Devel)
- set(CDVDnullFinalFlags ${OptimizationFlags})
-
-elseif(CMAKE_BUILD_TYPE STREQUAL Release)
- set(CDVDnullFinalFlags ${OptimizationFlags})
-
-endif()
+set(CDVDnullFinalFlags "")
# CDVDnull sources
set(CDVDnullSources
diff --git a/plugins/FWnull/CMakeLists.txt b/plugins/FWnull/CMakeLists.txt
index fd5a45e..aaf9e4e 100644
--- a/plugins/FWnull/CMakeLists.txt
+++ b/plugins/FWnull/CMakeLists.txt
@@ -8,21 +8,7 @@ endif()
# plugin name
set(Output FWnull-0.7.0)
-
-set(OptimizationFlags
- -O2
- )
-
-if(CMAKE_BUILD_TYPE STREQUAL Debug)
- set(FWnullFinalFlags "")
-
-elseif(CMAKE_BUILD_TYPE STREQUAL Devel)
- set(FWnullFinalFlags ${OptimizationFlags})
-
-elseif(CMAKE_BUILD_TYPE STREQUAL Release)
- set(FWnullFinalFlags ${OptimizationFlags})
-
-endif()
+set(FWnullFinalFlags "")
# FWnull sources
set(FWnullSources
diff --git a/plugins/GSdx/CMakeLists.txt b/plugins/GSdx/CMakeLists.txt
index 13b30c7..6fd6253 100644
--- a/plugins/GSdx/CMakeLists.txt
+++ b/plugins/GSdx/CMakeLists.txt
@@ -18,19 +18,14 @@ set(CommonFlags
-Wunused-variable # __dummy variable need to be investigated
)
-set(OptimizationFlags
- -O2
- )
-
-
if(CMAKE_BUILD_TYPE STREQUAL Debug)
set(GSdxFinalFlags ${GSdxFinalFlags} ${CommonFlags} -D_DEBUG)
elseif(CMAKE_BUILD_TYPE STREQUAL Devel)
- set(GSdxFinalFlags ${GSdxFinalFlags} ${CommonFlags} ${OptimizationFlags} -D_DEVEL)
+ set(GSdxFinalFlags ${GSdxFinalFlags} ${CommonFlags} -D_DEVEL)
elseif(CMAKE_BUILD_TYPE STREQUAL Release)
- set(GSdxFinalFlags ${GSdxFinalFlags} ${CommonFlags} ${OptimizationFlags} -W)
+ set(GSdxFinalFlags ${GSdxFinalFlags} ${CommonFlags} -W)
endif()
diff --git a/plugins/GSnull/CMakeLists.txt b/plugins/GSnull/CMakeLists.txt
index 2216e17..3bde988 100644
--- a/plugins/GSnull/CMakeLists.txt
+++ b/plugins/GSnull/CMakeLists.txt
@@ -8,21 +8,7 @@ endif()
# plugin name
set(Output GSnull)
-
-set(OptimizationFlags
- -O2
- )
-
-if(CMAKE_BUILD_TYPE STREQUAL Debug)
- set(GSnullFinalFlags "")
-
-elseif(CMAKE_BUILD_TYPE STREQUAL Devel)
- set(GSnullFinalFlags ${OptimizationFlags})
-
-elseif(CMAKE_BUILD_TYPE STREQUAL Release)
- set(GSnullFinalFlags ${OptimizationFlags})
-
-endif()
+set(GSnullFinalFlags "")
# GSnull sources
set(GSnullSources
diff --git a/plugins/PadNull/CMakeLists.txt b/plugins/PadNull/CMakeLists.txt
index acbe758..18b1b6c 100644
--- a/plugins/PadNull/CMakeLists.txt
+++ b/plugins/PadNull/CMakeLists.txt
@@ -7,21 +7,7 @@ endif()
# plugin name
set(Output PADnull)
-
-set(OptimizationFlags
- -O2
- )
-
-if(CMAKE_BUILD_TYPE STREQUAL Debug)
- set(PadNullFinalFlags "")
-
-elseif(CMAKE_BUILD_TYPE STREQUAL Devel)
- set(PadNullFinalFlags ${OptimizationFlags})
-
-elseif(CMAKE_BUILD_TYPE STREQUAL Release)
- set(PadNullFinalFlags ${OptimizationFlags})
-
-endif()
+set(PadNullFinalFlags "")
# PadNull sources
set(PadNullSources
diff --git a/plugins/SPU2null/CMakeLists.txt b/plugins/SPU2null/CMakeLists.txt
index 5409543..620a521 100644
--- a/plugins/SPU2null/CMakeLists.txt
+++ b/plugins/SPU2null/CMakeLists.txt
@@ -8,21 +8,7 @@ endif()
# plugin name
set(Output SPU2null)
-
-set(OptimizationFlags
- -O2
- )
-
-if(CMAKE_BUILD_TYPE STREQUAL Debug)
- set(SPU2nullFinalFlags "")
-
-elseif(CMAKE_BUILD_TYPE STREQUAL Devel)
- set(SPU2nullFinalFlags ${OptimizationFlags})
-
-elseif(CMAKE_BUILD_TYPE STREQUAL Release)
- set(SPU2nullFinalFlags ${OptimizationFlags})
-
-endif()
+set(SPU2nullFinalFlags "")
# SPU2null sources
set(SPU2nullSources
diff --git a/plugins/USBnull/CMakeLists.txt b/plugins/USBnull/CMakeLists.txt
index c84890e..7892d03 100644
--- a/plugins/USBnull/CMakeLists.txt
+++ b/plugins/USBnull/CMakeLists.txt
@@ -8,21 +8,7 @@ endif()
# plugin name
set(Output USBnull-0.7.0)
-
-set(OptimizationFlags
- -O2
- )
-
-if(CMAKE_BUILD_TYPE STREQUAL Debug)
- set(USBnullFinalFlags "")
-
-elseif(CMAKE_BUILD_TYPE STREQUAL Devel)
- set(USBnullFinalFlags ${OptimizationFlags})
-
-elseif(CMAKE_BUILD_TYPE STREQUAL Release)
- set(USBnullFinalFlags ${OptimizationFlags})
-
-endif()
+set(USBnullFinalFlags "")
# USBnull sources
set(USBnullSources
diff --git a/plugins/dev9null/CMakeLists.txt b/plugins/dev9null/CMakeLists.txt
index 09d8bee..b819985 100644
--- a/plugins/dev9null/CMakeLists.txt
+++ b/plugins/dev9null/CMakeLists.txt
@@ -8,21 +8,7 @@ endif()
# plugin name
set(Output dev9null-0.5.0)
-
-set(OptimizationFlags
- -O2
- )
-
-if(CMAKE_BUILD_TYPE STREQUAL Debug)
- set(dev9nullFinalFlags "")
-
-elseif(CMAKE_BUILD_TYPE STREQUAL Devel)
- set(dev9nullFinalFlags ${OptimizationFlags})
-
-elseif(CMAKE_BUILD_TYPE STREQUAL Release)
- set(dev9nullFinalFlags ${OptimizationFlags})
-
-endif()
+set(dev9nullFinalFlags "")
# dev9null sources
set(dev9nullSources
diff --git a/plugins/onepad/CMakeLists.txt b/plugins/onepad/CMakeLists.txt
index 6a12cd7..68ffb82 100644
--- a/plugins/onepad/CMakeLists.txt
+++ b/plugins/onepad/CMakeLists.txt
@@ -8,21 +8,7 @@ endif()
# plugin name
set(Output onepad-1.1.0)
-
-set(OptimizationFlags
- -O2
- )
-
-if(CMAKE_BUILD_TYPE STREQUAL Debug)
- set(onepadFinalFlags "")
-
-elseif(CMAKE_BUILD_TYPE STREQUAL Devel)
- set(onepadFinalFlags ${OptimizationFlags})
-
-elseif(CMAKE_BUILD_TYPE STREQUAL Release)
- set(onepadFinalFlags ${OptimizationFlags})
-
-endif()
+set(onepadFinalFlags "")
# onepad sources
set(onepadSources
diff --git a/plugins/spu2-x/src/CMakeLists.txt b/plugins/spu2-x/src/CMakeLists.txt
index 720c4ac..0180704 100644
--- a/plugins/spu2-x/src/CMakeLists.txt
+++ b/plugins/spu2-x/src/CMakeLists.txt
@@ -14,21 +14,7 @@ endif()
# plugin name
set(Output spu2x-2.0.0)
-
-set(OptimizationFlags
- -O2
- )
-
-if(CMAKE_BUILD_TYPE STREQUAL Debug)
- set(spu2xFinalFlags "")
-
-elseif(CMAKE_BUILD_TYPE STREQUAL Devel)
- set(spu2xFinalFlags ${OptimizationFlags})
-
-elseif(CMAKE_BUILD_TYPE STREQUAL Release)
- set(spu2xFinalFlags ${OptimizationFlags})
-
-endif()
+set(spu2xFinalFlags "")
# spu2x sources
set(spu2xSources
diff --git a/plugins/zerogs/opengl/CMakeLists.txt b/plugins/zerogs/opengl/CMakeLists.txt
index fd33949..79716c6 100644
--- a/plugins/zerogs/opengl/CMakeLists.txt
+++ b/plugins/zerogs/opengl/CMakeLists.txt
@@ -7,10 +7,6 @@ set(CommonFlags
-Wall
)
-set(OptimizationFlags
- -O2
- )
-
# Debug - Build
if(CMAKE_BUILD_TYPE STREQUAL Debug)
# add defines
@@ -20,13 +16,13 @@ endif(CMAKE_BUILD_TYPE STREQUAL Debug)
# Devel - Build
if(CMAKE_BUILD_TYPE STREQUAL Devel)
# add defines
- add_definitions(${CommonFlags} ${OptimizationFlags})
+ add_definitions(${CommonFlags})
endif(CMAKE_BUILD_TYPE STREQUAL Devel)
# Release - Build
if(CMAKE_BUILD_TYPE STREQUAL Release)
# add defines
- add_definitions(${CommonFlags} ${OptimizationFlags})
+ add_definitions(${CommonFlags})
endif(CMAKE_BUILD_TYPE STREQUAL Release)
# zerogs sources
diff --git a/plugins/zerospu2/CMakeLists.txt b/plugins/zerospu2/CMakeLists.txt
index c3e3243..9291706 100644
--- a/plugins/zerospu2/CMakeLists.txt
+++ b/plugins/zerospu2/CMakeLists.txt
@@ -8,21 +8,7 @@ endif()
# plugin name
set(Output zerospu2)
-
-set(OptimizationFlags
- -O2
- )
-
-if(CMAKE_BUILD_TYPE STREQUAL Debug)
- set(zerospu2FinalFlags "")
-
-elseif(CMAKE_BUILD_TYPE STREQUAL Devel)
- set(zerospu2FinalFlags ${OptimizationFlags})
-
-elseif(CMAKE_BUILD_TYPE STREQUAL Release)
- set(zerospu2FinalFlags ${OptimizationFlags})
-
-endif(CMAKE_BUILD_TYPE STREQUAL Release)
+set(zerospu2FinalFlags "")
# zerospu2 sources
set(zerospu2Sources
diff --git a/plugins/zzogl-pg/opengl/CMakeLists.txt b/plugins/zzogl-pg/opengl/CMakeLists.txt
index fe93246..4798097 100644
--- a/plugins/zzogl-pg/opengl/CMakeLists.txt
+++ b/plugins/zzogl-pg/opengl/CMakeLists.txt
@@ -26,10 +26,6 @@ set(CommonFlags
-Wunused-variable
)
-set(OptimizationFlags
- -O2
- )
-
#Clang doesn't support a few common flags that GCC does.
if(NOT USE_CLANG)
set(zzoglFinalFlags
@@ -46,12 +42,12 @@ if(CMAKE_BUILD_TYPE STREQUAL Debug)
elseif(CMAKE_BUILD_TYPE STREQUAL Devel)
set(zzoglFinalFlags
${zzoglFinalFlags}
- ${CommonFlags} ${OptimizationFlags} -g -W -DZEROGS_DEVBUILD
+ ${CommonFlags} -g -W -DZEROGS_DEVBUILD
)
elseif(CMAKE_BUILD_TYPE STREQUAL Release)
set(zzoglFinalFlags
${zzoglFinalFlags}
- ${CommonFlags} ${OptimizationFlags} -W
+ ${CommonFlags} -W
)
endif()
diff --git a/plugins/zzogl-pg/opengl/ZeroGSShaders/CMakeLists.txt b/plugins/zzogl-pg/opengl/ZeroGSShaders/CMakeLists.txt
index 156189c..ad1eb49 100644
--- a/plugins/zzogl-pg/opengl/ZeroGSShaders/CMakeLists.txt
+++ b/plugins/zzogl-pg/opengl/ZeroGSShaders/CMakeLists.txt
@@ -17,21 +17,17 @@ set(CommonFlags
-DNVIDIA_CG_API
)
-set(OptimizationFlags
- -O2
- )
-
if(CMAKE_BUILD_TYPE STREQUAL Debug)
set(zerogsshadersFinalFlags
${CommonFlags} -D_DEBUG
)
elseif(CMAKE_BUILD_TYPE STREQUAL Devel)
set(zerogsshadersFinalFlags
- ${CommonFlags} ${OptimizationFlags} -g -W -DZEROGS_DEVBUILD
+ ${CommonFlags} -g -W -DZEROGS_DEVBUILD
)
elseif(CMAKE_BUILD_TYPE STREQUAL Release)
set(zerogsshadersFinalFlags
- ${CommonFlags} ${OptimizationFlags} -W
+ ${CommonFlags} -W
)
endif(CMAKE_BUILD_TYPE STREQUAL Release)
diff --git a/tools/bin2cpp/CMakeLists.txt b/tools/bin2cpp/CMakeLists.txt
index 1689620..1e3e45c 100644
--- a/tools/bin2cpp/CMakeLists.txt
+++ b/tools/bin2cpp/CMakeLists.txt
@@ -7,7 +7,7 @@ set(bin2cppName bin2cpp)
if(CMAKE_BUILD_TYPE STREQUAL Debug)
# add defines
set(bin2cppFinalFlags
- -O2 -s -Wall -fexceptions
+ -s -Wall -fexceptions
)
endif(CMAKE_BUILD_TYPE STREQUAL Debug)
@@ -15,7 +15,7 @@ endif(CMAKE_BUILD_TYPE STREQUAL Debug)
if(CMAKE_BUILD_TYPE STREQUAL Devel)
# add defines
set(bin2cppFinalFlags
- -O2 -s -Wall -fexceptions
+ -s -Wall -fexceptions
)
endif(CMAKE_BUILD_TYPE STREQUAL Devel)
@@ -23,7 +23,7 @@ endif(CMAKE_BUILD_TYPE STREQUAL Devel)
if(CMAKE_BUILD_TYPE STREQUAL Release)
# add defines
set(bin2cppFinalFlags
- -O2 -s -Wall -fexceptions
+ -s -Wall -fexceptions
)
endif(CMAKE_BUILD_TYPE STREQUAL Release)
--
2.4.6