cf89d56ac Release 1.1.0 6defc33ea Update changelog 8480ce447 Use basic_pbf_builder to make buffer type configurable 25fbe0caf Travis: Disable test that fails with out of memory error f6741c19a Travis: Test on different architectures 598031339 Explicitly return 0 or 1 in example code, don't use std::exit dd8d315ea Remove virtual inheritance in builder f8511cc9e Fix another unused variable 4002414f0 Switch to catch2 for testing 9bb27a31f Avoid unused variable warning b04163da6 Use std::array instead of C array 4701b6a57 Make string non-const so the return doesn't copy 454f7d711 Fix clang-tidy config 6105d7a62 "Modernize" travis config 7fefbf932 Use try/catch in main() b3a62df21 Various fixes based on clang-tidy reports 83f784641 Use uppercase letters for numeric literals 23fd5f5c9 CMake config: Also look for newer clang-tidy versions 25ba7a7f6 Remove unnecessary ref qualifier f1cc1728a Doxygen: Remove config settings not available in newer versions 0a0afc97d Fix doc. 630dc80bc fix docs e022ba387 Call commit on finished features. 5d3f6eaf9 Remember version in layer_builder_impl. Add accessor functions. bc9d5f977 Remove comment that doesn't apply (any more). e1618d063 Update appveyor config to use more recent visual studio version. e6f9e3e62 Remove unnecessary workaround in Appveyor config. e1df3894c Remove xcode6.4 build soon to be removed from travis. 808a7b6a1 Release 1.0.3 d4faa2fb0 catch exceptions in vtzero-stats 291572505 Add overload of copy_properties function using a property_manager. 189caf4b8 Use new copy_id() function in advanced documentation. 184bb33e1 Add feature::for_each_property_indexes() member function. 3e296a36f Bugfix: Wrong iterator was checked in assert. 1115c0910 Update submodule to use newest mvt-fixtures. f32e73893 Explicitly initialize member (needed by older GCCs). 8d37928ca More tests. bf68443be Add copy_properties() helper function to feature builders. 96ed8cbd7 Add copy_id() helper function to builders. b166fcc3a Document that layer class uses mutable. 8609cdf96 Add missing word 3484299f2 Release 1.0.2 6d3dd8940 Bugfix: layer_builder::add_feature() now commits features it adds. 8da72723f Update links in change log. git-subtree-dir: third_party/vtzero git-subtree-split: cf89d56ac22eee0a252aab8d2e87344e4ce73d70
158 lines
4.7 KiB
CMake
158 lines
4.7 KiB
CMake
#-----------------------------------------------------------------------------
|
|
#
|
|
# CMake config
|
|
#
|
|
# vtzero
|
|
#
|
|
#-----------------------------------------------------------------------------
|
|
|
|
cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
|
|
|
|
list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
|
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
project(vtzero)
|
|
|
|
set(VTZERO_VERSION_MAJOR 1)
|
|
set(VTZERO_VERSION_MINOR 1)
|
|
set(VTZERO_VERSION_PATCH 0)
|
|
|
|
set(VTZERO_VERSION
|
|
"${VTZERO_VERSION_MAJOR}.${VTZERO_VERSION_MINOR}.${VTZERO_VERSION_PATCH}")
|
|
|
|
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
# This variable must be set to the directory where the mvt-fixtures from the
|
|
# https://github.com/mapbox/mvt-fixtures repository are to be found. Usually
|
|
# this is the directory where the submodule is checked out as described in
|
|
# the README, but you can also set this to a different path, for instance
|
|
# to change the setting while doing development.
|
|
|
|
set(MVT_FIXTURES "${CMAKE_SOURCE_DIR}/test/mvt-fixtures" CACHE PATH "mvt-fixtures directory for tests")
|
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
option(WERROR "Add -Werror flag to build (turns warnings into errors)" ON)
|
|
|
|
if(MSVC)
|
|
add_definitions(-std=c++11 /W3)
|
|
add_definitions(-D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS)
|
|
else()
|
|
add_definitions(-std=c++11 -Wall -Wextra -pedantic -Wsign-compare -Wconversion)
|
|
# add_definitions(-Weverything -Wno-c++98-compat -Wno-documentation -Wno-switch-enum -Wno-weak-vtables -Wno-padded -Wno-documentation-unknown-command -Wno-exit-time-destructors)
|
|
if(WERROR)
|
|
add_definitions(-Werror)
|
|
endif()
|
|
endif()
|
|
|
|
include_directories("${CMAKE_SOURCE_DIR}/include")
|
|
|
|
set(PROTOZERO_DATA_VIEW "" CACHE STRING "Type used for vtzero::data_view")
|
|
if(NOT PROTOZERO_DATA_VIEW STREQUAL "")
|
|
add_definitions(-DPROTOZERO_DATA_VIEW=${PROTOZERO_DATA_VIEW})
|
|
endif()
|
|
|
|
|
|
#-----------------------------------------------------------------------------
|
|
#
|
|
# Find dependencies
|
|
#
|
|
#-----------------------------------------------------------------------------
|
|
|
|
find_package(Protozero 1.7.0 REQUIRED)
|
|
|
|
include_directories(SYSTEM ${PROTOZERO_INCLUDE_DIR})
|
|
|
|
find_package(Boost)
|
|
|
|
|
|
#-----------------------------------------------------------------------------
|
|
#
|
|
# Optional "clang-tidy" target
|
|
#
|
|
#-----------------------------------------------------------------------------
|
|
message(STATUS "Looking for clang-tidy")
|
|
find_program(CLANG_TIDY NAMES clang-tidy clang-tidy-10 clang-tidy-9 clang-tidy-8 clang-tidy-7 clang-tidy-6.0 clang-tidy-5.0)
|
|
|
|
if(CLANG_TIDY)
|
|
message(STATUS "Looking for clang-tidy - found ${CLANG_TIDY}")
|
|
add_custom_target(clang-tidy
|
|
${CLANG_TIDY}
|
|
-p ${CMAKE_BINARY_DIR}
|
|
${CMAKE_SOURCE_DIR}/examples/*.cpp
|
|
${CMAKE_SOURCE_DIR}/test/*.cpp
|
|
${CMAKE_SOURCE_DIR}/test/t/*.cpp
|
|
)
|
|
else()
|
|
message(STATUS "Looking for clang-tidy - not found")
|
|
message(STATUS " Build target 'clang-tidy' will not be available.")
|
|
endif()
|
|
|
|
|
|
#-----------------------------------------------------------------------------
|
|
#
|
|
# Optional "cppcheck" target
|
|
#
|
|
#-----------------------------------------------------------------------------
|
|
message(STATUS "Looking for cppcheck")
|
|
find_program(CPPCHECK NAMES cppcheck)
|
|
|
|
if(CPPCHECK)
|
|
message(STATUS "Looking for cppcheck - found")
|
|
add_custom_target(cppcheck
|
|
${CPPCHECK}
|
|
-Uassert --std=c++11 --enable=all
|
|
${CMAKE_SOURCE_DIR}/examples/*.cpp
|
|
${CMAKE_SOURCE_DIR}/test/*.cpp
|
|
${CMAKE_SOURCE_DIR}/test/t/*.cpp
|
|
)
|
|
else()
|
|
message(STATUS "Looking for cppcheck - not found")
|
|
message(STATUS " Build target 'cppcheck' will not be available.")
|
|
endif()
|
|
|
|
|
|
#-----------------------------------------------------------------------------
|
|
#
|
|
# Include what you use
|
|
#
|
|
#-----------------------------------------------------------------------------
|
|
message(STATUS "Looking for iwyu")
|
|
find_program(IWYU_TOOL NAMES iwyu_tool)
|
|
|
|
if(IWYU_TOOL)
|
|
message(STATUS "Looking for iwyu - found")
|
|
add_custom_target(iwyu
|
|
${IWYU_TOOL} -p ${CMAKE_BINARY_DIR}
|
|
)
|
|
else()
|
|
message(STATUS "Looking for iwyu - not found")
|
|
message(STATUS " Build target 'iwyu' will not be available.")
|
|
endif()
|
|
|
|
|
|
#-----------------------------------------------------------------------------
|
|
#
|
|
# Installation
|
|
#
|
|
#-----------------------------------------------------------------------------
|
|
|
|
install(DIRECTORY include/vtzero DESTINATION include)
|
|
|
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
enable_testing()
|
|
|
|
add_subdirectory(doc)
|
|
|
|
add_subdirectory(examples)
|
|
|
|
add_subdirectory(test)
|
|
|
|
|
|
#-----------------------------------------------------------------------------
|