Skip to content
This repository has been archived by the owner on May 9, 2024. It is now read-only.

Commit

Permalink
Centralize version numbers in CMakeLists
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbaden committed Oct 4, 2022
1 parent 7584da1 commit 062a8c1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
14 changes: 8 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
cmake_minimum_required(VERSION 3.16.3)

set(HDK_VERSION_MAJOR "0")
set(HDK_VERSION_MINOR "2")
set(HDK_VERSION_PATCH "0")
set(HDK_VERSION_EXTRA "dev")
set(HDK_VERSION_RAW_NUMERIC "${HDK_VERSION_MAJOR}.${HDK_VERSION_MINOR}.${HDK_VERSION_PATCH}")
set(HDK_VERSION_RAW "${HDK_VERSION_MAJOR}.${HDK_VERSION_MINOR}.${HDK_VERSION_PATCH}${HDK_VERSION_EXTRA}")

project(
HeterogeneousDataKernels
VERSION 0.1
VERSION ${HDK_VERSION_RAW_NUMERIC}
LANGUAGES C CXX
)

Expand All @@ -28,11 +35,6 @@ if(DEFINED ENV{CONDA_PREFIX})
set(CMAKE_INSTALL_PREFIX "$ENV{CONDA_PREFIX}")
endif()

set(HDK_VERSION_MAJOR "0")
set(HDK_VERSION_MINOR "2")
set(HDK_VERSION_PATCH "0")
set(HDK_VERSION_EXTRA "")
set(HDK_VERSION_RAW "${HDK_VERSION_MAJOR}.${HDK_VERSION_MINOR}.${HDK_VERSION_PATCH}${HDK_VERSION_EXTRA}")
string(TIMESTAMP HDK_BUILD_DATE "%Y%m%d")
find_package(Git)
execute_process(
Expand Down
2 changes: 1 addition & 1 deletion python/setup.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ storage = Extension(

setup(
name="pyhdk",
version="0.1",
version="@HDK_VERSION_RAW@",
packages=["pyhdk"],
package_dir={"pyhdk": "@CMAKE_CURRENT_SOURCE_DIR@/pyhdk"},
ext_modules=cythonize(
Expand Down

0 comments on commit 062a8c1

Please sign in to comment.