Browse Source

Bump GCC requirements to 4.8. Close #1442

master
Alexey Sokolov 3 years ago
parent
commit
79ec016f05
4 changed files with 14 additions and 3 deletions
  1. +1
    -1
      cmake/TestCXX11.cmake
  2. +6
    -1
      cmake/cxx11check/main.cpp
  3. +1
    -1
      configure.ac
  4. +6
    -0
      m4/ax_cxx_compile_stdcxx_11.m4

+ 1
- 1
cmake/TestCXX11.cmake View File

@ -34,6 +34,6 @@ if(NOT DEFINED cxx11check)
"Error in C++11 check:\n${_CXX11Check_tryout}\n")
message(STATUS "Checking for C++11 support - not supported")
message(FATAL_ERROR " Upgrade your compiler.\n"
" GCC 4.7+ and Clang 3.2+ are known to work.")
" GCC 4.8+ and Clang 3.2+ are known to work.")
endif()
endif()

+ 6
- 1
cmake/cxx11check/main.cpp View File

@ -10,6 +10,7 @@
// and this notice are preserved. This file is offered as-is, without any
// warranty.
#include <map>
template <typename T>
struct check {
@ -55,4 +56,8 @@ void test();
void test() { func<foo>(0); }
}
int main() { return 0; }
int main() {
std::map<int, int> m;
m.emplace(2, 4);
return 0;
}

+ 1
- 1
configure.ac View File

@ -33,7 +33,7 @@ AC_PROG_CXX
# "Optional" because we want custom error message
AX_CXX_COMPILE_STDCXX_11([noext], [optional])
if test x"$HAVE_CXX11" != x1; then
AC_MSG_ERROR([Upgrade your compiler. GCC 4.7+ and Clang 3.2+ are known to work.])
AC_MSG_ERROR([Upgrade your compiler. GCC 4.8+ and Clang 3.2+ are known to work.])
fi
appendLib () {


+ 6
- 0
m4/ax_cxx_compile_stdcxx_11.m4 View File

@ -37,6 +37,7 @@
#serial 5
m4_define([_AX_CXX_COMPILE_STDCXX_11_testbody], [[
#include <map>
template <typename T>
struct check
{
@ -82,6 +83,11 @@ m4_define([_AX_CXX_COMPILE_STDCXX_11_testbody], [[
func<foo>(0);
}
}
void test_map() {
std::map<int, int> m;
m.emplace(2, 4);
}
]])
AC_DEFUN([AX_CXX_COMPILE_STDCXX_11], [dnl


Loading…
Cancel
Save