remove compatibility check for gcc 4.9 and below, as we cannot compile on 4.9 anyway

This commit is contained in:
Marcin Junczys-Dowmunt 2019-10-28 13:57:43 -07:00
parent 0a89e8f168
commit a0e472294a
2 changed files with 6 additions and 13 deletions

View File

@ -67,6 +67,11 @@ if(MSVC)
set(EXT_LIBS ${EXT_LIBS} SHLWAPI)
else(MSVC)
# Check we are using at least g++ 5.0
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0)
message(FATAL_ERROR "FATAL ERROR: Compiling Marian requires at least g++ 5.0, your version is ${CMAKE_CXX_COMPILER_VERSION}")
endif()
# Detect support CPU instrinsics for the current platform. This will
# only by used with BUILD_ARCH=native. For overridden BUILD_ARCH we
# minimally use -msse4.1. This seems to work with MKL.
@ -307,14 +312,6 @@ if(COMPILE_CPU)
endif(COMPILE_CPU)
set(BOOST_COMPONENTS "")
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.9)
add_definitions(-DUSE_BOOST_REGEX=1)
set(BOOST_COMPONENTS ${BOOST_COMPONENTS} regex)
message(STATUS "Using boost::regex")
else()
message(STATUS "Using std::regex")
endif()
if(COMPILE_SERVER)
find_package(OpenSSL)
if(OpenSSL_FOUND)

View File

@ -1,8 +1,4 @@
#pragma once
#ifdef USE_BOOST_REGEX
#include <boost/regex.hpp>
namespace regex = boost;
#else
#include <regex>
namespace regex = std;
#endif