1
0
mirror of https://github.com/TREX-CoE/trexio.git synced 2024-07-22 18:57:39 +02:00

add detection of emacs and min required version of Python3

This commit is contained in:
q-posev 2021-11-17 10:07:19 +01:00
parent 21131ed352
commit a1e6fcbfc5

View File

@ -18,9 +18,19 @@ option(TREXIO_DEVEL "TREXIO developer mode (for code generation)." OFF)
if(EXISTS ".git/config") if(EXISTS ".git/config")
set(TREXIO_DEVEL ON) set(TREXIO_DEVEL ON)
find_package(Python3) find_package(Python3 REQUIRED)
if(Python3_FOUND) if(Python3_FOUND)
message(STATUS "Python3 version :: ${Python3_VERSION}") if(Python3_VERSION_MINOR LESS 6)
message(FATAL_ERROR "Required Python3 version :: >= 3.6; Found :: ${Python3_VERSION}")
else()
message(STATUS "Python3 version :: ${Python3_VERSION}")
endif()
endif()
find_program(EMACS NAMES emacs REQUIRED)
if(NOT EMACS-NOTFOUND)
message(STATUS "EMACS detected :: ${EMACS}")
else()
message(FATAL_ERROR "EMACS not found. It is required to produce TREXIO source code from org-mode files.")
endif() endif()
endif() endif()