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: docs/build_and_install.md
+74-27Lines changed: 74 additions & 27 deletions
Original file line number
Diff line number
Diff line change
@@ -4,79 +4,126 @@ title: Build and Install
4
4
nav_order: 4
5
5
---
6
6
7
+
# Build and install
8
+
{: .no_toc }
9
+
10
+
## Table of contents
11
+
{: .no_toc .text-delta }
12
+
13
+
1. TOC
14
+
{:toc}
7
15
8
-
# Supported compilers
9
-
Compilation of Jinja2Cpp tested on the following compilers (with C++14 enabled feature):
16
+
##Supported compilers
17
+
Compilation of Jinja2C++ tested on the following compilers (with C++14 enabled feature):
10
18
- Linux gcc 5.0
11
19
- Linux gcc 6.0
12
20
- Linux gcc 7.0
13
21
- Linux clang 5.0
14
22
- Microsoft Visual Studio 2015 x86, x64
15
23
- Microsoft Visual Studio 2017 x86, x64
16
24
17
-
# Build and install
18
-
Jinja2Cpp has five external dependencies: boost library (at least version 1.55) and several header-only dependecies from nonstd project(expected-lite, variant-lite, value-ptr-lite, optional-lite). Because of types from boost are used inside library, you should compile both your projects and Jinja2Cpp library with similar compiler settings. Otherwise ABI could be broken.
The sample command is: `conan remote add martin https://api.bintray.com/conan/martinmoene/nonstd-lite`
72
+
3. Add reference to Jinja2Cpp package (`jinja2cpp/0.9.1@Manu343726/testing`) to your conanfile.txt, conanfile.py or CMakeLists.txt. For instance, with usage of `conan-cmake` integration it could be written this way:
73
+
```cmake
74
+
include (../../cmake/conan.cmake)
75
+
if (NOT MSVC)
76
+
set (CONAN_SETTINGS SETTINGS compiler.libcxx=libstdc++11)
-**JINJA2CPP_BUILD_SHARED** (default OFF) - Specify Jinja2Cpp library library link type.
106
+
-**MSVC_RUNTIME_TYPE** (default /MD) - MSVC runtime type to link with (if you use Microsoft Visual Studio compiler).
107
+
-**JINJA2CPP_DEPS_MODE** (default "internal") - modes for dependencies handling. Following values possible:
108
+
-`internal` In this mode Jinja2Cpp build script uses dependencies (include `boost`) shipped as subprojects. Nothing needs to be provided externally.
109
+
-`external-boost` In this mode Jinja2Cpp build script uses only `boost` as externally-provided dependency. All other dependencies taken from subprojects.
110
+
-`external` In this mode all dependencies should be provided externally. Paths to `boost`, `nonstd-*` libs etc. should be specified via standard CMake variables (like `CMAKE_PREFIX_PATH` or libname_DIR)
111
+
-`conan-build` Special mode for building Jinja2Cpp via conan recipe.
112
+
113
+
## Dependency management modes
114
+
TODO:
115
+
116
+
## Link with you projects
68
117
Jinja2Cpp is shipped with cmake finder script. So you can:
69
118
70
119
1. Include Jinja2Cpp cmake scripts to the project:
71
120
```cmake
72
121
list (APPEND CMAKE_MODULE_PATH ${JINJA2CPP_INSTALL_DIR}/cmake)
In case of C++17 standard enabled for your project you should define `variant_CONFIG_SELECT_VARIANT=variant_VARIANT_NONSTD` macro in the build settings.
0 commit comments