blob: d76a96edbf20883a30169ff7f9bc37872261c2e2 [file] [log] [blame] [view]
Pascal Bachd5f87e12014-12-12 15:59:17 +01001# Apache Thrift - CMake build
2
3## Goal
4Extend Apache Thrift's *make cross* approach to the build system.
5
6Due to growing the field of operating system support, a proper executable
7and library detection mechanism running on as much platforms as possible
8becomes required. The other aspect to simplify the release process and
9package generation process.
10
11As nice side benefit of CMake is the generation of development environment
12specific soultion files. => No solution files within source tree.
13
14
15## Usage
16just do this:
17
18 mkdir build
19 cmake ${THRIFT_SRC}
20
21if you use a specific toolchain pass it to cmake, the same for options:
22
23 cmake -DCMAKE_TOOLCHAIN_FILE=${THRIFT_SRC}/contrib/mingw32-toolchain.cmake ${THRIFT_SRC}
Roger Meier26593812015-04-12 16:10:35 +020024 cmake -DCMAKE_C_COMPILER=clang-3.5 -DCMAKE_CXX_COMPILER=clang++-3.5 ${THRIFT_SRC}
Pascal Bachd5f87e12014-12-12 15:59:17 +010025 cmake -DTHRIFT_COMPILER_HS=OFF ${THRIFT_SRC}
26 cmake -DWITH_ZLIB=ON ${THRIFT_SRC}
27
28and open the development environment you like with the solution or do this:
29
30 make
31 make check
32 make cross
33 make dist
34
35to generate an installer and distribution package do this:
36
37 cpack
38
39## TODO
40* git hash or tag based versioning depending on source state
41* build tutorial
42* build test
43* with/without language lib/<lang>/
44* enable/disable
Pascal Bachd5f87e12014-12-12 15:59:17 +010045* make cross
46* make dist (create an alias to make package_source)
47* make doc
48* cpack (C++ and make dist only ?)
49 * thrift-compiler
50 * libthrift
51 * tutorial
52 * test
53* merge into /README.md
54