Commit 11fc6b49 authored by Vladislav Vaintroub's avatar Vladislav Vaintroub

MDEV-5053 - fix cyclic dependency when building with Ninja CMake generator

parent b722aae6
...@@ -15,13 +15,20 @@ MACRO (USE_BUNDLED_JEMALLOC) ...@@ -15,13 +15,20 @@ MACRO (USE_BUNDLED_JEMALLOC)
IF (CMAKE_BUILD_TYPE MATCHES "Debug" AND NOT APPLE) # see the comment in CMakeLists.txt IF (CMAKE_BUILD_TYPE MATCHES "Debug" AND NOT APPLE) # see the comment in CMakeLists.txt
LIST(APPEND JEMALLOC_CONFIGURE_OPTS --enable-debug) LIST(APPEND JEMALLOC_CONFIGURE_OPTS --enable-debug)
ENDIF() ENDIF()
IF(CMAKE_GENERATOR MATCHES "Makefiles")
SET(MAKE_COMMAND ${CMAKE_MAKE_PROGRAM})
ELSE() # Xcode/Ninja generators
SET(MAKE_COMMAND make)
ENDIF()
ExternalProject_Add(jemalloc ExternalProject_Add(jemalloc
PREFIX extra/jemalloc PREFIX extra/jemalloc
SOURCE_DIR ${SOURCE_DIR} SOURCE_DIR ${SOURCE_DIR}
BINARY_DIR ${BINARY_DIR} BINARY_DIR ${BINARY_DIR}
STAMP_DIR ${BINARY_DIR} STAMP_DIR ${BINARY_DIR}
CONFIGURE_COMMAND "${SOURCE_DIR}/configure" ${JEMALLOC_CONFIGURE_OPTS} CONFIGURE_COMMAND "${SOURCE_DIR}/configure" ${JEMALLOC_CONFIGURE_OPTS}
BUILD_COMMAND ${CMAKE_MAKE_PROGRAM} "build_lib_static" BUILD_COMMAND ${MAKE_COMMAND} "build_lib_static"
INSTALL_COMMAND "" INSTALL_COMMAND ""
) )
ADD_LIBRARY(libjemalloc STATIC IMPORTED) ADD_LIBRARY(libjemalloc STATIC IMPORTED)
......
...@@ -25,7 +25,6 @@ ${CMAKE_BINARY_DIR}/sql ...@@ -25,7 +25,6 @@ ${CMAKE_BINARY_DIR}/sql
SET(GEN_SOURCES SET(GEN_SOURCES
${CMAKE_CURRENT_BINARY_DIR}/sql_yacc.h ${CMAKE_CURRENT_BINARY_DIR}/sql_yacc.h
${CMAKE_CURRENT_BINARY_DIR}/sql_yacc.cc ${CMAKE_CURRENT_BINARY_DIR}/sql_yacc.cc
${CMAKE_CURRENT_BINARY_DIR}/sql_builtin.cc
${CMAKE_CURRENT_BINARY_DIR}/lex_hash.h ${CMAKE_CURRENT_BINARY_DIR}/lex_hash.h
) )
...@@ -85,6 +84,7 @@ SET (SQL_SOURCE ...@@ -85,6 +84,7 @@ SET (SQL_SOURCE
gcalc_slicescan.cc gcalc_tools.cc gcalc_slicescan.cc gcalc_tools.cc
threadpool_common.cc threadpool_common.cc
../sql-common/mysql_async.c ../sql-common/mysql_async.c
${CMAKE_CURRENT_BINARY_DIR}/sql_builtin.cc
${GEN_SOURCES} ${GEN_SOURCES}
${MYSYS_LIBWRAP_SOURCE} ${MYSYS_LIBWRAP_SOURCE}
) )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment