Skip to content

Commit

Permalink
Merge pull request #55 from rcsoccersim/develop
Browse files Browse the repository at this point in the history
Official Release 19.0.0
  • Loading branch information
hidehisaakiyama authored Mar 25, 2024
2 parents 00861ce + b5a42a9 commit 1193469
Show file tree
Hide file tree
Showing 52 changed files with 139,448 additions and 4,807 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
cmake_minimum_required(VERSION 3.5)

project(rcssmonitor VERSION 18.0.0)
project(rcssmonitor VERSION 19.0.0)

if(CMAKE_VERSION VERSION_LESS "3.7.0")
set(CMAKE_INCLUDE_CURRENT_DIR ON)
endif()

# compiler options
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

if(NOT CMAKE_BUILD_TYPE)
Expand Down
9 changes: 9 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
2024-03-25 Hidehisa Akiyama <[email protected]>

* CMakeLists.txt:
* NEWS:
* configurea.ac:
- updated a major version number. Official release 19.0.0.
- improve the rcg parser library.
- support a new JSON monitor protocol.

2023-03-07 Hidehisa Akiyama <[email protected]>

* CMakeLists.txt:
Expand Down
8 changes: 8 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
[19.0.0]
* Support new server parameters.

* Reimplement a rcg parser library. A faster JSON parser is now
avaiable.

* Fix warnings that occur with Qt-5.15

[18.0.0]
* Support the changes of JSON-based protocol. To use the JSON-based
monitor protocol, -1 is required for client-version.
Expand Down
8 changes: 5 additions & 3 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script.

AC_PREREQ(2.61)
AC_INIT([rcssmonitor],[18.0.0],[https://github.com/rcsoccersim/rcssmonitor])
AC_INIT([rcssmonitor],[19.0.0],[https://github.com/rcsoccersim/rcssmonitor])

#LT_PREREQ(2.2.4)

Expand Down Expand Up @@ -44,7 +44,9 @@ AX_CHECK_ZLIB([],
# Checks for header files.
##################################################

AC_CHECK_HEADERS([arpa/inet.h])
AC_CHECK_HEADERS([arpa/inet.h],
break,
[AC_MSG_ERROR([*** arpa/inet.h not found ***])])

##################################################
# Checks for typedefs, structures, and compiler characteristics.
Expand Down Expand Up @@ -78,7 +80,7 @@ fi
# ----------------------------------------------------------
# check C++

AX_CXX_COMPILE_STDCXX_14(noext)
AX_CXX_COMPILE_STDCXX_17(noext)

# ----------------------------------------------------------
# check boost
Expand Down
89 changes: 78 additions & 11 deletions m4/ax_cxx_compile_stdcxx.m4
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@
#
# Check for baseline language coverage in the compiler for the specified
# version of the C++ standard. If necessary, add switches to CXX and
# CXXCPP to enable support. VERSION may be '11' (for the C++11 standard)
# or '14' (for the C++14 standard).
# CXXCPP to enable support. VERSION may be '11', '14', '17', or '20' for
# the respective C++ standard version.
#
# The second argument, if specified, indicates whether you insist on an
# extended mode (e.g. -std=gnu++11) or a strict conformance mode (e.g.
# -std=c++11). If neither is specified, you get whatever works, with
# preference for an extended mode.
# preference for no added switch, and then for an extended mode.
#
# The third argument, if specified 'mandatory' or if left unspecified,
# indicates that baseline support for the specified C++ standard is
Expand All @@ -35,13 +35,15 @@
# Copyright (c) 2015 Moritz Klammler <[email protected]>
# Copyright (c) 2016, 2018 Krzesimir Nowak <[email protected]>
# Copyright (c) 2019 Enji Cooper <[email protected]>
# Copyright (c) 2020 Jason Merrill <[email protected]>
# Copyright (c) 2021 Jörn Heusipp <[email protected]>
#
# Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty provided the copyright notice
# and this notice are preserved. This file is offered as-is, without any
# warranty.

#serial 11
#serial 18

dnl This macro is based on the code from the AX_CXX_COMPILE_STDCXX_11 macro
dnl (serial version number 13).
Expand All @@ -50,6 +52,7 @@ AC_DEFUN([AX_CXX_COMPILE_STDCXX], [dnl
m4_if([$1], [11], [ax_cxx_compile_alternatives="11 0x"],
[$1], [14], [ax_cxx_compile_alternatives="14 1y"],
[$1], [17], [ax_cxx_compile_alternatives="17 1z"],
[$1], [20], [ax_cxx_compile_alternatives="20"],
[m4_fatal([invalid first argument `$1' to AX_CXX_COMPILE_STDCXX])])dnl
m4_if([$2], [], [],
[$2], [ext], [],
Expand All @@ -62,6 +65,16 @@ AC_DEFUN([AX_CXX_COMPILE_STDCXX], [dnl
AC_LANG_PUSH([C++])dnl
ac_success=no
m4_if([$2], [], [dnl
AC_CACHE_CHECK(whether $CXX supports C++$1 features by default,
ax_cv_cxx_compile_cxx$1,
[AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])],
[ax_cv_cxx_compile_cxx$1=yes],
[ax_cv_cxx_compile_cxx$1=no])])
if test x$ax_cv_cxx_compile_cxx$1 = xyes; then
ac_success=yes
fi])
m4_if([$2], [noext], [], [dnl
if test x$ac_success = xno; then
for alternative in ${ax_cxx_compile_alternatives}; do
Expand Down Expand Up @@ -91,9 +104,18 @@ AC_DEFUN([AX_CXX_COMPILE_STDCXX], [dnl
dnl HP's aCC needs +std=c++11 according to:
dnl http://h21007.www2.hp.com/portal/download/files/unprot/aCxx/PDF_Release_Notes/769149-001.pdf
dnl Cray's crayCC needs "-h std=c++11"
dnl MSVC needs -std:c++NN for C++17 and later (default is C++14)
for alternative in ${ax_cxx_compile_alternatives}; do
for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do
cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_$switch])
for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}" MSVC; do
if test x"$switch" = xMSVC; then
dnl AS_TR_SH maps both `:` and `=` to `_` so -std:c++17 would collide
dnl with -std=c++17. We suffix the cache variable name with _MSVC to
dnl avoid this.
switch=-std:c++${alternative}
cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_${switch}_MSVC])
else
cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_$switch])
fi
AC_CACHE_CHECK(whether $CXX supports C++$1 features with $switch,
$cachevar,
[ac_save_CXX="$CXX"
Expand Down Expand Up @@ -140,20 +162,31 @@ m4_define([_AX_CXX_COMPILE_STDCXX_testbody_11],
_AX_CXX_COMPILE_STDCXX_testbody_new_in_11
)


dnl Test body for checking C++14 support

m4_define([_AX_CXX_COMPILE_STDCXX_testbody_14],
_AX_CXX_COMPILE_STDCXX_testbody_new_in_11
_AX_CXX_COMPILE_STDCXX_testbody_new_in_14
)

dnl Test body for checking C++17 support

m4_define([_AX_CXX_COMPILE_STDCXX_testbody_17],
_AX_CXX_COMPILE_STDCXX_testbody_new_in_11
_AX_CXX_COMPILE_STDCXX_testbody_new_in_14
_AX_CXX_COMPILE_STDCXX_testbody_new_in_17
)

dnl Test body for checking C++20 support

m4_define([_AX_CXX_COMPILE_STDCXX_testbody_20],
_AX_CXX_COMPILE_STDCXX_testbody_new_in_11
_AX_CXX_COMPILE_STDCXX_testbody_new_in_14
_AX_CXX_COMPILE_STDCXX_testbody_new_in_17
_AX_CXX_COMPILE_STDCXX_testbody_new_in_20
)


dnl Tests for new features in C++11

m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_11], [[
Expand All @@ -165,7 +198,11 @@ m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_11], [[
#error "This is not a C++ compiler"
#elif __cplusplus < 201103L
// MSVC always sets __cplusplus to 199711L in older versions; newer versions
// only set it correctly if /Zc:__cplusplus is specified as well as a
// /std:c++NN switch:
// https://devblogs.microsoft.com/cppblog/msvc-now-correctly-reports-__cplusplus/
#elif __cplusplus < 201103L && !defined _MSC_VER
#error "This is not a C++11 compiler"
Expand Down Expand Up @@ -456,7 +493,7 @@ m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_14], [[
#error "This is not a C++ compiler"
#elif __cplusplus < 201402L
#elif __cplusplus < 201402L && !defined _MSC_VER
#error "This is not a C++14 compiler"
Expand Down Expand Up @@ -580,7 +617,7 @@ m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_17], [[
#error "This is not a C++ compiler"
#elif __cplusplus < 201703L
#elif __cplusplus < 201703L && !defined _MSC_VER
#error "This is not a C++17 compiler"
Expand Down Expand Up @@ -946,6 +983,36 @@ namespace cxx17
} // namespace cxx17
#endif // __cplusplus < 201703L
#endif // __cplusplus < 201703L && !defined _MSC_VER
]])


dnl Tests for new features in C++20

m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_20], [[
#ifndef __cplusplus
#error "This is not a C++ compiler"
#elif __cplusplus < 202002L && !defined _MSC_VER
#error "This is not a C++20 compiler"
#else
#include <version>
namespace cxx20
{
// As C++20 supports feature test macros in the standard, there is no
// immediate need to actually test for feature availability on the
// Autoconf side.
} // namespace cxx20
#endif // __cplusplus < 202002L && !defined _MSC_VER
]])
35 changes: 35 additions & 0 deletions m4/ax_cxx_compile_stdcxx_17.m4
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# =============================================================================
# https://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx_17.html
# =============================================================================
#
# SYNOPSIS
#
# AX_CXX_COMPILE_STDCXX_17([ext|noext], [mandatory|optional])
#
# DESCRIPTION
#
# Check for baseline language coverage in the compiler for the C++17
# standard; if necessary, add switches to CXX and CXXCPP to enable
# support.
#
# This macro is a convenience alias for calling the AX_CXX_COMPILE_STDCXX
# macro with the version set to C++17. The two optional arguments are
# forwarded literally as the second and third argument respectively.
# Please see the documentation for the AX_CXX_COMPILE_STDCXX macro for
# more information. If you want to use this macro, you also need to
# download the ax_cxx_compile_stdcxx.m4 file.
#
# LICENSE
#
# Copyright (c) 2015 Moritz Klammler <[email protected]>
# Copyright (c) 2016 Krzesimir Nowak <[email protected]>
#
# Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty provided the copyright notice
# and this notice are preserved. This file is offered as-is, without any
# warranty.

#serial 2

AX_REQUIRE_DEFINED([AX_CXX_COMPILE_STDCXX])
AC_DEFUN([AX_CXX_COMPILE_STDCXX_17], [AX_CXX_COMPILE_STDCXX([17], [$1], [$2])])
25 changes: 14 additions & 11 deletions m4/ax_have_qt.m4
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
# QT_LRELEASE
# QT_LUPDATE
# QT_DIR
# QMAKE
#
# which respectively contain an "-I" flag pointing to the Qt include
# directory, link flags necessary to link with Qt and X, the full path to
Expand Down Expand Up @@ -54,30 +55,31 @@
# and this notice are preserved. This file is offered as-is, without any
# warranty.

#serial 19
#serial 25

AU_ALIAS([BNV_HAVE_QT], [AX_HAVE_QT])
AC_DEFUN([AX_HAVE_QT],
[
AC_REQUIRE([AC_PROG_CXX])
AC_REQUIRE([AC_PATH_X])
AC_REQUIRE([AC_PATH_XTRA])
AC_MSG_CHECKING(for Qt)
# openSUSE leap 15.3 installs qmake-qt5, not qmake, for example.
# Store the full name (like qmake-qt5) into am_have_qt_qmexe
# Store the full name (like qmake-qt5) into QMAKE
# and the specifier (like -qt5 or empty) into am_have_qt_qmexe_suff.
AC_CHECK_PROGS(am_have_qt_qmexe,qmake qmake-qt6 qmake-qt5,[])
am_have_qt_qmexe_suff=`echo $am_have_qt_qmexe | cut -b 6-`
AC_ARG_VAR([QMAKE],"Qt make tool")
AC_CHECK_TOOLS([QMAKE],[qmake qmake-qt6 qmake-qt5],[false])
AC_MSG_CHECKING(for Qt)
am_have_qt_qmexe_suff=`echo $QMAKE | sed 's,^.*qmake,,'`
# If we have Qt5 or later in the path, we're golden
ver=`$am_have_qt_qmexe --version | grep -o "Qt version ."`
ver=`$QMAKE --version | grep -o "Qt version ."`
if test "$ver" ">" "Qt version 4"; then
have_qt=yes
# This pro file dumps qmake's variables, but it only works on Qt 5 or later
am_have_qt_dir=`mktemp -d`
am_have_qt_pro="$am_have_qt_dir/test.pro"
am_have_qt_stash="$am_have_qt_dir/.qmake.stash"
am_have_qt_makefile="$am_have_qt_dir/Makefile"
# http://qt-project.org/doc/qt-5/qmake-variable-reference.html#qt
cat > $am_have_qt_pro << EOF
Expand Down Expand Up @@ -118,10 +120,10 @@ percent.target = %
percent.commands = @echo -n "\$(\$(@))\ "
QMAKE_EXTRA_TARGETS += percent
EOF
$am_have_qt_qmexe $am_have_qt_pro -o $am_have_qt_makefile
$QMAKE $am_have_qt_pro -o $am_have_qt_makefile
QT_CXXFLAGS=`cd $am_have_qt_dir; make -s -f $am_have_qt_makefile CXXFLAGS INCPATH`
QT_LIBS=`cd $am_have_qt_dir; make -s -f $am_have_qt_makefile LIBS`
rm $am_have_qt_pro $am_have_qt_makefile
rm $am_have_qt_pro $am_have_qt_stash $am_have_qt_makefile
rmdir $am_have_qt_dir
# Look for specific tools in $PATH
Expand All @@ -132,7 +134,7 @@ EOF
QT_LUPDATE=`which lupdate$am_have_qt_qmexe_suff`
# Get Qt version from qmake
QT_DIR=`$am_have_qt_qmexe --version | grep -o -E /.+`
QT_DIR=`$QMAKE --version | grep -o -E /.+`
# All variables are defined, report the result
AC_MSG_RESULT([$have_qt:
Expand Down Expand Up @@ -165,6 +167,7 @@ EOF
AC_SUBST(QT_RCC)
AC_SUBST(QT_LRELEASE)
AC_SUBST(QT_LUPDATE)
AC_SUBST(QMAKE)
#### Being paranoid:
if test x"$have_qt" = xyes; then
Expand Down
Loading

0 comments on commit 1193469

Please sign in to comment.