| Apache Ignite C++ Build Instructions |
| ==================================== |
| Here you can find instruction on how to build Apache Ignite C++ core library and |
| stand-alone node binary. To build examples you need to build and install core Apache |
| Ignite library then refer to $IGNITE_HOME/platforms/cpp/example/README.txt for |
| further instructions. |
| |
| For details on ODBC driver installation and usage please refer to |
| $IGNITE_HOME/platforms/cpp/odbc/README.txt. |
| |
| Building on Linux and Mac OS X with CMake (Windows currently not yet supported) |
| ---------------------------------- |
| |
| Common Requirements: |
| |
| * GCC, g++, CMake >= 3.6 must be installed |
| * Java Development Kit (JDK) must be installed: https://java.com/en/download/index.jsp |
| * JAVA_HOME environment variable must be set pointing to Java installation directory. |
| * IGNITE_HOME environment variable must be set to Ignite installation directory. |
| |
| By default building tests, ODBC and thin-client are disabled. |
| * OpenSSL, 1.0 or later required for building ODBC and thin-client. |
| * UnixODBX required for building ODBC. |
| * For building tests, boost framework is required. The following boost libraries are used: |
| * boost_unit_test_framework |
| * boost_thread |
| * boost_system |
| * boost_chrono |
| * boost-regex |
| |
| On Mac OS X all dependencies can be installed using Homebrew. |
| |
| Building and installing the Apache Ignite C++ components: |
| * Navigate to the directory $IGNITE_HOME/platforms/cpp |
| * Execute the following commands one by one to build the project: |
| * mkdir cmake-build-[release|debug] |
| * cd ./cmake-build-[release|debug] |
| * cmake -DCMAKE_BUILD_TYPE=[Release|Debug] [-DCMAKE_INSTALL_PREFIX=<install_dir>] .. |
| * make |
| * make install |
| |
| * For building ODBC add to cmake option -DWITH_ODBC=ON |
| * For building thin client add to cmake option -DWITH_THIN_CLIENT=ON |
| * For building with tests add to cmake option -DWITH_TESTS=ON |
| |
| Running test: |
| * For core tests: ctest -V -R IgniteCoreTest |
| * For thin-client tests: ctest -V -R IgniteThinClientTest |
| * For ODBC tests: ctest -V -R IgniteOdbcTest |
| * For all tests: ctest -V |
| |
| WARNING! |
| * For running ODBC tests, ODBC driver must be installed in driver manager. See odbc/README.txt for details. |
| * On Mac OS X Homebrew doesn't create symlinks for OpenSSL, so they should be created or as alternative |
| OPEN_SSL_HOME should be set before running ODBC or thin-client tests. |
| |
| Building on Windows with Visual Studio (tm) |
| ---------------------------------- |
| |
| Common Requirements: |
| |
| * Microsoft Visual Studio (tm) 2010 or later |
| * Windows SDK 7.1 |
| * Java Development Kit (JDK) must be installed: https://java.com/en/download/index.jsp |
| * JAVA_HOME environment variable must be set pointing to Java installation directory. |
| * IGNITE_HOME environment variable must be set to Ignite installation directory. |
| |
| Building binaries: |
| |
| * Open and build %IGNITE_HOME%\platforms\cpp\project\vs\ignite.sln (or ignite_86.sln if |
| you are running 32-bit platform). |
| * If you want to build ODBC driver then you should explicitly build it as it is disabled |
| in the solution file by default. In IDE it can be done by clicking on the ODBC project |
| with the right mouse button and choosing "Build" option. |
| |
| Building tests: |
| |
| You may either download boost with pre-built libraries or download source code and build |
| it by yourself. The details can be found by the following web link: |
| https://www.boost.org/doc/libs/1_68_0/more/getting_started/windows.html |
| |
| It is also required to set following enviroment variables for Visual Studio solution to |
| be able to locate boost libraries: |
| * BOOST_HOME - path to the directory that contains "boost" directory with header files. |
| * BOOST_LIB64_PATH - path to the directory that contains 64-bit libraries. Only requred |
| to build 64-bit Ignite libraries. |
| * BOOST_LIB32_PATH - path to the directory that contains 32-bit libraries. Only requred |
| to build 32-bit Ignite libraries. |
| * BOOST_LIB_SUFIX_D32 - sufix for debug 32-bit boost liraries. For example for library |
| 'libboost_chrono-vc100-mt-gd-x32-1_68.lib' the sufix is 'vc100-mt-gd-x32-1_68'. |
| * BOOST_LIB_SUFIX_R32 - sufix for release 32-bit boost liraries. For example for library |
| 'libboost_system-vc141-mt-x32-1_68.lib' the sufix is 'vc141-mt-x32-1_68'. |
| * BOOST_LIB_SUFIX_D64 - sufix for debug 64-bit boost liraries. For example for library |
| 'libboost_unit_test_framework-vc140-mt-gd-x64-1_68.lib' the sufix is |
| 'vc140-mt-gd-x64-1_68'. |
| * BOOST_LIB_SUFIX_R64 - sufix for release 64-bit boost liraries. For example for library |
| 'libboost_thread-vc100-mt-1_58.lib' the sufix is 'vc100-mt-1_58'. |
| |
| Building installers: |
| |
| * Install WiX Toolset if you do not have it yet. |
| * Add WiX Toolset "bin" directory to your PATH environmental variable. |
| * Build ODBC drivers: Release|x64 for 64-bit version and Release|Win32 for 32-bit version. |
| * Open terminal and navigate to the directory $IGNITE_HOME/platforms/cpp/odbc/install |
| * Execute the following commands one by one to build 32-bit driver: |
| * candle.exe ignite-odbc-x86.wxs |
| * light.exe -ext WixUIExtension ignite-odbc-x86.wixobj |
| * Execute the following commands one by one to build 64-bit driver: |
| * candle.exe ignite-odbc-amd64.wxs |
| * light.exe -ext WixUIExtension ignite-odbc-amd64.wixobj |
| |
| Building in later versions of Visual Studio: |
| |
| * Open project\vs\ignite.sln or project\vs\ignite_86.sln in Visual Studio |
| * You will be prompted to "Update VC++ Compiler and Libraries", click "Update" |
| * Build the solution. |
| |
| Building with QT Creator (tm): |
| -------------------------- |
| * File -> Open file or project -> and choose from ($IGNITE_HOME/modules/platforms) CMakeLists.txt |
| * If you have no $JAVA_HOME env variable, you need to append it. |
| * Additionally for odbc-test or thin-client-test you need to append IGNITE_NATIVE_TEST_CPP_THIN_CONFIG_PATH and set it |
| $IGNITE_HOME/modules/platforms/cpp/thin-client-test/config for thin-client-test and $IGNITE_HOME/modules/platforms/cpp/odbc-test/config for odbc-test |
| * Command line arguments for tests running need to have this additional lines : --catch_system_errors=no --log_level=all |