[CMAKE]: Allow specifying CMAKE_BUILD_TYPE

Defaults to "Debug", but the rpm will use "MinSizeRel"

Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
This commit is contained in:
Arnaldo Carvalho de Melo 2007-04-26 11:02:20 -03:00
parent f85781d5b9
commit ee12d416f3
1 changed files with 5 additions and 1 deletions

View File

@ -17,7 +17,11 @@ endmacro(_set_fancy)
# before ${CMAKE_ROOT}/Modules/ is checked
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules")
set(CMAKE_BUILD_TYPE debug)
if (NOT CMAKE_BUILD_TYPE)
set (CMAKE_BUILD_TYPE Debug CACHE STRING
"Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel."
FORCE)
endif (NOT CMAKE_BUILD_TYPE)
find_package(DWARF REQUIRED)