thrift/build/cmake
James E. King, III 2d6060d882 THRIFT-4046 fix PlatformSocket.h for mingw64/msys2 and provide instructions for building with cmake under that toolchain
Client: cmake
Patch: James E. King, III <jking@apache.org>

This closes #1171
2017-01-31 16:17:53 -05:00
..
android-toolchain.cmake THRIFT-3424 Add CMake android build option 2015-11-23 16:59:10 +09:00
config.h.in THRIFT-3873: fix various compiler warnings and overflow errors 2017-01-20 10:12:06 -05:00
ConfigureChecks.cmake THRIFT-3873: fix various compiler warnings and overflow errors 2017-01-20 10:12:06 -05:00
CPackConfig.cmake THRIFT-3677 Improve CMake Java build 2016-02-27 16:55:55 +09:00
DefineCMakeDefaults.cmake make style applied 2015-05-18 19:47:28 +02:00
DefineInstallationPaths.cmake THRIFT-2962:Docker Thrift env for development and testing 2015-02-18 23:25:54 -05:00
DefineOptions.cmake THRIFT-4033 disable thrift compiler plug-in support by default, as the thrift-compiler packaging is not ready for it yet 2017-01-25 20:41:06 -05:00
DefinePlatformSpecifc.cmake THRIFT-4033 disable thrift compiler plug-in support by default, as the thrift-compiler packaging is not ready for it yet 2017-01-25 20:41:06 -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
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
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
mingw32-toolchain.cmake THRIFT-2850 CMake: mingw32-toolchain, set static linker flags 2015-05-17 00:35:52 +02:00
README-MSYS2.md THRIFT-4046 fix PlatformSocket.h for mingw64/msys2 and provide instructions for building with cmake under that toolchain 2017-01-31 16:17:53 -05:00
README.md THRIFT-3155 move contrib/mingw32-toolchain.cmake to build/cmake/ 2015-05-16 21:09:18 +02:00
ThriftMacros.cmake THRIFT-2835 Add possibility to distribute generators separately from thrift core, and load them dynamically 2016-09-26 01:42:01 +09: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.

Usage

just do this:

mkdir cmake-build && cd cmake-build
cmake ..

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 ..

or on Windows

cmake -G "Visual Studio 12 2013 Win64" \
-DBOOST_ROOT=C:/3rdparty/boost_1_58_0 \
-DZLIB_ROOT=C:/3rdparty/zlib128-dll \
-DWITH_SHARED_LIB=off -DWITH_BOOSTTHREADS=ON ..

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

make
make check
make cross
make dist

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
  • with/without language lib//
  • 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