]> git.lyx.org Git - lyx.git/blobdiff - CMakeLists.txt
keytests: Speed up some tests
[lyx.git] / CMakeLists.txt
index f9fe75902052f1716d554f6781186c0ae85edef5..da0776eb2f25f767b59669f56b968fafaf982e11 100644 (file)
@@ -285,7 +285,7 @@ if(UNIX OR MINGW)
                  # see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53631
                  set(LYX_USE_STD_REGEX 0)
          else()
-                 set(LYX_USE_STD_REGEX 0)
+                 set(LYX_USE_STD_REGEX 1)
          endif()
        endif()
        set(LYX_GCC11_MODE "${CXX11_FLAG}")
@@ -729,19 +729,19 @@ if(GNUWIN32_DIR)
        list(APPEND CMAKE_PROGRAM_PATH "${GNUWIN32_DIR}/Python" )
 endif()
 
-find_package(PythonInterp 2.7 QUIET)
-if(PYTHONINTERP_FOUND)
-       if(PYTHON_VERSION_STRING VERSION_GREATER 2.8)
-       unset(PYTHONINTERP_FOUND)
-       endif()
-endif()
-
+# Search for python default version first
+unset(PYTHON_EXECUTABLE CACHE)
+unset(LYX_PYTHON_EXECUTABLE CACHE)
+unset(PYTHON_VERSION_MAJOR)
+unset(PYTHON_VERSION_MINOR)
+unset(PYTHON_VERSION_STRING)
+find_package(PythonInterp 3.3 QUIET)
 if(NOT PYTHONINTERP_FOUND)
   unset(PYTHON_EXECUTABLE CACHE)
-  unset(PYTHON_VERSION_MAJOR)
-  unset(PYTHON_VERSION_MINOR)
-  unset(PYTHON_VERSION_STRING)
-  find_package(PythonInterp 3.3 REQUIRED)
+  find_package(PythonInterp 2.0 REQUIRED)
+  if(NOT PYTHON_VERSION_STRING VERSION_LESS 2.8)
+    message(FATAL_ERROR "Python interpreter found, but is not suitable")
+  endif()
 endif()
 
 set(LYX_PYTHON_EXECUTABLE ${PYTHON_EXECUTABLE} CACHE FILEPATH "Python to be used by LyX")