This revision was automatically updated to reflect the committed changes.
Closed by commit rL255893: Patch cmake to allow detection of python 2.7.9+ 
(authored by aidandodds).

Changed prior to commit:
  http://reviews.llvm.org/D15566?vs=42994&id=43127#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D15566

Files:
  lldb/trunk/cmake/modules/LLDBConfig.cmake

Index: lldb/trunk/cmake/modules/LLDBConfig.cmake
===================================================================
--- lldb/trunk/cmake/modules/LLDBConfig.cmake
+++ lldb/trunk/cmake/modules/LLDBConfig.cmake
@@ -71,8 +71,8 @@
   if(EXISTS "${PYTHON_INCLUDE_DIRS}/patchlevel.h")
     file(STRINGS "${PYTHON_INCLUDE_DIRS}/patchlevel.h" python_version_str
          REGEX "^#define[ \t]+PY_VERSION[ \t]+\"[^\"]+\"")
-    string(REGEX REPLACE "^#define[ \t]+PY_VERSION[ \t]+\"([^\"]+)\".*" "\\1"
-                         PYTHONLIBS_VERSION_STRING "${python_version_str}")
+    string(REGEX REPLACE "^#define[ \t]+PY_VERSION[ \t]+\"([^\"+]+)[+]?\".*" 
"\\1"
+         PYTHONLIBS_VERSION_STRING "${python_version_str}")
     message("-- Found Python version ${PYTHONLIBS_VERSION_STRING}")
     string(REGEX REPLACE "([0-9]+)[.]([0-9]+)[.][0-9]+" "python\\1\\2" 
PYTHONLIBS_BASE_NAME "${PYTHONLIBS_VERSION_STRING}")
     unset(python_version_str)


Index: lldb/trunk/cmake/modules/LLDBConfig.cmake
===================================================================
--- lldb/trunk/cmake/modules/LLDBConfig.cmake
+++ lldb/trunk/cmake/modules/LLDBConfig.cmake
@@ -71,8 +71,8 @@
   if(EXISTS "${PYTHON_INCLUDE_DIRS}/patchlevel.h")
     file(STRINGS "${PYTHON_INCLUDE_DIRS}/patchlevel.h" python_version_str
          REGEX "^#define[ \t]+PY_VERSION[ \t]+\"[^\"]+\"")
-    string(REGEX REPLACE "^#define[ \t]+PY_VERSION[ \t]+\"([^\"]+)\".*" "\\1"
-                         PYTHONLIBS_VERSION_STRING "${python_version_str}")
+    string(REGEX REPLACE "^#define[ \t]+PY_VERSION[ \t]+\"([^\"+]+)[+]?\".*" "\\1"
+         PYTHONLIBS_VERSION_STRING "${python_version_str}")
     message("-- Found Python version ${PYTHONLIBS_VERSION_STRING}")
     string(REGEX REPLACE "([0-9]+)[.]([0-9]+)[.][0-9]+" "python\\1\\2" PYTHONLIBS_BASE_NAME "${PYTHONLIBS_VERSION_STRING}")
     unset(python_version_str)
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to