Mercurial > trustbridge > trustbridge
comparison CMakeLists.txt @ 1387:c64b6c56ce96 0.9.8
(issue95) Change keys for release build. Fix release build usage.
author | Andre Heinecke <andre.heinecke@intevation.de> |
---|---|
date | Thu, 15 Jan 2015 16:46:36 +0100 |
parents | 8897c90b8166 |
children |
comparison
equal
deleted
inserted
replaced
1386:90a8eb36e9b0 | 1387:c64b6c56ce96 |
---|---|
11 option(DO_RELEASE_BUILD "Build for a public release." OFF) | 11 option(DO_RELEASE_BUILD "Build for a public release." OFF) |
12 option(ENABLE_PROFILING "Set to enable profiling." OFF) | 12 option(ENABLE_PROFILING "Set to enable profiling." OFF) |
13 option(USE_CURL "Use libcurl to download updates and certificate lists." ON) | 13 option(USE_CURL "Use libcurl to download updates and certificate lists." ON) |
14 option(USE_CLANG "Use clang to compile trustbridge." OFF) | 14 option(USE_CLANG "Use clang to compile trustbridge." OFF) |
15 | 15 |
16 set(DOWNLOAD_SERVER "https://tb-devel.intevation.de:443" CACHE STRING "Used as download server" ) | 16 set(DOWNLOAD_SERVER "https://updates.trustbridge.de:443" CACHE STRING "Used as download server" ) |
17 set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/") | 17 set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/") |
18 | 18 |
19 #Old qtmain linking behavior to be compatible with cmake versions < 2.8.11 | 19 #Old qtmain linking behavior to be compatible with cmake versions < 2.8.11 |
20 | 20 |
21 if(POLICY CMP0020) | 21 if(POLICY CMP0020) |
22 cmake_policy(SET CMP0020 OLD) | 22 cmake_policy(SET CMP0020 OLD) |
23 endif() | |
24 | |
25 if (DO_RELEASE_BUILD) | |
26 message (STATUS "Building in release mode") | |
27 # Release build should automatically use tag build | |
28 add_definitions(-DIS_TAG_BUILD) | |
23 endif() | 29 endif() |
24 | 30 |
25 if (USE_CLANG) | 31 if (USE_CLANG) |
26 message (STATUS "Using clang options to build trustbridge.") | 32 message (STATUS "Using clang options to build trustbridge.") |
27 # This is a bit of a hack but necessary on Ubuntu 14.4 | 33 # This is a bit of a hack but necessary on Ubuntu 14.4 |
72 if(DO_RELEASE_BUILD) | 78 if(DO_RELEASE_BUILD) |
73 if (NOT CMAKE_BUILD_TYPE) | 79 if (NOT CMAKE_BUILD_TYPE) |
74 set (CMAKE_BUILD_TYPE RELEASE) | 80 set (CMAKE_BUILD_TYPE RELEASE) |
75 endif (NOT CMAKE_BUILD_TYPE) | 81 endif (NOT CMAKE_BUILD_TYPE) |
76 add_definitions (-DRELEASE_BUILD) | 82 add_definitions (-DRELEASE_BUILD) |
77 set(USE_REAL_RESOURCES ON) | |
78 else() | 83 else() |
79 # Default to debug build | 84 # Default to debug build |
80 if (NOT CMAKE_BUILD_TYPE) | 85 if (NOT CMAKE_BUILD_TYPE) |
81 set (CMAKE_BUILD_TYPE Debug) | 86 set (CMAKE_BUILD_TYPE Debug) |
82 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g") | 87 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g") |
83 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g") | 88 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g") |
84 endif (NOT CMAKE_BUILD_TYPE) | 89 endif (NOT CMAKE_BUILD_TYPE) |
85 endif() | |
86 | |
87 if(USE_REAL_RESOURCES) | |
88 add_definitions (-DUSE_REAL_RESOURCES) | |
89 endif() | 90 endif() |
90 | 91 |
91 if (NOT USE_CLANG) | 92 if (NOT USE_CLANG) |
92 # Warn level to be used for privileged parts | 93 # Warn level to be used for privileged parts |
93 set(WARN_HARDENING_FLAGS " -Wextra -Wconversion -Wformat-security") | 94 set(WARN_HARDENING_FLAGS " -Wextra -Wconversion -Wformat-security") |