Revert "Set C and C++ standards the modern Cmake way, and set C++ to C++17."

This reverts commit b5afd2e319.

Our baseline distro, Ubuntu 18.04, provides boost 1.65 and boost 1.67
is required for building with C++17 because the boost::locale developer
hung on to auto_ptr 6 years longer than he should have.
pull/588/head
John Ralls 7 years ago
parent b5afd2e319
commit 58cfb58b9c

@ -512,7 +512,7 @@ set (Boost_FIND_QUIETLY ON)
if (NOT DEFINED ${BOOST_ROOT})
set(BOOST_ROOT $ENV{BOOST_ROOT})
endif()
find_package (Boost 1.67.0 REQUIRED COMPONENTS date_time regex locale filesystem system)
find_package (Boost 1.54.0 REQUIRED COMPONENTS date_time regex locale filesystem system)
if (Boost_FOUND)
include_directories(${Boost_INCLUDE_DIRS})
@ -534,22 +534,18 @@ endif()
add_definitions(-D_GNU_SOURCE)
# Also, set the C++ version to c++11
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_C_STANDARD 11)
set(CMAKE_C_STANDARD_REQUIRED ON)
set(CMAKE_C_EXTENSIONS ON)
set(CMAKE_CXX_FLAGS "-std=gnu++11 ${CMAKE_CXX_FLAGS}") # FIXME: should be -std=c++11
if (UNIX)
set( CMAKE_C_FLAGS "-Werror -Wdeclaration-after-statement -Wno-pointer-sign -Wall -Wmissing-prototypes -Wmissing-declarations -Wno-unused ${CMAKE_C_FLAGS}")
set( CMAKE_C_FLAGS "-Wno-error=deprecated-declarations -Wno-error=parentheses ${CMAKE_C_FLAGS}")
set( CMAKE_C_FLAGS "-Wno-error=deprecated-declarations -std=gnu11 -Wno-error=parentheses ${CMAKE_C_FLAGS}")
set( CMAKE_CXX_FLAGS "-Werror -Wall -Wmissing-declarations -Wno-unused -Wno-error=parentheses ${CMAKE_CXX_FLAGS}")
set( CMAKE_CXX_FLAGS "-Wno-error=deprecated-declarations ${REGISTER_CXXFLAG} ${CMAKE_CXX_FLAGS}")
set( CMAKE_C_FLAGS_RELEASE "-O3 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 ${CMAKE_C_FLAGS}")
endif (UNIX)
if (MINGW)
set( CMAKE_C_FLAGS "-Werror -Wdeclaration-after-statement -Wno-pointer-sign -Wall -Wunused -Wmissing-prototypes -Wmissing-declarations -Wno-unused -Wno-error=deprecated-declarations ${CMAKE_C_FLAGS}")
set( CMAKE_C_FLAGS "-Werror -Wdeclaration-after-statement -Wno-pointer-sign -Wall -Wunused -Wmissing-prototypes -Wmissing-declarations -Wno-unused -Wno-error=deprecated-declarations -std=gnu11 ${CMAKE_C_FLAGS}")
set( CMAKE_CXX_FLAGS "-DWINVER=0x0500 -D_EMULATE_GLIBC=0 ${CMAKE_CXX_FLAGS}") # Workaround for bug in gtest on mingw, see https://github.com/google/googletest/issues/893 and https://github.com/google/googletest/issues/920
endif (MINGW)

@ -62,8 +62,6 @@ Libraries/Deps
--------------
required Version
-------- _______
gcc or clang 8.0 (gcc)/6.0 (clang) C/C++ compiler
cmake 3.10 Build system.
glib2 2.40.0
gtk+3 3.14.0
guile 2.2.0 or 2.0.0
@ -72,12 +70,12 @@ Libraries/Deps
libxslt, including xsltproc
ICU International Components for
Unicode
boost 1.67.0 locale and regex libs must be
boost 1.50.0 locale and regex libs must be
built with ICU support.
swig 3.0.12 Makes Guile and Python Bindings.
swig 2.0.10 Only required to build from git.
webkit webkitgtk-3.0 (Windows, Mac)
webkit2gtk-3.0 (Everything Else)
googletest 1.8.0 Some distros call it gtest.
googletest 1.7.0 Some distros call it gtest.
Some distros also separate out
googlemock or gmock; both are
required.

Loading…
Cancel
Save