Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
U
uniset2
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
UniSet project repositories
uniset2
Commits
4ac2dbf8
Commit
4ac2dbf8
authored
Dec 07, 2016
by
Pavel Vainerman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed: __cxx11::string --> std::string
fix compilation with --disable-api
parent
b10f8b9b
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
55 additions
and
29 deletions
+55
-29
.travis.yml
.travis.yml
+1
-1
Makefile.am
Utilities/codegen/tests/Makefile.am
+3
-3
configure.ac
configure.ac
+42
-21
ujson.h
include/ujson.h
+3
-0
libUniSet2.pc.in
libUniSet2.pc.in
+1
-1
ujson.cc
src/Various/ujson.cc
+5
-3
No files found.
.travis.yml
View file @
4ac2dbf8
...
...
@@ -33,7 +33,7 @@ before_script:
# due broken comedi
-
export CXXFLAGS="$CXXFLAGS -Wl,--unresolved-symbols=ignore-in-shared-libs"
-
autoreconf -fiv
-
./configure --enable-tests --enable-mysql --enable-sqlite --enable-rrd --enable-io --enable-logicproc --disable-python --disable-mqtt --disable-pgsql --disable-pkgchecklibev
-
./configure --enable-tests --enable-mysql --enable-sqlite --enable-rrd --enable-io --enable-logicproc --disable-python --disable-mqtt --disable-pgsql --disable-
api --disable-
pkgchecklibev
script
:
-
if [ ${COVERITY_SCAN_BRANCH} != 1 ]; then make ; fi
...
...
Utilities/codegen/tests/Makefile.am
View file @
4ac2dbf8
...
...
@@ -16,13 +16,13 @@ GENUOBJ=UObject_SK.cc UObject_SK.h
BUILT_SOURCES
=
$(GENERATED)
$(GENERATED2)
$(GENOBJ)
TestGen-main.cc TestGen_SK.cc TestGen_SK.h
:
../@PACKAGE@-codegen testgen.src.xml ../*.xsl
../@PACKAGE@-codegen
-l
$(top_builddir)
/Utilities/codegen
--gen-varmap
--local-include
-n
TestGen testgen.src.xml
$(SHELL)
../@PACKAGE@-codegen
-l
$(top_builddir)
/Utilities/codegen
--gen-varmap
--local-include
-n
TestGen testgen.src.xml
TestGenAlone-main.cc TestGenAlone_SK.cc TestGenAlone_SK.h
:
../@PACKAGE@-codegen testgen-alone.src.xml ../*.xsl
../@PACKAGE@-codegen
-l
$(top_builddir)
/Utilities/codegen
--local-include
--alone
-n
TestGenAlone testgen-alone.src.xml
$(SHELL)
../@PACKAGE@-codegen
-l
$(top_builddir)
/Utilities/codegen
--local-include
--alone
-n
TestGenAlone testgen-alone.src.xml
$(GENUOBJ)
:
../@PACKAGE@-codegen uobject.src.xml ../*.xsl
../@PACKAGE@-codegen
-l
$(top_builddir)
/Utilities/codegen
-n
UObject
--no-main
uobject.src.xml
$(SHELL)
../@PACKAGE@-codegen
-l
$(top_builddir)
/Utilities/codegen
-n
UObject
--no-main
uobject.src.xml
clean-local
:
rm
-rf
$(GENERATED)
$(GENERATED2)
$(GENUOBJ)
...
...
configure.ac
View file @
4ac2dbf8
...
...
@@ -55,11 +55,40 @@ else
AC_SUBST(EV_CFLAGS)
fi
#check rest api support
AC_MSG_CHECKING([REST API support])
buildapi=true
AC_ARG_ENABLE(api, AC_HELP_STRING([--disable-api], [disable REST API support]),
[ if test $enableval = yes; then buildapi=true; else buildapi=false; fi],[ buildapi=true; ])
REST_API_CFLAGS=
REST_API_CLIBS=
DISABLE_REST_API=
if test ${buildapi} = true; then
AC_MSG_RESULT([enabled])
REST_API_CLIBS="-lPocoJSON"
else
AC_MSG_RESULT([disabled])
REST_API_CFLAGS="-DDISABLE_REST_API"
DISABLE_REST_API=1
fi
AM_CONDITIONAL(DISABLE_REST_API, test ${buildapi} = false)
AC_SUBST(DISABLE_REST_API)
AC_SUBST(REST_API_CFLAGS)
AC_SUBST(REST_API_CLIBS)
#check libpoco support
AC_MSG_CHECKING([libpoco support])
#AC_SEARCH_LIBS(ServerSocket,PocoNet,,exit)
AC_CHECK_HEADER(Poco/Net/Socket.h,,exit)
POCO_LIBS="-lPocoFoundation -lPocoNet -lPocoJSON"
POCO_LIBS="-lPocoFoundation -lPocoNet"
if test ${buildapi} = true; then
POCO_LIBS="$POCO_LIBS -lPocoJSON"
fi
POCO_CFLAGS="-IPoco"
AC_SUBST(POCO_LIBS)
AC_SUBST(POCO_CFLAGS)
...
...
@@ -102,6 +131,18 @@ test "x$IDL" = "x" && AC_MSG_ERROR([*** omniidl not found.])
#AC_SUBST(UNISET_IDLFLAGS)
#check mysql support
AC_MSG_CHECKING([mysql support])
buildmysql=true
AC_ARG_ENABLE(mysql, AC_HELP_STRING([--disable-mysql], [disable MySQL support]),
[ if test $enableval = yes; then buildmysql=true; else buildmysql=false; fi],[ buildmysql=true; ])
if test ${buildmysql} = true; then
AC_MSG_RESULT([enabled])
AC_CHECK_HEADERS([mysql/mysql.h])
AC_CHECK_LIB([mysqlclient],mysql_init,,exit)
else
AC_MSG_RESULT([disabled])
fi
AM_CONDITIONAL(DISABLE_MYSQL, test ${buildmysql} = false)
...
...
@@ -225,26 +266,6 @@ fi
AM_CONDITIONAL(DISABLE_MQTT, test ${buildmqtt} = false)
#check rest api support
AC_MSG_CHECKING([REST API support])
buildapi=true
AC_ARG_ENABLE(api, AC_HELP_STRING([--disable-api], [disable REST API support]),
[ if test $enableval = yes; then buildapi=true; else buildapi=false; fi],[ buildapi=true; ])
REST_API_CFLAGS=
DISABLE_REST_API=
if test ${buildapi} = true; then
AC_MSG_RESULT([enabled])
else
AC_MSG_RESULT([disabled])
REST_API_CFLAGS="-DDISABLE_REST_API"
DISABLE_REST_API=1
fi
AM_CONDITIONAL(DISABLE_REST_API, test ${buildapi} = false)
AC_SUBST(DISABLE_REST_API)
AC_SUBST(REST_API_CFLAGS)
# check Doxygen
DOXYGEN=""
...
...
include/ujson.h
View file @
4ac2dbf8
...
...
@@ -17,6 +17,7 @@
#ifndef jsonHelpers_H_
#define jsonHelpers_H_
// --------------------------------------------------------------------------
#ifndef DISABLE_REST_API
#include <Poco/JSON/Object.h>
// --------------------------------------------------------------------------
namespace
uniset
...
...
@@ -72,4 +73,6 @@ class object
// --------------------------------------------------------------------------
}
// end of namespace uniset
// --------------------------------------------------------------------------
#endif // end of #ifndef DISABLE_REST_API
// --------------------------------------------------------------------------
#endif // end of _jsonHelpers_H_
libUniSet2.pc.in
View file @
4ac2dbf8
...
...
@@ -7,5 +7,5 @@ Name: libUniSet2
Description: Support library for UniSet
Requires: libxml-2.0 sigc++-2.0 omniORB4 libev
Version: @VERSION@
Libs: -L${libdir} -lUniSet2 -lPocoFoundation -lPocoNet
-lPocoJSON
Libs: -L${libdir} -lUniSet2 -lPocoFoundation -lPocoNet
@REST_API_CLIBS@
Cflags: -I${includedir}/@PACKAGE@ -D__OMNIORB4 -std=c++11 -D_GLIBCXX_USE_NANOSLEEP @REST_API_CFLAGS@
src/Various/ujson.cc
View file @
4ac2dbf8
...
...
@@ -14,6 +14,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
// --------------------------------------------------------------------------
#ifndef DISABLE_REST_API
// --------------------------------------------------------------------------
#include "ujson.h"
// --------------------------------------------------------------------------
namespace
uniset
...
...
@@ -39,13 +41,13 @@ json::help::item::item( Poco::JSON::Object::Ptr& ptr )
params
=
ptr
->
getArray
(
"parameters"
);
}
// --------------------------------------------------------------------------
json
::
help
::
item
::
item
(
const
std
::
__cxx11
::
string
&
description
)
json
::
help
::
item
::
item
(
const
std
::
string
&
description
)
{
root
=
new
Poco
::
JSON
::
Object
();
root
->
set
(
"description"
,
description
);
}
// --------------------------------------------------------------------------
void
json
::
help
::
item
::
param
(
const
std
::
__cxx11
::
string
&
name
,
const
std
::
__cxx11
::
string
&
description
)
void
json
::
help
::
item
::
param
(
const
std
::
string
&
name
,
const
std
::
string
&
description
)
{
if
(
!
params
)
{
...
...
@@ -128,4 +130,4 @@ Poco::JSON::Array::Ptr json::make_child_array(Poco::JSON::Object::Ptr& root, con
// --------------------------------------------------------------------------
}
// end of namespace uniset
// --------------------------------------------------------------------------
#endif // #ifndef DISABLE_REST_API
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment