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

Def version #386

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Def version #386

wants to merge 2 commits into from

Conversation

kwsp
Copy link
Contributor

@kwsp kwsp commented Jul 31, 2024

#194

Added macros KOMPUTE_VERSION_MAJOR, KOMPUTE_VERSION_MINOR, KOMPUTE_VERSION_PATCH, and KOMPUTE_VERSION_STRING. Generated from the project version defined in CMake.

Added a test to ensure the macros are defined.

kwsp added 2 commits July 31, 2024 11:54
Signed-off-by: tnie <tnie@tuta.io>
Signed-off-by: tnie <tnie@tuta.io>
@kwsp
Copy link
Contributor Author

kwsp commented Jul 31, 2024

I was curious so I did a grep for the current version and found it's defined in a few places

~/code/cpp/kompute rg 0.9.0
CMakeLists.txt
4:project(kompute VERSION 0.9.0 LANGUAGES CXX)

VERSION
1:0.9.0

setup.py
81:    version='0.9.0',

docs/overview/shaders-to-headers.rst
87:                                 GIT_TAG 1344ece4ac278f9b3be3b4555ffaace7a032b91f) # The commit hash for a dev version before v0.9.0. Replace with the latest from: https://github.com/KomputeProject/kompute/releases

vcpkg.json.opt
3:  "version-string": "0.9.0",

examples/logistic_regression/CMakeLists.txt
7:option(KOMPUTE_OPT_GIT_TAG "The tag of the repo to use for the example" v0.9.0)

docs/conf.py
30:release = '0.9.0'

examples/array_multiplication/CMakeLists.txt
7:option(KOMPUTE_OPT_GIT_TAG "The tag of the repo to use for the example" v0.9.0)

examples/android/android-simple/app/src/main/cpp/CMakeLists.txt
6:option(KOMPUTE_OPT_GIT_TAG "The tag of the repo to use for the example" v0.9.0)

Excluding the git tags in the examples, version is defined in 3 locations.

  1. Root CMakeLists.txt
  2. setup.py
  3. VERSION

I was wondering of there's a way to have a "Single source of truth" for the version but I guess this isn't too bad.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant