File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ project(cql2cpp
55 HOMEPAGE_URL "https://github.com/IndoorSpatial/cql2cpp"
66 LANGUAGES CXX
77)
8+ add_definitions (-DVERSION= "${PROJECT_VERSION} " )
89
910find_package (GTest REQUIRED )
1011find_package (geos REQUIRED )
Original file line number Diff line number Diff line change 2323#include " global_yylex.h"
2424#include " tree_dot.h"
2525
26+ #ifndef VERSION
27+ #define VERSION " 0.0.0"
28+ #endif
29+
2630namespace cql2cpp {
2731
2832template <typename FeatureType>
@@ -113,6 +117,8 @@ class Cql2Cpp {
113117 return true ;
114118 }
115119
120+ static std::string version () { return VERSION; }
121+
116122 private:
117123 static bool Parse (const std::string& cql2_query, AstNodePtr* root,
118124 std::string* error_msg) {
Original file line number Diff line number Diff line change 2121
2222#include < fstream>
2323
24+ #ifndef VERSION
25+ #define VERSION " 0.0.0"
26+ #endif
27+
2428DEFINE_string (query, " " , " cql2 query string" );
2529DEFINE_string (geojson, " " ,
2630 " geojson data set with multiple features in one feature "
@@ -35,7 +39,7 @@ int main(int argc, char** argv) {
3539 gflags::SetUsageMessage (
3640 " Usage: cql2 -query=\" city='Toronto'\" "
3741 " -geojson=\" path/to/feature_collection.geojson\" -index=0" );
38- gflags::SetVersionString (" 0.1.0 " );
42+ gflags::SetVersionString (VERSION );
3943 gflags::ParseCommandLineFlags (&argc, &argv, true );
4044
4145 google::InitGoogleLogging (argv[0 ]);
You can’t perform that action at this time.
0 commit comments