kompute
kompute copied to clipboard
Def version
https://github.com/KomputeProject/kompute/issues/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.
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.
- Root
CMakeLists.txt setup.pyVERSION
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.