Mercurial > trustbridge
changeset 34:bee7d274c4dc
Check for polarssl. Add release option to build with other certificates
author | Andre Heinecke <andre.heinecke@intevation.de> |
---|---|
date | Fri, 14 Mar 2014 08:58:18 +0100 |
parents | 25c08d63d2b7 |
children | 56ba6376426e |
files | CMakeLists.txt |
diffstat | 1 files changed, 15 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/CMakeLists.txt Fri Mar 14 08:57:51 2014 +0100 +++ b/CMakeLists.txt Fri Mar 14 08:58:18 2014 +0100 @@ -1,19 +1,30 @@ cmake_minimum_required(VERSION 2.8.8) project(m13) +option(DO_RELEASE_BUILD "Build for a public release." OFF) + set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/") include(CTest) include(GenerateCppcheck) +find_package(PolarSSL) + # Use cmake's automoc and make sure the generated files are included set(CMAKE_AUTOMOC ON) set(CMAKE_INCLUDE_CURRENT_DIR ON) +if(DO_RELEASE_BUILD) + if (NOT CMAKE_BUILD_TYPE) + set (CMAKE_BUILD_TYPE RELEASE) + endif (NOT CMAKE_BUILD_TYPE) + add_definitions (RELEASE_BUILD) +else() # Default to debug build -if (NOT CMAKE_BUILD_TYPE) - set (CMAKE_BUILD_TYPE Debug) -endif (NOT CMAKE_BUILD_TYPE) + if (NOT CMAKE_BUILD_TYPE) + set (CMAKE_BUILD_TYPE Debug) + endif (NOT CMAKE_BUILD_TYPE) +endif() # Warn level to be used for privileged parts set(WARN_HARDENING_FLAGS " -Wextra -Wconversion -Wformat-security") @@ -26,6 +37,7 @@ # Uncomment to enable profiling # set(PROFILING_FLAGS "-fprofile-arcs -ftest-coverage") +# set(PROFILING_LIBS gcov) SET(CMAKE_EXE_LINKER_FLAGS=${PROFILING_FLAGS})