CI use boost 1.67

This commit is contained in:
Wouter van Kleunen
2021-02-21 21:33:09 +00:00
parent 37ac7308fd
commit f7d985378e
3 changed files with 35 additions and 8 deletions
+16 -3
View File
@@ -15,15 +15,22 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends build-essential liblua5.1-0 liblua5.1-0-dev libprotobuf-dev libsqlite3-dev protobuf-compiler shapelib libshp-dev libboost-program-options-dev libboost-filesystem-dev libboost-system-dev
sudo apt-get install -y --no-install-recommends build-essential liblua5.1-0 liblua5.1-0-dev libprotobuf-dev libsqlite3-dev protobuf-compiler shapelib libshp-dev
- name: Build and install
env:
S_CFLAGS: -flto -ffunction-sections -fdata-sections
S_CXXFLAGS: -flto -ffunction-sections -fdata-sections
S_LDFLAGS: -Wl,-gc-sections
run: |
make -j 2
mkdir build
cd build
export CFLAGS=${S_CFLAGS} && export CXXFLAGS=${S_CXXFLAGS} && export LDFLAGS=${S_LDFLAGS}
BOOST_ROOT=$BOOST_ROOT_1_72_0 cmake -DTILEMAKER_USE_STATIC_BOOST=true ..
make -j
sudo make install
- name: Build openmaptiles-compatible mbtiles files of Liechtenstein
@@ -31,6 +38,12 @@ jobs:
curl http://download.geofabrik.de/europe/${AREA}-latest.osm.pbf -o ${AREA}.osm.pbf
tilemaker ${AREA}.osm.pbf --config=resources/config-openmaptiles.json --process=resources/process-openmaptiles.lua --output=${AREA}.mbtiles --verbose
- name: 'Upload compiled executable'
uses: actions/upload-artifact@v2
with:
name: tilemaker
path: build/tilemaker
Github-Action:
name: Generate mbtiles with Github Action
runs-on: ubuntu-latest
+17 -3
View File
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.9)
cmake_minimum_required(VERSION 2.8)
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Release")
@@ -6,6 +6,8 @@ endif()
project(tilemaker)
OPTION(TILEMAKER_USE_STATIC_BOOST "Statically link with boost libraries" OFF)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
if("${PROJECT_SOURCE_DIR}" STREQUAL "${PROJECT_BINARY_DIR}")
@@ -15,6 +17,18 @@ endif()
include_directories(include)
include_directories(${CMAKE_BINARY_DIR}) # for generated files
IF (TILEMAKER_USE_STATIC_BOOST)
MESSAGE (STATUS "Staticly linking with Boost")
SET (Boost_USE_STATIC_LIBS TRUE)
ELSE ()
MESSAGE (STATUS "Dynamically linking with Boost")
SET (Boost_USE_STATIC_LIBS FALSE)
ENDIF ()
IF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
LINK_DIRECTORIES(${Boost_LIBRARY_DIRS})
ENDIF ()
find_package(Boost 1.66 REQUIRED COMPONENTS system filesystem program_options)
include_directories(SYSTEM ${Boost_INCLUDE_DIRS})
@@ -34,7 +48,6 @@ find_package(ZLIB REQUIRED)
include_directories(${ZLIB_INCLUDE_DIR})
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE)
if(MSVC)
add_definitions(-D_USE_MATH_DEFINES)
@@ -56,6 +69,7 @@ file(GLOB tilemaker_src_files
"clipper/*.cpp"
)
add_executable(tilemaker vector_tile.pb.cc osmformat.pb.cc ${tilemaker_src_files})
target_link_libraries(tilemaker ${Boost_LIBRARIES} ${PROTOBUF_LIBRARY} ${LIBSHP_LIBRARIES} ${SQLITE3_LIBRARIES} ${LUA_LIBRARIES} ${ZLIB_LIBRARY} ${THREAD_LIB})
target_link_libraries(tilemaker ${PROTOBUF_LIBRARY} ${LIBSHP_LIBRARIES} ${SQLITE3_LIBRARIES} ${LUA_LIBRARIES} ${ZLIB_LIBRARY} ${THREAD_LIB} ${CMAKE_DL_LIBS}
Boost::system Boost::filesystem Boost::program_options)
install(TARGETS tilemaker RUNTIME DESTINATION bin)
+2 -2
View File
@@ -94,7 +94,7 @@ namespace sqlite {
public:
friend class database;
~database_binder() {
~database_binder() noexcept(false) {
/* Will be executed if no >>op is found */
if (_stmt) {
if (sqlite3_step(_stmt) != SQLITE_DONE) {
@@ -548,4 +548,4 @@ namespace sqlite {
};
#pragma endregion
}
}