1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-29 08:21:15 +03:00
Files
mariadb-columnstore-engine/cmake/thrift.cmake
Gagan Goel fd045e2fdf Merge branch columnstore-23.02.1-1 into develop-23.02 (#2778)
* cmake fixes:

* set build byproducts (otherwise ninja cannot build)
* exclude thrift from "all" target, it should only be buit as a dependency
  (otherwise it builds - and pulls in boost - when columnstore is disabled)
* move test-only external project into tests/ (because it requires git)
  and into storage/columnstore (where thrift and boost already are)

* Update drone to use 10.6-enterprise server branch. (#2763)

---------

Co-authored-by: Sergei Golubchik <serg@mariadb.com>
2023-03-17 13:23:22 +03:00

32 lines
1.1 KiB
CMake

include(ExternalProject)
set(INSTALL_LOCATION ${CMAKE_CURRENT_BINARY_DIR}/external/thrift)
SET(THRIFT_INCLUDE_DIRS "${INSTALL_LOCATION}/include")
SET(THRIFT_LIBRARY_DIRS "${INSTALL_LOCATION}/lib")
set(THRIFT_LIBRARY ${THRIFT_LIBRARY_DIRS}/${CMAKE_STATIC_LIBRARY_PREFIX}thrift${CMAKE_STATIC_LIBRARY_SUFFIX})
ExternalProject_Add(external_thrift
URL https://github.com/apache/thrift/archive/refs/tags/v0.17.0.tar.gz
URL_HASH SHA256=f5888bcd3b8de40c2c2ab86896867ad9b18510deb412cba3e5da76fb4c604c29
PREFIX ${INSTALL_LOCATION}
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=${INSTALL_LOCATION}
-DBUILD_COMPILER=YES
-DBUILD_CPP=YES
-DBUILD_C_GLIB=YES
-DBUILD_JAVA=NO
-DBUILD_JAVASCRIPT=NO
-DBUILD_KOTLIN=NO
-DBUILD_NODEJS=NO
-DBUILD_PYTHON=NO
-DBUILD_TESTING=NO
-DBUILD_SHARED_LIBS=NO
-DCMAKE_CXX_FLAGS:STRING="-fPIC"
-DBOOST_INCLUDEDIR=${Boost_INCLUDE_DIRS}
-DBOOST_LIBRARYDIR=${Boost_LIBRARY_DIRS}
BUILD_BYPRODUCTS "${THRIFT_LIBRARY_DIRS}/${CMAKE_STATIC_LIBRARY_PREFIX}thrift${CMAKE_STATIC_LIBRARY_SUFFIX}"
EXCLUDE_FROM_ALL TRUE
)
add_dependencies(external_thrift external_boost)