X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=CMakeLists.txt;h=3f491581b821fb0f6e4655008794e4a0527b7238;hb=ecdeffb52b1dad2f56e0e4210d0a040e807e2caf;hp=8be95c709ab153f1205fb2f2b97a5803dc1a38c2;hpb=83bee109db2f535b1a92b02eef811c1476d9f9cf;p=lyx.git diff --git a/CMakeLists.txt b/CMakeLists.txt index 8be95c709a..3f491581b8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -246,11 +246,10 @@ set(LYX_GCC11_MODE) if(UNIX OR MINGW) execute_process(COMMAND ${CMAKE_CXX_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION) message(STATUS "Using GCC version ${GCC_VERSION}") - if(NOT GCC_VERSION VERSION_LESS 4.4) - set(LYX_USE_TR1 1) - # GCC <= 4.5 does not support regex: there are linker errors - # http://gcc.gnu.org/onlinedocs/libstdc++/manual/status.html#status.iso.tr1 - set(LYX_USE_TR1_REGEX 0) + if(GCC_VERSION VERSION_LESS 4.9) + # 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) endif() if (LYX_ENABLE_CXX11) find_package(CXX11Compiler) @@ -259,14 +258,11 @@ if(UNIX OR MINGW) endif() set(LYX_GCC11_MODE "${CXX11_FLAG}") endif() - set(STD_STRING_USES_COW 1) else() - if(MSVC10) - set(LYX_USE_TR1 1) - #set(LYX_USE_TR1_REGEX 1) #TODO should we use it in ECMAScript mode? - else() - set(STD_STRING_USES_COW 1) - endif() + set(LYX_USE_STD_REGEX 0) +# if(MSVC10) +# set(LYX_USE_STD_REGEX 1) #TODO should we use it in ECMAScript mode? +# endif() endif() @@ -558,6 +554,7 @@ if(LYX_USE_QT MATCHES "QT5") find_package(Qt5MacExtras REQUIRED) endif() find_package(Qt5X11Extras QUIET) + find_package(Qt5WinExtras QUIET) set(QTVERSION ${Qt5Core_VERSION}) macro (qt_use_modules) qt5_use_modules(${ARGN}) @@ -633,7 +630,11 @@ find_package(ZLIB REQUIRED) if(LYX_EXTERNAL_BOOST) message(STATUS "Searching for boost") - find_package(Boost COMPONENTS signals regex) #TODO could REQUIRED be used + if(LYX_USE_STD_REGEX) + find_package(Boost COMPONENTS signals) + else() + find_package(Boost COMPONENTS signals regex) + endif() if(Boost_FOUND) message(STATUS "Boost found") message(STATUS "Boost-libs = ${Boost_LIBRARIES}") @@ -642,7 +643,7 @@ if(LYX_EXTERNAL_BOOST) message(FATAL_ERROR "Boost not found" ${Boost_ERROR_REASON}) endif() else() - if(LYX_USE_TR1_REGEX) + if(LYX_USE_STD_REGEX) set(Lyx_Boost_Libraries boost_signals) else() set(Lyx_Boost_Libraries boost_signals boost_regex)