Skip to content

Commit 750304c

Browse files
committed
add build instructions to README
see #138 (cherry picked from commit 6f523a4)
1 parent dc03481 commit 750304c

File tree

1 file changed

+44
-1
lines changed

1 file changed

+44
-1
lines changed

README.md

+44-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
[![Build status](https://github.com/pmed/v8pp/actions/workflows/cmake.yml/badge.svg)](https://github.com/pmed/v8pp/actions/workflows/cmake.yml)
2-
[![AppVeyor build status](https://ci.appveyor.com/api/projects/status/github/pmed/v8pp?svg=true)](https://ci.appveyor.com/project/pmed/v8pp)
32
[![NPM](https://img.shields.io/npm/v/v8pp.svg)](https://npmjs.com/package/v8pp)
43
[![Join the chat at https://gitter.im/pmed/v8pp](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/pmed/v8pp?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
54

@@ -11,6 +10,50 @@ Header-only library to expose C++ classes and functions into [V8](https://develo
1110
* GCC 5.4.0 (Ubuntu 16.04)
1211
* Clang 5.0.0 (Ubuntu 16.04)
1312

13+
## Building and testing
14+
15+
The library has a set of tests that can be configured, built, and run with CMake:
16+
17+
```console
18+
~/v8pp$ mkdir out; cd out
19+
~/v8pp/out$ cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON ..
20+
~/v8pp/out$ make
21+
~/v8pp/out$ ctest -V
22+
```
23+
24+
The full list of project options can be listed with cmake command:
25+
26+
```console
27+
~/v8pp/out$ cmake -LH ..
28+
```
29+
30+
Some of them could be:
31+
32+
> // Build documentation
33+
> BUILD_DOCUMENTATION:BOOL=OFF
34+
>
35+
> // Build shared library
36+
> BUILD_SHARED_LIBS:BOOL=ON
37+
>
38+
> // Build and run tests
39+
> BUILD_TESTING:BOOL=OFF
40+
>
41+
> // Header-only library
42+
> V8PP_HEADER_ONLY:BOOL=0
43+
>
44+
> // v8::Isolate data slot number, used in v8pp for shared data
45+
> V8PP_ISOLATE_DATA_SLOT:STRING=0
46+
>
47+
> // v8pp plugin initialization procedure name
48+
> V8PP_PLUGIN_INIT_PROC_NAME:STRING=v8pp_module_init
49+
>
50+
> // v8pp plugin filename suffix
51+
> V8PP_PLUGIN_SUFFIX:STRING=.dylib
52+
>
53+
> // Use new V8 ABI with V8_COMPRESS_POINTERS and V8_31BIT_SMIS_ON_64BIT_ARCH
54+
> V8_COMPRESS_POINTERS:BOOL=ON
55+
56+
1457
## Binding example
1558

1659
v8pp supports V8 versions after 6.3 with `v8::Isolate` usage in API. There are 2 targets for binding:

0 commit comments

Comments
 (0)