3
0
mirror of https://github.com/triqs/dft_tools synced 2024-12-22 20:34:38 +01:00

[cmake] app4triqs version detection via git, some cleaning in conf.py.in

This commit is contained in:
Nils Wentzell 2018-06-01 09:38:03 -04:00
parent 7f0e6283f0
commit 2cd1a9384f
2 changed files with 24 additions and 8 deletions

View File

@ -1,6 +1,3 @@
# Version number from the latest annotated git tag
execute_process(COMMAND git describe --abbrev=0 OUTPUT_VARIABLE APP4TRIQS_VERSION)
# Start configuration
cmake_minimum_required(VERSION 2.8.12)
project(app4triqs CXX)
@ -28,9 +25,18 @@ if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT OR (NOT IS_ABSOLUTE ${CMAKE_INSTA
endif()
message(STATUS "-------- INSTALL_PREFIX: ${CMAKE_INSTALL_PREFIX} --------")
# Fetch the git hash of app4triqs
# Use git to detect App4Triqs version and git hash
execute_process(COMMAND bash "-c" "${TRIQS_GIT_EXECUTABLE} describe | sed \"s/-\\([0-9]*\\)-.*/.\\1/g\""
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
OUTPUT_VARIABLE APP4TRIQS_VERSION
OUTPUT_STRIP_TRAILING_WHITESPACE
)
if(NOT APP4TRIQS_VERSION)
set(APP4TRIQS_VERSION 1.5)
endif()
triqs_get_git_hash_of_source_dir(APP4TRIQS_GIT_HASH)
message(STATUS "app4triqs git hash: ${APP4TRIQS_GIT_HASH}")
MESSAGE(STATUS "app4triqs version : ${APP4TRIQS_VERSION}")
message(STATUS "Git hash: ${APP4TRIQS_GIT_HASH}")
# Build and install the app4triqs library
add_subdirectory(c++/app4triqs)
@ -65,6 +71,6 @@ if(BUILD_DEBIAN_PACKAGE)
SET(CPACK_PACKAGE_VERSION ${APP4TRIQS_VERSION})
SET(CPACK_PACKAGE_CONTACT "https://github.com/TRIQS/app4triqs")
EXECUTE_PROCESS(COMMAND dpkg --print-architecture OUTPUT_VARIABLE CMAKE_DEBIAN_PACKAGE_ARCHITECTURE OUTPUT_STRIP_TRAILING_WHITESPACE)
SET(CPACK_DEBIAN_PACKAGE_DEPENDS "libc6 (>= 2.23), libgcc1 (>= 1:6), libstdc++6, python, libpython2.7, libopenmpi1.10, libhdf5-10, libgmp10, libfftw3-double3, libibverbs1, libgfortran3, zlib1g, libsz2, libhwloc5, libquadmath0, libaec0, libnuma1, libltdl7, libblas3, liblapack3, python-numpy, python-h5py, python-jinja2, python-mako, python-mpi4py, python-matplotlib, python-scipy, cpp2py (= ${APP4TRIQS_VERSION}), triqs (= ${APP4TRIQS_VERSION})")
SET(CPACK_DEBIAN_PACKAGE_DEPENDS "libc6 (>= 2.23), libgcc1 (>= 1:6), libstdc++6, python, libpython2.7, libopenmpi1.10, libhdf5-10, libgmp10, libfftw3-double3, libibverbs1, libgfortran3, zlib1g, libsz2, libhwloc5, libquadmath0, libaec0, libnuma1, libltdl7, libblas3, liblapack3, python-numpy, python-h5py, python-jinja2, python-mako, python-mpi4py, python-matplotlib, python-scipy, cpp2py (>= 1.5), triqs (>= 1.5)")
INCLUDE(CPack)
endif()

View File

@ -2,15 +2,25 @@
#
# TRIQS documentation build configuration file
import sys
sys.path.insert(0, "@TRIQS_SPHINXEXT_PATH@/numpydoc")
extensions = ['sphinx.ext.autodoc',
'sphinx.ext.mathjax',
'sphinx.ext.intersphinx',
'sphinx.ext.doctest',
'sphinx.ext.todo',
'sphinx.ext.viewcode',
'sphinx.ext.autosummary',
'plot_directive',
'numpydoc',
'matplotlib.sphinxext.plot_directive']
source_suffix = '.rst'
project = u'APP4TRIQS - An example triqs application'
copyright = u'2018 - The TRIQS Developers'
version = '@APP4TRIQS_VERSION'
mathjax_path = "@TRIQS_MATHJAX_PATH@/MathJax.js?config=default"
templates_path = ['@CMAKE_SOURCE_DIR@/doc/_templates']
@ -27,6 +37,6 @@ html_context = {'header_title': 'app4triqs',
html_static_path = ['@CMAKE_SOURCE_DIR@/doc/_static']
html_sidebars = {'index': ['sideb.html', 'searchbox.html']}
htmlhelp_basename = 'TRIQSIntdoc'
htmlhelp_basename = 'APP4TRIQSdoc'
intersphinx_mapping = {'python': ('http://docs.python.org/2.7', None), 'triqslibs': ('https://triqs.ipht.cnrs.fr/unstable', None)}
intersphinx_mapping = {'python': ('http://docs.python.org/2.7', None), 'triqslibs': ('https://triqs.github.io/triqs', None)}