diff --git a/CMakeLists.txt b/CMakeLists.txt index b688d92..073d0f4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,9 +18,19 @@ option(TREXIO_DEVEL "TREXIO developer mode (for code generation)." OFF) if(EXISTS ".git/config") set(TREXIO_DEVEL ON) - find_package(Python3) + find_package(Python3 REQUIRED) 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()