[cmake] Add minimum python version check to cmake to prevent later build errors.
authorRay Molenkamp <github@lazydodo.com>
Sat, 7 Oct 2017 13:57:19 +0000 (07:57 -0600)
committerRay Molenkamp <github@lazydodo.com>
Sat, 7 Oct 2017 13:58:54 +0000 (07:58 -0600)
CMakeLists.txt

index 552f747a39dc96285cea5c94ced6d4bf284b05ff..370c1ed520c18cbd723b6e7ce1110968e77b043f 100644 (file)
@@ -1493,6 +1493,9 @@ endif()
 # with _any_ library but since we used a fixed python version this tends to
 # be most problematic.
 if(WITH_PYTHON)
+       if(${PYTHON_VERSION} VERSION_LESS "3.6")
+               message(FATAL_ERROR "Atleast Python 3.6 is required to build")
+       endif()
        if(NOT EXISTS "${PYTHON_INCLUDE_DIR}/Python.h")
                message(FATAL_ERROR
                        "Missing: \"${PYTHON_INCLUDE_DIR}/Python.h\",\n"