thrift/build/cmake
2021-09-02 08:54:42 +02:00
..
android-toolchain.cmake THRIFT-3424 Add CMake android build option 2015-11-23 16:59:10 +09:00
BoostMacros.cmake build/cmake/BoostMacros.cmake: Removed 'Boost_NO_BOOST_CMAKE' and minor cleanup 2021-08-13 10:14:01 +02:00
BuildType.cmake THRIFT-4163: update cmake build type handling 2019-01-21 16:14:25 -05:00
config.h.in Use the cmake-generated thrift config also on MSVC 2021-08-30 11:41:54 +02:00
ConfigureChecks.cmake Use the cmake-generated thrift config also on MSVC 2021-08-30 11:41:54 +02: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-5109 Misc Cmake build improvements 2020-02-23 15:12:19 +01:00
DefineOptions.cmake build/cmake/DefineOptions.cmake: Minor improvement in logging for 'WITH_MT' 2021-08-13 10:14:01 +02:00
DefinePlatformSpecifc.cmake build/cmake/DefinePlatformSpecifc.cmake: Ensure ClangCl on MSVC is recognized as MSVC (because it does not handle -Wall too well) 2021-01-18 08:16:26 +01:00
FindAnt.cmake THRIFT-3424 Add CMake android build option 2015-11-23 16:59:10 +09:00
FindClangTools.cmake THRIFT-4732:refine cmake scripts (#1688) 2019-02-07 09:27:33 -05: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 Added support for thriftz to ThriftConfig.cmake.in 2021-02-12 11:10:15 +01:00
ThriftMacros.cmake Use modern OpenSSL cmake syntax (if available), and larger cmake cleanup 2021-09-02 08:54:42 +02:00
uninstall.cmake THRIFT-5147: Add uninstall function 2020-05-21 12:49:57 +02: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