Skip to content

Commit ba4d909

Browse files
Merge pull request #1099 from lukaszstolarczuk/debug-win-ver
Add CMake vars to dll's metadata
2 parents 2671373 + fb8838e commit ba4d909

File tree

3 files changed

+26
-8
lines changed

3 files changed

+26
-8
lines changed

CONTRIBUTING.md

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@
1313
- [Adding new dependency](#adding-new-dependency)
1414
- [Code coverage](#code-coverage)
1515
- [Debugging](#debugging)
16-
- [Checking the UMF version and CMake variables (Linux only)](#checking-the-umf-version-and-cmake-variables-linux-only)
17-
- [Requirements](#requirements)
16+
- [Checking UMF version and build options](#checking-umf-version-and-build-options)
17+
- [Linux](#linux)
18+
- [Windows](#windows)
1819

1920
Below you'll find instructions on how to contribute to UMF, either with code changes
2021
or issues. All contributions are most welcome!
@@ -229,16 +230,29 @@ $ genhtml -o html_report coverage.info
229230

230231
## Debugging
231232

232-
### Checking the UMF version and CMake variables (Linux only)
233+
### Checking UMF version and build options
233234

234-
Strings with the UMF version and useful CMake variables can be grepped in the following way:
235+
From an already built UMF shared library you can obtain UMF precise version and
236+
CMake variables/options it was built with. It's not only useful to verify what should
237+
be included within the library, but also for debugging. If you're filing an issue to
238+
UMF project, please include this information in your ticket.
239+
240+
#### Linux
241+
242+
Make sure the `binutils` package is installed in your system. Then, you can use
243+
the following grep command:
235244

236245
```bash
237246
$ strings libumf.so | grep "@(#)"
238247
@(#) Intel(R) UMF version: 0.11.0-dev.git66.g89e3831d
239248
@(#) Intel(R) UMF CMake variables: "CMAKE_BUILD_TYPE:Debug,...
240249
```
241250
242-
#### Requirements
251+
Please note, that version available in the name of library file (e.g. `libumf.so.0.11.0`)
252+
may be not accurate - version coded inside of the library is far more precise.
253+
254+
#### Windows
243255
244-
- binutils package (Linux)
256+
On Windows, DLL's metadata can be accessed e.g. looking into *Properties* of the dll file
257+
in the explorer. Look into the *Details* tab for "Product version" and "File description"
258+
(it contains UMF's build options).

src/libumf.rc.in

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010

1111
#define UMF_VERNUMBERS @PROJECT_VERSION_MAJOR@,@PROJECT_VERSION_MINOR@,@PROJECT_VERSION_PATCH@,@UMF_VERSION_REVISION@
1212
#define _UMF_VERSION "@UMF_VERSION@"
13+
// Store our CMake vars in the "FileDescription" block, as the custom fields require special parsing.
14+
#define _UMF_CMAKE_VARS "@UMF_ALL_CMAKE_VARIABLES@"
1315

1416
#ifdef _DEBUG
1517
#define VERSION_DEBUG VS_FF_DEBUG
@@ -49,7 +51,7 @@ BEGIN
4951
BLOCK "040904b0" // U.S. English, Unicode (0x04b0 == 1200)
5052
BEGIN
5153
VALUE "CompanyName", "Intel Corporation\0"
52-
VALUE "FileDescription", "Unified Memory Framework (UMF) library\0"
54+
VALUE "FileDescription", "Unified Memory Framework (UMF) library (build options: " _UMF_CMAKE_VARS ")\0"
5355
VALUE "FileVersion", _UMF_VERSION "\0"
5456
VALUE "LegalCopyright", "Copyright 2024-2025, Intel Corporation. All rights reserved.\0"
5557
VALUE "LegalTrademarks", "\0"

src/proxy_lib/proxy_lib.rc.in

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010

1111
#define UMF_VERNUMBERS @PROJECT_VERSION_MAJOR@,@PROJECT_VERSION_MINOR@,@PROJECT_VERSION_PATCH@,@UMF_VERSION_REVISION@
1212
#define _UMF_VERSION "@UMF_VERSION@"
13+
// Store our CMake vars in the "FileDescription" block, as the custom fields require special parsing.
14+
#define _UMF_CMAKE_VARS "@UMF_ALL_CMAKE_VARIABLES@"
1315

1416
#ifdef _DEBUG
1517
#define VERSION_DEBUG VS_FF_DEBUG
@@ -49,7 +51,7 @@ BEGIN
4951
BLOCK "040904b0" // U.S. English, Unicode (0x04b0 == 1200)
5052
BEGIN
5153
VALUE "CompanyName", "Intel Corporation\0"
52-
VALUE "FileDescription", "Unified Memory Framework (UMF) proxy library\0"
54+
VALUE "FileDescription", "Unified Memory Framework (UMF) proxy library (build options: " _UMF_CMAKE_VARS ")\0"
5355
VALUE "FileVersion", _UMF_VERSION "\0"
5456
VALUE "LegalCopyright", "Copyright 2024-2025, Intel Corporation. All rights reserved.\0"
5557
VALUE "LegalTrademarks", "\0"

0 commit comments

Comments
 (0)