mirror of https://github.com/PCSX2/pcsx2.git
cmake: factorize debug/dev define
This commit is contained in:
parent
8987ca61a1
commit
a66c911fed
|
@ -272,9 +272,9 @@ else()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(CMAKE_BUILD_TYPE MATCHES "Debug")
|
if(CMAKE_BUILD_TYPE MATCHES "Debug")
|
||||||
set(DEBUG_FLAG "${DBG}")
|
set(DEBUG_FLAG "${DBG} -DPCSX2_DEVBUILD -DPCSX2_DEBUG -D_DEBUG")
|
||||||
elseif(CMAKE_BUILD_TYPE MATCHES "Devel")
|
elseif(CMAKE_BUILD_TYPE MATCHES "Devel")
|
||||||
set(DEBUG_FLAG "${DBG} -DNDEBUG")
|
set(DEBUG_FLAG "${DBG} -DNDEBUG -DPCSX2_DEVBUILD -D_DEVEL")
|
||||||
elseif(CMAKE_BUILD_TYPE MATCHES "Release")
|
elseif(CMAKE_BUILD_TYPE MATCHES "Release")
|
||||||
set(DEBUG_FLAG "-DNDEBUG")
|
set(DEBUG_FLAG "-DNDEBUG")
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -8,39 +8,11 @@ endif(NOT TOP_CMAKE_WAS_SOURCED)
|
||||||
|
|
||||||
set(Output Utilities)
|
set(Output Utilities)
|
||||||
|
|
||||||
set(CommonFlags
|
set(CommonFlags
|
||||||
-fno-strict-aliasing
|
-fno-strict-aliasing
|
||||||
)
|
)
|
||||||
|
|
||||||
# Debug - Build
|
set(UtilitiesFinalFlags ${CommonFlags})
|
||||||
if(CMAKE_BUILD_TYPE STREQUAL Debug)
|
|
||||||
|
|
||||||
# add defines
|
|
||||||
set(UtilitiesFinalFlags
|
|
||||||
${UtilitiesFinalFlags}
|
|
||||||
${CommonFlags} -DPCSX2_DEBUG -DPCSX2_DEVBUILD
|
|
||||||
)
|
|
||||||
endif(CMAKE_BUILD_TYPE STREQUAL Debug)
|
|
||||||
|
|
||||||
# Devel - Build
|
|
||||||
if(CMAKE_BUILD_TYPE STREQUAL Devel)
|
|
||||||
|
|
||||||
# add defines
|
|
||||||
set(UtilitiesFinalFlags
|
|
||||||
${UtilitiesFinalFlags}
|
|
||||||
${CommonFlags} -DPCSX2_DEVBUILD
|
|
||||||
)
|
|
||||||
endif(CMAKE_BUILD_TYPE STREQUAL Devel)
|
|
||||||
|
|
||||||
# Release - Build
|
|
||||||
if(CMAKE_BUILD_TYPE STREQUAL Release)
|
|
||||||
|
|
||||||
# add defines
|
|
||||||
set(UtilitiesFinalFlags
|
|
||||||
${UtilitiesFinalFlags}
|
|
||||||
${CommonFlags}
|
|
||||||
)
|
|
||||||
endif(CMAKE_BUILD_TYPE STREQUAL Release)
|
|
||||||
|
|
||||||
# variable with all sources of this library
|
# variable with all sources of this library
|
||||||
set(UtilitiesSources
|
set(UtilitiesSources
|
||||||
|
|
|
@ -8,37 +8,11 @@ endif(NOT TOP_CMAKE_WAS_SOURCED)
|
||||||
|
|
||||||
set(Output x86emitter)
|
set(Output x86emitter)
|
||||||
|
|
||||||
set(CommonFlags
|
set(CommonFlags
|
||||||
-fno-strict-aliasing
|
-fno-strict-aliasing
|
||||||
)
|
)
|
||||||
|
|
||||||
# Debug - Build
|
set(x86emitterFinalFlags ${CommonFlags})
|
||||||
if(CMAKE_BUILD_TYPE STREQUAL Debug)
|
|
||||||
# add defines
|
|
||||||
set(x86emitterFinalFlags
|
|
||||||
${x86emitterFinalFlags}
|
|
||||||
${CommonFlags} -DPCSX2_DEBUG -DPCSX2_DEVBUILD
|
|
||||||
)
|
|
||||||
endif(CMAKE_BUILD_TYPE STREQUAL Debug)
|
|
||||||
|
|
||||||
# Devel - Build
|
|
||||||
if(CMAKE_BUILD_TYPE STREQUAL Devel)
|
|
||||||
# add defines
|
|
||||||
set(x86emitterFinalFlags
|
|
||||||
${x86emitterFinalFlags}
|
|
||||||
${CommonFlags} -DPCSX2_DEVBUILD
|
|
||||||
)
|
|
||||||
endif(CMAKE_BUILD_TYPE STREQUAL Devel)
|
|
||||||
|
|
||||||
# Release - Build
|
|
||||||
if(CMAKE_BUILD_TYPE STREQUAL Release)
|
|
||||||
|
|
||||||
# add defines
|
|
||||||
set(x86emitterFinalFlags
|
|
||||||
${x86emitterFinalFlags}
|
|
||||||
${CommonFlags}
|
|
||||||
)
|
|
||||||
endif(CMAKE_BUILD_TYPE STREQUAL Release)
|
|
||||||
|
|
||||||
# variable with all sources of this library
|
# variable with all sources of this library
|
||||||
set(x86emitterSources
|
set(x86emitterSources
|
||||||
|
|
|
@ -30,23 +30,10 @@ else()
|
||||||
set(pcsx2FinalFlags "")
|
set(pcsx2FinalFlags "")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Debug - Build
|
set(pcsx2FinalFlags ${pcsx2FinalFlags} ${CommonFlags})
|
||||||
if(CMAKE_BUILD_TYPE STREQUAL Debug)
|
|
||||||
set(pcsx2FinalFlags ${pcsx2FinalFlags} ${CommonFlags} -DPCSX2_DEVBUILD -DPCSX2_DEBUG)
|
|
||||||
|
|
||||||
elseif(CMAKE_BUILD_TYPE STREQUAL Devel)
|
|
||||||
set(pcsx2FinalFlags ${pcsx2FinalFlags} ${CommonFlags} -DPCSX2_DEVBUILD)
|
|
||||||
|
|
||||||
elseif(CMAKE_BUILD_TYPE STREQUAL Release)
|
|
||||||
set(pcsx2FinalFlags ${pcsx2FinalFlags} ${CommonFlags})
|
|
||||||
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(XDG_STD)
|
if(XDG_STD)
|
||||||
set(pcsx2FinalFlags
|
set(pcsx2FinalFlags ${pcsx2FinalFlags} -DXDG_STD)
|
||||||
${pcsx2FinalFlags}
|
|
||||||
-DXDG_STD
|
|
||||||
)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(Output PCSX2)
|
set(Output PCSX2)
|
||||||
|
|
|
@ -17,16 +17,7 @@ set(CommonFlags
|
||||||
-Wunused-variable # __dummy variable need to be investigated
|
-Wunused-variable # __dummy variable need to be investigated
|
||||||
)
|
)
|
||||||
|
|
||||||
if(CMAKE_BUILD_TYPE STREQUAL Debug)
|
set(GSdxFinalFlags ${CommonFlags})
|
||||||
set(GSdxFinalFlags ${GSdxFinalFlags} ${CommonFlags} -D_DEBUG)
|
|
||||||
|
|
||||||
elseif(CMAKE_BUILD_TYPE STREQUAL Devel)
|
|
||||||
set(GSdxFinalFlags ${GSdxFinalFlags} ${CommonFlags} -D_DEVEL)
|
|
||||||
|
|
||||||
elseif(CMAKE_BUILD_TYPE STREQUAL Release)
|
|
||||||
set(GSdxFinalFlags ${GSdxFinalFlags} ${CommonFlags} -W -Wno-unused-parameter)
|
|
||||||
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(XDG_STD)
|
if(XDG_STD)
|
||||||
set(GSdxFinalFlags ${GSdxFinalFlags} -DXDG_STD)
|
set(GSdxFinalFlags ${GSdxFinalFlags} -DXDG_STD)
|
||||||
|
|
|
@ -9,11 +9,7 @@ endif()
|
||||||
# plugin name
|
# plugin name
|
||||||
set(Output LilyPad-0.11.0)
|
set(Output LilyPad-0.11.0)
|
||||||
|
|
||||||
if(CMAKE_BUILD_TYPE STREQUAL Debug)
|
set(lilypadFinalFlags "")
|
||||||
set(lilypadFinalFlags "-DPCSX2_DEBUG")
|
|
||||||
else()
|
|
||||||
set(lilypadFinalFlags "")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# lilypad sources
|
# lilypad sources
|
||||||
set(lilypadSources
|
set(lilypadSources
|
||||||
|
|
Loading…
Reference in New Issue