gnucash master: Multiple changes pushed

John Ralls jralls at code.gnucash.org
Tue Oct 8 18:09:28 EDT 2019


Updated	 via  https://github.com/Gnucash/gnucash/commit/b5afd2e3 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/5e41c79c (commit)
	from  https://github.com/Gnucash/gnucash/commit/75073a7a (commit)



commit b5afd2e319b0f06697c83806e85dd15fab508e5b
Author: John Ralls <jralls at ceridwen.us>
Date:   Fri Oct 4 12:26:35 2019 -0700

    Set C and C++ standards the modern Cmake way, and set C++ to C++17.
    
    Boost has to go to 1.67 as well because boost::locale used auto_ptr
    before that and it's been removed from the language in C++17.

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 283c48521..42665f77c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -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.54.0 REQUIRED COMPONENTS date_time regex locale filesystem system)
+find_package (Boost 1.67.0 REQUIRED COMPONENTS date_time regex locale filesystem system)
 
 if (Boost_FOUND)
   include_directories(${Boost_INCLUDE_DIRS})
@@ -534,18 +534,22 @@ endif()
 add_definitions(-D_GNU_SOURCE)
 
 # Also, set the C++ version to c++11
-set(CMAKE_CXX_FLAGS "-std=gnu++11 ${CMAKE_CXX_FLAGS}")  # FIXME: should be -std=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)
 
 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 -std=gnu11 -Wno-error=parentheses ${CMAKE_C_FLAGS}")
+  set( CMAKE_C_FLAGS "-Wno-error=deprecated-declarations -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 -std=gnu11 ${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 ${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)
 
diff --git a/README.dependencies b/README.dependencies
index 94ceb234a..bc0351e37 100644
--- a/README.dependencies
+++ b/README.dependencies
@@ -62,6 +62,8 @@ 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
@@ -70,12 +72,12 @@ Libraries/Deps
   libxslt, including xsltproc
   ICU                                           International Components for
                                                 Unicode
-  boost			1.50.0                  locale and regex libs must be
+  boost			1.67.0                  locale and regex libs must be
                                                 built with ICU support.
-  swig			2.0.10			Only required to build from git.
+  swig			3.0.12			Makes Guile and Python Bindings.
   webkit		webkitgtk-3.0 (Windows, Mac)
                         webkit2gtk-3.0 (Everything Else)
-  googletest            1.7.0                   Some distros call it gtest.
+  googletest            1.8.0                   Some distros call it gtest.
                                                 Some distros also separate out
                                                 googlemock or gmock; both are
                                                 required.

commit 5e41c79c7697a22c37c20fe3e51606966d81d712
Author: John Ralls <jralls at ceridwen.us>
Date:   Fri Oct 4 12:07:15 2019 -0700

    Require SWIG >=3.0.12 for facility to extend C++ classes with templates.

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5db6b97e7..283c48521 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -262,7 +262,7 @@ endif (WIN32)
 # ############################################################
 
 # SWIG
-find_package (SWIG 2.0.10 REQUIRED)
+find_package (SWIG 3.0.12 REQUIRED)
 include (${SWIG_USE_FILE})
 string(REGEX MATCH "^[0-9]+[.]" SWIG_MAJOR ${SWIG_VERSION})
 
@@ -531,17 +531,6 @@ if (have_stringop_truncation)
     set(HAVE_STRINGOP_TRUNCATION TRUE)
 endif()
 
-if (SWIG_MAJOR LESS 3)
-check_cxx_compiler_flag(-Wno-register have_no_register)
-if (have_no_register)
-  set(REGISTER_CXXFLAG -Wno-register)
-else()
-  check_cxx_compiler_flag(-Wno-deprecated-register have_no_dep_register)
-  if (have_no_dep_register)
-    set(REGISTER_CXXFLAG -Wno-deprecated-register)
-  endif()
-endif()
-endif()
 add_definitions(-D_GNU_SOURCE)
 
 # Also, set the C++ version to c++11



Summary of changes:
 CMakeLists.txt      | 27 ++++++++++-----------------
 README.dependencies |  8 +++++---
 2 files changed, 15 insertions(+), 20 deletions(-)



More information about the gnucash-changes mailing list