]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
Merge pull request #2067 in SNORT/snort3 from ~MIALTIZE/snort3:cxx14 to master
authorMichael Altizer (mialtize) <mialtize@cisco.com>
Fri, 13 Mar 2020 21:37:04 +0000 (21:37 +0000)
committerMichael Altizer (mialtize) <mialtize@cisco.com>
Fri, 13 Mar 2020 21:37:04 +0000 (21:37 +0000)
Squashed commit of the following:

commit be07a2b2ac719b81b1d16e09e9cb552e73573a29
Author: Michael Altizer <mialtize@cisco.com>
Date:   Fri Mar 6 18:13:43 2020 -0500

    build: Bump the C++ compiler supported feature set requirement to C++14

CMakeLists.txt
README.md
cmake/compiler_features.cmake
cmake/platforms.cmake
doc/tutorial.txt
src/network_inspectors/appid/test/tp_mock.cc

index 5be70a6262e22a2c3b6860fc6749bbdf86e88f5b..4981a7fc745e1facc22797dc45ed54915a448925 100644 (file)
@@ -6,7 +6,7 @@ set (VERSION_MINOR 0)
 set (VERSION_PATCH 0)
 set (VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}")
 
-set (CMAKE_CXX_STANDARD 11)
+set (CMAKE_CXX_STANDARD 14)
 set (CMAKE_CXX_STANDARD_REQUIRED ON)
 set (CMAKE_CXX_EXTENSIONS OFF)
 
index da13b7022e241405459d6cb42f100a8936cc81e4..232a55ce48d9fe0d94cdd67cdd3b938fde821620 100644 (file)
--- a/README.md
+++ b/README.md
@@ -54,7 +54,7 @@ the latest:
 * cmake to build from source
 * daq from https://github.com/snort3/libdaq for packet IO
 * dnet from https://github.com/dugsong/libdnet.git for network utility functions
-* g++ >= 4.8 or other C++11 compiler
+* g++ >= 5 or other C++14 compiler
 * hwloc from https://www.open-mpi.org/projects/hwloc/ for CPU affinity management
 * LuaJIT from http://luajit.org for configuration and scripting
 * OpenSSL from https://www.openssl.org/source/ for SHA and MD5 file signatures,
index f136fdc900c57e146f5e6eac6e275dccc33fa72e..23d447936afc474dbba27658d161743643d5f835 100644 (file)
@@ -1,5 +1,5 @@
 set ( _SAVE_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS} )
-set ( CMAKE_REQUIRED_FLAGS "-std=c++11 -fPIC -shared -Wl,-undefined,dynamic_lookup" )
+set ( CMAKE_REQUIRED_FLAGS "-std=c++14 -fPIC -shared -Wl,-undefined,dynamic_lookup" )
 
 unset ( HAVE_EXTERN_GNU_TLS )
 check_cxx_source_compiles (
index 14b2456617aab1972d4912a352090847311554a6..e8acf4725141e6ee1628886441012dd45cec8344 100644 (file)
@@ -11,15 +11,6 @@ endif()
 
 set (CMAKE_SKIP_RPATH ON)
 
-if (${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU")
-    set(GNUCXX_MINVER "4.8.1")
-    message(STATUS "g++ version ${CMAKE_CXX_COMPILER_VERSION}")
-    if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS GNUCXX_MINVER)
-        message(FATAL_ERROR "A minimum of g++ ${GNUCXX_MINVER} is required for C++11 support")
-    endif()
-endif()
-
-
 # the Clang compiler on MacOS X may need the c++ library explicitly specified
 if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
     if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
index b8537c042b8900efd82850aa9f91b655358d1e9a..fab457033915e6623986e44f502b5b6cfdbba901 100644 (file)
@@ -7,12 +7,12 @@ out more advanced usage.
 
 Required:
 
+* a compiler that supports the C++14 feature set
+
 * cmake to build from source
 
 * daq from https://github.com/snort3/libdaq for packet IO
 
-* g\++ >= 4.8 or other recent C++11 compiler
-
 * dnet from https://github.com/dugsong/libdnet.git for network utility
   functions
 
index 8ed7b86bbd165cb44e9790f0cc1a75bb8b4bd8d6..d46f8bbf75d8e07ffeb53d5251079b1098dc0103 100644 (file)
@@ -20,7 +20,7 @@
 
 // Standalone compilation:
 // g++ -g -Wall -I.. -I/path/to/snort3/src -c tp_mock.cc
-// g++ -std=c++11 -g -Wall -I.. -I/path/to/snort3/src -shared -fPIC -o libtp_mock.so tp_mock.cc
+// g++ -std=c++14 -g -Wall -I.. -I/path/to/snort3/src -shared -fPIC -o libtp_mock.so tp_mock.cc
 // As a module (dynamically loaded)  - see CMakeLists.txt
 
 #include <iostream>