[Bf-blender-cvs] [4947aa29db0] master: CMake: Improve python version mismatch error

Ray Molenkamp noreply at git.blender.org
Tue Jun 22 02:19:12 CEST 2021


Commit: 4947aa29db0a388b166704bd22eb416896064c61
Author: Ray Molenkamp
Date:   Mon Jun 21 18:19:07 2021 -0600
Branches: master
https://developer.blender.org/rB4947aa29db0a388b166704bd22eb416896064c61

CMake: Improve python version mismatch error

When CMake detects and incompatible Python version
it errors out with an error saying at-least python 3.9
is required, but doesn't mention the version it detected.

This makes troubleshooting the problem harder than it
needs to be.

This diff changes the error message to include the python
version CMake detected.

Differential Revision: https://developer.blender.org/D11666

Reviewed By: Ray Molenkamp

===================================================================

M	CMakeLists.txt

===================================================================

diff --git a/CMakeLists.txt b/CMakeLists.txt
index f315fa87236..297e32bd67e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -836,7 +836,7 @@ if(WITH_PYTHON)
   # because UNIX will search for the old Python paths which may not exist.
   # giving errors about missing paths before this case is met.
   if(DEFINED PYTHON_VERSION AND "${PYTHON_VERSION}" VERSION_LESS "3.9")
-    message(FATAL_ERROR "At least Python 3.9 is required to build")
+    message(FATAL_ERROR "At least Python 3.9 is required to build, but found Python ${PYTHON_VERSION}")
   endif()
 
   file(GLOB RESULT "${CMAKE_SOURCE_DIR}/release/scripts/addons")



More information about the Bf-blender-cvs mailing list