2013-05-30 23:46:02 -05:00
|
|
|
|
|
|
|
# Download and patch boost headers to a particular version.
|
|
|
|
# Assumes include( ExternalProject ) was done inline previous to this file.
|
|
|
|
|
|
|
|
set( BOOST_RELEASE 1.53.0 )
|
|
|
|
set( BOOST_MD5 a00d22605d5dbcfb4c9936a9b35bc4c2 ) # re-calc this on every RELEASE change
|
2013-05-31 16:22:34 -05:00
|
|
|
|
|
|
|
string( REGEX REPLACE "\\." "_" BOOST_VERS "${BOOST_RELEASE}" )
|
2013-05-30 23:46:02 -05:00
|
|
|
set( PREFIX ${DOWNLOAD_DIR}/boost_${BOOST_VERS} )
|
|
|
|
|
|
|
|
|
2013-05-31 16:22:34 -05:00
|
|
|
ExternalProject_Add( boost
|
2013-05-30 23:46:02 -05:00
|
|
|
PREFIX ${PREFIX}
|
|
|
|
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
2013-05-31 16:22:34 -05:00
|
|
|
URL http://downloads.sourceforge.net/project/boost/boost/${BOOST_RELEASE}/boost_${BOOST_VERS}.tar.bz2
|
|
|
|
URL_MD5 ${BOOST_MD5}
|
2013-05-30 23:46:02 -05:00
|
|
|
|
|
|
|
# The patch command executes with the working directory set to <SOURCE_DIR>
|
2013-05-31 16:22:34 -05:00
|
|
|
PATCH_COMMAND bzr patch -p0 ${PROJECT_SOURCE_DIR}/patches/boost.patch
|
2013-05-30 23:46:02 -05:00
|
|
|
|
|
|
|
CONFIGURE_COMMAND ""
|
|
|
|
|
|
|
|
# remove then re-copy into the include/boost directory during next two steps:
|
2013-05-31 16:22:34 -05:00
|
|
|
BUILD_COMMAND ${CMAKE_COMMAND} -E remove_directory ${PROJECT_SOURCE_DIR}/include/boost
|
2013-05-30 23:46:02 -05:00
|
|
|
INSTALL_COMMAND ${CMAKE_COMMAND} -E copy_directory <SOURCE_DIR>/boost ${PROJECT_SOURCE_DIR}/include/boost
|
|
|
|
)
|
|
|
|
|
|
|
|
|
2013-05-31 16:22:34 -05:00
|
|
|
# <SOURCE_DIR> = ${PREFIX}/src/boost
|
2013-05-30 23:46:02 -05:00
|
|
|
# Add extra steps, so that we can easily regenerate any boost patch needed for the above.
|
|
|
|
# There is a Bazaar 'boost scratch repo' in <SOURCE_DIR> and after committing pristine
|
|
|
|
# download, the patch is applied. This lets you regenerate a new patch at any time
|
2013-05-31 16:22:34 -05:00
|
|
|
# easily, simply by editing the working tree in <SOURCE_DIR> and doing "bzr diff" in there.
|
2013-05-30 23:46:02 -05:00
|
|
|
|
|
|
|
|
|
|
|
ExternalProject_Add_Step( boost bzr_commit_boost
|
|
|
|
COMMAND bzr ci -q -m pristine <SOURCE_DIR>
|
2013-05-31 16:22:34 -05:00
|
|
|
COMMENT "committing pristine boost files to 'boost scratch repo'"
|
2013-05-30 23:46:02 -05:00
|
|
|
DEPENDERS patch
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
ExternalProject_Add_Step( boost bzr_add_boost
|
|
|
|
COMMAND bzr add -q <SOURCE_DIR>
|
2013-05-31 16:22:34 -05:00
|
|
|
COMMENT "adding pristine boost files to 'boost scratch repo'"
|
2013-05-30 23:46:02 -05:00
|
|
|
DEPENDERS bzr_commit_boost
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
ExternalProject_Add_Step( boost bzr_init_boost
|
|
|
|
COMMAND bzr init -q <SOURCE_DIR>
|
|
|
|
COMMENT "creating 'boost scratch repo' specifically for boost to track boost patches"
|
2013-05-31 16:22:34 -05:00
|
|
|
DEPENDERS bzr_add_boost
|
2013-05-30 23:46:02 -05:00
|
|
|
DEPENDEES download
|
|
|
|
)
|