[prev in list] [next in list] [prev in thread] [next in thread] 

List:       lyx-cvs
Subject:    [LyX/2.3.x] Cmake build:Amend 44bbd0b0 and 22f59925
From:       Kornel Benko <kornel () lyx ! org>
Date:       2019-10-26 13:01:29
Message-ID: 20191026130129.679272800DE () lyx ! lyx ! org
[Download RAW message or body]

commit 46e29ebe54a12af24af86eb097f50082c11f925f
Author: Kornel Benko <kornel@lyx.org>
Date:   Thu Jun 13 09:18:40 2019 +0200

    Cmake build:Amend 44bbd0b0 and 22f59925
    
    44bbd0b0: Get full version of gcc
    22f59925: Remove support for gcc 4.6
    
    Also Remove support for msvc without STD_REGEX
    
    (cherry picked from commit 6f2cd26103d0d59fd76184fd76af89cb8817ad4f)
---
 CMakeLists.txt |   18 +++++++++++-------
 1 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index f99c57b..cf862cc 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -280,21 +280,25 @@ if(UNIX OR MINGW)
 	    set(LYX_USE_STD_REGEX 0)
 	  endif()
 	else()
-	  execute_process(COMMAND ${CMAKE_CXX_COMPILER} -dumpversion OUTPUT_VARIABLE \
GCC_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE) +	  execute_process(COMMAND \
${CMAKE_CXX_COMPILER} -dumpfullversion OUTPUT_VARIABLE GCC_VERSION ERROR_VARIABLE \
_error RESULT_VARIABLE _err OUTPUT_STRIP_TRAILING_WHITESPACE) +	  #message(STATUS \
"dumpfullversion: error = ${_error}, result = ${_err}") +	  if (_err)
+	    # previous check failed, try again with _old_ parameter
+	    execute_process(COMMAND ${CMAKE_CXX_COMPILER} -dumpversion OUTPUT_VARIABLE \
GCC_VERSION ERROR_VARIABLE _error RESULT_VARIABLE _err \
OUTPUT_STRIP_TRAILING_WHITESPACE) +	    #message(STATUS "dumpversion: error = \
${_error}, result = ${_err}") +	  endif()
 	  message(STATUS "Using GCC version ${GCC_VERSION}")
 	  if(GCC_VERSION VERSION_LESS 4.9)
-		  if(GCC_VERSION VERSION_LESS 4.6)
-			  message(FATAL_ERROR "gcc >= 4.6 is required.")
-		  endif()
-		  # <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)
+		  # Drop support for gcc versions prior to 4.9
+		  message(FATAL_ERROR "gcc >= 4.9 is required.")
 	  else()
 		  set(LYX_USE_STD_REGEX 1)
 	  endif()
 	endif()
 	set(LYX_GCC11_MODE "${CXX11_FLAG}")
 else()
+		# Drop support for msvc versions prior to 1915
+		message(FATAL_ERROR "msvc >= 1915 is required.")
 	set(LYX_USE_STD_REGEX 0)
 #	if(MSVC10)
 #		set(LYX_USE_STD_REGEX 1) #TODO should we use it in ECMAScript mode?
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic