Compare commits
4 Commits
v5.4.0-rc.7
...
v5.4.0
| Author | SHA1 | Date | |
|---|---|---|---|
| 4db1b7bea5 | |||
| 32c5f14ed3 | |||
| cbd88c63b9 | |||
| 621e302a38 |
+2
-2
@@ -127,8 +127,8 @@ if(ENABLE_GOLD_LINKER)
|
|||||||
|
|
||||||
# Issue 2785: check gold binutils version and don't use gc-sections for versions prior 2.25
|
# Issue 2785: check gold binutils version and don't use gc-sections for versions prior 2.25
|
||||||
string(REGEX REPLACE ".*\\(GNU Binutils[^\\)0-9]+([0-9]+\\.[0-9]+)[^\\)]*\\).*" "\\1" GOLD_BINUTILS_VERSION "${LD_VERSION}")
|
string(REGEX REPLACE ".*\\(GNU Binutils[^\\)0-9]+([0-9]+\\.[0-9]+)[^\\)]*\\).*" "\\1" GOLD_BINUTILS_VERSION "${LD_VERSION}")
|
||||||
if ("${GOLD_BINUTILS_VERSION}" VERSION_LESS "2.25")
|
if ("${GOLD_BINUTILS_VERSION}" VERSION_LESS "2.26")
|
||||||
message(STATUS "Disabling gc-sections on gold binutils < 2.25, see: https://sourceware.org/bugzilla/show_bug.cgi?id=17639")
|
message(STATUS "Disabling gc-sections on gold binutils < 2.26, see: https://sourceware.org/bugzilla/show_bug.cgi?id=17639")
|
||||||
set(LD_AVOID_GC_SECTIONS TRUE)
|
set(LD_AVOID_GC_SECTIONS TRUE)
|
||||||
endif()
|
endif()
|
||||||
else()
|
else()
|
||||||
|
|||||||
+1
-1
@@ -34,7 +34,7 @@ int main(int argc, const char *argv[])
|
|||||||
config.use_shared_memory = false;
|
config.use_shared_memory = false;
|
||||||
|
|
||||||
// Routing machine with several services (such as Route, Table, Nearest, Trip, Match)
|
// Routing machine with several services (such as Route, Table, Nearest, Trip, Match)
|
||||||
OSRM osrm{config};
|
const OSRM osrm{config};
|
||||||
|
|
||||||
// The following shows how to use the Route service; configure this service
|
// The following shows how to use the Route service; configure this service
|
||||||
RouteParameters params;
|
RouteParameters params;
|
||||||
|
|||||||
+21
-3
@@ -51,8 +51,26 @@ module.exports = function () {
|
|||||||
} else {
|
} else {
|
||||||
this.TERMSIGNAL = 'SIGTERM';
|
this.TERMSIGNAL = 'SIGTERM';
|
||||||
this.EXE = '';
|
this.EXE = '';
|
||||||
// TODO autodetect if this was build with shared or static libraries
|
|
||||||
this.LIB = process.env.BUILD_SHARED_LIBS && '.so' || '.a';
|
// heuristically detect .so/.a suffix
|
||||||
|
this.LIB = null;
|
||||||
|
|
||||||
|
try {
|
||||||
|
const dot_a = util.format('%s/libosrm%s', this.BIN_PATH, '.a');
|
||||||
|
fs.accessSync(dot_a, fs.F_OK);
|
||||||
|
this.LIB = '.a';
|
||||||
|
} catch(e) { /*nop*/ }
|
||||||
|
|
||||||
|
try {
|
||||||
|
const dot_so = util.format('%s/libosrm%s', this.BIN_PATH, '.so');
|
||||||
|
fs.accessSync(dot_so, fs.F_OK);
|
||||||
|
this.LIB = '.so';
|
||||||
|
} catch(e) { /*nop*/ }
|
||||||
|
|
||||||
|
if (!this.LIB) {
|
||||||
|
throw new Error('*** Unable to detect dynamic or static libosrm libraries');
|
||||||
|
}
|
||||||
|
|
||||||
this.QQ = '';
|
this.QQ = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -65,7 +83,7 @@ module.exports = function () {
|
|||||||
|
|
||||||
// eslint-disable-next-line no-console
|
// eslint-disable-next-line no-console
|
||||||
console.info(util.format('Node Version', process.version));
|
console.info(util.format('Node Version', process.version));
|
||||||
if (parseInt(process.version.match(/v(\d)/)[1]) < 4) throw new Error('*** PLease upgrade to Node 4.+ to run OSRM cucumber tests');
|
if (parseInt(process.version.match(/v(\d)/)[1]) < 4) throw new Error('*** Please upgrade to Node 4.+ to run OSRM cucumber tests');
|
||||||
|
|
||||||
fs.exists(this.TEST_PATH, (exists) => {
|
fs.exists(this.TEST_PATH, (exists) => {
|
||||||
if (exists)
|
if (exists)
|
||||||
|
|||||||
@@ -69,6 +69,21 @@ struct RouteParameters : public BaseParameters
|
|||||||
|
|
||||||
RouteParameters() = default;
|
RouteParameters() = default;
|
||||||
|
|
||||||
|
template <typename... Args>
|
||||||
|
RouteParameters(const bool steps_,
|
||||||
|
const bool alternatives_,
|
||||||
|
const GeometriesType geometries_,
|
||||||
|
const OverviewType overview_,
|
||||||
|
const boost::optional<bool> continue_straight_,
|
||||||
|
Args... args_)
|
||||||
|
: BaseParameters{std::forward<Args>(args_)...}, steps{steps_}, alternatives{alternatives_},
|
||||||
|
annotations{false}, geometries{geometries_}, overview{overview_},
|
||||||
|
continue_straight{continue_straight_}
|
||||||
|
// Once we perfectly-forward `args` (see #2990) this constructor can delegate to the one below.
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
// RouteParameters constructor adding the `annotations` setting in a API-compatible way.
|
||||||
template <typename... Args>
|
template <typename... Args>
|
||||||
RouteParameters(const bool steps_,
|
RouteParameters(const bool steps_,
|
||||||
const bool alternatives_,
|
const bool alternatives_,
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ class Engine final
|
|||||||
// Needs to be public
|
// Needs to be public
|
||||||
struct EngineLock;
|
struct EngineLock;
|
||||||
|
|
||||||
explicit Engine(EngineConfig &config);
|
explicit Engine(const EngineConfig &config);
|
||||||
|
|
||||||
Engine(Engine &&) noexcept;
|
Engine(Engine &&) noexcept;
|
||||||
Engine &operator=(Engine &&) noexcept;
|
Engine &operator=(Engine &&) noexcept;
|
||||||
@@ -63,12 +63,12 @@ class Engine final
|
|||||||
// Impl. in cpp since for unique_ptr of incomplete types
|
// Impl. in cpp since for unique_ptr of incomplete types
|
||||||
~Engine();
|
~Engine();
|
||||||
|
|
||||||
Status Route(const api::RouteParameters ¶meters, util::json::Object &result);
|
Status Route(const api::RouteParameters ¶meters, util::json::Object &result) const;
|
||||||
Status Table(const api::TableParameters ¶meters, util::json::Object &result);
|
Status Table(const api::TableParameters ¶meters, util::json::Object &result) const;
|
||||||
Status Nearest(const api::NearestParameters ¶meters, util::json::Object &result);
|
Status Nearest(const api::NearestParameters ¶meters, util::json::Object &result) const;
|
||||||
Status Trip(const api::TripParameters ¶meters, util::json::Object &result);
|
Status Trip(const api::TripParameters ¶meters, util::json::Object &result) const;
|
||||||
Status Match(const api::MatchParameters ¶meters, util::json::Object &result);
|
Status Match(const api::MatchParameters ¶meters, util::json::Object &result) const;
|
||||||
Status Tile(const api::TileParameters ¶meters, std::string &result);
|
Status Tile(const api::TileParameters ¶meters, std::string &result) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::unique_ptr<EngineLock> lock;
|
std::unique_ptr<EngineLock> lock;
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ class OSRM final
|
|||||||
* \return Status indicating success for the query or failure
|
* \return Status indicating success for the query or failure
|
||||||
* \see Status, RouteParameters and json::Object
|
* \see Status, RouteParameters and json::Object
|
||||||
*/
|
*/
|
||||||
Status Route(const RouteParameters ¶meters, json::Object &result);
|
Status Route(const RouteParameters ¶meters, json::Object &result) const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Distance tables for coordinates.
|
* Distance tables for coordinates.
|
||||||
@@ -92,7 +92,7 @@ class OSRM final
|
|||||||
* \return Status indicating success for the query or failure
|
* \return Status indicating success for the query or failure
|
||||||
* \see Status, TableParameters and json::Object
|
* \see Status, TableParameters and json::Object
|
||||||
*/
|
*/
|
||||||
Status Table(const TableParameters ¶meters, json::Object &result);
|
Status Table(const TableParameters ¶meters, json::Object &result) const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Nearest street segment for coordinate.
|
* Nearest street segment for coordinate.
|
||||||
@@ -101,7 +101,7 @@ class OSRM final
|
|||||||
* \return Status indicating success for the query or failure
|
* \return Status indicating success for the query or failure
|
||||||
* \see Status, NearestParameters and json::Object
|
* \see Status, NearestParameters and json::Object
|
||||||
*/
|
*/
|
||||||
Status Nearest(const NearestParameters ¶meters, json::Object &result);
|
Status Nearest(const NearestParameters ¶meters, json::Object &result) const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Trip: shortest round trip between coordinates.
|
* Trip: shortest round trip between coordinates.
|
||||||
@@ -110,7 +110,7 @@ class OSRM final
|
|||||||
* \return Status indicating success for the query or failure
|
* \return Status indicating success for the query or failure
|
||||||
* \see Status, TripParameters and json::Object
|
* \see Status, TripParameters and json::Object
|
||||||
*/
|
*/
|
||||||
Status Trip(const TripParameters ¶meters, json::Object &result);
|
Status Trip(const TripParameters ¶meters, json::Object &result) const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Match: snaps noisy coordinate traces to the road network
|
* Match: snaps noisy coordinate traces to the road network
|
||||||
@@ -119,7 +119,7 @@ class OSRM final
|
|||||||
* \return Status indicating success for the query or failure
|
* \return Status indicating success for the query or failure
|
||||||
* \see Status, MatchParameters and json::Object
|
* \see Status, MatchParameters and json::Object
|
||||||
*/
|
*/
|
||||||
Status Match(const MatchParameters ¶meters, json::Object &result);
|
Status Match(const MatchParameters ¶meters, json::Object &result) const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tile: vector tiles with internal graph representation
|
* Tile: vector tiles with internal graph representation
|
||||||
@@ -128,7 +128,7 @@ class OSRM final
|
|||||||
* \return Status indicating success for the query or failure
|
* \return Status indicating success for the query or failure
|
||||||
* \see Status, TileParameters and json::Object
|
* \see Status, TileParameters and json::Object
|
||||||
*/
|
*/
|
||||||
Status Tile(const TileParameters ¶meters, std::string &result);
|
Status Tile(const TileParameters ¶meters, std::string &result) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::unique_ptr<engine::Engine> engine_;
|
std::unique_ptr<engine::Engine> engine_;
|
||||||
|
|||||||
@@ -124,7 +124,7 @@ namespace osrm
|
|||||||
namespace engine
|
namespace engine
|
||||||
{
|
{
|
||||||
|
|
||||||
Engine::Engine(EngineConfig &config)
|
Engine::Engine(const EngineConfig &config)
|
||||||
{
|
{
|
||||||
if (config.use_shared_memory)
|
if (config.use_shared_memory)
|
||||||
{
|
{
|
||||||
@@ -157,32 +157,32 @@ Engine::~Engine() = default;
|
|||||||
Engine::Engine(Engine &&) noexcept = default;
|
Engine::Engine(Engine &&) noexcept = default;
|
||||||
Engine &Engine::operator=(Engine &&) noexcept = default;
|
Engine &Engine::operator=(Engine &&) noexcept = default;
|
||||||
|
|
||||||
Status Engine::Route(const api::RouteParameters ¶ms, util::json::Object &result)
|
Status Engine::Route(const api::RouteParameters ¶ms, util::json::Object &result) const
|
||||||
{
|
{
|
||||||
return RunQuery(lock, *query_data_facade, params, *route_plugin, result);
|
return RunQuery(lock, *query_data_facade, params, *route_plugin, result);
|
||||||
}
|
}
|
||||||
|
|
||||||
Status Engine::Table(const api::TableParameters ¶ms, util::json::Object &result)
|
Status Engine::Table(const api::TableParameters ¶ms, util::json::Object &result) const
|
||||||
{
|
{
|
||||||
return RunQuery(lock, *query_data_facade, params, *table_plugin, result);
|
return RunQuery(lock, *query_data_facade, params, *table_plugin, result);
|
||||||
}
|
}
|
||||||
|
|
||||||
Status Engine::Nearest(const api::NearestParameters ¶ms, util::json::Object &result)
|
Status Engine::Nearest(const api::NearestParameters ¶ms, util::json::Object &result) const
|
||||||
{
|
{
|
||||||
return RunQuery(lock, *query_data_facade, params, *nearest_plugin, result);
|
return RunQuery(lock, *query_data_facade, params, *nearest_plugin, result);
|
||||||
}
|
}
|
||||||
|
|
||||||
Status Engine::Trip(const api::TripParameters ¶ms, util::json::Object &result)
|
Status Engine::Trip(const api::TripParameters ¶ms, util::json::Object &result) const
|
||||||
{
|
{
|
||||||
return RunQuery(lock, *query_data_facade, params, *trip_plugin, result);
|
return RunQuery(lock, *query_data_facade, params, *trip_plugin, result);
|
||||||
}
|
}
|
||||||
|
|
||||||
Status Engine::Match(const api::MatchParameters ¶ms, util::json::Object &result)
|
Status Engine::Match(const api::MatchParameters ¶ms, util::json::Object &result) const
|
||||||
{
|
{
|
||||||
return RunQuery(lock, *query_data_facade, params, *match_plugin, result);
|
return RunQuery(lock, *query_data_facade, params, *match_plugin, result);
|
||||||
}
|
}
|
||||||
|
|
||||||
Status Engine::Tile(const api::TileParameters ¶ms, std::string &result)
|
Status Engine::Tile(const api::TileParameters ¶ms, std::string &result) const
|
||||||
{
|
{
|
||||||
return RunQuery(lock, *query_data_facade, params, *tile_plugin, result);
|
return RunQuery(lock, *query_data_facade, params, *tile_plugin, result);
|
||||||
}
|
}
|
||||||
|
|||||||
+6
-6
@@ -21,32 +21,32 @@ OSRM &OSRM::operator=(OSRM &&) noexcept = default;
|
|||||||
|
|
||||||
// Forward to implementation
|
// Forward to implementation
|
||||||
|
|
||||||
engine::Status OSRM::Route(const engine::api::RouteParameters ¶ms, util::json::Object &result)
|
engine::Status OSRM::Route(const engine::api::RouteParameters ¶ms, util::json::Object &result) const
|
||||||
{
|
{
|
||||||
return engine_->Route(params, result);
|
return engine_->Route(params, result);
|
||||||
}
|
}
|
||||||
|
|
||||||
engine::Status OSRM::Table(const engine::api::TableParameters ¶ms, json::Object &result)
|
engine::Status OSRM::Table(const engine::api::TableParameters ¶ms, json::Object &result) const
|
||||||
{
|
{
|
||||||
return engine_->Table(params, result);
|
return engine_->Table(params, result);
|
||||||
}
|
}
|
||||||
|
|
||||||
engine::Status OSRM::Nearest(const engine::api::NearestParameters ¶ms, json::Object &result)
|
engine::Status OSRM::Nearest(const engine::api::NearestParameters ¶ms, json::Object &result) const
|
||||||
{
|
{
|
||||||
return engine_->Nearest(params, result);
|
return engine_->Nearest(params, result);
|
||||||
}
|
}
|
||||||
|
|
||||||
engine::Status OSRM::Trip(const engine::api::TripParameters ¶ms, json::Object &result)
|
engine::Status OSRM::Trip(const engine::api::TripParameters ¶ms, json::Object &result) const
|
||||||
{
|
{
|
||||||
return engine_->Trip(params, result);
|
return engine_->Trip(params, result);
|
||||||
}
|
}
|
||||||
|
|
||||||
engine::Status OSRM::Match(const engine::api::MatchParameters ¶ms, json::Object &result)
|
engine::Status OSRM::Match(const engine::api::MatchParameters ¶ms, json::Object &result) const
|
||||||
{
|
{
|
||||||
return engine_->Match(params, result);
|
return engine_->Match(params, result);
|
||||||
}
|
}
|
||||||
|
|
||||||
engine::Status OSRM::Tile(const engine::api::TileParameters ¶ms, std::string &result)
|
engine::Status OSRM::Tile(const engine::api::TileParameters ¶ms, std::string &result) const
|
||||||
{
|
{
|
||||||
return engine_->Tile(params, result);
|
return engine_->Tile(params, result);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user