Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
None
-
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
- is superceded by
-
THRIFT-2850 Have the cmake build system run make cross
- Open
- relates to
-
THRIFT-797 Converting to cmake from autotools
- Closed