cmake: create a prof build type

It is the same as a release build but with the debug symbol and the
frame pointer.
This commit is contained in:
Gregory Hainaut 2016-02-21 16:22:31 +01:00
parent a66c911fed
commit 1db5e0c0bf
2 changed files with 6 additions and 1 deletions

View File

@ -55,7 +55,8 @@ for ARG in "$@"; do
--cppcheck ) cppcheck=1 ;; --cppcheck ) cppcheck=1 ;;
--dev|--devel ) flags+=(-DCMAKE_BUILD_TYPE=Devel) build="$root/build_dev";; --dev|--devel ) flags+=(-DCMAKE_BUILD_TYPE=Devel) build="$root/build_dev";;
--dbg|--debug ) flags+=(-DCMAKE_BUILD_TYPE=Debug) build="$root/build_dbg";; --dbg|--debug ) flags+=(-DCMAKE_BUILD_TYPE=Debug) build="$root/build_dbg";;
--release ) flags+=(-DCMAKE_BUILD_TYPE=Release) build="$root/build_rel";; --rel|--release ) flags+=(-DCMAKE_BUILD_TYPE=Release) build="$root/build_rel";;
--prof ) flags+=(-DCMAKE_BUILD_TYPE=Prof) build="$root/build_prof";;
--strip ) flags+=(-DCMAKE_BUILD_STRIP=TRUE) ;; --strip ) flags+=(-DCMAKE_BUILD_STRIP=TRUE) ;;
--glsl ) flags+=(-DGLSL_API=TRUE) ;; --glsl ) flags+=(-DGLSL_API=TRUE) ;;
--egl ) flags+=(-DEGL_API=TRUE) ;; --egl ) flags+=(-DEGL_API=TRUE) ;;
@ -74,6 +75,7 @@ for ARG in "$@"; do
echo "** User options **" echo "** User options **"
echo "--dev / --devel : Build PCSX2 as a Development build." echo "--dev / --devel : Build PCSX2 as a Development build."
echo "--debug : Build PCSX2 as a Debug build." echo "--debug : Build PCSX2 as a Debug build."
echo "--prof : Build PCSX2 as a Profiler build (release + debug symbol)."
echo "--release : Build PCSX2 as a Release build." echo "--release : Build PCSX2 as a Release build."
echo echo
echo "--clean : Do a clean build." echo "--clean : Do a clean build."

View File

@ -277,6 +277,9 @@ elseif(CMAKE_BUILD_TYPE MATCHES "Devel")
set(DEBUG_FLAG "${DBG} -DNDEBUG -DPCSX2_DEVBUILD -D_DEVEL") 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")
elseif(CMAKE_BUILD_TYPE MATCHES "Prof")
# Keep frame pointer and debug information for profiler tool
set(DEBUG_FLAG "${DBG} -DNDEBUG")
endif() endif()
if (USE_ASAN) if (USE_ASAN)