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
Copy file name to clipboardExpand all lines: doc/basics.md
+29-8Lines changed: 29 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -46,28 +46,49 @@ c++ myproject.cpp simdjson.cpp
46
46
```
47
47
48
48
Note:
49
-
- Users on macOS and other platforms were default compilers do not provide C++11 compliant by default should request it with the appropriate flag (e.g., `c++ myproject.cpp simdjson.cpp`).
49
+
- Users on macOS and other platforms were default compilers do not provide C++11 compliant by default should request it with the appropriate flag (e.g., `c++ -std=c++17 myproject.cpp simdjson.cpp`).
50
50
- Visual Studio users should compile with the `_CRT_SECURE_NO_WARNINGS` flag to avoid warnings with respect to our use of standard C functions such as `fopen`.
51
51
52
+
53
+
Using simdjson with package managers
54
+
------------------
55
+
56
+
You can install the simdjson library on your system or in your project using multiple package managers such as MSYS2, the conan package manager, vcpkg, brew, the apt package manager (debian-based Linux systems), the FreeBSD package manager (FreeBSD), and so on. [Visit our wiki for more details](https://github.com/simdjson/simdjson/wiki/Installing-simdjson-with-a-package-manager).
57
+
52
58
Using simdjson as a CMake dependency
53
59
------------------
54
60
55
-
You can include the simdjson repository as a folder in your CMake project. In the parent
56
-
`CMakeLists.txt`, include the following lines:
61
+
You can include the simdjson as a CMake dependency by including the following lines in your `CMakeLists.txt`:
set(SIMDJSON_JUST_LIBRARY ON CACHE STRING "Build just the library, nothing else." FORCE)
60
-
add_subdirectory(simdjson EXCLUDE_FROM_ALL)
61
-
```
77
+
78
+
You should replace `GIT_TAG v0.4.7` by the version you need (e.g., `GIT_TAG v0.5.0`). If you omit `GIT_TAG v0.5.0`, you will work from the main branch of simdjson: we recommend that if you are working on production code,
62
79
63
80
Elsewhere in your project, you can declare dependencies on simdjson with lines such as these:
64
81
65
-
```
82
+
```cmake
66
83
add_executable(myprogram myprogram.cpp)
67
84
target_link_libraries(myprogram simdjson)
68
85
```
69
86
70
-
See [our CMake demonstration](https://github.com/simdjson/cmakedemo).
87
+
We recommend CMake version 3.15 or better.
88
+
89
+
See [our CMake demonstration](https://github.com/simdjson/cmake_demo_single_file). It works under Linux, FreeBSD, macOS and Windows (including Visual Studio).
90
+
91
+
71
92
72
93
The CMake build in simdjson can be taylored with a few variables. You can see the available variables and their default values by entering the `cmake -LA` command.
Copy file name to clipboardExpand all lines: doc/basics_doxygen.md
+28-6Lines changed: 28 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -28,28 +28,50 @@ c++ myproject.cpp simdjson.cpp
28
28
```
29
29
30
30
Note:
31
-
- Users on macOS and other platforms were default compilers do not provide C++11 compliant by default should request it with the appropriate flag (e.g., `c++ myproject.cpp simdjson.cpp`).
31
+
- Users on macOS and other platforms were default compilers do not provide C++11 compliant by default should request it with the appropriate flag (e.g., `c++ -std=c++17 myproject.cpp simdjson.cpp`).
32
32
- Visual Studio users should compile with the `_CRT_SECURE_NO_WARNINGS` flag to avoid warnings with respect to our use of standard C functions such as `fopen`.
33
33
34
+
Using simdjson with package managers
35
+
------------------
36
+
37
+
You can install the simdjson library on your system or in your project using multiple package managers such as MSYS2, the conan package manager, vcpkg, brew, the apt package manager (debian-based Linux systems), the FreeBSD package manager (FreeBSD), and so on. [Visit our wiki for more details](https://github.com/simdjson/simdjson/wiki/Installing-simdjson-with-a-package-manager).
38
+
34
39
Using simdjson as a CMake dependency
35
40
------------------
36
41
37
-
You can include the simdjson repository as a folder in your CMake project. In the parent
38
-
`CMakeLists.txt`, include the following lines:
42
+
You can include the simdjson as a CMake dependency by including the following lines in your `CMakeLists.txt`:
39
43
40
44
```
41
-
set(SIMDJSON_JUST_LIBRARY ON CACHE STRING "Build just the library, nothing else." FORCE)
You should replace `GIT_TAG v0.4.7` by the version you need (e.g., `GIT_TAG v0.5.0`). If you omit `GIT_TAG v0.5.0`, you will work from the main branch of simdjson: we recommend that if you are working on production code,
60
+
45
61
Elsewhere in your project, you can declare dependencies on simdjson with lines such as these:
46
62
47
63
```
48
64
add_executable(myprogram myprogram.cpp)
49
65
target_link_libraries(myprogram simdjson)
50
66
```
51
67
52
-
See [our CMake demonstration](https://github.com/simdjson/cmakedemo).
68
+
We recommend CMake version 3.15 or better.
69
+
70
+
See [our CMake demonstration](https://github.com/simdjson/cmake_demo_single_file). It works under Linux, FreeBSD, macOS and Windows (including Visual Studio).
71
+
72
+
The CMake build in simdjson can be taylored with a few variables. You can see the available variables and their default values by entering the `cmake -LA` command.
0 commit comments