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

Remove leading zeros in version_config.hpp #793

Merged
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
3 changes: 3 additions & 0 deletions cmake/Modules/Version.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
# Generate version_config.hpp from the version found in CMakeLists.txt
function(write_version)
message(STATUS "RMM VERSION: ${RMM_VERSION}")
math(EXPR RMM_VERSION_MAJOR_CPP_HEADER "${RMM_VERSION_MAJOR} + 0" OUTPUT_FORMAT DECIMAL)
math(EXPR RMM_VERSION_MINOR_CPP_HEADER "${RMM_VERSION_MINOR} + 0" OUTPUT_FORMAT DECIMAL)
math(EXPR RMM_VERSION_PATCH_CPP_HEADER "${RMM_VERSION_PATCH} + 0" OUTPUT_FORMAT DECIMAL)
configure_file(${RMM_SOURCE_DIR}/cmake/version_config.hpp.in
${RMM_BINARY_DIR}/include/rmm/version_config.hpp @ONLY)
endfunction(write_version)
6 changes: 3 additions & 3 deletions cmake/version_config.hpp.in
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
*/
#pragma once

#define RMM_VERSION_MAJOR @RMM_VERSION_MAJOR@
#define RMM_VERSION_MINOR @RMM_VERSION_MINOR@
#define RMM_VERSION_PATCH @RMM_VERSION_PATCH@
#define RMM_VERSION_MAJOR @RMM_VERSION_MAJOR_CPP_HEADER@
#define RMM_VERSION_MINOR @RMM_VERSION_MINOR_CPP_HEADER@
#define RMM_VERSION_PATCH @RMM_VERSION_PATCH_CPP_HEADER@