Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
F
fmt
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
fmt
Commits
d91a66e1
Commit
d91a66e1
authored
Jul 26, 2014
by
Victor Zverovich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Read version from CMakeLists.txt instead of using configure for compatibility with ReadTheDocs.
parent
2a1c0c99
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
5 deletions
+11
-5
CMakeLists.txt
CMakeLists.txt
+0
-4
doc/conf.py
doc/conf.py
+11
-1
No files found.
CMakeLists.txt
View file @
d91a66e1
...
@@ -151,11 +151,7 @@ if (EXISTS .gitignore)
...
@@ -151,11 +151,7 @@ if (EXISTS .gitignore)
set
(
CPACK_PACKAGE_VERSION_MAJOR 0
)
set
(
CPACK_PACKAGE_VERSION_MAJOR 0
)
set
(
CPACK_PACKAGE_VERSION_MINOR 10
)
set
(
CPACK_PACKAGE_VERSION_MINOR 10
)
set
(
CPACK_PACKAGE_VERSION_PATCH 0
)
set
(
CPACK_PACKAGE_VERSION_PATCH 0
)
set
(
CPPFORMAT_VERSION
${
CPACK_PACKAGE_VERSION_MAJOR
}
.
${
CPACK_PACKAGE_VERSION_MINOR
}
.
${
CPACK_PACKAGE_VERSION_PATCH
}
)
set
(
CPACK_SOURCE_PACKAGE_FILE_NAME cppformat-
${
CPPFORMAT_VERSION
}
)
set
(
CPACK_SOURCE_PACKAGE_FILE_NAME cppformat-
${
CPPFORMAT_VERSION
}
)
set
(
CPACK_RESOURCE_FILE_README
${
FORMAT_SOURCE_DIR
}
/README.rst
)
set
(
CPACK_RESOURCE_FILE_README
${
FORMAT_SOURCE_DIR
}
/README.rst
)
include
(
CPack
)
include
(
CPack
)
endif
()
endif
()
configure_file
(
doc/conf.py.in doc/conf.py @ONLY
)
doc/conf.py
.in
→
doc/conf.py
View file @
d91a66e1
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
# All configuration values have a default; values that are commented out
# All configuration values have a default; values that are commented out
# serve to show the default.
# serve to show the default.
import sys, os
import
sys
,
os
,
re
# If extensions (or modules to document with autodoc) are in another directory,
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# add these directories to sys.path here. If the directory is relative to the
...
@@ -49,6 +49,16 @@ master_doc = 'index'
...
@@ -49,6 +49,16 @@ master_doc = 'index'
project
=
u'C++ Format'
project
=
u'C++ Format'
copyright
=
u'2012-2014, Victor Zverovich'
copyright
=
u'2012-2014, Victor Zverovich'
# Get version from CMakeLists.txt.
version
=
{}
with
open
(
'../CMakeLists.txt'
)
as
f
:
for
line
in
f
:
m
=
re
.
match
(
r'set\(CPACK_PACKAGE_VERSION_([A-Z]+) ([0-9]+)\)'
,
line
.
strip
())
if
m
:
kind
,
value
=
m
.
groups
()
version
[
kind
]
=
value
version
=
'{}.{}.{}'
.
format
(
version
[
'MAJOR'
],
version
[
'MINOR'
],
version
[
'PATCH'
])
# The version info for the project you're documenting, acts as replacement for
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# |version| and |release|, also used in various other places throughout the
# built documents.
# built documents.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment