diff --git a/CMakeLists.txt b/CMakeLists.txt index 951b894b23..78264488de 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 12099accba..85cbaeb551 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 673db54455..0f13553361 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" )