On 9 February 2016 at 00:01, Tim E. Real wrote:
>
> Must we add the -std=gnu++11 flags to each module?
> Or is there a way to tell (the top level) cmake to do it all for us?
> I haven't pulled for a few days - are you saying it's already been done?
>

Hi Tim,
It is pretty much done, in the sense that it builds and works.
To enable c++11 (c++14) you just add -std=gnu++11 (-std=gnu++14) to
the CMAKE_CXX_FLAGS* entries in the top-level CMakeLists.txt file.
The pure c++11 is enabled via -std=c++11 flag. The -std=gnu++11
enables some GNU extensions on top.

I am by no means an expert with c++11 or 14. I have been reading a lot
lately. There have been many additions and some changes to the
language and to the standard library. Fortunately, there is decent
amount of documentation out there.

There are a few things the consider for making a permanent switch:

- Up until gcc6, the default gcc mode is c++98, which kind of suggests
that the c++11 features are somewhat experimental. So we need some
good testing.
- Many distributions will be using gcc5 and below for quite some time.
There was a table somewhere on the internet about what features are
implemented on which gcc version. I think c++11 features started being
implemented around gcc-4.7 (I might be wrong). So we have to make a
decision on how old of a compiler/distro we want to support, and use
only those features of c++11 that are available for the minimal gcc
version we choose.
- Just because we start using the c++11(14) compiler mode doesn't
necessarily mean we are done converting. After the switch, we might
want to scan through the codebase and look for opportunities to
c+11ize the code, e.g. use move semantics where it makes sense, to
eliminate needless copying of objects etc (but from what I remember,
we use pointers in the time critical parts of the code anyway, so this
might not apply)
- One other thing: with the recent gtkmm24 library versions, we need
-std=gnu++11 to compile the lv2gtk2helper. So we will be hit by this
requirement sooner or later.

If you ask my opinion, I would say go for it. I will do a quick
research about the compiler versions of the current popular distros
and then I can provide you more detail on what can be done.

Cheers,
Orcan

------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
Lmuse-developer mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/lmuse-developer

Reply via email to