mirror of
https://github.com/TREX-CoE/trexio.git
synced 2024-08-25 06:31:43 +02:00
add detection of emacs and min required version of Python3
This commit is contained in:
parent
21131ed352
commit
a1e6fcbfc5
@ -18,11 +18,21 @@ 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)
|
||||
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()
|
||||
|
||||
# By default, the shared TREXIO library is built (even without -DBUILD_SHARED_LIBS=ON).
|
||||
# To change this behaviour, append -DBUILD_STATIC_LIBS=ON to the cmake call.
|
||||
|
Loading…
Reference in New Issue
Block a user