File tree Expand file tree Collapse file tree 3 files changed +25
-10
lines changed
runtime_src/core/include/xrt/detail Expand file tree Collapse file tree 3 files changed +25
-10
lines changed Original file line number Diff line number Diff line change 1+ #ifndef _XRT_VERSION_SLIM_H_
2+ #define _XRT_VERSION_SLIM_H_
3+
4+ /*
5+ * This header contains minimal version info needed for xrt/detail/abi.h header
6+ */
7+
8+ #define XRT_SLIM_VERSION (major , minor ) ((major << 16) + (minor))
9+ #define XRT_SLIM_VERSION_CODE XRT_SLIM_VERSION(@XRT_VERSION_MAJOR@, @XRT_VERSION_MINOR@)
10+ #define XRT_SLIM_MAJOR (code ) ((code >> 16))
11+ #define XRT_SLIM_MINOR (code ) (code - ((code >> 16) << 16))
12+
13+ #endif
Original file line number Diff line number Diff line change @@ -88,13 +88,18 @@ configure_file(
8888 ${PROJECT_BINARY_DIR} /gen/version .h
8989)
9090
91+ configure_file (
92+ ${XRT_SOURCE_DIR} /CMake/config/version -slim.h.in
93+ ${PROJECT_BINARY_DIR} /gen/xrt/detail/version -slim.h
94+ )
95+
9196configure_file (
9297 ${XRT_SOURCE_DIR} /CMake/config/version .json.in
9398 ${PROJECT_BINARY_DIR} /gen/version .json
9499)
95100
96101# xrt component install
97- install (FILES ${PROJECT_BINARY_DIR} /gen/version .h
102+ install (FILES ${PROJECT_BINARY_DIR} /gen/version .h ${PROJECT_BINARY_DIR} /gen/xrt/detail/ version -slim.h
98103 DESTINATION ${XRT_INSTALL_INCLUDE_DIR} /xrt/detail
99104 COMPONENT ${XRT_BASE_DEV_COMPONENT} )
100105
Original file line number Diff line number Diff line change 44#ifndef XRT_DETAIL_ABI_H
55#define XRT_DETAIL_ABI_H
66
7- // Generated version.h file is installed into include/xrt/detail/version.h
8- // but at build time it is picked up from compile include search path
9- #if defined(XRT_BUILD) && !defined(DISABLE_ABI_CHECK)
10- # include " version.h"
11- #elif !defined(XRT_BUILD)
12- # include " xrt/detail/version.h"
7+ // Use slim version header without datetime fields
8+ #ifndef DISABLE_ABI_CHECK
9+ # include " xrt/detail/version-slim.h"
1310#endif
1411
1512#ifdef __cplusplus
@@ -27,9 +24,9 @@ namespace xrt { namespace detail {
2724// version of XRT and new version.
2825struct abi {
2926#ifndef DISABLE_ABI_CHECK
30- const unsigned int major {XRT_MAJOR (XRT_VERSION_CODE )};
31- const unsigned int minor {XRT_MINOR (XRT_VERSION_CODE )};
32- const unsigned int code {XRT_VERSION_CODE };
27+ const unsigned int major {XRT_SLIM_MAJOR (XRT_SLIM_VERSION_CODE )};
28+ const unsigned int minor {XRT_SLIM_MINOR (XRT_SLIM_VERSION_CODE )};
29+ const unsigned int code {XRT_SLIM_VERSION_CODE };
3330#else
3431 const unsigned int major {0 };
3532 const unsigned int minor {0 };
You can’t perform that action at this time.
0 commit comments