diff --git a/src/options.cpp b/src/options.cpp index 0b5744dfd..687b74fb1 100644 --- a/src/options.cpp +++ b/src/options.cpp @@ -14,6 +14,7 @@ #include "options.hpp" #include "reprojection.hpp" #include "sprompt.hpp" +#include "version.hpp" #include #include @@ -564,6 +565,7 @@ options_t::options_t(int argc, char *argv[]) : options_t() reproject_area = true; break; case 'V': + fmt::print(stderr, "Build: {}\n", get_build_type()); fmt::print(stderr, "Compiled using the following library versions:\n"); fmt::print(stderr, "Libosmium {}\n", LIBOSMIUM_VERSION_STRING); fmt::print(stderr, "Proj {}\n", get_proj_version()); diff --git a/src/version.cpp.in b/src/version.cpp.in index b64fab60d..7f63e370b 100644 --- a/src/version.cpp.in +++ b/src/version.cpp.in @@ -7,6 +7,11 @@ * For a full list of authors see the git log. */ +char const *get_build_type() noexcept +{ + return "@CMAKE_BUILD_TYPE@"; +} + char const *get_osm2pgsql_version() noexcept { return "@PACKAGE_VERSION@@VERSION_FROM_GIT@"; diff --git a/src/version.hpp b/src/version.hpp index d022cfb01..f66d0afbe 100644 --- a/src/version.hpp +++ b/src/version.hpp @@ -10,6 +10,7 @@ * For a full list of authors see the git log. */ +char const *get_build_type() noexcept; char const *get_osm2pgsql_version() noexcept; char const *get_osm2pgsql_short_version() noexcept; char const *get_minimum_postgresql_server_version() noexcept;