• 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 3.11)
18
19project (generate_geocoding_data)
20
21set (
22  SOURCES
23  "src/cpp-build/generate_geocoding_data.cc"
24  "src/cpp-build/generate_geocoding_data_main.cc"
25)
26
27if (NOT WIN32)
28  add_definitions ("-Wall -Werror")
29endif ()
30
31include_directories ("src")
32
33add_executable (generate_geocoding_data ${SOURCES})
34target_link_libraries (generate_geocoding_data absl::strings absl::btree absl::node_hash_set)
35
36if (BUILD_TESTING)
37  set (TEST_SOURCES
38      "src/cpp-build/generate_geocoding_data.cc"
39      "test/cpp-build/generate_geocoding_data_test.cc"
40      "test/cpp-build/run_tests.cc"
41  )
42
43  set (TEST_LIBS ${GTEST_LIB})
44
45  if (NOT WIN32)
46    list (APPEND TEST_LIBS pthread)
47  endif ()
48
49  # Build the testing binary.
50  include_directories ("test")
51  add_executable (generate_geocoding_data_test ${TEST_SOURCES})
52  target_link_libraries (generate_geocoding_data_test absl::btree ${TEST_LIBS} absl::node_hash_set)
53endif()
54
55