3
0
mirror of https://github.com/triqs/dft_tools synced 2024-12-23 12:55:17 +01:00
dft_tools/share/cmake/Modules/FindSphinx.cmake
Alexander Hampel 11d394fd5b synchronize dfttools with app4triqs structure
* moved the plovasp C++ code to c++/triqs_dft_tools/converters/vasp
* added global header triqs_dft_tools/triqs_dft_tools.hpp
* python dir based on single cmakelist file
* registered C++ tests for plovasp
* corrected imports for py3 tests for plovasp
* corrected block order in sigma_from_file and srvo3_Gloc
* exchanged ref files for sigma_from_file, srvo3_Gloc, SrVO3.ref.h5
* moved vasp converter bash scripts from dir shells to bin dir
2020-06-10 17:45:53 +02:00

38 lines
1.3 KiB
CMake

# Copyright Olivier Parcollet 2017.
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
# This module looks for sphinx documentation tool
# and define a function that prepares the Makefile for sphinx-build
find_program(SPHINXBUILD_EXECUTABLE
NAMES sphinx-build
PATHS /usr/bin /opt/local/bin /usr/local/bin #opt/sphinx-doc/bin
PATH_SUFFIXES bin
)
if (NOT SPHINXBUILD_EXECUTABLE)
message(FATAL_ERROR "I cannot find sphinx to build the triqs documentation")
endif()
execute_process(
COMMAND "${SPHINXBUILD_EXECUTABLE}" --version
OUTPUT_VARIABLE SPHINXBUILD_VERSION
ERROR_VARIABLE SPHINXBUILD_VERSION
)
if (SPHINXBUILD_VERSION MATCHES "[Ss]phinx.* ([0-9]+\\.[0-9]+(\\.|b)[0-9]+)")
set (SPHINXBUILD_VERSION "${CMAKE_MATCH_1}")
endif()
if (SPHINXBUILD_VERSION VERSION_EQUAL 1.6.3)
message(FATAL_ERROR "sphinx-build found at ${SPHINXBUILD_EXECUTABLE} but version 1.6.3 has a bug. Upgrade sphinx.")
else()
message(STATUS "sphinx-build program found at ${SPHINXBUILD_EXECUTABLE} with version ${SPHINXBUILD_VERSION}")
endif ()
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(SPHINX DEFAULT_MSG SPHINXBUILD_EXECUTABLE)
mark_as_advanced( SPHINXBUILD_EXECUTABLE )