mirror of
https://github.com/fmtlib/fmt.git
synced 2025-12-14 09:39:08 +01:00
Pass version from CMake to Sphinx
This commit is contained in:
12
doc/conf.py
12
doc/conf.py
@@ -47,7 +47,7 @@ source_suffix = '.rst'
|
||||
|
||||
# General information about the project.
|
||||
project = u'C++ Format'
|
||||
copyright = u'2012-2014, Victor Zverovich'
|
||||
copyright = u'2012-2015, Victor Zverovich'
|
||||
|
||||
# The version info for the project you're documenting, acts as replacement for
|
||||
# |version| and |release|, also used in various other places throughout the
|
||||
@@ -55,15 +55,11 @@ copyright = u'2012-2014, Victor Zverovich'
|
||||
#
|
||||
# The short X.Y version.
|
||||
|
||||
# Get version from CMakeLists.txt.
|
||||
with open('../CMakeLists.txt') as f:
|
||||
for line in f:
|
||||
m = re.match(r'set\(CPPFORMAT_VERSION (.+)\)', line.strip())
|
||||
if m:
|
||||
version = m.group(1)
|
||||
# Version and release are passed from CMake.
|
||||
#version = None
|
||||
|
||||
# The full version, including alpha/beta/rc tags.
|
||||
release = version
|
||||
#release = version
|
||||
|
||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||
# for a list of supported languages.
|
||||
|
||||
Reference in New Issue
Block a user