Bump the C++ version from C++11 to C++17

This will allow the usage of more modern features in the future.
This commit is contained in:
Mirko Dziadzka 2024-02-09 21:57:31 +01:00
parent ca5f5163b4
commit 367a871f30
11 changed files with 14 additions and 15 deletions

View File

@ -76,7 +76,7 @@ Windows build is not ready yet.
## Dependencies
This library is written in C++ using the C++11 standards. It also uses Flex
This library is written in C++ using the C++17 standards. It also uses Flex
and Yacc to produce the “Sec Rules Language” parser. Other, mandatory dependencies include YAJL, as ModSecurity uses JSON for producing logs and its testing framework, libpcre (not yet mandatory) for processing regular expressions in SecRules, and libXML2 (not yet mandatory) which is used for parsing XML requests.
All others dependencies are related to operators specified within SecRules or configuration directives and may not be required for compilation. A short list of such dependencies is as follows:

View File

@ -52,8 +52,8 @@ AC_PROG_MAKE_SET
PKG_PROG_PKG_CONFIG
# Check if the compiler is c++11 compatible.
# AX_CXX_COMPILE_STDCXX_11(,mandatory)
# Check if the compiler is c++17 compatible.
# AX_CXX_COMPILE_STDCXX_17(,mandatory)
# Check for libinjection
if ! test -f "${srcdir}/others/libinjection/src/libinjection_html5.c"; then

View File

@ -32,7 +32,7 @@ simple_request_LDFLAGS = \
simple_request_CPPFLAGS = \
$(GLOBAL_CFLAGS) \
-std=c++11 \
-std=c++17 \
-I$(top_builddir)/headers \
-I$(top_builddir) \
-g \

View File

@ -32,7 +32,7 @@ read_LDFLAGS = \
read_CPPFLAGS = \
$(GLOBAL_CFLAGS) \
-std=c++11 \
-std=c++17 \
-I$(top_builddir)/headers \
-I$(top_builddir) \
-g \

View File

@ -33,7 +33,7 @@ simple_request_LDFLAGS = \
simple_request_CPPFLAGS = \
$(GLOBAL_CFLAGS) \
-std=c++11 \
-std=c++17 \
-I$(top_builddir)/headers \
-I$(top_builddir) \
-g \

View File

@ -311,7 +311,7 @@ libmodsecurity_la_CFLAGS =
libmodsecurity_la_CPPFLAGS = \
-std=c++11 \
-std=c++17 \
-I.. \
-g \
-I../others \

View File

@ -11,11 +11,10 @@ libmodsec_parser_la_SOURCES = \
test.cc
libmodsec_parser_la_CPPFLAGS = \
-std=c++11 \
-std=c++17 \
-I../.. \
-I../../headers \
-I../../others \
-std=c++11 \
-I.. \
-g \
-fPIC \

View File

@ -70,7 +70,7 @@ unit_tests_LDFLAGS = \
unit_tests_CPPFLAGS = \
-std=c++11 \
-std=c++17 \
-Icommon \
-I../ \
-g \
@ -126,7 +126,7 @@ regression_tests_LDFLAGS = \
regression_tests_CPPFLAGS = \
-std=c++11 \
-std=c++17 \
-Icommon \
-I../ \
-g \
@ -179,7 +179,7 @@ rules_optimization_LDFLAGS = \
$(YAJL_LDFLAGS)
rules_optimization_CPPFLAGS = \
-std=c++11 \
-std=c++17 \
-Icommon \
-I../ \
-g \

View File

@ -32,7 +32,7 @@ benchmark_LDFLAGS = \
$(LUA_LDFLAGS)
benchmark_CPPFLAGS = \
-std=c++11 \
-std=c++17 \
-I$(top_builddir)/headers \
$(GLOBAL_CPPFLAGS) \
$(PCRE_CFLAGS) \

View File

@ -30,7 +30,7 @@ afl_fuzzer_LDADD = \
afl_fuzzer_CPPFLAGS = \
-std=c++11 \
-std=c++17 \
-Icommon \
-I../ \
-I../../ \

View File

@ -28,7 +28,7 @@ modsec_rules_check_LDFLAGS = \
$(YAJL_LDFLAGS)
modsec_rules_check_CPPFLAGS = \
-std=c++11 \
-std=c++17 \
-I$(top_builddir)/headers \
$(GLOBAL_CPPFLAGS) \
$(PCRE_CFLAGS) \