Merge branch 'master' into svg-group-render
This commit is contained in:
commit
cd4069f91e
4 changed files with 37 additions and 16 deletions
27
.github/workflows/build_and_test.yml
vendored
27
.github/workflows/build_and_test.yml
vendored
|
@ -25,7 +25,12 @@ jobs:
|
|||
- uses: pre-commit/action@v3.0.0
|
||||
|
||||
buildAndTest:
|
||||
name: Build and Test
|
||||
name: >-
|
||||
Build & Test
|
||||
(${{ matrix.os }})
|
||||
(C++ ${{ matrix.cxx-standard }})
|
||||
${{ matrix.memory-mapped == 'OFF' && '(USE_MEMORY_MAPPED_FILE=OFF)' || '' }}
|
||||
${{ matrix.static-build == 'OFF' && '(BUILD_SHARED_LIBS=OFF)' || '' }}
|
||||
needs: checkSource
|
||||
strategy:
|
||||
fail-fast: false
|
||||
|
@ -33,11 +38,20 @@ jobs:
|
|||
os: [macos-latest, windows-latest, ubuntu-latest]
|
||||
memory-mapped: ["OFF", "ON"]
|
||||
static-build: ["OFF", "ON"]
|
||||
cxx-standard: [14]
|
||||
include:
|
||||
- os: ubuntu-latest
|
||||
mono: mono
|
||||
- os: macos-latest
|
||||
mono: mono
|
||||
- os: macos-latest
|
||||
cxx-standard: 17
|
||||
mono: mono
|
||||
- os: ubuntu-latest
|
||||
cxx-standard: 17
|
||||
mono: mono
|
||||
- os: windows-latest
|
||||
cxx-standard: 17
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
|
@ -78,12 +92,19 @@ jobs:
|
|||
string: ${{ runner.os }}
|
||||
|
||||
- name: set lower case runner os
|
||||
shell: "bash"
|
||||
shell: bash
|
||||
run: |
|
||||
echo "PRESET=${{ steps.lc_platform.outputs.lowercase }}-ci" >>${GITHUB_ENV}
|
||||
|
||||
- name: Configure CMake
|
||||
run: cmake -DUSE_MEMORY_MAPPED_FILE=${{ matrix.memory-mapped }} -DBUILD_SHARED_LIBS=${{ matrix.static-build }} --preset ${{ env.PRESET }}
|
||||
shell: bash
|
||||
run: |
|
||||
cmake \
|
||||
-DBUILD_SHARED_LIBS:BOOL=${{ matrix.static-build || 'ON' }} \
|
||||
-DCMAKE_CXX_STANDARD=${{ matrix.cxx-standard || '14' }} \
|
||||
-DUSE_MEMORY_MAPPED_FILE:BOOL=${{ matrix.memory-mapped || 'ON' }} \
|
||||
-LA \
|
||||
--preset ${{ env.PRESET }}
|
||||
|
||||
- name: Build
|
||||
run: cmake --build --preset ${{ env.PRESET }}
|
||||
|
|
2
.github/workflows/release_linux.yml
vendored
2
.github/workflows/release_linux.yml
vendored
|
@ -40,7 +40,7 @@ jobs:
|
|||
libboost-regex-dev
|
||||
|
||||
- name: Configure CMake
|
||||
run: cmake --preset ${{ env.PRESET }}
|
||||
run: cmake -LA --preset ${{ env.PRESET }}
|
||||
|
||||
- name: Build
|
||||
run: cmake --build --preset ${{ env.PRESET }}
|
||||
|
|
|
@ -49,7 +49,7 @@ mapnik_option(USE_PROJ "adds proj support" ON)
|
|||
mapnik_option(USE_GRID_RENDERER "adds grid renderer" ON)
|
||||
mapnik_option(USE_SVG_RENDERER "adds svg renderer" ON)
|
||||
mapnik_option(USE_BIGINT "uses 64 bit instead of 32" ON)
|
||||
mapnik_option(USE_BOOST_FILESYSTEM "use boost::filesytem even if `std::filesystem` is avaible (since c++17)" OFF)
|
||||
mapnik_option(USE_BOOST_FILESYSTEM "use boost::filesytem even if `std::filesystem` is available (since c++17)" OFF)
|
||||
mapnik_option(USE_MEMORY_MAPPED_FILE "uses file cache" ON)
|
||||
mapnik_option(USE_MULTITHREADED "enables the multithreaded features (threadsafe)" ON)
|
||||
mapnik_option(USE_NO_ATEXIT "disable atexit" OFF)
|
||||
|
@ -156,11 +156,11 @@ mapnik_find_threads()
|
|||
mapnik_find_package(ICU REQUIRED COMPONENTS uc i18n data)
|
||||
|
||||
mapnik_find_package(Boost ${BOOST_MIN_VERSION} REQUIRED COMPONENTS regex)
|
||||
if(CMAKE_CXX_STANDARD LESS 17)
|
||||
set(USE_BOOST_FILESYSTEM ON)
|
||||
if(CMAKE_CXX_STANDARD VERSION_LESS 17)
|
||||
set(USE_BOOST_FILESYSTEM ON CACHE BOOL "Use boost::filesystem" FORCE)
|
||||
endif()
|
||||
if(USE_BOOST_FILESYSTEM)
|
||||
mapnik_find_package(Boost ${BOOST_MIN_VERSION} REQUIRED COMPONENTS filesystem system)
|
||||
mapnik_find_package(Boost ${BOOST_MIN_VERSION} REQUIRED COMPONENTS filesystem system)
|
||||
endif()
|
||||
|
||||
list(APPEND MAPNIK_COMPILE_DEFS BOOST_REGEX_HAS_ICU)
|
||||
|
@ -266,7 +266,7 @@ if(USE_BIGINT)
|
|||
endif()
|
||||
|
||||
if(USE_BOOST_FILESYSTEM)
|
||||
list(APPEND MAPNIK_COMPILE_DEFS USE_BOOST_FILESYSYTEM)
|
||||
list(APPEND MAPNIK_COMPILE_DEFS USE_BOOST_FILESYSTEM)
|
||||
list(APPEND MAPNIK_OPTIONAL_LIBS Boost::filesystem)
|
||||
endif()
|
||||
|
||||
|
|
|
@ -23,20 +23,20 @@
|
|||
#ifndef MAPNIK_FILESYSTEM_HPP
|
||||
#define MAPNIK_FILESYSTEM_HPP
|
||||
|
||||
#if defined(__cpp_lib_filesystem) && !defined(USE_BOOST_FILESYSTEM)
|
||||
#include <filesystem>
|
||||
#else
|
||||
#ifdef USE_BOOST_FILESYSTEM
|
||||
#include <boost/filesystem/operations.hpp> // for absolute, exists, etc
|
||||
#include <boost/filesystem/path.hpp> // for path, operator/
|
||||
#else
|
||||
#include <filesystem>
|
||||
#endif
|
||||
|
||||
namespace mapnik {
|
||||
#if defined(__cpp_lib_filesystem) && !defined(USE_BOOST_FILESYSTEM)
|
||||
namespace fs = std::filesystem;
|
||||
using error_code = std::error_code;
|
||||
#else
|
||||
#ifdef USE_BOOST_FILESYSTEM
|
||||
namespace fs = boost::filesystem;
|
||||
using error_code = boost::system::error_code;
|
||||
#else
|
||||
namespace fs = std::filesystem;
|
||||
using error_code = std::error_code;
|
||||
#endif
|
||||
} // namespace mapnik
|
||||
|
||||
|
|
Loading…
Reference in a new issue