]> git.lyx.org Git - features.git/commit
Fix the logic of selection of std::regex
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Wed, 6 Jan 2016 09:33:54 +0000 (10:33 +0100)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Mon, 11 Jan 2016 09:40:12 +0000 (10:40 +0100)
commit39717adfda1620c5eb2bee122622dff1a99ba7af
tree8d57b6bde3873a2ee39cd69aa6967f020059b1d2
parent2f8444b12078d040c6e3282512518068195ed635
Fix the logic of selection of std::regex

This amends commit e1938aa2, which introduced some logic
errors: regex would be enabled for gcc versions which have unusable
<regex> header.

The new code separates better special gcc handling from special C++11
handling and should be more readable.

* set -std=c++11 in AM_CPPFLAGS instead of AM_CXXFLAGS, since the
  preprocessor uses this setting too.

* Before checking for header <regex>, set language to C++ and update
  value of AM_CPPFLAGS too.

* Separate code that checks for regex in its own macro.

* now unknown compiler which have the <regex> header, will use std::regex in C++11 mode.
config/lyxinclude.m4