[Lldb-commits] [PATCH] D65230: [CMake] Loosen Python version check and ignore patch version

Stefan Gränitz via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Jul 24 12:24:28 PDT 2019


sgraenitz added a comment.

Interesting way to get from version to list! :)

Cosmetics: It looks like `PYTHON_VERSION_STRING` and `PYTHONLIBS_VERSION_STRING` are global and all others are local variables? Using lowercase names for locals makes it easier to see. As names are case-sensitive, it would also avoid the collision with the actual `PYTHON_MAJOR/MINOR`.



================
Comment at: lldb/cmake/modules/LLDBConfig.cmake:205
+    # doesn't set PYTHON_VERSION_MAJOR or PYTHON_VERSION_MINOR. Use the LLDB
+    # prefix to not shadow the actual variables.
+    string(REPLACE "." ";" PYTHON_VERSION_LIST ${PYTHON_VERSION_STRING})
----------------
I think CMake would not shadow, but overwrite them in directory scope (which is root here, so everywhere except the cache).


Repository:
  rLLDB LLDB

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D65230/new/

https://reviews.llvm.org/D65230





More information about the lldb-commits mailing list