source: CMakeLists.txt@ 12063

Last change on this file since 12063 was 12060, checked in by hock@…, 11 years ago

Reintegrate branch: 20130111-hock-message_classes

improvements:

  • new message classes (reboost, zero-copy)
  • "fast path" for direct links (skip overlay layer)
  • link-properties accessible from the application
  • SystemQueue can call boost::bind functions
  • protlib compatibility removed (32bit overhead saved in every message)
  • addressing2
  • AddressDiscovery discoveres only addresses on which we're actually listening
  • ariba serialization usage reduced (sill used in OverlayMsg)
  • Node::connect, easier and cleaner interface to start-up ariba from the application
  • ariba configs via JSON, XML, etc (boost::property_tree)
  • keep-alive overhead greatly reduced
  • (relayed) overlay links can actually be closed now
  • lost messages are detected in most cases
  • notification to the application when link is transformed into direct-link
  • overlay routing: send message to second best hop if it would be dropped otherwise
  • SequenceNumbers (only mechanisms, so for: upward compatibility)
  • various small fixes


regressions:

  • bluetooth is not yet working again
  • bootstrap modules deactivated
  • liblog4xx is not working (use cout-logging)

This patch brings great performance and stability improvements at cost of backward compatibility.
Also bluetooth and the bootstrap modules have not been ported to the new interfaces, yet.

File size: 6.5 KB
Line 
1# [License]
2# The Ariba-Underlay Copyright
3#
4# Copyright (c) 2008-2012, Institute of Telematics, UniversitÀt Karlsruhe (TH)
5#
6# Institute of Telematics
7# UniversitÀt Karlsruhe (TH)
8# Zirkel 2, 76128 Karlsruhe
9# Germany
10#
11# Redistribution and use in source and binary forms, with or without
12# modification, are permitted provided that the following conditions are
13# met:
14#
15# 1. Redistributions of source code must retain the above copyright
16# notice, this list of conditions and the following disclaimer.
17# 2. Redistributions in binary form must reproduce the above copyright
18# notice, this list of conditions and the following disclaimer in the
19# documentation and/or other materials provided with the distribution.
20#
21# THIS SOFTWARE IS PROVIDED BY THE INSTITUTE OF TELEMATICS ``AS IS'' AND
22# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
24# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OF TELEMATICS OR
25# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
26# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
27# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
28# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
29# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
30# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
31# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32#
33# The views and conclusions contained in the software and documentation
34# are those of the authors and should not be interpreted as representing
35# official policies, either expressed or implied, of the Institute of
36# Telematics.
37# [License]
38
39cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
40project(ariba CXX)
41
42# Version
43set(ariba_VERSION_MAJOR 0)
44set(ariba_VERSION_MINOR 8)
45set(ariba_VERSION_PATCH 99)
46set(ariba_VERSION ${ariba_VERSION_MAJOR}.${ariba_VERSION_MINOR}.${ariba_VERSION_PATCH})
47
48message(STATUS "Configuring ariba version ${ariba_VERSION}")
49
50
51list(APPEND CMAKE_MODULE_PATH "${ariba_SOURCE_DIR}/CMakeModules")
52
53
54## Add build type: Profiling ##
55SET( CMAKE_CXX_FLAGS_PROFILING "-O2 -g -pg" CACHE STRING
56 "Flags used by the C++ compiler during profiling builds."
57 FORCE )
58SET( CMAKE_C_FLAGS_PROFILING "-O2 -g -pg" CACHE STRING
59 "Flags used by the C compiler during profiling builds."
60 FORCE )
61SET( CMAKE_EXE_LINKER_FLAGS_PROFILING
62 "" CACHE STRING
63 "Flags used for linking binaries during profiling builds."
64 FORCE )
65SET( CMAKE_SHARED_LINKER_FLAGS_PROFILING
66 "" CACHE STRING
67 "Flags used by the shared libraries linker during profiling builds."
68 FORCE )
69MARK_AS_ADVANCED(
70 CMAKE_CXX_FLAGS_PROFILING
71 CMAKE_C_FLAGS_PROFILING
72 CMAKE_EXE_LINKER_FLAGS_PROFILING
73 CMAKE_SHARED_LINKER_FLAGS_PROFILING )
74# Update the documentation string of CMAKE_BUILD_TYPE for GUIs
75#SET( CMAKE_BUILD_TYPE "${CMAKE_BUILD_TYPE}" CACHE STRING
76# "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel Profiling."
77# FORCE )
78## [Add build type: Profiling] ##
79
80## set default build type
81IF(NOT CMAKE_BUILD_TYPE)
82 SET(CMAKE_BUILD_TYPE Release
83 CACHE STRING "Choose the type of build : None Debug Release RelWithDebInfo MinSizeRel Profiling."
84 FORCE)
85ENDIF(NOT CMAKE_BUILD_TYPE)
86message("---> Current build type is: ${CMAKE_BUILD_TYPE}")
87
88
89
90
91## Provide some choices for CMAKE_BUILD_TYPE
92#set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS
93# "" Release Debug RelWithDebInfo MinSizeRel)
94
95# Explicitly add BUILD_SHARED_LIBS to the user interface and default to on
96option(BUILD_SHARED_LIBS "Whether to build libraries shared or static" ON)
97mark_as_advanced(BUILD_SHARED_LIBS)
98
99
100
101# Option to produce statically linked binaries
102option(BUILD_STATIC_BINS
103 "Whether to link executables statically.
104If selected overrrides BUILD_SHARED_LIBS.
105This option has to be set BEFORE the initial creation of the CMake cache
106(this is only possible by using the non-interactive command line interface
107`cmake ../ -DBUILD_STATIC_BINS=ON`)
108Otherwise the library paths will not be rediscovered."
109 OFF
110 )
111
112if(DEFINED BUILD_STATIC_BINS_PREVIOUS_VALUE AND
113 ((BUILD_STATIC_BINS_PREVIOUS_VALUE AND NOT BUILD_STATIC_BINS) OR
114 (NOT BUILD_STATIC_BINS_PREVIOUS_VALUE AND BUILD_STATIC_BINS)))
115 message(FATAL_ERROR
116 "You can't set BUILD_STATIC_BINS to a different value after the "
117 "CMake cache has been built because then the library paths will not "
118 "be rediscovered. "
119 "Setting this before cache creation is only possible by using the "
120 "non-interactive command line interface: "
121 "`cmake ../ -DBUILD_STATIC_BINS=ON`"
122 )
123endif()
124set(BUILD_STATIC_BINS_PREVIOUS_VALUE "${BUILD_STATIC_BINS}" CACHE INTERNAL
125 "Internal value to detect whether the BUILD_STATIC_BINS has been previously
126 set to a different value"
127 )
128
129if(BUILD_STATIC_BINS)
130 set(BUILD_SHARED_LIBS OFF)
131 set(Boost_USE_STATIC_LIBS ON)
132 set(Boost_USE_STATIC_RUNTIME ON)
133 # Give priority to .a files (or equivalent)
134 set(CMAKE_FIND_LIBRARY_SUFFIXES
135 ${CMAKE_STATIC_LIBRARY_SUFFIX} ${CMAKE_FIND_LIBRARY_SUFFIXES})
136endif(BUILD_STATIC_BINS)
137# End of option to produce statically linked binaries
138
139
140add_subdirectory(source)
141add_subdirectory(sample)
142add_subdirectory(docu)
143
144# Install package information
145install(EXPORT ariba-targets
146 DESTINATION lib/ariba
147 COMPONENT Development
148 )
149
150configure_file(
151 pkg/ariba-config.cmake.in
152 pkg/ariba-config.cmake
153 @ONLY
154 )
155
156configure_file(
157 pkg/ariba-config-local.cmake.in
158 ariba-config.cmake
159 @ONLY
160 )
161
162configure_file(
163 pkg/ariba-config-version.cmake.in
164 ariba-config-version.cmake
165 @ONLY
166 )
167
168install(
169 FILES
170 "${ariba_BINARY_DIR}/pkg/ariba-config.cmake"
171 "${ariba_BINARY_DIR}/ariba-config-version.cmake"
172 DESTINATION lib/ariba
173 COMPONENT Development
174 )
175
176
177
178# Packaging
179set(CPACK_PACKAGE_VERSION_MAJOR
180 "${ariba_VERSION_MAJOR}"
181 )
182set(CPACK_PACKAGE_VERSION_MINOR
183 "${ariba_VERSION_MINOR}"
184 )
185set(CPACK_PACKAGE_VERSION_PATCH
186 "${ariba_VERSION_PATCH}"
187 )
188
189set(CPACK_SYSTEM_NAME
190 "${CMAKE_SYSTEM_NAME}_${CMAKE_SYSTEM_PROCESSOR}"
191 )
192
193set(CPACK_PACKAGE_DESCRIPTION_SUMMARY
194 "Ariba P2P library"
195 )
196#TODO: set(CPACK_PACKAGE_DESCRIPTION_FILE)
197#TODO: set(CPACK_RESOURCE_FILE_README)
198#TODO: set(CPACK_RESOURCE_FILE_WELCOME)
199
200set(CPACK_PACKAGE_VENDOR
201 "Institute of Telematics, UniversitÀt Karlsruhe (TH)"
202 )
203
204set(CPACK_SOURCE_PACKAGE_FILE_NAME "ariba-${ariba_VERSION}")
205
206include(CPack)
Note: See TracBrowser for help on using the repository browser.