Am Mittwoch, 6. Januar 2016 um 10:26:24, schrieb Jean-Marc Lasgouttes <lasgout...@lyx.org> > Le 05/01/2016 18:04, Kornel Benko a écrit : > >> Isn't LYX_ENABLE_CXX11=ON the default for clang? > > > > By default it is OFF for any compiler. > > > >> I have to use —-disable-cxx11 with auto tools. > >> Why is it working with cmake for you? > >> Where is your Qt5 framework? > >> What compiler are you using? > > Kornel, it would be nice to enable C++11 by default when possible in > 2.2. In 2.3 we will make it a requirement. This probably means that we > have to find out how to do that with msvc and make sure that it works. > > For reference the algorithm used by autotools for 2.2 is the following: > > * enable c++11 by default for gcc >= 4.3 and all real clang (not the > older gcc based one) > For clang, also use -Wno-deprecated-register (lots of warnings with Qt4) > * when forcing c++11 on gcc <= 4.2, error out. > * if using gcc under cygwin use mode gnu++11 instead of c++11 > > Separately, detect that c++11 is enabled by testing for > __cplusplus >= 201103L || defined(__GXX_EXPERIMENTAL_CXX0X__) > > We do the test separately so that people can use a compiler we do not > handle and set it manually in c++11 mode. > > When c++11 mode is detected > * define LYX_USE_CXX11 > * add flag -Wno-deprecated-declarations, so that we do not get warnings > about the deprecated auto_ptr (we will remove this in 2.3) > * define LYX_USE_STD_REGEX when using C++11 with either clang or gcc >= > 4.9. [although there is something fishy with the current code that I > have to double check]. > > > It would be nice if we could converge to the same algorithm in the two > build systems. If you disagree on what autotools do, we can discuss > adaptations.
In cmake it is an option, which is set _before_ we know the compiler. I could change it for UNIX (with clang | gnu-c++) or MINGW, but I am not confident enough to change it for MSVC. > JMarc Kornel
signature.asc
Description: This is a digitally signed message part.