Commit 9856021e authored by Yoni Fogel's avatar Yoni Fogel

refs #6566 Improve xz source clone code, cleanup xz subproject

git-svn-id: file:///svn/toku/tokudb@55449 c7de825b-a66e-492c-adef-691d508d4ae1
parent 21f1ac58
...@@ -54,34 +54,25 @@ endif () ...@@ -54,34 +54,25 @@ endif ()
FILE(GLOB XZ_ALL_FILES ${XZ_SOURCE_DIR}/*) FILE(GLOB XZ_ALL_FILES ${XZ_SOURCE_DIR}/*)
if (CMAKE_GENERATOR STREQUAL Ninja) if (CMAKE_GENERATOR STREQUAL Ninja)
## ninja doesn't understand "$(MAKE)" ## ninja doesn't understand "$(MAKE)"
ExternalProject_Add(build_lzma set(SUBMAKE_COMMAND make)
PREFIX xz
DOWNLOAD_COMMAND
cd ${XZ_SOURCE_DIR} && cp -ru "${XZ_ALL_FILES}" "<SOURCE_DIR>/"
CONFIGURE_COMMAND
"<SOURCE_DIR>/configure" ${xz_configure_opts}
"--prefix=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/xz"
BUILD_COMMAND
make -C src/liblzma
INSTALL_COMMAND
make -C src/liblzma install
)
else () else ()
## use "$(MAKE)" for submakes so they can use the jobserver, doesn't ## use "$(MAKE)" for submakes so they can use the jobserver, doesn't
## seem to break Xcode... ## seem to break Xcode...
ExternalProject_Add(build_lzma set(SUBMAKE_COMMAND $(MAKE))
endif ()
ExternalProject_Add(build_lzma
PREFIX xz PREFIX xz
DOWNLOAD_COMMAND DOWNLOAD_COMMAND
cd ${XZ_SOURCE_DIR} && cp -ru "${XZ_ALL_FILES}" "<SOURCE_DIR>/" cp -au "${XZ_ALL_FILES}" "<SOURCE_DIR>/"
CONFIGURE_COMMAND CONFIGURE_COMMAND
"<SOURCE_DIR>/configure" ${xz_configure_opts} "<SOURCE_DIR>/configure" ${xz_configure_opts}
"--prefix=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/xz" "--prefix=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/xz"
BUILD_COMMAND BUILD_COMMAND
$(MAKE) -C src/liblzma ${SUBMAKE_COMMAND} -C src/liblzma
INSTALL_COMMAND INSTALL_COMMAND
$(MAKE) -C src/liblzma install ${SUBMAKE_COMMAND} -C src/liblzma install
) )
endif ()
FILE(GLOB_RECURSE XZ_ALL_FILES_RECURSIVE ${XZ_SOURCE_DIR}/*) FILE(GLOB_RECURSE XZ_ALL_FILES_RECURSIVE ${XZ_SOURCE_DIR}/*)
ExternalProject_Add_Step(build_lzma reclone_src # Names of project and custom step ExternalProject_Add_Step(build_lzma reclone_src # Names of project and custom step
COMMENT "(re)cloning xz source..." # Text printed when step executes COMMENT "(re)cloning xz source..." # Text printed when step executes
......
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