mirror of
https://github.com/NVIDIA/nvbench.git
synced 2026-03-14 20:27:24 +00:00
Merge pull request #213 from alliepiper/version_prefix_fix
Use the new(ish) PREFIX option of rapids-cmake version, git revision header utils.
This commit is contained in:
@@ -20,6 +20,9 @@ endmacro()
|
||||
# Called after project(...)
|
||||
macro(nvbench_init_rapids_cmake)
|
||||
rapids_cmake_build_type(Release)
|
||||
rapids_cmake_write_version_file("${NVBench_BINARY_DIR}/nvbench/detail/version.cuh")
|
||||
rapids_cmake_write_version_file(
|
||||
"${NVBench_BINARY_DIR}/nvbench/detail/version.cuh"
|
||||
PREFIX "NVBENCH"
|
||||
)
|
||||
rapids_cpm_init()
|
||||
endmacro()
|
||||
|
||||
@@ -139,6 +139,7 @@ endif()
|
||||
rapids_cmake_write_git_revision_file(
|
||||
nvbench_git_revision
|
||||
"${NVBench_BINARY_DIR}/nvbench/detail/git_revision.cuh"
|
||||
PREFIX "NVBENCH"
|
||||
)
|
||||
target_link_libraries(nvbench PRIVATE nvbench_git_revision)
|
||||
|
||||
|
||||
@@ -18,12 +18,5 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
// Include the auto-generated git revision header:
|
||||
#include <nvbench/detail/git_revision.cuh>
|
||||
|
||||
// WAR issue rapidsai/rapids-cmake#99:
|
||||
#define NVBENCH_GIT_BRANCH NVBench_GIT_BRANCH
|
||||
#define NVBENCH_GIT_SHA1 NVBench_GIT_SHA1
|
||||
#define NVBENCH_GIT_VERSION NVBench_GIT_VERSION
|
||||
#ifdef NVBench_GIT_IS_DIRTY
|
||||
#define NVBENCH_GIT_IS_DIRTY
|
||||
#endif
|
||||
|
||||
@@ -18,13 +18,9 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
// Include the auto-generated version header:
|
||||
#include <nvbench/detail/version.cuh>
|
||||
|
||||
// WAR issue rapidsai/rapids-cmake#99
|
||||
#define NVBENCH_VERSION_MAJOR NVBench_VERSION_MAJOR
|
||||
#define NVBENCH_VERSION_MINOR NVBench_VERSION_MINOR
|
||||
#define NVBENCH_VERSION_PATCH NVBench_VERSION_PATCH
|
||||
|
||||
// clang-format off
|
||||
|
||||
/// Numeric version as "MMmmpp"
|
||||
|
||||
Reference in New Issue
Block a user