cmake: Make Devel the default for the moment. Commit another cmake patch...

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2956 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
arcum42 2010-05-06 09:33:23 +00:00
parent 6314d413f9
commit deb0f620d7
5 changed files with 51 additions and 40 deletions

View File

@ -9,7 +9,7 @@ cmake_minimum_required(VERSION 2.6)
include(${PROJECT_SOURCE_DIR}/cmake/Pcsx2Utils.cmake)
include(${PROJECT_SOURCE_DIR}/cmake/SearchForStuff.cmake)
#set(CMAKE_BUILD_TYPE Devel)
set(CMAKE_BUILD_TYPE Devel)
#-------------------------------------------------------------------------------
# if no build type is set, use Debug as default

View File

@ -215,8 +215,13 @@ set(CDVDnull TRUE)
#---------------------------------------
# CDVDiso
#---------------------------------------
set(CDVDiso TRUE)
# requires: -BZip2
#---------------------------------------
if(BZIP2_FOUND)
set(CDVDiso TRUE)
else(BZIP2_FOUND)
set(CDVDiso FALSE)
endif(BZIP2_FOUND)
#---------------------------------------
# dev9null

View File

@ -3,8 +3,19 @@
# library name
set(UtilitiesName Utilities)
# Clear default flags
set(CMAKE_C_FLAGS "")
set(CMAKE_CXX_FLAGS "")
set(CMAKE_C_FLAGS_DEBUG "")
set(CMAKE_CXX_FLAGS_DEBUG "")
set(CMAKE_C_FLAGS_DEVEL "")
set(CMAKE_CXX_FLAGS_DEVEL "")
set(CMAKE_C_FLAGS_RELEASE "")
set(CMAKE_CXX_FLAGS_RELEASE "")
# set common flags
set(CommonFlags
-pthread
-m32
-march=i486
-msse
@ -71,9 +82,6 @@ set(OptimizationFlags
# Debug - Build
if(CMAKE_BUILD_TYPE STREQUAL Debug)
# clear flags
set(CMAKE_C_FLAGS_DEBUG)
set(CMAKE_CXX_FLAGS_DEBUG)
# add defines
add_definitions(${CommonFlags} ${DebugFlags} -DPCSX2_DEBUG -DPCSX2_DEVBUILD)
@ -81,9 +89,6 @@ endif(CMAKE_BUILD_TYPE STREQUAL Debug)
# Devel - Build
if(CMAKE_BUILD_TYPE STREQUAL Devel)
# clear flags
set(CMAKE_C_FLAGS_DEVEL)
set(CMAKE_CXX_FLAGS_DEVEL)
# add defines
add_definitions(${CommonFlags} ${OptimizationFlags} -DPCSX2_DEVBUILD -DPCSX2_DEVEL)
@ -91,9 +96,6 @@ endif(CMAKE_BUILD_TYPE STREQUAL Devel)
# Release - Build
if(CMAKE_BUILD_TYPE STREQUAL Release)
# clear flags
set(CMAKE_C_FLAGS_RELEASE)
set(CMAKE_CXX_FLAGS_RELEASE)
# add defines
add_definitions(${CommonFlags} ${OptimizationFlags} ${LinkerFlags})

View File

@ -3,8 +3,19 @@
# library name
set(x86emitterName x86emitter)
# Clear default flags
set(CMAKE_C_FLAGS "")
set(CMAKE_CXX_FLAGS "")
set(CMAKE_C_FLAGS_DEBUG "")
set(CMAKE_CXX_FLAGS_DEBUG "")
set(CMAKE_C_FLAGS_DEVEL "")
set(CMAKE_CXX_FLAGS_DEVEL "")
set(CMAKE_C_FLAGS_RELEASE "")
set(CMAKE_CXX_FLAGS_RELEASE "")
# set common flags
set(CommonFlags
-pthread
-fno-guess-branch-probability
-fno-dse
-fno-tree-dse
@ -72,9 +83,6 @@ set(OptimizationFlags
# Debug - Build
if(CMAKE_BUILD_TYPE STREQUAL Debug)
# clear flags
set(CMAKE_C_FLAGS_DEBUG)
set(CMAKE_CXX_FLAGS_DEBUG)
# add defines
add_definitions(${CommonFlags} ${DebugFlags} -DPCSX2_DEVBUILD -DPCSX2_DEBUG)
@ -82,9 +90,6 @@ endif(CMAKE_BUILD_TYPE STREQUAL Debug)
# Devel - Build
if(CMAKE_BUILD_TYPE STREQUAL Devel)
# clear flags
set(CMAKE_C_FLAGS_DEVEL)
set(CMAKE_CXX_FLAGS_DEVEL)
# add defines
add_definitions(${CommonFlags} ${OptimizationFlags} -DPCSX2_DEVBUILD -DPCSX2_DEVEL)
@ -92,9 +97,6 @@ endif(CMAKE_BUILD_TYPE STREQUAL Devel)
# Release - Build
if(CMAKE_BUILD_TYPE STREQUAL Release)
# clear flags
set(CMAKE_C_FLAGS_RELEASE)
set(CMAKE_CXX_FLAGS_RELEASE)
# add defines
add_definitions(${CommonFlags} ${OptimizationFlags} ${LinkerFlags})

View File

@ -1,7 +1,18 @@
# pcsx2
# Clear default flags
set(CMAKE_C_FLAGS "")
set(CMAKE_CXX_FLAGS "")
set(CMAKE_C_FLAGS_DEBUG "")
set(CMAKE_CXX_FLAGS_DEBUG "")
set(CMAKE_C_FLAGS_DEVEL "")
set(CMAKE_CXX_FLAGS_DEVEL "")
set(CMAKE_C_FLAGS_RELEASE "")
set(CMAKE_CXX_FLAGS_RELEASE "")
# set common flags
set(CommonFlags
-pthread
-fno-guess-branch-probability
-fno-dse
-fno-tree-dse
@ -68,9 +79,6 @@ set(OptimizationFlags
# Debug - Build
if(CMAKE_BUILD_TYPE STREQUAL Debug)
# clear flags
set(CMAKE_C_FLAGS_DEBUG " ")
set(CMAKE_CXX_FLAGS_DEBUG " ")
# executable name
set(pcsx2Name pcsx2-dbg)
@ -81,9 +89,6 @@ endif(CMAKE_BUILD_TYPE STREQUAL Debug)
# Devel - Build
if(CMAKE_BUILD_TYPE STREQUAL Devel)
# clear flags
set(CMAKE_C_FLAGS_DEVEL " ")
set(CMAKE_CXX_FLAGS_DEVEL " ")
# executable name
set(pcsx2Name pcsx2-dev)
@ -94,9 +99,6 @@ endif(CMAKE_BUILD_TYPE STREQUAL Devel)
# Release - Build
if(CMAKE_BUILD_TYPE STREQUAL Release)
# clear flags
set(CMAKE_C_FLAGS_RELEASE " ")
set(CMAKE_CXX_FLAGS_RELEASE " ")
# executable name
set(pcsx2Name pcsx2)
@ -105,17 +107,17 @@ if(CMAKE_BUILD_TYPE STREQUAL Release)
add_definitions(${CommonFlags} ${OptimizationFlags} ${LinkerFlags} -DWX_PRECOMP -DNDEBUG)
endif(CMAKE_BUILD_TYPE STREQUAL Release)
# get svn revision and generate svnrev.h
if(SVN)
# execute subversion
Subversion_WC_INFO(${CMAKE_SOURCE_DIR} tmpvar)
# write svnrev.h
file(WRITE ${CMAKE_BINARY_DIR}/pcsx2/svnrev.h "#define SVN_REV ${tmpvar_WC_REVISION} \n#define SVN_MODS 0")
else(SVN)
# write svnrev.h
file(WRITE ${CMAKE_BINARY_DIR}/pcsx2/svnrev.h "#define SVN_REV 0 \n#define SVN_MODS 0")
endif(SVN)
# you must have both svn client executable and a source that contains svn metadata
if((SVN) AND (EXISTS "${CMAKE_SOURCE_DIR}/.svn"))
# execute subversion
Subversion_WC_INFO(${CMAKE_SOURCE_DIR} tmpvar)
# write svnrev.h
file(WRITE ${CMAKE_BINARY_DIR}/pcsx2/svnrev.h "#define SVN_REV ${tmpvar_WC_REVISION} \n#define SVN_MODS 0")
else((SVN) AND (EXISTS "${CMAKE_SOURCE_DIR}/.svn"))
# write svnrev.h
file(WRITE ${CMAKE_BINARY_DIR}/pcsx2/svnrev.h "#define SVN_REV 0 \n#define SVN_MODS 0")
endif((SVN) AND (EXISTS "${CMAKE_SOURCE_DIR}/.svn"))
# variable with sources of this executable
set(pcsx2Sources