~thomas-voss/location-service/fix-1347887

« back to all changes in this revision

Viewing changes to CMakeLists.txt

This MP consolidates multiple related changes together, with the goal of:

(1.) Make the service instance accessible via a cli. Useful for testing scenarios.
(2.) To cut down time-to-first-fix (ttff) by:
  (2.1) Leveraging SUPL and other supplementary data downloaded over ordinary data connections.
  (2.2) Enabling network-based positioning providers to acquire fast position estimates.

In more detail:

* Added tests for daemon and cli.
* Unified daemon and cli header and implementation files.
* Add a command-line interface to the service.
* Split up provider selection policy to rely on an interface ProviderEnumerator to ease in testing.
* Trimmed down on types.
* Removed connectivity API draft to prepare for simpler approach.
* Refactored includes.
* Added a configuration option to handle cell and wifi ID reporting.
* Add a mock for a connectivity API exposed to providers and reporters.
* Add units for connectivity api.
* Refactor cell class into namespace radio. Fixes: 1226204, 1248973, 1281817

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
 
3
3
project(ubuntu-location-service)
4
4
 
5
 
set(UBUNTU_LOCATION_SERVICE_VERSION_MAJOR 0)
 
5
set(UBUNTU_LOCATION_SERVICE_VERSION_MAJOR 1)
6
6
set(UBUNTU_LOCATION_SERVICE_VERSION_MINOR 0)
7
 
set(UBUNTU_LOCATION_SERVICE_VERSION_PATCH 3)
 
7
set(UBUNTU_LOCATION_SERVICE_VERSION_PATCH 0)
8
8
 
9
 
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -pedantic -Wextra -fPIC -pthread")
10
 
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -fno-strict-aliasing -pedantic -Wextra -fPIC -pthread")
 
9
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -pedantic -Wextra -fPIC")
 
10
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -fno-strict-aliasing -pedantic -Wextra -fPIC")
11
11
 
12
12
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
13
13
 
20
20
include(GNUInstallDirs)
21
21
 
22
22
find_package(PkgConfig)
23
 
find_package(Boost 1.49 COMPONENTS system program_options)
 
23
find_package(Boost COMPONENTS system program_options)
24
24
find_package(GLog)
25
25
find_package(GFlags)
 
26
find_package(Threads)
26
27
pkg_check_modules(DBUS dbus-1 REQUIRED)
27
28
pkg_check_modules(DBUS_CPP dbus-cpp REQUIRED)
28
 
 
 
29
pkg_check_modules(JSON_CPP jsoncpp)
 
30
# TODO(tvoss): Re-enable once net-cpp hits the archive.
 
31
pkg_check_modules(NET_CPP net-cpp)
 
32
pkg_check_modules(PROCESS_CPP process-cpp REQUIRED)
 
33
pkg_check_modules(PROPERTIES_CPP properties-cpp REQUIRED)
29
34
#####################################################################
30
35
# Enable code coverage calculation with gcov/gcovr/lcov
31
36
# Usage:
43
48
 
44
49
option (DISABLE_ERROR_ON_LOCAL_TYPEDEFS_WARNINGS "Disable errors when local typedefs are unused" ON)
45
50
if (DISABLE_ERROR_ON_LOCAL_TYPEDEFS_WARNINGS)
46
 
        SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-error=unused-local-typedefs")
 
51
    SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-error=unused-local-typedefs")
47
52
endif (DISABLE_ERROR_ON_LOCAL_TYPEDEFS_WARNINGS)
48
53
 
49
54
include_directories(
50
55
  ${Boost_INCLUDE_DIRS}
51
56
  ${DBUS_INCLUDE_DIRS}
52
 
  ${DBUS_CPP_INCLUDE_DIRS}/dbus
 
57
  ${DBUS_CPP_INCLUDE_DIRS}
 
58
  ${JSON_CPP_INCLUDE_DIRS}
 
59
  ${NET_CPP_INCLUDE_DIRS}
 
60
  ${PROPERTIES_CPP_INCLUDE_DIRS}
 
61
  ${PROCESS_CPP_INCLUDE_DIRS}
53
62
  ${GLog_INCLUDE_DIR}
54
63
  ${GFlags_INCLUDE_DIR}
55
 
  include/location_service
 
64
 
 
65
  ${CMAKE_SOURCE_DIR}/include/location_service
 
66
  ${CMAKE_SOURCE_DIR}/src/location_service
56
67
)
57
68
 
 
69
file(GLOB_RECURSE UBUNTU_LOCATION_SERVICE_PUBLIC_HEADERS ${CMAKE_CURRENT_SOURCE_DIR} *.h)
 
70
 
58
71
add_subdirectory(data)
59
72
add_subdirectory(doc)
60
73
add_subdirectory(examples)