aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorwsnipex <wsnipex@a1.net>2017-11-01 20:20:19 +0100
committerwsnipex <wsnipex@a1.net>2017-11-01 22:21:32 +0100
commit1cea4c73d24af3ed22789ece095379c66269fa6c (patch)
tree7c6778fd0a80e6ce865a23ff28839a168d3364b3 /tools
parent64b82bba85398be323e61cba3d559997752f9e6f (diff)
[JsonSchemabuilder] adjust version parsing
Diffstat (limited to 'tools')
-rw-r--r--tools/depends/native/JsonSchemaBuilder/CMakeLists.txt2
-rw-r--r--tools/depends/native/JsonSchemaBuilder/src/JsonSchemaBuilder.cpp3
-rw-r--r--tools/depends/native/JsonSchemaBuilder/src/Makefile.am1
3 files changed, 5 insertions, 1 deletions
diff --git a/tools/depends/native/JsonSchemaBuilder/CMakeLists.txt b/tools/depends/native/JsonSchemaBuilder/CMakeLists.txt
index 4fe8fdce40..783b8a3c58 100644
--- a/tools/depends/native/JsonSchemaBuilder/CMakeLists.txt
+++ b/tools/depends/native/JsonSchemaBuilder/CMakeLists.txt
@@ -1,3 +1,5 @@
set(SOURCES src/JsonSchemaBuilder.cpp)
+set(CMAKE_CXX_STANDARD 11)
+set(CMAKE_CXX_STANDARD_REQUIRED ON)
add_executable(JsonSchemaBuilder ${SOURCES})
diff --git a/tools/depends/native/JsonSchemaBuilder/src/JsonSchemaBuilder.cpp b/tools/depends/native/JsonSchemaBuilder/src/JsonSchemaBuilder.cpp
index a267fd9d34..9a8acdbd9b 100644
--- a/tools/depends/native/JsonSchemaBuilder/src/JsonSchemaBuilder.cpp
+++ b/tools/depends/native/JsonSchemaBuilder/src/JsonSchemaBuilder.cpp
@@ -22,6 +22,7 @@
#include <fstream>
#include <iostream>
#include <string>
+#include <regex>
using namespace std;
@@ -29,7 +30,7 @@ void print_version(ifstream &in, ofstream &out)
{
string line;
if (getline(in, line))
- out << line;
+ out << regex_replace(line, regex("(\\s+)?JSONRPC_VERSION\\s+|(\\s+)?#.*"), "");
}
void print_license(ifstream &in, ofstream &out)
diff --git a/tools/depends/native/JsonSchemaBuilder/src/Makefile.am b/tools/depends/native/JsonSchemaBuilder/src/Makefile.am
index 1d5e071bca..99454a1005 100644
--- a/tools/depends/native/JsonSchemaBuilder/src/Makefile.am
+++ b/tools/depends/native/JsonSchemaBuilder/src/Makefile.am
@@ -1,3 +1,4 @@
bin_PROGRAMS = JsonSchemaBuilder
JsonSchemaBuilder_SOURCES = JsonSchemaBuilder.cpp
+AM_CXXFLAGS = -O2 -std=c++11