Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-2571

Simplify cross compilation using CMake

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 0.9.2
    • Compiler (General)
    • None

    Description

      Using CMake would simplify cross compilation.

      The for example the same build script can be used to build:

      • Native for Linux using GCC
      • Native for Windows using Visual Studio
      • Cross compile for ARM on Linux
      • Cross compile for Windows form Linux using mingw32

      It also makes it easy to generate project files for Eclipse or Visual Studio.

      Some examples:

      Create an eclipse project
      mkdir build_ec && cd build_ec
      cmake -G "Eclipse CDT4 - Unix Makefiles" ../compiler/cpp
      make
      

      Now open the folder build_ec using eclipse.

      Create a Visual Studio project (Windows only)
      mkdir build_vs && cd build_vs
      cmake -G "Visual Studio 12" ../compiler/cpp
      

      Now open the folder build_vs using Visual Studio.

      Cross compile using mingw32
      mkdir build_mingw32 && cd build_mingw32
      cmake -DCMAKE_TOOLCHAIN_FILE=../contrib/mingw32-toolchain.cmake ../compiler/cpp
      make
      

      Attachments

        Issue Links

          Activity

            People

              henrique Henrique Mendonca
              pascal.bach Pascal Bach
              Votes:
              1 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: