You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 22, 2023. It is now read-only.
@@ -14,80 +13,155 @@ More implementation details can be found in [include/libpmemobj++/README.md](inc
14
13
Latest releases can be found on the ["releases" tab](https://github.com/pmem/libpmemobj-cpp/releases).
15
14
Up-to-date support/maintenance status of branches/releases is available on [pmem.io](https://pmem.io/libpmemobj-cpp).
16
15
17
-
# Compatibility note #
18
-
In libpmemobj 1.12 we introduced a new transaction handler type: [pmem::obj::flat_transaction](https://pmem.io/libpmemobj-cpp/master/doxygen/classpmem_1_1obj_1_1flat__transaction.html). By defining LIBPMEMOBJ_CPP_USE_FLAT_TRANSACTION you can make pmem::obj::transaction to be an alias to pmem::obj::flat_transaction. In 1.12 we have also changed the default behavior of containers' transactional methods. Now, in case of any failure within such method, the outer transaction (if any) will not be immediately aborted. Instead, an exception will be thrown, which will lead to transaction abort only if it's not caught before the outer tx scope ends. To change the behavior to the old one, you can set LIBPMEMOBJ_CPP_FLAT_TX_USE_FAILURE_RETURN macro to 0. Be aware that the old behavior can lead to segfaults in some cases (see tx_nested_struct_example in this [file](examples/transaction/transaction.cpp)).
16
+
## Compatibility note
17
+
In libpmemobj 1.12 we introduced a new transaction handler type: [pmem::obj::flat_transaction](https://pmem.io/libpmemobj-cpp/master/doxygen/classpmem_1_1obj_1_1flat__transaction.html).
18
+
By defining LIBPMEMOBJ_CPP_USE_FLAT_TRANSACTION you can make pmem::obj::transaction to be an alias to pmem::obj::flat_transaction.
19
+
In 1.12 we have also changed the default behavior of containers' transactional methods. Now, in case of any failure within such method,
20
+
the outer transaction (if any) will not be immediately aborted. Instead, an exception will be thrown, which will lead to transaction abort
21
+
only if it's not caught before the outer tx scope ends. To change the behavior to the old one, you can set LIBPMEMOBJ_CPP_FLAT_TX_USE_FAILURE_RETURN macro to 0.
22
+
Be aware that the old behavior can lead to segfaults in some cases (see tx_nested_struct_example in this [file](examples/transaction/transaction.cpp)).
The best way to install stable releases, tested on specific OS, is to use package manager.
44
+
45
+
### Windows
46
+
The recommended and the easiest way to install **libpmemobj-cpp** on Windows is to use Microsoft's vcpkg. Vcpkg is an open source tool and ecosystem created for library management.
47
+
For more information about vcpkg please see [vcpkg repository](https://github.com/microsoft/vcpkg#quick-start-windows).
48
+
```ps
49
+
.\vcpkg.exe install libpmemobj-cpp:x64-windows
50
+
```
51
+
52
+
### Ubuntu/Debian
53
+
For installation on Debian-related distros please execute following commands:
54
+
```
55
+
# apt install libpmemobj-cpp-dev
56
+
```
57
+
58
+
### Fedora/RHEL
59
+
To install **libpmemobj-cpp** on Fedora or RedHat execute:
60
+
```
61
+
# dnf install libpmemobj++-devel
62
+
```
19
63
20
-
# How to build #
64
+
## Dependencies
65
+
You will need the following packages for compilation:
- GCC >= 4.8.1 (C++11 is supported in GCC since version 4.8.1, but it does not support expanding variadic template variables in lambda expressions, which is required to build persistent containers and is possible with GCC >= 4.9.0. If you want to build libpmemobj-cpp without testing containers, use flag TEST_XXX=OFF (separate flag for each container))
**radix_tree**: on Windows, Visual Studio in version at least 2017 is needed. Testing and/or installing radix_tree can be disable via CMake options.
80
+
><sup>1</sup> C++11 is supported in GCC since version 4.8.1, but it does not support expanding variadic template variables in lambda expressions, which is required to build persistent containers and is possible with GCC >= 4.9.0. If you want to build libpmemobj-cpp without testing containers, use flag TEST_XXX=OFF (separate flag for each container).
35
81
36
-
## On Linux ##
82
+
><sup>2</sup> **radix_tree** is supported on Windows with MSBuild >=15 (Visual Studio at least 2017 is needed). Testing radix_tree can be disabled via CMake option (use -DTEST_RADIX_TREE=OFF).
37
83
38
-
```sh
84
+
## Linux build
85
+
### Standard compilation
86
+
```
39
87
$ mkdir build
40
88
$ cd build
41
89
$ cmake ..
42
-
$ make
43
-
$ make install
90
+
$ make [-DCMAKE_INSTALL_PREFIX=<path_to_installation_dir>]
0 commit comments