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()
|
||||
|
||||
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")
|
||||
set(DEBUG_FLAG "${DBG} -DNDEBUG")
|
||||
set(DEBUG_FLAG "${DBG} -DNDEBUG -DPCSX2_DEVBUILD -D_DEVEL")
|
||||
elseif(CMAKE_BUILD_TYPE MATCHES "Release")
|
||||
set(DEBUG_FLAG "-DNDEBUG")
|
||||
endif()
|
||||
|
|
|
@ -12,35 +12,7 @@ set(CommonFlags
|
|||
-fno-strict-aliasing
|
||||
)
|
||||
|
||||
# Debug - Build
|
||||
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)
|
||||
set(UtilitiesFinalFlags ${CommonFlags})
|
||||
|
||||
# variable with all sources of this library
|
||||
set(UtilitiesSources
|
||||
|
|
|
@ -12,33 +12,7 @@ set(CommonFlags
|
|||
-fno-strict-aliasing
|
||||
)
|
||||
|
||||
# Debug - Build
|
||||
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)
|
||||
set(x86emitterFinalFlags ${CommonFlags})
|
||||
|
||||
# variable with all sources of this library
|
||||
set(x86emitterSources
|
||||
|
|
|
@ -30,23 +30,10 @@ else()
|
|||
set(pcsx2FinalFlags "")
|
||||
endif()
|
||||
|
||||
# Debug - Build
|
||||
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()
|
||||
set(pcsx2FinalFlags ${pcsx2FinalFlags} ${CommonFlags})
|
||||
|
||||
if(XDG_STD)
|
||||
set(pcsx2FinalFlags
|
||||
${pcsx2FinalFlags}
|
||||
-DXDG_STD
|
||||
)
|
||||
set(pcsx2FinalFlags ${pcsx2FinalFlags} -DXDG_STD)
|
||||
endif()
|
||||
|
||||
set(Output PCSX2)
|
||||
|
|
|
@ -17,16 +17,7 @@ set(CommonFlags
|
|||
-Wunused-variable # __dummy variable need to be investigated
|
||||
)
|
||||
|
||||
if(CMAKE_BUILD_TYPE STREQUAL Debug)
|
||||
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()
|
||||
set(GSdxFinalFlags ${CommonFlags})
|
||||
|
||||
if(XDG_STD)
|
||||
set(GSdxFinalFlags ${GSdxFinalFlags} -DXDG_STD)
|
||||
|
|
|
@ -9,11 +9,7 @@ endif()
|
|||
# plugin name
|
||||
set(Output LilyPad-0.11.0)
|
||||
|
||||
if(CMAKE_BUILD_TYPE STREQUAL Debug)
|
||||
set(lilypadFinalFlags "-DPCSX2_DEBUG")
|
||||
else()
|
||||
set(lilypadFinalFlags "")
|
||||
endif()
|
||||
set(lilypadFinalFlags "")
|
||||
|
||||
# lilypad sources
|
||||
set(lilypadSources
|
||||
|
|
Loading…
Reference in New Issue