From 465d52b766db9a7271abdc87f12b408b94127a4c Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Tue, 8 Sep 2009 03:01:55 +0000 Subject: [PATCH] - Fixed: PROFILE was incorrectly declared in the top-level CMakeLists.txt, so GCC always generating profiling information for Debug and RelWithDebInfo builds. This happened to also bring up that game-music-emu and DUMB are always built as RelWithDebInfo. If we're doing a normal Release build, we can just leave them as Release as well. SVN r1808 (trunk) --- CMakeLists.txt | 2 +- dumb/CMakeLists.txt | 4 +++- game-music-emu/CMakeLists.txt | 4 +++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 951b894b2..78264488d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,7 +10,7 @@ set( ZDOOM_OUTPUT_DIR ${CMAKE_BINARY_DIR} CACHE PATH "Directory where zdoom.pk3 set( ZDOOM_EXE_NAME "zdoom" CACHE FILEPATH "Name of the executable to create." ) if( CMAKE_COMPILER_IS_GNUCXX ) - set( PROFILE CACHE 0 BOOL "Enable profiling with gprof for Debug and RelWithDebInfo build types." ) + set( PROFILE 0 CACHE BOOL "Enable profiling with gprof for Debug and RelWithDebInfo build types." ) endif( CMAKE_COMPILER_IS_GNUCXX ) find_package( BZip2 ) diff --git a/dumb/CMakeLists.txt b/dumb/CMakeLists.txt index 12099accb..85cbaeb55 100644 --- a/dumb/CMakeLists.txt +++ b/dumb/CMakeLists.txt @@ -3,7 +3,9 @@ cmake_minimum_required( VERSION 2.4 ) # DUMB is much slower in a Debug build than a Release build, so we force a Release # build here, since we're not maintaining DUMB, only using it. # Comment out the below line to allow Debug builds. -set( CMAKE_BUILD_TYPE "RelWithDebInfo" ) +if( NOT CMAKE_BUILD_TYPE MATCHES "Release" ) + set( CMAKE_BUILD_TYPE "RelWithDebInfo" ) +endif( NOT CMAKE_BUILD_TYPE MATCHES "Release" ) set( CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -D_DEBUG -DDEBUGMODE=1" ) diff --git a/game-music-emu/CMakeLists.txt b/game-music-emu/CMakeLists.txt index 673db5445..0f1355336 100644 --- a/game-music-emu/CMakeLists.txt +++ b/game-music-emu/CMakeLists.txt @@ -2,7 +2,9 @@ cmake_minimum_required( VERSION 2.4 ) include( CheckCXXCompilerFlag ) # I don't plan on debugging this, so make it a release build. -set( CMAKE_BUILD_TYPE "RelWithDebInfo" ) +if( NOT CMAKE_BUILD_TYPE MATCHES "Release" ) + set( CMAKE_BUILD_TYPE "RelWithDebInfo" ) +endif( NOT CMAKE_BUILD_TYPE MATCHES "Release" ) if( CMAKE_COMPILER_IS_GNUCXX ) set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall" )