Eyescale/CMake

COMMON_USE_CXX03 doesn't set -std flag

juanchopanza opened this issue · 6 comments

By default, the flag -std=c++11 is set. But when using COMMON_USE_CXX03, neither -std=c++98 nor -std=c++03 is used. It would be good to set this flag for consistency. It will also make it easier to manage standard conformance consistently for both C++11 and C++03 standards by using the pedantic flags.

I'll be having a look at that in a moment

Also more in general, COMMON_USE_CXX03 seems to mean "don't use C++11. But at some point it will be necessary to say "really use C++03", or "really use C++14" etc. So maybe CXX_STD with a set of supported values might make more sense.

eile commented

Interesting. We're rarely not building with -std=c++11, so expect at least our projects to bitrot eventually. Also, cross-project compatibility is at risk (at least with clang, which uses a different stdlib). Feel free to fix - but is there a reason to not use C++11 in your projects?

Unfortunately, in principle we should be able to run in the bluegene and there isn't supposed to be good support. We had a discussion about this in the almost defunct SWG. I would really prefer to use C++11.

eile commented

gcc/clang might be an option on BlueGene, if performance is not critical. Otherwise: my condolences.

COMMON_USE_CXX03 was removed in #522, now C++11 only.