Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop support for staticxml backend in production code #376

Merged
merged 1 commit into from
Mar 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 1 addition & 8 deletions openstreetmap-cgimap.1
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,6 @@ FCGI port number (e.g. 8000) to listen on. This option is for backwards compatib
.TP
.BR \-\-socket =\fISOCKET\fR
FCGI port number (e.g. :8000) or UNIX socket to listen on.
.TP
.BR \-\-backend =\fIBACKEND\fR
Backend to use, available options are: apidb, staticxml.
Default is apidb.
.SS ApiDB backend options
.TP
.BR \-\-dbname =\fIDBNAME\fR
Expand Down Expand Up @@ -155,7 +151,4 @@ Database character set to use for API write operations, if different from \-\-ch
.TP
.BR \-\-update\-dbport =\fIUPDATEPORT\fR
Database port number or UNIX socket file name to use for API write operations, if different from \-\-dbport.
.SS Static XML backend options:
.TP
.BR \-\-file =\fIFILE\fR
File to load static OSM XML from.

2 changes: 1 addition & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -99,4 +99,4 @@ target_link_libraries(cgimap_fcgi


add_subdirectory(backend/apidb)
add_subdirectory(backend/staticxml)

15 changes: 0 additions & 15 deletions src/backend/staticxml/CMakeLists.txt

This file was deleted.

3 changes: 0 additions & 3 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@ using namespace std::chrono_literals;
#include "cgimap/backend/apidb/apidb.hpp"
#endif

#include "cgimap/backend/staticxml/staticxml.hpp"

namespace po = boost::program_options;

namespace {
Expand Down Expand Up @@ -295,7 +293,6 @@ void setup_backends() {
#if ENABLE_APIDB
register_backend(make_apidb_backend());
#endif
register_backend(make_staticxml_backend());
}


Expand Down
16 changes: 16 additions & 0 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,22 @@
############
if(BUILD_TESTING)

##################
# cgimap_staticxml
##################
add_library(cgimap_staticxml)

target_include_directories(cgimap_staticxml PUBLIC
.)

target_sources(cgimap_staticxml PRIVATE
staticxml.cpp)

target_link_libraries(cgimap_staticxml
cgimap_common_compiler_options
LibXml2::LibXml2
cgimap_core)

###########
# test_core
###########
Expand Down
2 changes: 1 addition & 1 deletion src/backend/staticxml/staticxml.cpp → test/staticxml.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* For a full list of authors see the git log.
*/

#include "cgimap/backend/staticxml/staticxml.hpp"
#include "staticxml.hpp"
#include "cgimap/backend.hpp"
#include "cgimap/output_formatter.hpp"
#include "cgimap/api06/id_version.hpp"
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion test/test_core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@

#include "cgimap/process_request.hpp"
#include "cgimap/output_buffer.hpp"
#include "cgimap/backend/staticxml/staticxml.hpp"
#include "cgimap/request_helpers.hpp"
#include "cgimap/time.hpp"
#include "staticxml.hpp"

#include <boost/program_options.hpp>
#include <fmt/core.h>
Expand Down
Loading