Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use cmake project version info in sphinx config #560

Merged
merged 1 commit into from
Jan 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
cmake_minimum_required(VERSION 3.23.1)

set(MATX_VERSION 0.7.0)

# Used for config file generation
if(NOT DEFINED PROJECT_NAME)
set(NOT_SUBPROJECT ON)
Expand Down Expand Up @@ -30,7 +32,7 @@ set(cutensornet_DIR "" CACHE PATH "Directory where cuTensorNet is installed.")
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

if (MATX_BUILD_DOCS)
project(MATX_DOCS)
project(MATX_DOCS VERSION ${MATX_VERSION})
add_subdirectory(docs_input)
endif()

Expand All @@ -55,7 +57,7 @@ endif()
project(MATX
LANGUAGES CUDA CXX
DESCRIPTION "A modern and efficient header-only C++ library for numerical computing on GPU"
VERSION 0.7.0
VERSION ${MATX_VERSION}
HOMEPAGE_URL "https://github.com/NVIDIA/MatX")

if (NOT CMAKE_CUDA_ARCHITECTURES)
Expand Down
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,6 @@ cmake -DMATX_BUILD_TESTS=ON ..
make -j
```

Note that if documentation is selected all other build options are off. This eases the dependencies needed to build documentation
so large libraries such as CUDA don't need to be installed.

### Integrating MatX With Your Own Projects
MatX uses CMake as a first-class build generator, and therefore provides the proper config files to include into your own project. There are
typically two ways to do this:
Expand Down
4 changes: 2 additions & 2 deletions docs_input/conf.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ copyright = '2021-2024, Nvidia'
author = 'Nvidia'

# The short X.Y version
version = '0.7'
version = '@PROJECT_VERSION_MAJOR@.@PROJECT_VERSION_MINOR@'
# The full version, including alpha/beta/rc tags
release = '0.7'
release = '@PROJECT_VERSION@'


# -- General configuration ---------------------------------------------------
Expand Down