From c2d5896a3b8e39f9ebe09a5909eca0ae0813cd8a Mon Sep 17 00:00:00 2001 From: Ichthyostega Date: Sat, 15 Aug 2015 21:50:00 +0200 Subject: [PATCH] Project: switch to C++14 This means we have rather tight compiler requirements now. Beyond that, we expect no serious impact; the most notable C++14 feature we're likely to use soon is type inference on lambda arguments. --- admin/scons/Setup.py | 2 +- doc/technical/build/Dependencies.txt | 11 ++++------- doc/technical/code/c++11.txt | 4 +++- doc/technical/howto/IdeSetup.txt | 2 +- doc/user/tutorials/building.txt | 12 ++++++++++-- doc/user/tutorials/contributing.txt | 1 - 6 files changed, 19 insertions(+), 13 deletions(-) diff --git a/admin/scons/Setup.py b/admin/scons/Setup.py index b8bc1ab96..0d5a0cdd9 100644 --- a/admin/scons/Setup.py +++ b/admin/scons/Setup.py @@ -74,7 +74,7 @@ def defineBuildEnvironment(): env.Replace( CPPPATH =["#src"] # used to find includes, "#" means always absolute to build-root , CPPDEFINES=['LUMIERA_VERSION='+VERSION ] # note: it's a list to append further defines , CCFLAGS='-Wall -Wextra' - , CXXFLAGS='-std=gnu++11 -Wno-enum-compare' + , CXXFLAGS='-std=gnu++14 -Wno-enum-compare' , CFLAGS='-std=gnu99' ) env.Append(LINKFLAGS='-Wl,--no-undefined') # require every dependency is given on link, in the right order diff --git a/doc/technical/build/Dependencies.txt b/doc/technical/build/Dependencies.txt index 36baef13d..eade18bb7 100644 --- a/doc/technical/build/Dependencies.txt +++ b/doc/technical/build/Dependencies.txt @@ -48,9 +48,9 @@ Languages and Tools * C / C++ - - a C99 / C++11 compatible compiler footnote:[in practice, we build using GCC and + - a C99 / C++14 compatible compiler footnote:[in practice, we build using GCC and occasionally we check using Clang] - - GCC *4.7* or Clang *3.3* should be fine footnote:[basically we try to use just the stock language. + - GCC *4.9* or Clang *3.5* should be fine footnote:[basically we try to use just the stock language. On rare occasions in the past, we _did_ use some GCC extensions, like `typeof()`, but we care for workarounds, in case this becomes a problem]. @@ -62,7 +62,7 @@ Languages and Tools - libboost-regex-dev * Script languages - - Python (*2.6*) for build scripts + - Python (*2.7*) for build scripts - bash (some test scripts use bash specific extensions) Build Tools @@ -79,10 +79,7 @@ We maintain a link:/documentation/technical/infra/debianDepot.html[Debian/Ubuntu Libraries ~~~~~~~~~ -* BOOST footnote:[as of [yellow-background]#5/2014#, we rely on the quite recent Boost-1.55, - which isn't in Debian/stable and not even in Debian/testing. + - As always in such cases, we provide backported packages in our - link:http://lumiera.org/debian/pool/experimental/b/boost1.55/[Lumiera package repository], until these versions become mainstream.] +* BOOST * link:http://nobug.pipapo.org/[NoBug] * http://gmerlin.sourceforge.net/gavl.html[GAVL] (for raw media support) * ALSA: libasound2-dev diff --git a/doc/technical/code/c++11.txt b/doc/technical/code/c++11.txt index 5a1660454..4d99bb73b 100644 --- a/doc/technical/code/c++11.txt +++ b/doc/technical/code/c++11.txt @@ -12,7 +12,9 @@ language and compiler support wasn't ready for what we consider _state of the cr amended deficiencies by rolling our own helper facilities, with a little help from Boost. Thus there was no urge for us to adopt the new language standard; we could simply wait for the compiler support to mature. In spring 2014, finally, we were able to switch our codebase -to C++11 with minimal effort. Following this switch, we're now able to reap the benefits of +to C++11 with minimal effort.footnote[since 8/2015 -- after the switch to Debian/Jessie +as a »reference platform«, we even compile with `-std=gnu++14`] +Following this switch, we're now able to reap the benefits of this approach; we may now gradually replace our sometimes clunky helpers and workarounds with the smooth syntax of the ``new language'' -- without being forced to learn or adopt an entirely new coding style, since that style isn't exactly new for us. diff --git a/doc/technical/howto/IdeSetup.txt b/doc/technical/howto/IdeSetup.txt index 8186fe27b..7017ad04d 100644 --- a/doc/technical/howto/IdeSetup.txt +++ b/doc/technical/howto/IdeSetup.txt @@ -29,7 +29,7 @@ There is nothing really fancy with the configuration, things work as you'd expec actually enabled. This provider is used by the IDE to retrieve definitions from the compiler for syntax checks while you type and for building the search index. Typically, this provider is called ``GCC Builtin Compiler Settings''; please ensure in the global (or the project specific) configuration that the invocation command line includes - the argument `-std=gnu++11` -- otherwise you'll get a lot of red squiggles on the new language features ;-) + the argument `-std=gnu++14` -- otherwise you'll get a lot of red squiggles on the new language features ;-) Indexer troubleshooting ~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/doc/user/tutorials/building.txt b/doc/user/tutorials/building.txt index 8a9e45ac4..c7550270f 100644 --- a/doc/user/tutorials/building.txt +++ b/doc/user/tutorials/building.txt @@ -46,7 +46,7 @@ authoritative information about the build dependencies is encoded into the link:{ldoc}/technical/build/SCons.html[build system]. Thus, when the build system aborts, indicating that a never version of some library is required, then usually the build system is right...] -More specifically, you'll need the GNU C/C++ compiler with C++11 support (Version >= 4.7) +More specifically, you'll need the GNU C/C++ compiler with C++14 support (Version >= 4.9) in addition to the following tools and libraries: * link:http://git-scm.com/[Git VCS] @@ -73,7 +73,7 @@ For Debian based systems, e.g. Mint, Ubuntu..., you can install these packages a ------------------------------------------------------------------------------------- sudo apt-get install build-essential scons git-core valgrind intltool \ libboost-dev libboost-program-options-dev libboost-regex-dev libboost-filesystem-dev \ -libgavl-dev libgtkmm-2.4-dev librsvg2-dev libxv-dev +libgavl-dev libgtkmm-3.0-dev libgdl-3-dev librsvg2-dev libxv-dev ------------------------------------------------------------------------------------- Optionally, you may also want to install the `gtk2-engines` package. @@ -136,6 +136,14 @@ sudo make install GDL: building and installing ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +NOTE: 8/2015 the information in this paragraph is outdated! + We have switched to GTK-3 recently. Now we're able just to use the + official GDL from upstream (or your distribution). But we have also + switched to C++ bindings, and thus need a gdlmm installation, which + is not yet provided through the offial repositories on most distributions. + Thus, instead of shipping our own libGDL, now we're providing a DEB package + of gdlmm through our repository... + The *GNOME Docking library* is sometimes available through your package manager, but we provide a suitable custom package as well; the following shows how to build the latter diff --git a/doc/user/tutorials/contributing.txt b/doc/user/tutorials/contributing.txt index 887f67251..549707586 100644 --- a/doc/user/tutorials/contributing.txt +++ b/doc/user/tutorials/contributing.txt @@ -266,7 +266,6 @@ Proc Layer:: * expand on the work done for a pooling small objects allocator. * develop a backend for our various allocation schemes to use this allocator. -- help with the C++11 transition - Command system at the GUI interface * expand on the work done for generic commands