• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (C) 2012 The Libphonenumber Authors
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15# Author: Patrick Mezard
16
17cmake_minimum_required (VERSION 2.8)
18
19project (generate_geocoding_data)
20
21# Helper functions dealing with finding libraries and programs this library
22# depends on.
23
24include (gtest.cmake)
25
26find_or_build_gtest ()
27
28set (
29  SOURCES
30  "src/cpp-build/generate_geocoding_data.cc"
31  "src/cpp-build/generate_geocoding_data_main.cc"
32)
33
34if (NOT WIN32)
35  add_definitions ("-Wall -Werror")
36endif ()
37
38include_directories ("src")
39
40add_executable (generate_geocoding_data ${SOURCES})
41
42set (TEST_SOURCES
43  "src/cpp-build/generate_geocoding_data.cc"
44  "test/cpp-build/generate_geocoding_data_test.cc"
45  "test/cpp-build/run_tests.cc"
46)
47
48set (TEST_LIBS ${GTEST_LIB})
49
50if (NOT WIN32)
51  list (APPEND TEST_LIBS pthread)
52endif ()
53
54# Build the testing binary.
55include_directories ("test")
56add_executable (generate_geocoding_data_test ${TEST_SOURCES})
57target_link_libraries (generate_geocoding_data_test ${TEST_LIBS})
58