thrift/build/cmake
2019-05-04 21:52:29 -04:00
..
android-toolchain.cmake THRIFT-3424 Add CMake android build option 2015-11-23 16:59:10 +09:00
BoostMacros.cmake THRIFT-4861: Set minimum boost to 1.56 and stop using deprecated boost predef endian header 2019-05-04 21:52:29 -04:00
BuildType.cmake THRIFT-4163: update cmake build type handling 2019-01-21 16:14:25 -05:00
config.h.in THRIFT-4730: remove pthread code and refactor, ending up with just ThreadFactory 2019-01-11 09:13:12 -05:00
ConfigureChecks.cmake THRIFT-4618: Use poll() instead of select() in C++ TNonblockingServer if available (#1580) 2018-10-12 07:37:40 -04:00
CPackConfig.cmake THRIFT-3677 Improve CMake Java build 2016-02-27 16:55:55 +09:00
DefineCMakeDefaults.cmake fix c++17 building on windows 2019-01-22 16:28:15 +08:00
DefineInstallationPaths.cmake THRIFT-4811: Add CMake config file and targets. (see #4752) (#1748) 2019-03-15 07:35:18 -04:00
DefineOptions.cmake THRIFT-4384: fix concurrent sync in cpp async client code 2019-02-02 22:10:41 -05:00
DefinePlatformSpecifc.cmake THRIFT-4732:refine cmake scripts (#1688) 2019-02-07 09:27:33 -05:00
FindAnt.cmake THRIFT-3424 Add CMake android build option 2015-11-23 16:59:10 +09:00
FindCabal.cmake THRIFT-3398 Add CMake build for Haskell library and tests 2015-10-29 00:41:52 +09:00
FindClangTools.cmake THRIFT-4732:refine cmake scripts (#1688) 2019-02-07 09:27:33 -05:00
FindGHC.cmake THRIFT-3398 Add CMake build for Haskell library and tests 2015-10-29 00:41:52 +09:00
FindGLIB.cmake THRIFT-2962:Docker Thrift env for development and testing 2015-02-18 23:25:54 -05:00
FindGradle.cmake THRIFT-3424 Add CMake android build option 2015-11-23 16:59:10 +09:00
FindGradlew.cmake THRIFT-(1418|1507|3983|4120|4178|4259|4294): Multiple issues 2018-01-24 12:28:55 -05:00
FindInttypes.cmake THRIFT-3873: fix various compiler warnings and overflow errors 2017-01-20 10:12:06 -05:00
FindLibevent.cmake THRIFT-3873: fix various compiler warnings and overflow errors 2017-01-20 10:12:06 -05:00
GenerateConfigModule.cmake THRIFT-4811: Add CMake config file and targets. (see #4752) (#1748) 2019-03-15 07:35:18 -04:00
mingw32-toolchain.cmake THRIFT-2850 CMake: mingw32-toolchain, set static linker flags 2015-05-17 00:35:52 +02:00
NewPlatformDebug.cmake THRIFT-2221: detect C++11 and use std namespace for memory operations (smart_ptr) 2017-08-10 13:27:21 -04:00
README-MSYS2.md remove boost::thread and boost::mutex code 2019-01-07 08:11:37 -05:00
README.md THRIFT-4732: windows cmake refinements and add windows docker build support 2019-01-11 20:47:00 -05:00
StaticCodeAnalysis.cmake THRIFT-4732:refine cmake scripts (#1688) 2019-02-07 09:27:33 -05:00
ThriftConfig.cmake.in THRIFT-4811: Add CMake config file and targets. (see #4752) (#1748) 2019-03-15 07:35:18 -04:00
ThriftMacros.cmake THRIFT-4811: Add CMake config file and targets. (see #4752) (#1748) 2019-03-15 07:35:18 -04:00

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

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