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
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)
* 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,
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 (
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")
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
// 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>