Build in release mode by default. This way, users only have to specify the CMAKE_BUILD_TYPE parameter if they actually want Debug mode.

This commit is contained in:
Sebastian Messmer 2016-02-14 17:06:06 +01:00
parent b84c8d63fd
commit e4d41af9a9
2 changed files with 8 additions and 3 deletions

View File

@ -6,9 +6,14 @@ require_gcc_version(4.8)
require_clang_version(3.5) # clang 3.5 needed for spdlog dependency require_clang_version(3.5) # clang 3.5 needed for spdlog dependency
# Default value is not to build test cases # Default value is not to build test cases
if(NOT DEFINED BUILD_TESTING) if(NOT BUILD_TESTING)
set(BUILD_TESTING OFF CACHE INTERNAL "BUILD_TESTING") set(BUILD_TESTING OFF CACHE INTERNAL "BUILD_TESTING")
endif(NOT DEFINED BUILD_TESTING) endif(NOT BUILD_TESTING)
# Default vaule is to build in release mode
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release CACHE INTERNAL "CMAKE_BUILD_TYPE")
endif(NOT CMAKE_BUILD_TYPE)
add_subdirectory(vendor) add_subdirectory(vendor)
add_subdirectory(src) add_subdirectory(src)

View File

@ -80,7 +80,7 @@ Build & Install
2. Build 2. Build
$ mkdir cmake && cd cmake $ mkdir cmake && cd cmake
$ cmake .. -DCMAKE_BUILD_TYPE=Release $ cmake ..
$ make $ make
3. Install 3. Install