According to cppreference GCC, Clang, and MSVC support c++14, so nothing stops us from switching.
Details
Diff Detail
- Repository
- R261 KMyMoney
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
c++: error: unrecognized command line option ‘-std=c++14’
This happens on my stock distro. So we should better stick with c++11 for some more time.
I guess it's deeper matter and installing this wouldn't suffice. It seems we need to get by without c++14.
Even if that would suffice, it would only be for OpenSuse. Every distro goes at their own pace for such upgrades, and LTS versions often are quite behind the leading edge.
I'm avid front runner, but I'm not 100% sure about the switch.
I mean Qt only lately switched to c++11 in Qt 5.7. KDE Frameworks still uses c++11. On the other hand, oldest supported GCC version is 5.4 and it's capable of c++14.
I wonder what will distros do. Wouldn't they ship KMM if we would have c++14 or would they compile it anyways with special compiler that supports c++14. On the other hand, if they provide so old software, would they be interested at all in our fresh KMM. If no, then I'm all in for switching to c++14.
CMakeLists.txt | ||
---|---|---|
65 | Will MSVC compile c++14 code correctly with that check left untouched? | |
66 | Have you seen this? According to that website GCC's an MSVC's capabilities for c++14 are equal, so how this comment be still valid? |
I would be too, but on my stock openSUSE Leap 42.2 which I installed just a few weeks ago from scratch, I have
thb@thb-nb:~/bin$ g++ --version g++ (SUSE Linux) 4.8.5 Copyright (C) 2015 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
and using the proposed change does not work. Not sure if there is a newer version available and how I would install and not brake anything.
I just did that after I found out that it does not upgrade automatically but a version is available (even for gcc6). After switching the -strd=c++14 option works w/o problems.
MSVC switch remains as it seems that this compiler doesn't support standards version switches
It seems that the change should return. I wonder whether Cristian can compile on c++14.
Maybe you need to set CMAKE_<LANG>_COMPILER to /usr/bin/g++-5 (or so).
CMakeLists.txt | ||
---|---|---|
65 | Yes. MSVC does not know this switch, so it will generate a warning for every invocation (about the number of .cpp files we have). MSVC always compiles with all features it knows (which can be C++17 or any Microsoft specific addition). | |
66 | This comment refers to CMake's compile features. They should make the compiler flag settings compiler (and compiler version) independent (note: the option -std=c++** works probably only for GCC and clang – and we can be happy that this are two compilers already). |
Do you *depend* on C++14? If not, then this change is quite... unnecessary and only causes trouble for packagers / people attempting to build KMyMoney on older distros.
Nobody depends on C++14 but it would be nice to finally start using it. See earlier considerations on this page about older distros.
I don't find these arguments particular convincing. Ubuntu 14.04 LTS is another popular distro people are using, which is also featuring GCC 4.8 (=> no C++14 support). People need to upgrade their compiler toolchain in case they want to compile your project. Every now and then I see people popping up in KDevelop who tell me that the KDevelop build is broken on Ubuntu 14.04 LTS b/c of various reasons -- easy to fix usually. So there's a couple of people indeed using that as a development platform to work on KDE projects. And I'd rather not lose them as potential contributors for my project. Just my 2c, I'm not involved in the KMyMoney project after all. /me hides again.
It's beyond my grasp. If Ubuntu 14.04 LTS sticks with old software, then why would they like to compile our new software. They stick with it not without a reason.
It seems too me that they wouldn't be interested in our development.
Besides KMM requires Qt 5.6 and they have only Qt 5.2 so they are already out of reach.