mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
Use std::regex automatically in C++11 mode
This is consistent with autotools. The only exception is MSVC, since we do not know yet whether it works.
This commit is contained in:
parent
6a165ecba2
commit
a15aafa2a1
@ -255,6 +255,10 @@ if(UNIX OR MINGW)
|
||||
# <regex> in gcc is unusable in versions less than 4.9.0
|
||||
# see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53631
|
||||
set(LYX_USE_STD_REGEX 0)
|
||||
else()
|
||||
if (LYX_ENABLE_CXX11)
|
||||
set(LYX_USE_STD_REGEX 1)
|
||||
endif()
|
||||
endif()
|
||||
if (LYX_ENABLE_CXX11)
|
||||
find_package(CXX11Compiler)
|
||||
@ -856,6 +860,10 @@ if(QTVERSION MATCHES "^([0-9]+)\\.([0-9]+)\\.([0-9]+).*")
|
||||
MATH(EXPR QT4_VERSION "(${CMAKE_MATCH_1}<<16)|(${CMAKE_MATCH_2}<<8)|${CMAKE_MATCH_3}")
|
||||
endif()
|
||||
|
||||
if (NOT HAVE_REGEX)
|
||||
set(LYX_USE_STD_REGEX 0)
|
||||
endif()
|
||||
|
||||
|
||||
set (cmd ${CMAKE_CTEST_COMMAND})
|
||||
if (MSVC)
|
||||
|
@ -33,6 +33,8 @@ foreach(_h_file aspell.h aspell/aspell.h limits.h locale.h
|
||||
check_include_files(${_h_file} HAVE_${_HF})
|
||||
set(Include_Defines "${Include_Defines}#cmakedefine HAVE_${_HF} 1\n")
|
||||
endforeach()
|
||||
check_include_file_cxx(regex HAVE_REGEX)
|
||||
set(Include_Defines "${Include_Defines}#cmakedefine HAVE_REGEX 1\n")
|
||||
configure_file(${LYX_CMAKE_DIR}/configIncludes.cmake ${TOP_BINARY_DIR}/configIncludes.h.cmake)
|
||||
configure_file(${TOP_BINARY_DIR}/configIncludes.h.cmake ${TOP_BINARY_DIR}/configIncludes.h)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user