summaryrefslogtreecommitdiffstats
path: root/src/jaegertracing/thrift/build/cmake/README.md
blob: a0eb859bd24db952aa68d98ae977b3e4db010549 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# Apache Thrift - CMake Build

## Goal

Extend Apache Thrift's *make cross* approach to the build system.

Due to growing the field of operating system support, a proper executable
and library detection mechanism running on as much platforms as possible
becomes required. The other aspect to simplify the release process and
package generation process.

As nice side benefit of CMake is the generation of development environment
specific soultion files. => No solution files within source tree.

## Prerequisites

These are language-specific, however for C++ you must provide:

- Boost
- OpenSSL

You may optionally provide:

- libevent
- zlib

## Usage

To use CMake you first create an out-of-tree build directory, then use
CMake to generate a build framework, then build:

    mkdir /tmp/build
    cd /tmp/build
    cmake /location/to/thrift

if you use a specific toolchain pass it to cmake, the same for options:

    cmake -DCMAKE_TOOLCHAIN_FILE=../build/cmake/mingw32-toolchain.cmake ..
    cmake -DCMAKE_C_COMPILER=clang-3.5 -DCMAKE_CXX_COMPILER=clang++-3.5 ..
    cmake -DTHRIFT_COMPILER_HS=OFF ..
    cmake -DWITH_ZLIB=ON ..

and open the development environment you like with the solution or do this:

    make
    make check
    make cross
    make dist

or on Windows, the following will produce a solution file you can use
inside Visual Studio:

    cmake -G "Visual Studio 15 2017 Win64" \
      -DBOOST_ROOT=C:/3rdparty/boost_1_69_0 \
      -DBOOST_LIBRARYDIR=C:/3rdparty/boost_1_69_0/lib64-msvc-14.1^
      -DZLIB_ROOT=C:/3rdparty/zlib-1.2.11

<!--
To generate an installer and distribution package do this:

    cpack
-->

## TODO

* git hash or tag based versioning depending on source state
* build tutorial
* build test
* enable/disable
* make cross
* make dist (create an alias to make package_source)
* make doc
* cpack (C++ and make dist only ?)
  * thrift-compiler
  * libthrift
  * tutorial
  * test
* merge into /README.md