Skip to content

Commit

Permalink
Added build type for cmake.
Browse files Browse the repository at this point in the history
Default build type is Release.
  • Loading branch information
Karl Smith committed Aug 4, 2014
1 parent df7a046 commit b62474d
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,23 @@ project (evt2root)

#if user does not specify prefix we assign it to the exec directory
if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
message("Install Prefix not specified.")
message(STATUS "Install Prefix not specified.")
file(MAKE_DIRECTORY exec)
get_filename_component(INSTALL_DIR ${CMAKE_SOURCE_DIR}/exec REALPATH)
set(CMAKE_INSTALL_PREFIX ${INSTALL_DIR} CACHE PATH
"Install Prefix" FORCE)
endif ()
message("Installing to ${CMAKE_INSTALL_PREFIX}")
message(STATUS "Installing to ${CMAKE_INSTALL_PREFIX}")

#Define the default build type
IF(NOT CMAKE_BUILD_TYPE)
SET(CMAKE_BUILD_TYPE Release CACHE STRING
"Build type, options are: None Debug Release
RelWithDebInfo MinSizeRel."
FORCE)
message(STATUS "Build type not defined, using default.")
ENDIF(NOT CMAKE_BUILD_TYPE)
message(STATUS "Build type: ${CMAKE_BUILD_TYPE}")

set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")

Expand Down

0 comments on commit b62474d

Please sign in to comment.