small improvement - PYTHON_VERSION cmake-gui behaviour

Issue #11 new
L. Marsh created an issue

Hello,

Here is a small change for the main CMakeLists.txt file. It is supposed to make PYTHON_VERSION free from the boolean constraint inside an interactive cmake interface (only tested on one machine)

--- a/CMakeLists.txt.old
+++ b/CMakeLists.txt
@@ -59,7 +59,7 @@ OPTION(PREPDEBUG "Debug files generated by preprocessor" OFF)
 # in debug mode, disable python debug libs (ie, link against release libs)
 OPTION(DEBUG_PYTHON_WITH_RELEASE "Special debugging option for python, link with release libs even in debug mode. This can be handy, e.g., for windows." OFF) 
 # manually select a specific python version
-OPTION(PYTHON_VERSION "Manually choose python version" OFF)
+set(PYTHON_VERSION "DEFAULT" CACHE STRING "Manually choose python version")
 # numpy / tensorflow integration
 OPTION(NUMPY "Compile with numpy integration?" OFF)

@@ -112,7 +112,7 @@ IF(BLENDER)
 ENDIF()

 # translate option into python version string
-if(NOT PYTHON_VERSION)
+if(PYTHON_VERSION STREQUAL "DEFAULT")
   set(PYTHON_VER_ID) # use any...
 else()
   set(PYTHON_VER_ID ${PYTHON_VERSION})

Have a nice day

Comments (0)

  1. Log in to comment