Commit c82ed463 authored by Yoni Fogel's avatar Yoni Fogel

refs #6566 Compiling/configuring no longer changes XZ source files (it changes a copy)

This prevents unnecessarily modified files in svn/git

git-svn-id: file:///svn/toku/tokudb@55400 c7de825b-a66e-492c-adef-691d508d4ae1
parent 5bc582e8
...@@ -51,13 +51,15 @@ if (NOT EXISTS "${XZ_SOURCE_DIR}/configure") ...@@ -51,13 +51,15 @@ if (NOT EXISTS "${XZ_SOURCE_DIR}/configure")
message(FATAL_ERROR "Can't find the xz sources. Please check them out to ${XZ_SOURCE_DIR} or modify TOKU_SVNROOT (${TOKU_SVNROOT}) or XZ_SOURCE_DIR.") message(FATAL_ERROR "Can't find the xz sources. Please check them out to ${XZ_SOURCE_DIR} or modify TOKU_SVNROOT (${TOKU_SVNROOT}) or XZ_SOURCE_DIR.")
endif () endif ()
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 ExternalProject_Add(build_lzma
PREFIX xz PREFIX xz
SOURCE_DIR "${XZ_SOURCE_DIR}" DOWNLOAD_COMMAND
cd ${XZ_SOURCE_DIR} && cp -ru "${XZ_ALL_FILES}" "<SOURCE_DIR>/"
CONFIGURE_COMMAND CONFIGURE_COMMAND
"${XZ_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 make -C src/liblzma
...@@ -69,9 +71,10 @@ else () ...@@ -69,9 +71,10 @@ else ()
## seem to break Xcode... ## seem to break Xcode...
ExternalProject_Add(build_lzma ExternalProject_Add(build_lzma
PREFIX xz PREFIX xz
SOURCE_DIR "${XZ_SOURCE_DIR}" DOWNLOAD_COMMAND
cd ${XZ_SOURCE_DIR} && cp -ru "${XZ_ALL_FILES}" "<SOURCE_DIR>/"
CONFIGURE_COMMAND CONFIGURE_COMMAND
"${XZ_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 $(MAKE) -C src/liblzma
...@@ -79,6 +82,12 @@ else () ...@@ -79,6 +82,12 @@ else ()
$(MAKE) -C src/liblzma install $(MAKE) -C src/liblzma install
) )
endif () endif ()
FILE(GLOB_RECURSE XZ_ALL_FILES_RECURSIVE ${XZ_SOURCE_DIR}/*)
ExternalProject_Add_Step(build_lzma reclone_src # Names of project and custom step
COMMENT "(re)cloning xz source..." # Text printed when step executes
DEPENDERS download configure # Steps that depend on this step
DEPENDS ${XZ_ALL_FILES_RECURSIVE} # Files on which this step depends
)
set_source_files_properties( set_source_files_properties(
"${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/xz/include/lzma.h" "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/xz/include/lzma.h"
......
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